Ben Rubinstein wrote:
I have a number of questions - answers to any or all would be gratefully received, as would any other relevant observations or suggestions.


* Is the -ui flag documented anywhere? I can only find references from users on various forums and lists - nothing from RR

I thought it was mentioned in the engine change log when it first appeared but now I can't find it. Mark Waddingham has confirmed that it's what to use in some posts on the improve list, I think. At any rate, I know it's the official "right way" to do it.


* Evidently the -ui flag implies don't start the GUI; does it have other implications?

Not that I know of.


* Is there a way for a stack to tell that it's in "-ui" mode? The flag doesn't appear in the $0, $1 etc globals

The "environment" variable will be "command line". That isn't documented either; I found out by testing.


My app already has an "unattended" mode in which it is invoked from the command with some additional parameters, and then (although still normally displaying the UI) it goes through a sequence automatically, and then automatically quits. I expect it also to write some note to stderr. Launching this with the -ui option it is totally silent, and it does not appear to do anything, nor does it quit. I've made a minimal stack that just writes some notes to the console and then quits - that works as expected in the -ui mode. I'm guess that this means that my real app is doing something during startup which is illegal in -ui mode; therefore it throws an error and never gets to write anything to console or to quit.

If there's a problem, it should show up in the error log.


* Are there known gotchas, things that you mustn't do in -ui mode?

Not really; some gui-related things won't work but you'll usually get an error in that case. Most things behave as you'd expect.

From my CGI tutorial:

Some native Revolution commands that don't work (and may hang your script) are:

    * go - requires a GUI window redraw
    * toplevel - GUI-based
    * modeless (or any other stack modes) - GUI-based
    * create stack (or any file creation) - CGI permissions restriction
* save stack (errors with "can't open stack backup file") - permissions restriction
    * beep - GUI-based


--
Jacqueline Landman Gay         |     [email protected]
HyperActive Software           |     http://www.hyperactivesw.com
_______________________________________________
use-revolution mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to