[Gambas-user] Little DataCombo bug

Leandro Anthonioz Blanc leandro_anthonioz at ...43...
Fri Jun 8 15:53:12 CEST 2007


Hi all! I'm designing data bound forms in Gambas 1.9.49. Controls like DataSource,
DataBrowser and DataControl works perfectly. However, I discover a little DataCombo bug.
Every time a form is opened, DataCombo allways shows first field different to Datacombo "Field" property,
not (necessary) field marked in "Display" DataCombo property. For example: suppose I have a table like this:

    MyTable
    -------
    RecordId  (key)
    FieldOne
    FieldTwo

    If I configure a DataCombo with properties like this:

    cmbMyDataCombo
    --------------
    Table: MyTable
    Field: RecordId
    Display: FieldTwo

... when forms open, MyDataCombo shows "FieldOne" field contents, not "FieldTwo"
field contents. However, this can be solved executing line "Me.cmbMyDataCombo.Refresh(TRUE)" 
(True argument is required to solve it). After execute this line, this time DataCombo shows "FieldTwo"
field content. I think problem is caused because first time that Reload sub in
comp/src/gb.db.form/DataCombo.class file is executed, $sDisplay variable is not assigned yet
(is an empty string), and default behaviour in such case is show first field different to
"Field" DataCombo property field. But I don't know how to set $sDisplay at startup to solve it.
I think that "something" should call Display_Write() property procedure before Refresh() to 
set $sDisplay variable. I hope this information can be useful. Thank you very much.


       
---------------------------------
Get the free Yahoo! toolbar and rest assured with the added security of spyware protection. 



More information about the User mailing list