OSX Distribution issues
janschenkel at yahoo.com
Mon Oct 27 07:35:30 EST 2003
--- Graham Samuel <livfoss at blueyonder.co.uk> wrote:
> Apologies to the list because I know this stuff has
> come up many
> times before, but with Google search apparently
> broken, I can't find
> the right references.
> I'm building multi-platform distributions using
> RunRev 2.1. I'm using
> MacOS 9.2.2 as the platform to construct them. The
> Windows and
> pre-OSX ones come out fine, but for the OSX I have
> two problems that
> I don't quite understand how to fix:
> 1. I want to give the user the chance to save a
> document before
> quitting - this is what I do on the other platforms.
> When RunRev
> moves my Quit menu in OSX, my quit scripts don't
> work because the
> whole app quits as soon as the Quit menu option is
> chosen, apparently
> without running any scripts. I tried putting the
> code in a CloseStack
> handler in my mainstack, but it doesn't seem to get
> executed. Is
> there a solution to this - I seem to remember there
> is one, but I
> can't remember what. There must be some way to run
> exit code.
Let's start with a copy+paste from the Docs
"HOW TO respond to quitting an OS X application
On OS X systems, the ?Quit? menu item is part of the
Application menu, which is displayed by the operating
system rather than by the application. Because of
this, choosing ?Quit? on OS X systems does not send a
menuPick message, so you cannot handle quitting in a
Instead, choosing ?Quit? sends an Apple Event (class
?aevt?, ID ?quit?) to the application. If you don?t
intercept this Apple Event in an appleEvent handler,
Revolution sends a shutdownRequest message in response
to the Apple Event. To respond to the user choosing
?Quit?, handle either of these messages.
Tip: For easiest cross-platform development, place
all the code you want to execute on quitting in a
> and less importantly:
> 2. When I build the distribution, it goes in a
> folder created by the
> Distribution Builder - I then transfer this to my
> OSX boot disk. When
> I look in the folder under OSX, I see my app with
> the right icon
> (thanks, earlier respondents on this list and of
> Iconographer!) but I also see the RunRev icon
> apparently signalling
> an application, real name Revolution.app, with what
> looks like a
> complete set of application folder contents. If I
> double-click on it,
> the OS says it crashed, harmlessly. What is this and
> how can I get
> rid of it, or better, stop Distribution Builder
> creating it in the
> first place?
On MacOS X, the app-bundles are actually folders,
containing the "real" application and lots of other
things that "Classic" MacOS would have stored in the
resource fork and other places.
The bundles allow for one easy spot to store
everything that belongs with your applications, so you
don't need to find DLL x here, VBX y there, etc. as
you would on Windows machines.
> PS IMHO there's a lot wrong with Distribution
> Builder, and it appears
> to crash my machine quite frequently, but that's for
> another time.
Admittedly I didn't have mluch luck with Rev 2.1 on my
MacOS 9 iMac, either : upon install it crashed ; it
qworks fine, but I can't use the Distribution Builder
to create applications.
So for now I create my Classic apps on the MacOS X
PowerBook, and that works ; when 2.1.1 final rolls
around, I'll replace the one on the iMac.
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)
Do you Yahoo!?
Exclusive Video Premiere - Britney Spears
More information about the Use-livecode