--- John Leung wrote: > > 1. Checking if a menu (or a command bar) is visible. > ... >
Perhaps this thread will help you: http://www.escribe.com/computing/pcpqa/m51603.html > 2. A second question is related to a field's attribute. In OS4's > API reference manual, it warns us about not accessing FieldAttrType's > structure member directly and yet, there are 2 functions that allow > us to get and set the attributes (FldGetAttributes and > FldSetAttributes). > So, I guess the question is what is true. If we shouldn't use those > 2 functions, then how should we change a field's editable state > programatically and how should we check if a field is usable, etc? > The API provides the functions FldGetAttributes and FldSetAttributes, so you *can* use them. What you can't do is get a pointer to a field, then use the -> operator to access that field directly. Sample untested code to make my point: // don't do this UInt16 usable; FieldType * fldP = FrmGetActiveField(frmP); usable = fldP->attr.usable; // bad fldP->attr.usable = 0; // also bad // ok to do this FieldAttr attr; FieldType * fldP = FrmGetActiveField(frmP); FldGetAttributes(fldP, &attr); // OK attr.usable = 0; FldSetAttributes(fldP, &attr); // also OK __________________________________________________ Do You Yahoo!? Send FREE Valentine eCards with Yahoo! Greetings! http://greetings.yahoo.com -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/tech/support/forums/