> If you're going to present a dialog, I'd think that better approaches
would be:
>
> A. in your library function, the library opens its own database,
gets/locks its
> resources, runs its dialog code, releases/unlocks its resources, and
closes its
> database before returning to the caller
>
> B. add a 'code' 1 resource to your library as if it were a normal
application.
> In your library function, call SysAppLaunch on your library and present
the
> dialog in PilotMain.

i wouldn't recommend version B. that would be way too complicated for a
simple task like that - you would have to save the current state of the
calling application, call the other application, save the settings then call
and restore the original application again.

depending on how (frequently) the resources are used, version A would be ok,
like for example displaying a dialog and never use the resources again. if
the library makes frequent use of it's resources in different functions,
this approach would probably slow down the whole process a lot without that
much of a benefit.

a well programmed calling application opens and closes the shared library
correctly anyway. and it can be easily checked if the library is already
opened or not.

markus dresch (www.palmside.com)



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

Reply via email to