[fb code]
FutureBASIC plist Example
The following is FutureBASIC source code and is free to all to download and use without any restrictions what-so-ever.
All source code is written in FutureBASIC for Macintosh computers. To find out more about this most excellent language, check out: FutureBASIC
The following is a three part procedure for creating an application with its custom icon in FutureBasic for OS-X. This example is all the code you'll need.
Part A (128.icns)
- Create your own set of icons in whatever program (i.e., Icon Machine or Iconographer ) that will allow you to design an icon suite (Thumbnail down to Mini -- Iconographer has a good explanation of this in it's help file)
- Save your icon suite with the name "128.icns".
Part B (info.plist)
- Prepare an info.plist (as shown below). Any text editor will do, including BBEdit or Apple's "Property List Editor.app":
- Save as a text file with the name "info.plist"
Part C (putting it together)
- Create a FB application using the following code:
- Build your application (myProgram).
- Launch MakeBundle and Drag your new application to it.
- You should now have two applications, namely "myProgram" and "myProgram.app"
- Control-click myProgram.app and select "Show Package Contents"
- In "Contents" folder, replace the info.plist with your new "info.plist".
- Open "Resources" folder
- Replace the 128.icns with your new "128.icns".
- Close the Contents folder.
- Change the name of your application from "myProgram" to "MyProgram" (or whatever you want).
Now, your new application should have it's new icon. If you have any difficulties, please notify me.
Various FutureBASIC Source Code
The following is FutureBASIC II source code and is free to all to download and use without any restrictions what-so-ever.
If you have any trouble "unstuffing" anything provided herein, try using Unstuff It Expander as provided by Aladdin Systems:
This program will sort 1,000 strings in 0.0166 seconds and 10,000 strings in less than 0.25 sec on my Macintosh 9600/132. It's a quick little program that use INDEX's and pointers.
This program will demonstrate how to set up a memory based linked list. This will allow you to add as many records as memory will allow.
This program will show you how to draw various style lines, namely dot, dot/dash, dash, and railroad lines.
This file is actually two programs that demonstrate text rotation: 1) TEXT Rotation to the Screen -- which is done by drawing the string to GWorlds; creating a rectangle around the text; moving each pixel within the rectangle to a new position (i.e., angle); and then bitcopy the result back to the viewing window. (The routine is pretty quick thanks to Ross's FNJN II integer trig functions); 2) TEXT Rotation to the Printer -- which uses PICCOMENTS to place text at any position and angle on the printed page.
Gsec is designed to display 2D stacked SEGY seismic data for Geophysicists. While no programmer in his right mind would ever want to do that, the FB source code does provide several examples of how to do a gamut of other things, such as: placing things in resource files (i.e., id, name, date); keeping track of window positions; creating and keeping a preference file; using SANE for IEEE conversions and calculations; showing mouse coordinate data in scroll bar area; using GWorld for a very large graphic; hiding data inside PICT files; placing PICT files in the clipboard; printing PICT files; and launching the program from program generated files. This source is very well documented. (This file comes with seismic data and is 480K in size)
This program (which is written in PG Pro) will show you how to create and use an offscreen GWorld and demonstrate the use of scroll bars. It simply draws a grid in the off screen GWorld and then brings it forward into a window with scroll bars. From there you can scroll to see all of the graphics.

