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

richard terry rterry at ...1822...
Sat Apr 5 04:12:35 CEST 2008


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








More information about the User mailing list