realbasic-nug
[Top] [All Lists]

Re: gui application should be able to print

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: gui application should be able to print
From: Matthias Buercher <reader at belle-nuit dot com>
Date: Thu, 30 Jun 2005 17:49:14 +0200
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <B0D5FF24-47A7-424C-9F84-F2A60F573F8D at belle-nuit dot com>
On 30 juin 05, at 16:19, Matthias Buercher wrote:

i see that an os x mach GUI application can get its command line arguments and it even gets them right if you call it from the shell. any chances now to implement the print command that is available for console applications?
matthias

looks like i have found the answer myself:

rb 5.5
make a new desktop application project, build to mach-O. set window to none.

add this to the app.open event

  system.debugLog "hello world"
  quit

run it. it will print "hello world" to the console application

build the project. call the executable (within the bundle) from the terminal.
it will print "hello world" to the terminal.
i can also save a picture to a file. only opening windows blocks the terminal, of course.

so if you build a desktop application, you can make it behave like a console application in a terminal, not interactive, but it can be a feedback, as the system.debuglog goes to the terminal and not the console. can i rely on that?

matthias




_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>