Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Class Libraries and Code References
Message
From
19/06/2012 15:01:13
 
 
To
19/06/2012 14:39:16
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows 7
Miscellaneous
Thread ID:
01546353
Message ID:
01546371
Views:
63
>>>>>>I have a container class in which I used to have a label. The container was placed on many forms during design time.
>>>>>>
>>>>>>I've now removed that label from the container class. When I run the Code References tool, it is reporting that all of those forms still have some reference to the label. I've opened one of the forms and went thru it with a fine tooth comb and cannot find any such label. I didn't expect to because I've removed it from the class. Code References, however, insists that it is still there.
>>>>>>
>>>>>>Anyone ever experience this "bug" or is there something I'm missing when using Code References?
>>>>>>
>>>>>
>>>>>Have you packed the VCX?
>>>>>
>>>>>Tamar
>>>>
>>>>I just packed the vcx as you suggested and it made no difference to the Code References results.
>>>>
>>>>Mike
>>>
>>>I have seen that myself. The reference stays in the VCX (you can see it by looking at the code in
>>>the class browser), so it gets picked up by Code References. Hasn't seemed to affect anything,
>>>however, so I haven't bothered to figure out the cause or the fix.
>>>
>>>-m.
>>
>>I was coming to the same conclusion that it "hasn't seemed to affect anything", however, this is a huge glitch IMO when using Code References.
>
>Code References is just picking up what is there.
>I would guess that GoFish would pick up the same thing.

Is the search finding a reference in the Code or in the Property settings? If in the code, then there is probably a code reference to the label, such as:

thisform.myContainer.myRemovedLabel.Caption = "This label has be removed from the class"

In this case there would be runtime failure as the label no longer exists. However, if you previously had the label in the class and added to a form and then in the form you changed the label caption to the above at design time in the properties editor; then you could still have a reference to the label but at run-time you would not have a problem. Since you are changing the caption of a label that is in a class that is then added to a form, the property value change is stored with the form object and not with the original class implementation. When searching with code references it would find the label property value, but this would have no effect since the object does not exist (VFP will not complain of a missing object but will ignore the property value).
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform