At 4:46 PM -0600 2000/02/16, Robert Graber wrote:
>Well, if you try that code you should get a fatal exception, just like I
>did.  I am thinking that the problem is in the call to FldGetAttributes.
>The OS call expects to send back a pointer to the Attributes in the second
>parameter, not accept an address.

No, the function copies the field's attributes into the memory area pointed to by the 
attrP you pass to the routine. It does not return a pointer to the attributes. 
FldGetAttributes is little more than:

  void FldGetAttributes (const FieldType * fldP, FieldAttrPtr attrP)
  {
    *attrP = fldP->attr;
  }

The fatal exception is (probably) the result of passing an invalid fldP to the 
routine. Hook up a debugger, run this on a Debug ROM, and the problem(s) should become 
obvious. A good C pointer refresher might help too... var parameters are a bit 
trickier if you're used to Pascal-style parameter syntax (pass by value vs. pass by 
reference).

Regards,

Jim Schram
3Com/Palm Computing
Partner Engineering



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to