GetFieldID

PowerBuilder Native Interface

IPB_Session interface:

GetFieldID method

Description

Syntax

GetFieldID(pbclass cls, LPCTSTR fieldName)

Return Values

Examples

void CallBack::f_setvisible(IPB_Session* session,
   pbobject dwobj)
{
   pbclass cls;
   IPB_Value* pv;
   pbfieldID fid;
   pbstring strtmp;
   bool isTrue;
   pbboolean isNull;

   cls = session-> GetClass(dwobj);
   fid = session-> GetFieldID(cls, "visible");
   if (fid == kUndefinedFieldID)
      return;
   isTrue = session-> GetBoolField(dwobj, fid, isNull);
   if (isTrue)
      session -> SetBoolField(dwobj, fid, false);
else
      session -> SetBoolField(dwobj, fid, true);
   return ;
}

Usage

See Also