Narayana,
This method that I am using masks the one you mention. Here is the
method definition:
static void * GetObjectPtr (UInt16 objectID)
{
FormPtr frm;
frm = FrmGetActiveForm ();
return (FrmGetObjectPtr (frm, FrmGetObjectIndex (frm, objectID)));
}
Regards,
JV
On 11/6/06, Narayana Moorthi <[EMAIL PROTECTED]> wrote:
hi,
i am also a newly learning palm devoloper. I do not know whether your
'GetObjectPtr' in fldP = GetObjectPtr(ApgarInput);
is your own method. if not u should use FrmGetObjectPtr(pointer to form,
objectindex). the prototype and definition is:
Prototype void *FrmGetObjectPtr (
const FormType *formP,
uint16_t objIndex
)
Parameters → formP Pointer to the form. → objIndex
Index of an element in the form. You can obtain this by using
FrmGetObjectIndex().
and continue with FldInsert().
you are getting error because your program does not know which form (memory)
should it access. try this and and kindly let me know if you are able to
get the answer.
But to efficiently insert text use FldGetTextHandle() method.
On 11/6/06, Jorge Vasquez <[EMAIL PROTECTED]> wrote:
>
> Hi again,
> I think that I am lost as to how manage String in general in Palm. I
> come from JAVA background so please have a little patience.
> I have the following code fragment which is causing me pain:
>
> ...
> case frmOpenEvent:
> pForm = FrmGetActiveForm();
> FrmSetFocus(pForm, FrmGetObjectIndex(pForm,
ApgarInput));
> //Agregar el valor de Apgar previamente ingresado
> if (valorApgar != 0) {
> fldP = GetObjectPtr(ApgarInput);
> FldInsert(fldP, valorApgar,
StrLen(valorApgar));
> }
>
> I have a global pointer variable valorApgar which is a pointer to the
> formerly introduced text in the Field and which I obtain as following:
>
> valorApgar = FldGetTextPtr(fldP);
>
> the global variable valorApgar is declared as follows:
>
> static Char* valorApgar;
>
> I am getting an error related to an invalid access of memory but to be
> honest I AM LOST!!!
>
> Thanks and regards,
> JV
>
> On 11/5/06, Jorge Vasquez <[EMAIL PROTECTED]> wrote:
> > Regards,
> >
> > I am a Palm beginner and I would like to know if somebody can help me
> > with code examples to the following 2 problems:
> >
> > 1. Maintain the previous field value entered by a user in a form.
> > (The specific scenario consists of a wizard-type application, where
> > the user has the possibility of navigating between forms and whenever
> > he goes back I need to maintain the previous values that he/she
> > entered for each field)
> > 2. Validate if the input value in a field is an integer.
> >
> >
> > Thanks to all,
> > --
> > Jorge Andres Vasquez
> >
> > --
> > For information on using the PalmSource Developer Forums, or to
unsubscribe, please see
http://www.palmos.com/dev/support/forums/
> >
>
>
> --
> Jorge Andres Vasquez
>
> --
> For information on using the PalmSource Developer Forums, or to
unsubscribe, please see
http://www.palmos.com/dev/support/forums/
>
-- For information on using the PalmSource Developer Forums, or to
unsubscribe, please see
http://www.palmos.com/dev/support/forums/
--
Jorge Andres Vasquez
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/