[Gambas-user] IDE not updating class members when changed (2.99 Build 1291)

Benoit Minisini gambas at ...1...
Sat Apr 5 15:44:26 CEST 2008


On samedi 5 avril 2008, richard terry wrote:
> Benoit,
>
> Please take the time to digest this as I think it really is a bug (or
> rather something not being updated under the hood when you change members
> of classes). Stopping gambas and re-loading rectifies things however.
>
>
> I have  number of classes describing drugs
>
> cPack:  (contains the pack details)
> 	active as string
>         active_units as string
> 	etc.
>
> cProduct: (contains the product details)
> 	brand as string
> 	formcode as integer
> 	prodcode as integger
> 	formulation as string
>
> I had a class cDrug, which I've simplifed but say:
>
> cDrug is the class and has this in it
> =================
> Public pack As cPack
> Public productdetails  As cProduct
> =================
>
> Take note my description below of what happens when I later change one of
> these names.
>
> Then I have another subclass which inherits cDRug,  which again I've
> simplifed and removed many of its members,  but say:
>
> cPrescriptionItem:
> =====================================
> Inherits cDrug
> Public start_date As Date            ' date the drug started
> Public directions As String          ' directions as text eg 1 mane
> etc
> =====================================
> ie the tree on the side bar shows (nothis:
>
> cDrug
> 	cPrescription
> cPack
> cProductDetails
>
> Now when I address this in code
>
> Dim scriptitem = new cPrescriptionitem
>
> When I type the auto-completion gives me this:
>
> scriptitem.productdetails.brand
> or
> scriptitem.pack.active
>
> ie so far, all ok.
>
> Now lets say I think - "stupid me, I should have just called the
> productdetails member of Cdrug "product instead of "product details"
> So I go back and change it, so now cDrug reads:
>
>  =================
> Public pack As cPack
> Public product As cProduct
> =================
>
> However, when I then go back to the form using this information, something
> under the hood has not updated this change, so the auto-complete still
> comes up  with:
>
> scriptitem.productdetails.brand  instead of
> scriptitem.product.brand
>
> If I manually change it then the program runs ok.
>
> To get the auto-completion to work I have to close down gambas and start it
> again, so presumably something is getting reset there, which is not getting
> reset when one changes stuff within a class.
>
> Regards
>
> Richard
>

Apparently the bug is that if you modify a class, it resets its completion 
information, but not the completion information of the inherited class.

I will look at it... Bad luck that you found that just after the release of 
2.5! :-)

Regards,

-- 
Benoit Minisini




More information about the User mailing list