On Fri, 12 Sep 2003, Luc Le Blanc wrote:

> Is there any good example of such multiple object beaming in pre-OS 4.0
> available somewhere?

The book _Palm Programming: The Developer's Guide_ from O'Reilly has a few
great examples of multi-record beaming, using no special 4.0+ features.
You can probably get access to the book online through their site if you
don't have the printed version, or you can buy that.  I've used a
variation on their example in some of my code, and it's worked very well.

Basically what they do is send a record count then, for each record, a
size value and then the record itself.  There's no memory allocated to
hold a single record or the entire set... the data is beamed straight from
the database records.  The receiver knows how much is coming and will wait
for it... there's no reason to send it all at once.  There's matching
receive code in the book that handles single- and multi-record beaming,
based on the corresponding sender functions.

Hope that helps.

-- 
-----------------------------------------------------------------------
Brian Smith // avalon73 at arthurian dot nu // http://www.arthurian.nu/
Software Developer  //  Gamer  //   Webmaster  //  System Administrator
"What I like about deadlines is the lovely whooshing sound they make
 as they rush past." --Douglas Adams

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

Reply via email to