Re: dereferencing pointer to incomplete type when trying to access pEvent-data.fldEnter.pField
On Mon, Apr 18, 2005 at 04:01:05AM -, Sebastian Noack wrote: well, I figure out what you said. But I wonder at how it is solved in the internal of functions like FldGetTextLength. The headers used when compiling the OS do not use opaque structure declarations; OS code is allowed to access the structure any way it wants. Conversely, the headers provided by the SDK use opaque structure declarations, and you cannot access the structure's internals. You need to do some research on how opaque structure declarations work in C. For example: struct some_opaque_struct; void do_something(some_opaque_struct*); // This will compile, why? void process1(some_opaque_struct* thestruct) { do_something(thestruct); } // This will not compile, why not? void process2(some_opaque_struct* thestruct) { do_something(thestruct + 1); } -- Dave Carrigan Seattle, WA, USA [EMAIL PROTECTED] | http://www.rudedog.org/ | ICQ:161669680 UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-C++-DNS-PalmOS-PostgreSQL-MySQL -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: dereferencing pointer to incomplete type when trying to access pEvent-data.fldEnter.pField
Hi Tim, Your subject says the error occurs on the first line, but your message says That's not true. In the line pField = pEvent-data.fldEnter.pField;, I don't access the FieldType. I just get a pointer on it. it occurs on the second. Anyhow, the data.fldEnter information is only valid when pEvent-eType == fldEnterEvent. I'm assuming you do check that. I check it in my source. But even I wouldn't do that, the compiler wouldn't notice that. Consider that I talking about a compiler-error-message. Regards Sebastian -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
Re: dereferencing pointer to incomplete type when trying to access pEvent-data.fldEnter.pField
Hi, well, I figure out what you said. But I wonder at how it is solved in the internal of functions like FldGetTextLength. Regards Sebastian -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/