> I put in code to handle the
> sysAppLaunchCmdSyncNotify launch code, but found that DmFindDatabase (to
get
> the app's dbID using its database name) does not work in this context -
the
> find fails.

I don't know why this isn't working, but you can use SysCurAppDatabase to
get your card number and LocalID. (It seems like I've been saying this a lot
lately; I guess the fact that this API isn't in the Data Manager explains
why people don't know about it.)

> If instead I use DmGetNextDatabaseByTypeCreator, I can find the app, but
> unfortunately, calling SysUIAppSwitch to launch the app with the cardNo
and
> dbID from this call returns a normal status, but the app isn't launched
(the
> HotSync app remains on the screen).

The HotSync app is probably "eating" the appStopEvent enqueued by
SysUIAppSwitch. Try Peter's suggestion - using an alarm to delay the switch.
The problem with this is what delay do you use? Too short and it won't work.
Too long and it'll pause for a while.

Alternatively, do your self-extracting directly in the syncNotify sublaunch.
I'd be concerned about this for several reasons. (1) Limited stack, dynamic
heap, etc. (2) Changing the list of databases while iterating over it. (3)
The user isn't expecting the "cleaning up" phase to take long.

The design of Palm OS doesn't really support what you're trying to do; your
best bet may be to let the user invoke the self-extracting app manually.

Another approach to self-extracting is to make the self-extracting app look
like the app that's inside the archive. When you first run it, it starts
with an extraction and then runs normally. This is similar to the "first
run" approach Microsoft uses in their Mac apps.
--
Danny @ Palm

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to