"Paul Gilbert" <[EMAIL PROTECTED]> wrote in message
news:34314@palm-dev-forum...
>
> A few questions about the Palm:
>
> 1) Is is possible to programmatically find out the creator ID of the
running
> program? I have a linked in library that maintains a unique database of
> information for each application it's linked into, and I'd like to avoid
the
> programmer user having to explicitly set the creator ID at startup.
You can get info about the current application by calling SysCurAppDatabase
to get a reference to the application database, then using the normal DB
manipulation functions exposed by the Database Manger (DmDatabaseInfo being
one of the more useful).
> 2) This may be a silly question, but how does the Memory application
> determine the number of records (for display) done by an application. If
> say, an application has two tables: a master and client table, but it
would
> only make sense to display the number of records in the master table, is
> there a way to confine the record count to only the master table? If I
> change the creator ID for the secondary table, then it comes up on it's
own
> in the record listing, which isn't desirable.
I'm not sure exactly how it does it, but I would guess that it sums up the
record count for all non-resource databases with the same creator ID. I
don't know of a way to hide records from that count.
> 3) Is there a macro that defines a method's class during compilation -
> something similar to the __FILE__ macro, but of class scope?
This couldn't be done by a macro, since the preprocessor doesn't understand
C++. With CW Palm 7, you can use the predefined identifiers "__func__"
which is a constant string with the name of the currently compiling
function. Both CWP7 and GCC allow you to use __FUNC__ and __PRETTY_FUNC__
for similar tasks.
--
Ben Combee
Veriprise Wireless <http://www.veriprise.com>
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/