[Gambas-user] Property question....
Stephen Bungay
sbungay at ...981...
Fri Mar 14 14:48:55 CET 2008
Benoit Minisini wrote:
> 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!
>
Yes the error is happening at compile time and is something I did not
expect (i.e. since RecordSet is declared as a property it should be a
'known' identifier).
More information about the User
mailing list