i dont know how many people may find this useful - but, i thought i would
post it here for archive purposes anyhow; i know i spent long enough on it.
if your the type like me who likes to move the whole application, including
the event loop to an PACE native object (ARM) and, you are expect to use
the dynamic input areas of the T3 (with DIA compatibility prc's installed),
you will need this code.
calling FrmSetDIAPolicyAttr() via PACE on a Tungsten|T3 with the DIA
compatibility prc's installed gives the unit a FATAL EXCEPTION, however
calling the API from 68k directly works fine.
Err
FrmSetDIAPolicyAttr_PACE(FormType *formP, UInt16 diaPolicy)
{
Err result;
// Tungsten|T3:: PACE callback fails (FATAL EXCEPTION)
if ((g -> ftr.comID == 'Palm') && (g -> ftr.devID == 'Arz1'))
{
uint16 *p;
// FormAttrType exists at 40 bytes inside the form type structure
//
// default: 0x0041 0x0230
// custom: 0x0041 0x0211 <-- flags changed
p = (uint16 *)formP; p += 21;
if (diaPolicy == frmDIAPolicyCustom)
*p = 529; // 0x211
else
*p = 560; // 0x230
result = errNone;
}
else
{
PACE_PARAMS_INIT()
PACE_PARAMS_ADD32(formP)
PACE_PARAMS_ADD16(diaPolicy)
PACE_PARAMS_DONE()
PACE_EXEC_SELECTOR(pinFrmSetDIAPolicyAttr)
result = (Err)PACE_EXEC(sysTrapSysPinSelector, 0)
}
return result;
}
this is definately a "hack-in-place" for the Tungsten|T3 - but, it is the only
way someone will be able to call the FrmSetDIAPolicyAttr from within your
PACE native object on an ARM unit (may not work on x86 - offsets diff?)
if you dont call FrmSetDIAPolicyAttr - you can press the DIA up/down buttons
and it simply returns to the open position because the form doesn't have
these attributes set internally.
i wonder how many native-ARM secrets i could find to post here :)
--
// Aaron Ardiri
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/