Tutorials > Pocket Smalltalk Tutorial > Create Application Resources
 

3. Create Application Resources

You will need to create PalmOS resources for hold user interface layouts, bitmaps, an application icon, the application's version ID, and so forth. This is not part of Pocket Smalltalk; you need to use external tools to do this. I recommend using PilRC for compiling resources. The following steps assume that you have PilRC installed and can invoke it from the MS-DOS prompt.

The first step is to create a text file in your project's directory. If you do not have a good text editor you can use the Notepad program supplied with Microsoft Windows. Create a file named tutorial.rcp with the following contents:


FORM ID 3000 AT (0 0 160 160)
BEGIN
    TITLE "Smalltalk Tutorial"
    BUTTON "Push Me" ID 4000 AT (65 50 AUTO AUTO)
END
This is PilRC syntax for a simple form layout. It specifies a form ID of 3000, and the form contains a title and a single button with an ID of 4000. You will use these ID numbers later to create bindings to these PalmOS user interface elements from Smalltalk.

Compile the file you just created with PilRC by typing the following at the MS-DOS prompt (in the same directory as the file you just created):

pilrc tutorial.rcp
This should yield a file named tFRM0bb8.bin. If you had put more than one form definition in the .rcp file this would have produced more than one .bin file.

If you make changes to the .rcp file containing your form definition(s), you must re-run PilRC as shown above.

Next: Add application resources to your project

Last updated: Dec 16, 2001

Palm Powered is a trademark of Palm Inc. Pocket Smalltalk is trademark of Pocket Smalltalk Group. Copyright (c) 1998 - 2001 Pocket Smalltalk Group.