I guess that this problem does not affect very many people since the response to my original post was non-existent until now. Either that or the developers affected aren't regression testing on the Treo simulators...
I also think the problem is caused by the "focus-ring" feature. The OS loses the current focus field when you select a control. I eventually, came up with a workaround that is compatible with other devices. I cache the selected field using the fldEnterEvent. Then use the cached value in response to selection of my controls. Not sure if this is a perfect solution but it solved my immediate problem. I have included the text of my original post for continuity. My original post should have said that "FrmGetFocus returns nofocus (0xffff)" - it is my function (getFocusField) that returns null as a result of the field object focus being lost.. Ralph "jan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I have a similar problem. > My app runs on all generic 5.x simulators but not on a Treo650 or T|T5 simulator. > FrmGetFocus returns 0xFFFF on the Treo-simulator. > Perhaps it has something to do with this "focus-ring" feature? > ---------------- My original post --------------- Ralph Curtis Tue, 02 Nov 2004 14:34:41 -0800 I use the following code to check for a field with selected text when a control (graphic button) is selected. If such a field exists I process its selected text as part of handling the selected control. Works fine except on the Treo (simulator). On the Treo FrmGetFocus returns null. I have checked as early as the ctlEnterEvent and found that null will be returned. Does anyone know of this problem or a work around for the problem? FieldPtr getFocusField(const FormPtr formP) { FieldPtr fldP = NULL; UInt16 objIndex = FrmGetFocus(formP); if(objIndex != noFocus && FrmGetObjectType(formP, objIndex) == frmFieldObj) { fldP = (FieldPtr)FrmGetObjectPtr(formP, objIndex); } return fldP; } ----------- End original post ---------------- -- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
