[Gambas-user] Property question....

Stephen Bungay sbungay at ...981...
Fri Mar 14 04:51:22 CET 2008


  Given the following....

PUBLIC mRecordSet AS Result

PROPERTY RecordSet AS Result
PRIVATE FUNCTION RecordSet_Read() AS Result
   RETURN (mRecordSet) ' This will probably never get used
                       ' access mRecordSet directly.
END

PRIVATE SUB RecordSet_Write(Value AS Result)
   IF NOT IsNull(Value) THEN
      IF Value.Count > 0 THEN
         mRecordSet = Value
         PopulateForm
      END IF
   END IF
END
.
.
.
' Only gets called when Property RecordSet is written to...
Private Sub PopulateForm()
   ' Code to populate the form from data in mRecordSet goes here
END


An assignment of a result set to property 'RecordSet' will yield 
"Unknown identifier: RecordSet at line [line number] in [formname].class.

Why can I not use a property to store a result? I can code around this, 
but being able to do it lets me use the properties to make things happen 
when result sets get assigned.





More information about the User mailing list