OpenAmigaGuideAsync notification on close

AmigaOS users can make feature requests in this forum.
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

OpenAmigaGuideAsync notification on close

Post by chris »

Please can OpenAmigaguideAsync() be updated so it sends a message to the message port when the user has finished with it (ie. after the process which launches OpenAmigaguide has returned)

More info here: http://forum.hyperion-entertainment.biz ... =26&t=2270
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Post by trixie »

So as per the thread linked above: Chris and Xenix have confirmed that AmigaGuide library fails to send a ShutdownMsgID message when the client window is closed. Judging from sources available in Commodore documentation (DevCon 1993 in this particular case), the feature worked previously and the message was sent because the example codes Wait() for it.

However, I'm still wondering how this message identifies the AmigaGuide client that was closed. An application can open several asynchronous AG clients (i.e. obtain several AG handles) and then Wait() for the close message - but how do I know which handle this particular message refers to? Looking at struct AmigaGuideMessage (libraries/amigaguide.c) doesn't make me any wiser. The agm_Data and agm_DType fields look promising but as there is neither a further description, nor a definition of message data types, I'm left in the dark.

Could we please have someone file a bug report and ask for a quick fix? I'm quite sure the reason for the message not being sent is something trivial.
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: OpenAmigaGuideAsync notification on close

Post by chris »

trixie wrote:However, I'm still wondering how this message identifies the AmigaGuide client that was closed. An application can open several asynchronous AG clients (i.e. obtain several AG handles) and then Wait() for the close message - but how do I know which handle this particular message refers to?
Surely the different clients would have different signal number, so you'd just Wait(agSig1 | agSig2) and then check which signal was received before getting the message (ie. usual message loop)
Could we please have someone file a bug report and ask for a quick fix? I'm quite sure the reason for the message not being sent is something trivial.
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Post by trixie »

@chris
Surely the different clients would have different signal number, so you'd just Wait(agSig1 | agSig2) and then check which signal was received before getting the message
Makes sense. But then the number of asynchronously opened clients is limited to 16? The documention doesn't mention any of these things, and I'd like to know because I've started writing the AmigaGuide Library page for the Dev Wiki.
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: OpenAmigaGuideAsync notification on close

Post by chris »

trixie wrote:Makes sense. But then the number of asynchronously opened clients is limited to 16?
I guess so, in fact less than that as the program is likely to have other signals allocated. The 16 signals limit is actually quite restrictive, it would be great to see a fix for this (like a 64-bit integer for signal bits) (hmm, I'll raise that separately, don't want to dilute this thread with signals talk)
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Post by trixie »

@chris

Confirmed! I've just made a small test program, and AmigaGuide Library will only let me open 16 clients.
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Post by trixie »

To bring back attention to something that no-one seems to have picked up:

As it was mentioned here, Chris and Xenix have confirmed that AmigaGuide library fails to send a ShutdownMsgID message. Judging from sources available in Commodore documentation (DevCon 1993 in this particular case), this feature worked previously and the message was sent because the example sources explicitly Wait() for it.

Further, due to documentation being very sketchy, it is not absolutely clear what the ShutdownMsgID was actually supposed to do. I'd guess it signalled when the client window is closed but I cannot be sure.

At any rate, there is no such notification in place currently, and after the developer opens an asynchronous AmigaGuide client,there is no way for him to tell if/when the client window has been closed. This complicates the use of AmigaGuide for interactive help from within the application. The workaround - to enforce client shutdown and restart each time the user requests help - can hardly be considered a satisfactory solution.

So my and Chris' request here is either a bugfix (if ShutdownMsgID is indeed meant to signal client window closing), or a feature request (if such notification is not implemented at all). Pretty please :-)
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
ssolie
Beta Tester
Beta Tester
Posts: 1010
Joined: Mon Dec 20, 2010 8:51 pm
Location: Canada
Contact:

Re: OpenAmigaGuideAsync notification on close

Post by ssolie »

trixie wrote:So my and Chris' request here is either a bugfix (if ShutdownMsgID is indeed meant to signal client window closing), or a feature request (if such notification is not implemented at all). Pretty please :-)
Did you guys get a bugzilla bug number from anybody yet?

It sounds like this is a real bug and/or missing feature. The code base 4.x is based on came from 3.1 so if it works in 3.1 then it should work in 4.x.

Maybe you could summarize the problem with a simple example program? Then I could create a bug report myself and attach that.
ExecSG Team Lead
User avatar
trixie
Posts: 409
Joined: Thu Jun 30, 2011 2:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Post by trixie »

@ssolie
Maybe you could summarize the problem with a simple example program? Then I could create a bug report myself and attach that.
No bugzilla entry AFAIK. I'll try to produce an example as soon as possible but it's my essay week and I'm currently busy meeting deadlines at school :-( But maybe Chris already has a piece of code that would demonstrate the problem? If not, don't worry, this thing can wait until I get to it (weekend perhaps).

There is also one other thing I'll need to investigate further. When you open an asynchronous AG client and the user presses the "Help" button in the window, the system-provided AmigaGuide help file will get loaded, "taking over" of your client. This wouldn't be a problem but it seems that there's no way for you to resume control, apart from shutting down and restarting the client (or pressing "Retrace" manually to get back to your file). This is rather stupid, as commands sent to the client will now be executed upon the AG system help file, not the file with which you opened the client. But as I say, I'll need to give it some more testing.
The Rear Window blog

AmigaOne X5000 @ 2GHz / 4GB RAM / Radeon RX 560 / ESI Juli@ / AmigaOS 4.1 Final Edition
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
chris
Posts: 562
Joined: Sat Jun 18, 2011 11:05 am
Contact:

Re: OpenAmigaGuideAsync notification on close

Post by chris »

trixie wrote:But maybe Chris already has a piece of code that would demonstrate the problem?
Yes, I probably do.

There is also one other thing I'll need to investigate further. When you open an asynchronous AG client and the user presses the "Help" button in the window, the system-provided AmigaGuide help file will get loaded, "taking over" of your client. This wouldn't be a problem but it seems that there's no way for you to resume control, apart from shutting down and restarting the client (or pressing "Retrace" manually to get back to your file). This is rather stupid, as commands sent to the client will now be executed upon the AG system help file, not the file with which you opened the client. But as I say, I'll need to give it some more testing.
That sounds like a bug too.
Post Reply