[futurebasic] Re: [FB] Custom Folders

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : September 1999 : Group Archive : Group : All Groups

From: "Phil Yates" <phil.yates@...>
Date: Sat, 11 Sep 1999 12:43:46 +0600
This is the "ReadMe " file I've attached to the "CustomFolder.sit.hqx" file I've
just uploaded to my Web site. You can download it from :

http://www.hawk.ndirect.co.uk/downloads/CustomFolder.sit.hqx  (12K)

Hope it's of use. I've just kludged it together in about half an hour, and it's
only been tested under 8.6.

If you wish to post this on other sites, please feel free to do so, but please
put in a small credit to Hawk Software.

-------------

Creating a Custom Folder

The program adds the required functions to my "MiniBase" program ,which you get
as a bonus. I use "MiniBase" to test out new Functions, etc.

I needed to create a custom folder, which would contain a file containing
information about the folder and its contents.

Thus the stages you need to go through are :

1. Create your custom folder Icons, and save them in your program's resource
fork. It needs to be a resource of type "ICN#" (Icon family), and should contain
all the sizes and masks). I've stored the example in ICN# 200, but you can
number it anything you like, provided it's higher than 128, and doesn't
interfere with your program ICN#s.

2. When you invoke the Menu, the program :

a) Invites you to name the file you'll be creating in the folder (you don't have
to do this - you can change it if you want)

b) Creates a Folder with the same name

c) Creates the file

d) Creates an Icon File, and resource fork for it

e) Copies across all the "ICN#" resources from your own Resource Fork into the
new file

f) Sets the Bit in the Folder to say that there's a custom Icon

g) Bumps the Folder date to update it

h) Sets the Icon file invisible. (This is commented out so you can see the file
created while you're testing)

3. Using this method, you can have as many Custom folders as you like - just
store them all in your program's resource fork, and set the Resource Number when
you create the folder.

Thanks to those on the FB list who helped with this.

Phil.