I am having a problem tracking down an error discovered
using POSE.  This error does not occur on the actual Palm.

I have a Form that has a field that simply displays the User
Name.  It's properties: Usable=T, Editable=F, Enable=T. The form has 
three fields and two buttons.  The event handler has code for opening 
the form and responding to the two buttons; that's it; very simple.

I do not have any event handlers that have anything to do with this 
field.  But POSE apparently taps in this field.  And that causes the
error.

So, I tried this without POSE.  I open the form, then tap the User 
Name field and sure enough the same error is generated.  But I cannot 
determine why it occurs or how to fix it.

The error reported is: "... line 100, invalid field length...".

I have other fields and none of these exhibit this problem.  All 
properties on all three fields are the same except that the User Name 
field is not editable.  Everything else on the form works as it 
should.

Any tips on why I might get this error by simply tapping a field with 
my pen?

Here is the event handler:
//***********************************************************
static Boolean frmRegEventH(EventPtr event) {
  FormPtr       form;
  FieldPtr      fldP;
  Word          fldIdx;
  ControlPtr    ctlP;
  int  handled = 0;

  CALLBACK_PROLOGUE
  form = FrmGetActiveForm();
  switch (event->eType) {
      case frmOpenEvent:
          FrmDrawForm(form);
          if(FrmGetFormId(form) == frmRegister) {
              RegFormInit(form);
          }
          handled = 1;
          break;
      case ctlSelectEvent:
          if (event->data.ctlEnter.controlID == btnRegRegister ) {
              // if btnRegRegistered is pressed do something here
              handled = 1;
              break;
          }
          if (event->data.ctlEnter.controlID == btnRegOk ) {
              // if btnRegOk is pressed return to main form
              FrmReturnToForm(frmMain);
              handled = 1;
              break;
          }
          break;
        }
        CALLBACK_EPILOGUE       
        return handled;
}

--
-----------------------------------------------------------------
Discussion Group:        http://www.halcyon.com/ipscone/wwwboard/

Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------

Reply via email to