OpenAmigaGuideAsync notification on close

AmigaOS users can make feature requests in this forum.

OpenAmigaGuideAsync notification on close

Postby chris » Tue Feb 11, 2014 4:34 pm

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: viewtopic.php?f=26&t=2270
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: OpenAmigaGuideAsync notification on close

Postby trixie » Fri Feb 21, 2014 11:48 am

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.
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
 
Posts: 353
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Postby chris » Fri Feb 21, 2014 4:00 pm

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.
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: OpenAmigaGuideAsync notification on close

Postby trixie » Fri Feb 21, 2014 4:38 pm

@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.
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
 
Posts: 353
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Postby chris » Fri Feb 21, 2014 4:59 pm

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)
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Re: OpenAmigaGuideAsync notification on close

Postby trixie » Fri Feb 21, 2014 7:50 pm

@chris

Confirmed! I've just made a small test program, and AmigaGuide Library will only let me open 16 clients.
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
 
Posts: 353
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Postby trixie » Wed Mar 05, 2014 10:49 am

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 :-)
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
 
Posts: 353
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Postby ssolie » Wed Mar 05, 2014 5:24 pm

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.
AmigaOS Development Team Lead
Be authentic. Get AmigaOS.
User avatar
ssolie
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1000
Joined: Mon Dec 20, 2010 9:51 pm
Location: Canada

Re: OpenAmigaGuideAsync notification on close

Postby trixie » Wed Mar 05, 2014 6:06 pm

@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.
Smoke me a kipper, I'll be back for breakfast!
SAM440ep-flex @ 667MHz / 1GB RAM / Radeon 9250 / AmigaOS 4.1 Final Edition
User avatar
trixie
 
Posts: 353
Joined: Thu Jun 30, 2011 3:54 pm
Location: Czech Republic

Re: OpenAmigaGuideAsync notification on close

Postby chris » Wed Mar 05, 2014 6:15 pm

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.
chris
 
Posts: 548
Joined: Sat Jun 18, 2011 12:05 pm

Next

Return to AmigaOS Feature Requests

Who is online

Users browsing this forum: No registered users and 3 guests