Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Parent property by "path to", passing variables between script files



It's just the NSMentality to load NIBs lazily.  Since with AppleScript
Studio you are simply using AppleScript to write Cocoa applications, the
cult of NeXT came with it.  Technically, loading NIBs lazily saves memory
and speeds your application's launch, but it's probably not enough to make
much difference in a moderately complex AppleScript Studio app.  Only thing
I'd suggest is to check your app's launch speed, add the NIB loads in the on
will finish launching event, then test again and see if the speed hit is
acceptable to you.

Topher

-----Original Message-----
From: applescript-studio-bounces+tophu=email@hidden
[mailto:applescript-studio-bounces+tophu=email@hidden] On Behalf
Of Graham Jones
Sent: Monday, April 25, 2005 3:34 PM
To: Applescript Studio
Subject: Re: Parent property by "path to", passing variables between script
files

Hi Philip,

Thanks for your continued help...

You know, the only reason I keep track of nibs loading is because I'm
following examples I've seen elsewhere, including Apple's tutorials.  I
guess I figured there was a reason, such as time to load multiple nibs and
memory reasons...  But you're right, it sure is a lot simpler to load them
all at once in the launch sequence.

Does anyone else know why I shouldn't do this?  Speak now, or forever hold
your peace...  I'll gladly chop out more globals and unnecessary lines of
code if there's no good reason not to.

Thanks,
Graham Jones.

On 4/25/05 7:25 AM, "Philip Buckley" <email@hidden> wrote:

> There's just one thing I have been wondering. Why do you need to keep
> track of which nibs are loaded? You wrote in an earlier email "globals
> that keep track of whether nibs are loaded, etc." Or, more to the
> point, why do you need to keep that information in global variables? As
> a rule I simply load all my nibs in the application's "on launched"
> handler. There's no great overhead and I know that from then on they
> are all loaded.
> 
> on launched theObject -- application launched
> load nib "abc"
> load nib "xyz"
> -- etc
> end launched
> ...

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-studio mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-studio/email@hidden

This email sent to email@hidden

References: 
 >Re: Parent property by "path to", passing variables between script files (From: Graham Jones <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.