|
ReAction window not remembering its position. |
Posted on: 2011/6/19 15:48
#1 |
---|---|---|
Not too shy to talk
![]() ![]() Joined:
2008/5/2 12:14 From Sweden
Posts: 419
|
I think I just found a bug in ReAction. OS4.1.2
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++ ![]() |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/19 16:28
#2 |
---|---|---|
Supreme Council
![]() ![]() Joined:
2006/11/19 18:16 From London, England
Posts: 1219
|
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 |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/19 21:00
#3 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2006/12/4 23:15 Posts: 1482
|
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? |
|
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/19 21:05
#4 |
---|---|---|
Quite a regular
![]() ![]() Joined:
2006/11/27 14:24 From Scarfskerry
Posts: 548
|
Use MUI
![]() |
|
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/19 21:47
#5 |
---|---|---|
Supreme Council
![]() ![]() Joined:
2006/11/19 18:16 From London, England
Posts: 1219
|
@BillE
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 |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/21 19:36
#6 |
---|---|---|
Not too shy to talk
![]() ![]() Joined:
2008/5/2 12:14 From Sweden
Posts: 419
|
@Rigo
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++ ![]() |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/22 11:18
#7 |
---|---|---|
Quite a regular
![]() ![]() Joined:
2006/12/2 0:35 From Sydney
Posts: 629
|
@Deniil
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. |
|
_________________
cheers tony |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/22 14:02
#8 |
---|---|---|
Not too shy to talk
![]() ![]() Joined:
2008/5/2 12:14 From Sweden
Posts: 419
|
@tonyw
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++ ![]() |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/22 16:54
#9 |
---|---|---|
Amigans Defender
![]() ![]() Joined:
2006/11/17 22:40 From England
Posts: 2862
|
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. |
|
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/23 5:33
#10 |
---|---|---|
Quite a regular
![]() ![]() Joined:
2009/5/1 17:57 From Czech Republic
Posts: 831
|
@Deniil
Quote:
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. |
|
_________________
- Do you suffer from long-term memory loss? - I can't remember. |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/23 8:11
#11 |
---|---|---|
Not too shy to talk
![]() ![]() Joined:
2008/5/2 12:14 From Sweden
Posts: 419
|
Quote:
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++ ![]() |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/23 8:42
#12 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2006/12/4 23:15 Posts: 1482
|
@Trixie
You're nearly right
#define RA_CloseWindow(win)
|
|
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/23 9:28
#13 |
---|---|---|
Just can't stay away
![]() ![]() Joined:
2006/12/4 23:15 Posts: 1482
|
@Deniil What IDCMP flags have you set?
Any idcmphooks ? |
|
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/23 9:36
#14 |
---|---|---|
Quite a regular
![]() ![]() Joined:
2009/5/1 17:57 From Czech Republic
Posts: 831
|
Quote:
No, sorry, I was wrong. Mixed up WM_ICONIFY and WM_CLOSE. |
|
_________________
- Do you suffer from long-term memory loss? - I can't remember. |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/6/23 10:59
#15 |
---|---|---|
Supreme Council
![]() ![]() Joined:
2006/11/19 18:16 From London, England
Posts: 1219
|
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 |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/10/31 14:24
#16 |
---|---|---|
Not too shy to talk
![]() ![]() Joined:
2008/5/2 12:14 From Sweden
Posts: 419
|
@Rigo
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. http://hem.bredband.net/deniil/ 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++ ![]() |
||
|
Re: ReAction window not remembering its position. |
Posted on: 2011/10/31 21:42
#17 |
---|---|---|
Supreme Council
![]() ![]() Joined:
2006/11/19 18:16 From London, England
Posts: 1219
|
@Deniil
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 |
||