Ahh, makes sense now. Thanks for the help Paul, appreciate it.

Warm regards,
Hemon


"Paul Gibson" <[EMAIL PROTECTED]> wrote in message
news:91203@palm-dev-forum...
>
> Well, I use Insider for that.  It is quite good, but recently it seems to
> have vanished.  Search the archives over the past month or two to come up
> with the suggested alternatives to Insider.
>
> My code is a bit sloppy, but I want two pointers to the structure.  One is
a
> Char *, which points to the head of the memory sequence, and one is
> RecordType which also points to the same place.  The data pointer in
record
> type will still be null (or garbage) however, so it must be set.  I just
> like to use the Char * as a basis for the data pointer.  Alternatively:
>
> rt->data = rt + sizeof(RecordingHeaderType);
>
> would probably work.  Then you would not need the Char *.  Essentially
what
> this is doing though is setting rt->data to point at a spot n bytes from
the
> front.  N is simply the number of bytes used by the previous members of
rt,
> ie, RecordingHeaderType.  There are  probably 100 ways to do this, and
they
> depend on how you declare the structure.
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Hemon
> Dey
> Sent: Monday, July 15, 2002 9:40 PM
> To: Palm Developer Forum
> Subject: Re: Dynamically expanding record
>
>
> Paul,
>
> Thanks for that explanation. I'm about to test it out now ... do you know
of
> any programs that let you inspect the values in a record in a database?
>
> > Alternatively you could have data be MyType *.  But you'd have to set it
> to
> > the beginning of the array after locking the record:
> >
> > Char *s = (Char *)MemHandleLock(h);
> > RecordingType *rt = (RecordingType *) s;
> > rt->data = s + sizeof(RecordingHeaderType);
>
> I'm not sure if I can understand what you're trying to do here, I would
> appreciate it if you could please expand on it. ...
> ie. Why do you lock to a character pointer and then cast it to a
> RecordingType pointer? Help, I'm lost !!!  :)
>
> Thanks for your help.
> Hemon
>
>
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/support/forums/
>
>
>
>



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

Reply via email to