bartop

palmoswerks ARCHIVE
Palm OS programming tips from a (former) CodeWarrior insider

header

Navigation

Search
Home
About
Stories
Stuff I Like
Articles
PilRC
CodeWarrior
palmos.techwood.org
DevTools List
Palm OS Dev FAQ

Panel Launching Behavior

Author:   Ben Combee  
Posted: 11/13/03; 3:30:53 PM
Topic: Panel Launching Behavior
Msg #: 153 (top msg in thread)
Prev/Next: 152/154
Reads: 552

Here's an underdocumented area of Palm OS:

Applications can launch pref panels using code like this:

LaunchWithCommand(sysFileTPanel, sysFileCFormats,
    sysAppLaunchCmdPanelCalledFromApp, 0);

The "LaunchWithCommand" macro encapsulates a call to SysUIAppSwitch after finding the DB that matches the type/creator code passed to it. The key part here is the sysAppLaunchCmdPanelCalledFromApp launch code, which tells the panel that it should put up a "Done" button to exit the panel, rather than show a pop-up trigger with all the panel names.

The OS has a special hook in place to handle these panel launches. When the panel exits, the original app is restarted with a sysAppLaunchCmdReturnFromPanel launch code. If the application doesn't handle this launch code, the OS will again startup the app, this time using a sysAppLaunchNormal code.


Send feedback to combee@techwood.org
Copyright © 2004 Benjamin L. Combee
Palm OS is a registered trademark of PalmSource, Inc.
Metrowerks and CodeWarrior are registered trademarks of Metrowerks Inc.

The views expressed on this website/weblog are those of mine alone and do not necessarily reflect the views of PalmSource or Metrowerks.

This is a Manila Site

qwertYAK / frobnovich