Standalones and file icons

Tereza Snyder tereza at attainmentcompany.com
Fri Oct 11 10:29:01 EDT 2002


on 10.11.02 7:56 AM, Shari wrote:

> I have a standalone, with embedded stacks, and with external stacks.
> 
> The standalone has a creator code and custom icons, and all is well.
> 
> I want the external stacks to also have custom icons, different from
> the standalone, but nothing I've tried gets the icons to stick.

...
 
>
> What specifically, needs to be done, to have stacks with custom
> icons?  The stacks are part of the standalone program, mostly to save
> data into, but have other uses as well.
> 

Here's what I do:

Create icon resources for your auxiliary stacks, and set them up in the BNDL
resource to apply to files of type 'MSTK'.

Save your auxiliary stacks with stackfiletype "MYAPMSTK" where "MYAP" is
your creator code. Now, so long as you don't save the auxiliary stacks from
the development environment without setting the stackfiletype, they should
display your icon in the finder. You may need to rebuild the desktop for the
change to appear.

But to keep myself sane, I separate this task from development per se by
making it part of the build process. I run a "lockup" utility script before
building a standalone, that loads all my auxiliary stacks into memory one at
a time with lockmessages true, runs "lockup" on each (a handler in the stack
script that empties fields that ought to be empty, etc.) and saves each with
the correct stackfiletype into my "distribution" directory. In addition,
I've modified the standalone builder script to add resources (like the BNDL
resource, a version resource, and the icons) to my application from a
separate resource file during the build. After all, it doesn't matter what
icons those stacks have on my development machine - it's the distribution
that counts.

Hope this helps,

tereza



+ Tereza Snyder 
+ Senior Software Developer
+ Attainment Company, Inc.
+ <www.attainmentcompany.com>
+ 800.327.4269




More information about the metacard mailing list