Hello,
If you haven't already found it, check out the tutorial at
http://tangentsoft.net/palmfaq/articles/tutorial/index.html - read it all
though, including the debugging section, as there are some "bugs" in the code
in the earlier section that are "fixed" in the debugging portion of the
tutorial.
> The first one.
>
> I created a database of about 10 records to store some configuration that I
> don't want to store in the Prefs. Now I can get the info using fields in my
> config form, but I'm not able to get the info and store it in a char
> variable to use the config info inside the program. How can I read the
> record and store it in a char variable without passing the data trought a
> field?
Try something like this (from memory, so I hope it's right - somebody'll
correct me if it's not I'm sure ;-):
Char * myCopy;
handle = DmGetRecord(databaseRef, index);
Char *p = (Char *) MemHandleLock(handle);
myCopy = MemPtrNew (StrLen (p) + 1); // null terminated
StrCopy (myCopy, p);
MemPtrUnlock(p);
Could do with some error checking of course, but it shows you the basic
strategy. Remember to free the copy when you're done with it (or when the
application terminates) using MemPtrFree().
> The second one.
>
> It's a matter of floats, I have to make some calculations about time and
> cost per minute, but I get a nice 1.1111111e01 kind of result. How can I
> make it seems like 11.12 in order to be easy of undestand? if you can help
> me with some examples of how to do this and how to make my calculations.
Sorry, don't have any info for you on this one... never done anything with
floating point numbers.
HTH,
John...
=====
Rate Corporate America at http://exec-ratings.bluedonkey.org
__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
http://tax.yahoo.com
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/support/forums/