
1. How do I unpack a password protected zip file?
2. How do I upgrade my PS 1.x projects?
3. How do I create a simple PalmOS application?
4. I don't see all controls in the palette, how do I resize the palette?
5. How can I debug my application?
6. How do I define PalmOS version string in my application?
7. How do I use modal form?
8. How do I use STRINGLIST?
Use the pkunzip utility with the -s switch:pkunzip -sMyPassword PSTrial.zip
Because of radically improved event handling model, the old projects must be manually upgraded. We recommend these steps:
- create a new project
- for each FORM resource from your old project create a new form (click New Form button)
- copy FORM resources from your old appllication as plain text (they should be almost 100% compatible except NOFRAME flag)
- switch to form designer, then click on controls and double-click events to generate required headers for event handlers
- copy content of event handlers from your old application to the new one
It should be also possible to directly compile your old project sources, but you must change .ENV and .RC file extensions to .PAS
- click New items icon (the first icon)
- click Application icon (the first icon)
- click OK button
- click Run icon (or press F9)
- to stop debugging either exit your applicaiton in POSE or press Ctrl-F2
then try to add a simple button control:
- click Design tab in the bottom size of the editor and switch to the form designer
- click Button resource on the component palette
- click form to add button resource
- set Caption to Hello in Object Inspector window
- double click on Button to create button event handler
- add this line into the event handler procedure: ShowMessage('Hello, world');
- click Run icon (or press F9) to compile and start the application
you can directly modify the PocketStudio\Bin\PocketStudio.dst file: change Width value in the [PaletteBar] section
or simply drag by mouse the palette outside the main window, resize it and place back
- PalmOS emulator (POSE) must be installed, its available at http://www.palmos.com/dev/tools/emulator/; we recommend to use the latest POSE version 3.5
- PS 1.x must be closed before using POSE with PS 2
- sometimes (rarely) restarting PS 2 can help
- try to increase POSE timeouts and delays using Tools/Environment Options/Debugger menu
- to stop debugging either exit your app on POSE or use Ctrl-F2
you must define the version string directly in the project file (Project / View Source menu):
resource
VERSION 1 '1.0';
APPICONNAME 1000 'Project';
ICON 1000 'IconLBW.bmp' 'IconLC.bmp';
ICON 1001 'IconSBW.bmp' 'IconSC.bmp';Notice, that string '1.0' is the app version showed by PalmOS. Development versions usually contain also stage and change information inside version string:
major.minor.[stage.change]
See PalmOS documentation (Palm OS UI Guidelines.pdf) for further details.
use this simple scheme (see DbInfo demo example):
// load and show dialog
PSForm.InitModal(FormCardInfo);
// prepare modal dialog controls (set fields, etc.)
PSField.SetText(FieldName, CardName);
...
// show dialog
PSForm.ShowModal;
// use modal dialog controls (read fields, etc.)
...
// switch off dialog (back to the original form)
FrmReturnToForm(FormMain);
const
StringList1 = AutoID;
resource
STRINGLIST StringList1 'Prefix' 'String1' 'String2' 'String3' ;
procedure Button1Select;
var Text: array [0..19] of Char;
begin
SysStringByIndex(StringList1, 2 , Text, SizeOf(Text));
ShowMessage(Text);
end ;