Page 1 of 1

App doesn't close

PostPosted: Thu Sep 14, 2006 8:39 am
by Siegmar
Hi, first let me tell you that I'm very happy to see what happened to Neobook! Some years ago I played a litte bit with neobook for DOS. But now, when I remembered Neobook and took a look on it, I was really surprised! That's a great Tool! I won't work again with all my other tools.

My problem:
I built a pub that opens an application. This application is a (neobook compiled) browserobject. RUN starts the app as it should. But CloseApplication does nothing.

The browserobject loads a radiostream and shows a picture. No scrollbar, no menu ... nothing else.

Any idea? Thank you in advance.

Siegmar

PostPosted: Thu Sep 14, 2006 9:04 am
by Gaev
Siegmar:
RUN starts the app as it should. But CloseApplication does nothing.
... can you post the exact commands you are deploying ?

PostPosted: Thu Sep 14, 2006 9:17 am
by Siegmar
Run "[PubDir]browser.exe" "" "RunOnce" "" ""

And to close (in shutdown-action and menu):

CloseApp "[PubDir]browser.exe" "RequestClose"
Exit "" ""

Thanks, for the quick reply
Siegmar

PostPosted: Thu Sep 14, 2006 9:19 am
by Siegmar
I forgot to say:

I also tried ForsedClose

PostPosted: Thu Sep 14, 2006 9:48 am
by Gaev
Siegmar:
And to close (in shutdown-action and menu):
... is the CloseApp command in your pub's ShutDown section ? ... if so, remember that when you test using F8 i.e. Run (this Page only), upon exiting your pub (say via the windows close button or a button in your application), this routine is NOT invoked ... to be sure, you might place an AlertBox command just before the CloseApp command, to verify that it is being serviced.

Another probable cause might be that while the Browser application (inside your browser.exe pub) is active, this request is not getting through ... so ...

a) try and replace [PubDir]browser.exe with notepad.exe in the Run and CloseApp commands

b) if that works, see if you can make it work with the Browser object in your browser.exe program Disabled ... to see if it is interfering with the received request to Close itself.


Also, try specifying a variable for the [AppID] in your Run command and then use it in your CloseApp command.

PostPosted: Thu Sep 14, 2006 10:13 am
by Siegmar
Hi Gaev, thank you,

It is a little bit funny: I tried to disable the browserobjekt. In Neobook the Radiostream and the Flashpicture are visible/hearable because it's in the HomeURL of the browserobject.
I unmarked 'enabled'. Nothing happened. I closed the pub and opened it again. The browser is still visible/hearable. I controlled the settings: 'enabled' is unmarked !!!????

I solved my problem, while I put a closebutton into the browser. But I'm still interested in what the solution could be ...

Siegmar

PostPosted: Thu Sep 14, 2006 10:24 am
by Siegmar
Forgot something again:

Notepad.exe works fine. And generally I start with the complete pub, I seldom make use of the single-site start.

Greetings, Siegmar

PostPosted: Thu Sep 14, 2006 11:04 am
by Neosoft Support
Is your browser pub set to run in full screen mode? If so, there is an issue with the CloseApp action that affects full screen publications. This will be corrected in the next update. However, you should be able to use the current version with the force option. For example, try this instead:

Run "[PubDir]browser.exe" "" "RunOnce" "" "[AppID]"

CloseApp "[AppID]" "ForceClose"
Exit "" ""

You can also try adding a short delay between close and exit:

CloseApp "[AppID]" "ForceClose"
Delay "1000"
Exit "" ""

PostPosted: Thu Sep 14, 2006 11:22 am
by Siegmar
Thank you,
but also DELAY doesn't help. I think it could have something to do with the Link within the browser?

Maybe you try it yourself:
http://www.radiomontecarlo.net/RMC_04/R ... ma?radio=4

Put it in a new pup browserobjekt, run and close app. I would be astonished if it worked.

It must be the link,
or not?

I don't know,
Siegmar

PostPosted: Thu Sep 14, 2006 12:43 pm
by Gaev
Siegmar:

This works for me ...

a) I created JustBrowser.pub ... 800 X 600 window (in my 1024 X 768 screen) with title bar ... just one Browser Object in it ... with its Internet Address set to ... http://www.radiomontecarlo.net/RMC_04/R ... ma?radio=4 ... and compiled it to JustBrowser.exe

b) In another pub, I made two buttons ...
Code: Select all
Run "[PubDir]JustBrowser.exe" "" "RunOnce" "" "[AppID]"
... and ...
Code: Select all
CloseApp "[AppID]" "ForceClose"


c) Ran ( F8 ) second pub

d) clicked on first button

e) when the music started playing in JustBrowser's window, I switched back to first program and clicked its second button


... and the JustBrowser.exe window was gone ... perhaps you can try and duplicate this EXACTLY (including new name for program with Browser object) and see if it works ... then perhaps make incremental changes until it does not.

By the way, check in your (old browser.exe) program to make sure there is nothing coded in its ShutDown section that might prevent any attempt to close it.

PostPosted: Fri Sep 15, 2006 3:37 am
by Siegmar
Thank you very much! Closing by variable works!
Greetings, Siegmar