$objtype for Item Reference

Reg Paling Reg.Paling at Lokanet.com
Mon Apr 27 20:26:26 EDT 2009


Hi Hugh,

You can define a field reference parameter pRef, and then

Switch pRef.$type
   Case kCharacter,kInteger,kNumber
      Do something
   Case kBoolean
      Do something else
   Case kDate,kDatetime,kTime
      etc
   Case kPicture,kList
      etc
   Default
      OK message debug {Unrecognised type.  [nam(pRef)]    [pRef.$type]}
End Switch

Cheers,
Reg


Hugh Bragg wrote:
> How can I determine the object type of a variable pointed to by an 
> Item Reference?
>
> Everything I've tried returns #NULL for pRef.$objtype()
>
> Is there any way to pass any unknown variable to a method and 
> determine the variables object type within the method?
>




More information about the omnisdev-en mailing list