PocketStudio 2 FAQ
Content
1. How do I unpack a password protected zip file?
Use the pkunzip utility with the -s switch:

pkunzip -sMyPassword PSTrial.zip

2. How do I upgrade my PS 1.x projects?

Because of radically improved event handling model, the old projects must be manually upgraded. We recommend these steps:

  1. create a new project
  2. for each FORM resource from your old project create a new form (click New Form button)
  3. copy FORM resources from your old appllication as plain text (they should be almost 100% compatible except NOFRAME flag)
  4. switch to form designer, then click on controls and double-click events to generate required headers for event handlers
  5. 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

3. How do I create a simple PalmOS application?
  1. click New items icon (the first icon)
  2. click Application icon (the first icon)
  3. click OK button
  4. click Run icon (or press F9)
  5. to stop debugging either exit your applicaiton in POSE or press Ctrl-F2

then try to add a simple button control:

  1. click Design tab in the bottom size of the editor and switch to the form designer
  2. click Button resource on the component palette
  3. click form to add button resource
  4. set Caption to Hello in Object Inspector window
  5. double click on Button to create button event handler
  6. add this line into the event handler procedure: ShowMessage('Hello, world');
  7. click Run icon (or press F9) to compile and start the application
4. I don't see all controls in the palette, how do I resize the palette?

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

5. How can I debug my application?
  • 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
6. How do I define PalmOS version string?

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.

7. How do I use modal form?

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);

8. How do I use STRINGLIST?
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 ;
Last Updated Monday March 3, 2008
Copyright © 1999-2008 WINSOFT. All rights reserved.