discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Library, Bundle or ...


From: Philippe Roussel
Subject: Re: Library, Bundle or ...
Date: Mon, 8 Jan 2007 22:24:25 +0100
User-agent: Mutt/1.5.11

On Mon, Jan 08, 2007 at 07:52:30PM +0000, Richard Frith-Macdonald wrote:

[interesting stuff]

> eg.
> for a application local bundle ...
> 
> bundle = [NSBundle bundleWithPath: [[NSBundle mainBundle]  
> pathForResource: @"AgendaWidget" ofType: @"bundle"]];
> 
> or to search all standard bundle locations ...
> 
> NSEnumerator *enumerator = [NSSearchPathForDirectoriesinDomains 
> (NSLibraryDirectory, NSAllDomainsMask, YES) objectEnumerator];
> NSString      *path;
> while (bundle == nil && (path = [enumerator nextObject]) != nil)
>   {
>     bundle = [NSBundle bundleWithPath:  [path  
> stringByAppendingPathComponent: @"Bundles/AgendaWidget.bundle"]];
>   }

Ok, that's what I was missing, a way to load a bundle without
specifying a full path. Thanks for the tip Richard, now it all makes
sense.

> A palette is unrelated to locating the library/bundle, as you don't  
> load it into your application.  Your application uses a library or  
> bundle to get the code, and Gorm uses the palette when you design/ 
> build the application user interface.  To load a palette into Gorm  
> you just click the 'Tools' menu item, then 'Load palette', then  
> select the palette you wish to use in the open panel.  Alternatively,  
> you can set a list of palettes (full paths to the palettes) in the  
> user defaults as an array keyed on 'USER_PALETTES' and Gorm will load  
> these automatically at startup.

Yes, I got all that already and I had a working palette but with the
widget code inside because I didn't know how to load it from a library
or a bundle. I'll give it another shot with your informations.

Thanks a lot for your help,
Philippe
-- 
What makes the universe so hard to comprehend is that there's nothing to 
compare it with.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]