Home  
Login
Username:

Password:

Remember me



Lost Password?

Register now!
Sections
Who's Online
75 user(s) are online (71 user(s) are browsing Forums)

Members: 0
Guests: 75

more...
Support us!
Recent OS4 Files
OS4Depot.net





ReAction window not remembering its position.
Not too shy to talk
Joined:
2008/5/2 12:14
From Sweden
Posts: 473
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++
   Report Go to top

Re: ReAction window not remembering its position.
Supreme Council
Joined:
2006/11/19 18:16
From London, England
Posts: 1262
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
   Report Go to top

Re: ReAction window not remembering its position.
Just can't stay away
Joined:
2006/12/4 23:15
Posts: 1884
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?




_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: ReAction window not remembering its position.
Quite a regular
Joined:
2006/11/27 14:24
From Scarfskerry
Posts: 560
Use MUI

   Report Go to top

Re: ReAction window not remembering its position.
Supreme Council
Joined:
2006/11/19 18:16
From London, England
Posts: 1262
@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
   Report Go to top

Re: ReAction window not remembering its position.
Not too shy to talk
Joined:
2008/5/2 12:14
From Sweden
Posts: 473
@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++
   Report Go to top

Re: ReAction window not remembering its position.
Quite a regular
Joined:
2006/12/2 0:35
From Sydney
Posts: 653
@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
   Report Go to top

Re: ReAction window not remembering its position.
Not too shy to talk
Joined:
2008/5/2 12:14
From Sweden
Posts: 473
@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++
   Report Go to top

Re: ReAction window not remembering its position.
Amigans Defender
Joined:
2006/11/17 22:40
From England
Posts: 3171
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.

   Report Go to top

Re: ReAction window not remembering its position.
Quite a regular
Joined:
2009/5/1 17:57
From Czech Republic
Posts: 937
@Deniil

Quote:

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.

_________________
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
   Report Go to top

Re: ReAction window not remembering its position.
Not too shy to talk
Joined:
2008/5/2 12:14
From Sweden
Posts: 473
Quote:

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++
   Report Go to top

Re: ReAction window not remembering its position.
Just can't stay away
Joined:
2006/12/4 23:15
Posts: 1884
@Trixie

You're nearly right

#define RA_CloseWindow(win) 
        
IIntuition->IDoMethod(winWM_CLOSENULL)

#define RA_HandleInput(win,code) 
        
IIntuition->IDoMethod(winWM_HANDLEINPUTcode)

#define RA_Iconify(win) 
        
(BOOL)(ULONGIIntuition->IDoMethod(winWM_ICONIFYNULL)


_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: ReAction window not remembering its position.
Just can't stay away
Joined:
2006/12/4 23:15
Posts: 1884
@Deniil What IDCMP flags have you set?

Any idcmphooks ?


_________________
Blender For OS4.x : Blues : Walker Broad
   Report Go to top

Re: ReAction window not remembering its position.
Quite a regular
Joined:
2009/5/1 17:57
From Czech Republic
Posts: 937
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.

No, sorry, I was wrong. Mixed up WM_ICONIFY and WM_CLOSE.

_________________
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
   Report Go to top

Re: ReAction window not remembering its position.
Supreme Council
Joined:
2006/11/19 18:16
From London, England
Posts: 1262
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
   Report Go to top

Re: ReAction window not remembering its position.
Not too shy to talk
Joined:
2008/5/2 12:14
From Sweden
Posts: 473
@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++
   Report Go to top

Re: ReAction window not remembering its position.
Supreme Council
Joined:
2006/11/19 18:16
From London, England
Posts: 1262
@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
   Report Go to top





[Advanced Search]


Powered by XOOPS 2.0 © 2001-2016 The XOOPS Project