Hi!


 I am a dummie on Palm programming (3 months). I would like to encapsulate
a CW resource  (for example , a field) inside a Sat. Forms extension.To do
this,
I have found 2 ways : to declare a FieldType variable or to call the
FldNewField() function. In the first case, I do :


    FieldType   fld1;
    RectangleType R;
    FieldAttrType fldAtt;

    fld1.id = 9999;     // For example
    R.topLeft.x = 10;
    R.topLeft.y = 10;
    R.extent.x = 40;
    R.extent.y = 10;
    fld1.rect = R;
    FldGetAttributes(&fld1,&fldAtt);
    fldAtt.visible = 1;
    FldSetAttributes(&fld1,&fldAtt);
    fld1.textLen = 10;
    fld1.maxChars = 10;
    FldSetUsable (&fld1,TRUE);
    FldDrawField (&fld1);

  The problem is that the control doesn't appear.Any idea ?



   In the second case, I do :

     FieldPtr fld1
     FormPtr frm;

     frm = SF_GetFormOsFormPtr(SF_GetCurrentForm());
     if (FrmValidatePtr(frm))
     {
          fld1 = FldNewField ((VoidPtr) &frm,9999,10,10,40,10,
                              boldFont,15,true,true,true,true,
                              rightAlign,false,false,false);
     }


  I get the error message :

     'MemoryMgrNew.c , Line:4197,Invalid handle'


  Yesterday I did the same than in case 2
  but inside a CW app (not an extension) and
  the object appeared without any problem,
  so maybe there is no way to do this inside a
  Sat. Forms extension project. Any help??


  I am usign a Palm V (maybe is an important data).


  Anyone can help me ??

  I appreciate any kind of help
  Thank you for your time


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to