It seems that if I open a RA window with WA_Left, WA_Top, WA_Width, WA_Height flags (which I have saved in prefs) it's all fine. But if I move the window, then close it using RA_CloseWindow() (not destroying the object!) and then open it again with RA_OpenWindow it will have forgotten the new window position it was closed at, and again open at the original position first given when it was created.
Now, however, if I not only move the window but I also resize it, THEN it remembers both the new size and position if I close and open it. I'd say that's a bug. It should always remember as long as I don't destroy the object of course.
Software developer for Amiga OS3 and OS4. Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Do you have a simple example that displays this "bug". It will save me creating one...
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk
Using my AOrgansier app as a test case (it uses reaction windows and can be iconified) I find that the windows position is remebered after iconification.
Ofcouse WM_ICONIFY is lsightly different to closeing.
The event editing subwindow is closed and reopened though and again this seems to remember the window positions with out any resize.
I don't think I'm setting the position of the initial window though, if you don;t set WA_Left etc does it still forget window position after close and reopen for you?
Thanks for that insightfull contribution to the discussion.
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk
No, sorry. Don't have a simple case. But I just tested without setting WA_Left/Width/etc when I create the window and I get the same behaviour - it only remembers after I resize, not just a move.
Software developer for Amiga OS3 and OS4. Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Try it with Notepad or any other system app - it works with them.
I seem to remember that I had to write down the current size and position of my window when it was iconified, then restore those values after un-iconification. Perhaps if you showed us your Window Tags, we could suggest a fix.
I also seem to remember having to manually pick and reset these values when closing/iconifying RA windows but then I would not expect it is ever remember anything.
I'll give you the tags when I get home. Btw. the behaviour is the same using either IDoMethod(winobj, WM_ICONIFY) or RA_CloseWindow(winobj) and the RA_OpenWindow(winobj).
Software developer for Amiga OS3 and OS4. Develops for OnyxSoft and the Amiga using E and C and occasionally C++
There's another problem with the resize somebody notified me with Wet.
If you resize horizontally, iconify and then un-iconify, it comes back (correctly) in the size it was before iconification - however it is impossible to resize the width back to the size it was originally (it will only go larger, not smaller).
The gadgets across are buttons or string gadgets and cycle gadgets, so something isn't specifying minimum size properly.
the behaviour is the same using either IDoMethod(winobj, WM_ICONIFY) or RA_CloseWindow(winobj)
RA_CloseWindow() is just a macro for IDoMethod(winobj, WM_ICONIFY), that's why they behave in the same way. The macro is defined in the ReAction includes.
trixie wrote: RA_CloseWindow() is just a macro for IDoMethod(winobj, WM_ICONIFY), that's why they behave in the same way. The macro is defined in the ReAction includes.
Are you sure?? RA_CloseWindow() doesn't put an icon on WB but WM_ICONIFY does. Also, WM_ICONIFY doesn't work at all unless WINDOW_AppPort or something is given. But RA_CloseWindow() always work.
Software developer for Amiga OS3 and OS4. Develops for OnyxSoft and the Amiga using E and C and occasionally C++
Are you sure?? RA_CloseWindow() doesn't put an icon on WB but WM_ICONIFY does. Also, WM_ICONIFY doesn't work at all unless WINDOW_AppPort or something is given. But RA_CloseWindow() always work.
No, sorry, I was wrong. Mixed up WM_ICONIFY and WM_CLOSE.
Looking at the source for window.class, it appears that someone has been a bit lazy, and remembering the current window size/position was never really supported. I've made some changes to that in order to try an recreate the original size/position as faithfully as possible. Hopefully I have even restored the original zoom as well, but I really need a test case that I can test this with.
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk
I have apparently forgotten about this, but Annotate beta should give you a testcase if you open menu->Tools->Ed Exchange. This is where I found the problem.
So, what I would expect it to do, is to remember size and pos after I close it and open it again. I do not expect (nor want) it to revert to the size/pos given at creation time. Those are only default values.
Now let's hope I didn't make a workaround before I released the beta ;)
Software developer for Amiga OS3 and OS4. Develops for OnyxSoft and the Amiga using E and C and occasionally C++
I fail to see the similarities of an application and an example.
Ideally I would require a small example that will reproduce the problem, and include its source code. That way I can see if it really is a problem with window.class, or the way in which the application programmer is approaching the problem.
Downloading an entire application, with no source code, really doesn't help here.
Simon
Comments made in any post are personal opinion, and are in no-way representative of any commercial entity unless specifically stated as such. ---- http://codebench.co.uk