[futurebasic] Re: [FB] I need advice on program conversion

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2006 : Group Archive : Group : All Groups

From: Bernie <fb.list@...>
Date: Thu, 18 May 2006 09:05:10 +0100

Give all windows the standard handler & compositing attributes.
Create nibs and/or use CreateXXXXControl/HIXXXXCreate functions.
Use EditUnicodeText & HITextView for editable text.
Use the DataBrowser for lists.
Use CE (carbon events)/RAEL (RunApplicationEventLoop).
Draw with Quartz.
Use FSRefs.
Write only OS X apps.

Don't use FB's appearance button statement.
Don't use FB edit fields.
Don't use the EditText control.
Don't use the ListBox control.
Don't use any WaitNextEvent stuff (HandleEvents, on dialog, on mouse,  
on menu...)
Don't use QuickDraw.
Don't use FSSpecs or vRefNums.
Don't write Classic apps.


Joe Lertola wrote:

> I am about to start work on converting my most complicated program  
> to carbon. Given my lack of attention to programming for the past  
> few years an my lack of free time I am afraid that it might take me  
> a year or more to get this project done. I have been avoiding this  
> task until now because I believe that I made some bad decisions  
> that are going to be hard to correct. I want to rewrite the program  
> from the ground up so that it is easier to maintain.
> One of the program's functions is to keep track of large geographic  
> databases. These databases can consist of dozens or hundreds of  
> individual files. The way I currently keep track of the databases  
> is that I store the paths to each file in a string list in the  
> program's resource fork and I display the lists in Program  
> Generator scrolling list controls.
> I realize that I have a few problems with this setup that I need to  
> correct in addition to the problem of finding a replacement for PG  
> scrolling lists. The first problem is that I think I should not be  
> using the path to save file locations. I believe that I need to use  
> aliases instead, but I am only vaguely aware of what aliases are  
> and I have no idea how to use them. Are aliases actual finder files  
> or are they something that I can create and store in some kind of  
> list?
> Also I have been advised that is bad practice to store data in my  
> programs resource fork. But I am not sure what the best alternative  
> is. Should I store things in a folder within the same folder as my  
> applications? Or should I store them  in a preference file? I do  
> like the idea of keeping all the database information with the  
> program so I am leaning towards the idea of storing it in the same  
> folder with the application. Can I make my program into a bundle so  
> that I can keep my data and the program in a folder that appears to  
> be a program? Is that possible with Future Basic? If so what are  
> the advantages of using a bundle?
>  Any advice on these topics would be greatly appreciated.