At 10:27 PM -0700 6/1/02, Craig Belson wrote:
>I have 5 fields that can accept text, and a struct that I created 
>that consists of 5 chars.  What I'm looking to do is store the text 
>input in the fields in the struct, the first field to the first 
>char, etc...

I guess I'm still not getting it.  How are you assigning a whole 
field to just a single char?  Do your fields accept only a single 
character?  Or are you snagging just the first character from each 
field?

>The way I was taught to do this would be to get a FieldPtr for the 
>first field, then get the text pointer for the contents of the field 
>- from there, we could write the text to our struct... (so if that's 
>bad like you said, don't blame me, blame my CS professor. *smiles*)

I didn't say that was bad.  I said that accessing a form's data 
directly was bad.  More explicitly, using "frmP->objects->object" is 
bad.

The title of your e-mail said "FrmGetObjectPtr question", but I've 
yet to see you actually use FrmGetObjectPtr.

However, since you *are* accessing data members directly, you might 
be able to narrow down your crash by breaking things up.  Access 
"frmP->objects" first, then "frmP->objects->object".  The one that 
causes your crash might tell you something.  For instance, if the 
first one causes the crash, then you know that "frmP" is invalid for 
some reason.

-- Keith

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

Reply via email to