Notification when Amigaguide closed?

This forum is for general developer support questions.

Re: Notification when Amigaguide closed?

Postby trixie » Tue Feb 11, 2014 1:29 pm

@chris

ALL it needs to do is send a message to the existing msgport when the async OpenAmigaGuide call returns.

You mean that in the program's main loop you'd Wait() for the AmigaGuide signal, then GetAmigaGuideMsg() to check if you got the guide-was-closed signal, then act accordingly? Yes, that could work.
Smoke me a kipper, I'll be back for breakfast!

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

Re: Notification when Amigaguide closed?

Postby chris » Tue Feb 11, 2014 1:36 pm

trixie wrote:@chris

ALL it needs to do is send a message to the existing msgport when the async OpenAmigaGuide call returns.

You mean that in the program's main loop you'd Wait() for the AmigaGuide signal, then GetAmigaGuideMsg() to check if you got the guide-was-closed signal, then act accordingly? Yes, that could work.


Exactly.
chris
 
Posts: 552
Joined: Sat Jun 18, 2011 12:05 pm

Re: Notification when Amigaguide closed?

Postby trixie » Tue Feb 11, 2014 4:27 pm

@chris

Well if it was for me, you'd have AmigaGuide sending your notification tomorrow :-) But under the circumstances, you'll have to contact Steven and ask for it. Still there's a good chance, unless it breaks things of course: I needed a special kind of message from the commodities.library, and it was implemented fairly quickly. The commodities update actually did break things but as the only software really affected was Exchange (third-party commodity managers used undocumented features, and were therefore illegal), the situation was easy to remedy.
Smoke me a kipper, I'll be back for breakfast!

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

Re: Notification when Amigaguide closed?

Postby xenic » Wed Feb 12, 2014 9:27 pm

@chris
I think something is wrong with amigaguide.library. I found an AmigaGuide example called HyperApp.c on my OS3 developer CD and compiled it for OS4 (with a few changes). HyperApp.c waits for AmigaGuide messages and displays the type of messages received. Even though it checks for ShutdownMsgID, it doesn't show any shutdown message being received. If you have access to an OS3 Amiga, it might be interresting to see if HyperApp.c receives a shutdown message (ShutdownMsgID).
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
 
Posts: 1148
Joined: Sun Jun 19, 2011 1:06 am

Re: Notification when Amigaguide closed?

Postby trixie » Thu Feb 13, 2014 12:06 am

@xenic

I had a quick look at some other examples on the DevCD (aghelp.c and advaghelp.c, in the Orlando 1993 DevCon directory), and it indeed looks like "ShutdownMsgID" from libraries/amigaguide.h refers to a message sent to the AmigaGuide port. The code shows quite clearly that the program's input loop Wait()s on the AmigaGuide signal, then performs GetAmigaGuideMsg() and switch()es for the individual messages, ShutdownMsgID being one of them. So if the message doesn't arrive (as you say), it is likely that something's broken under the bonnet.
Smoke me a kipper, I'll be back for breakfast!

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

Re: Notification when Amigaguide closed?

Postby chris » Thu Feb 13, 2014 2:27 am

xenic wrote:@chris
I think something is wrong with amigaguide.library. I found an AmigaGuide example called HyperApp.c on my OS3 developer CD and compiled it for OS4 (with a few changes). HyperApp.c waits for AmigaGuide messages and displays the type of messages received. Even though it checks for ShutdownMsgID, it doesn't show any shutdown message being received. If you have access to an OS3 Amiga, it might be interresting to see if HyperApp.c receives a shutdown message (ShutdownMsgID).


I tried running it, and it doesn't display any messages. I think it needs compiling with the debug enabled. The other examples (advaghelp being the best looking one) have a similar problem, in that they only display errors after receiving the messages, they don't display reception of the message itself. It certainly appears that the ShutdownMsgID should be sent.

I don't have anything that can usefully compile this old code for 68k, at least not without reworking it, so that's as far as I can investigate for the moment.

(As an aside, there's some nice documentation about AmigaGuide, XRefs and Dynamic Nodes that I've not seen before, and a cool dynamic node example which displays running libraries and things inside an AmigaGuide)
chris
 
Posts: 552
Joined: Sat Jun 18, 2011 12:05 pm

Re: Notification when Amigaguide closed?

Postby xenic » Thu Feb 13, 2014 6:14 pm

chris wrote:I tried running it, and it doesn't display any messages. I think it needs compiling with the debug enabled. The other examples (advaghelp being the best looking one) have a similar problem, in that they only display errors after receiving the messages, they don't display reception of the message itself. It certainly appears that the ShutdownMsgID should be sent.

I just eliminated clib & pragmas includes, added proto includes for exec, graphics etc. & <string.h>. I replaced all the debug statements with printf() and compiled for OS4 with some defines to use obsolete Intuition stuff. When I ran the resulting binary from a shell, it just comfirmed that the shutdown message was not being received when the guide was closed.

Some time ago I uploaded a command called "OpenGuide" to OS4 depot at the request of another programmer. He wanted to be able to open and control AmigaGuide help from a script. The command opens an AmigaGuide that can be controlled (somewhat) with AmigaGuide ARexx commands. It opens an AmigaGuide synchronously and doesn't return until the guide is closed by the user. You could use similar code in a seperate process that signals your main program when the synchronous AmigaGuide returns after the user closes it.

When I wrote "OpenGuide" I also discovered that some of the AmigaGuide ARexx commands don't seem to work as documented. I only got them working by trial-and-error. I suspect that AmigaGuide library is a low priority for the OS4 devs, so I don't think we can expect fixes any time soon.
AmigaOne X1000 with 2GB memory - OS4.1 FE
xenic
 
Posts: 1148
Joined: Sun Jun 19, 2011 1:06 am

Re: Notification when Amigaguide closed?

Postby chris » Sat Feb 15, 2014 2:59 am

Right, an update. I've compiled HyperApp for 68k with an extra printf in it so I can see the messages that are coming in.
There is no difference between OS4 and OS3.1 amigaguide.library wrt the messages that are sent - there are two:
Code: Select all
Message: 11007
Pressed the big gadget
Pressed the big gadget
Message: 11011


The first is sent on program startup, the second at some point after help is opened.

Furthermore, I replaced amigaguide.library v39 with amigaguide.library v34 from the old DevCon package. Still no shutdown message.

So, either this has never been implemented, it has been broken since forever, or that message has some other purpose. With no useful documentation in this regard, we can only go by the examples:
Code: Select all
   /* Shutdown message */
       case ShutdownMsgID:


I think it's pretty clear that at the time the example was written, that message was intended to signify that the user had finished with the AmigaGuide session, so either nobody ever checked it actually worked, or it was never implemented. Only somebody with access to the source code will be able to tell us which it is.
chris
 
Posts: 552
Joined: Sat Jun 18, 2011 12:05 pm

Re: Notification when Amigaguide closed?

Postby salass00 » Sun Feb 23, 2014 7:55 pm

chris wrote:I think it's pretty clear that at the time the example was written, that message was intended to signify that the user had finished with the AmigaGuide session, so either nobody ever checked it actually worked, or it was never implemented.


AFAICT it seems to be the latter, i.e. a feature that was never implemented.
User avatar
salass00
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 506
Joined: Sat Jun 18, 2011 4:12 pm
Location: Finland

Re: Notification when Amigaguide closed?

Postby chris » Sun Feb 23, 2014 10:35 pm

salass00 wrote:
chris wrote:I think it's pretty clear that at the time the example was written, that message was intended to signify that the user had finished with the AmigaGuide session, so either nobody ever checked it actually worked, or it was never implemented.


AFAICT it seems to be the latter, i.e. a feature that was never implemented.


Does it look easy to add?
chris
 
Posts: 552
Joined: Sat Jun 18, 2011 12:05 pm

Previous

Return to General Developer Support

Who is online

Users browsing this forum: No registered users and 1 guest