[Gambas-user] Property question....

Benoit Minisini gambas at ...1...
Fri Mar 14 10:03:11 CET 2008


On vendredi 14 mars 2008, Stephen Bungay wrote:
>   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.

This is a compiler error. Please explain how you can get it at runtime while 
assigning the property!

-- 
Benoit Minisini




More information about the User mailing list