Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Error 1734 when setting property
Message
From
07/01/2009 03:16:01
 
 
To
06/01/2009 12:35:03
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Miscellaneous
Thread ID:
01371076
Message ID:
01371587
Views:
13
>>>>>>>>>>>>Hi,
>>>>>>>>>>>>
>>>>>>>>>>>>What can cause the above error when setting a property of an object?
>>>>>>>>>>>>
>>>>>>>>>>>>I have a class derived from 'Container' with a property named 'IsValid' with an access method that simply returns T.
>>>>>>>>>>>>A second class is derived from this which overrides the IsValid_Access by returning 'This.IsValid'
>>>>>>>>>>>>
>>>>>>>>>>>>In the InteractiveChange of a textbox in the class I have:
>>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>Check Hidden/protected attribute
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>? PEMSTATUS(THIS.Parent,"IsValid",2)
Returns F - everything is public :-{
>>>>>>>>>
>>>>>>>>>Rename the IsValid_Access to IsValid_Access_, then try again.
>>>>>>>>
>>>>>>>>Thank you ! That worked (once I'd put the sub-classed code into the renamed method)
>>>>>>>>So are you going to tell me why it worked (i.e. what was wrong before) :-}
>>>>>>>>
>>>>>>>>Regards,
>>>>>>>>Viv
>>>>>>>>
>>>>>>>
>>>>>>>Hard to say something without having the code in my hands.
>>>>>>>
>>>>>>>Post IsValid_Access code ...
>>>>>>Pretty minimal. Just:
IF !THIS.IsValid
>>>>>>  ?? CHR(7)
>>>>>>  THIS.Label2.VISIBLE = .T.
>>>>>>ENDIF
>>>>>>RETURN THIS.IsValid
>>>>>>
>>>>>>Regards,
>>>>>>Viv
>>>>>
>>>>>try to reactivate the method ... now
>>>>
>>>>Hi,
>>>>
>>>>If I revert to .IsValid_Access the error comes back. Also I've realized that changing the name of the accessor method won't be a satisfactory solution - all the other classes (where the name hasn't changed) lose their functionality unless I manually go through all of them and copy the code from the old .IsValid_Access to the new .IsValid_Access_ . Given that there's 15-20 of them it would be a pain to do have to do it manually....
>>>>
>>>
>>>VFP call IsValid_Access when you read IsValid property and IsValid_Access is not in the call stack.
>>>VFP don't call IsValid_Access_ ... then you lost the implicit VFP call
>>>
>>>I guess that the error fired within sValid_Access ...
>>>Debug it, find the true line where the error is fired ...
>>
>>The error fires on '.IsValid = .T.' - it doesn't step into any code (there's no assign method)
>>?
>
>Exists some bug into VFP that fired Access when you write into some special property ...
>and exists some name property that collide with some internal VFP design ...
>IsValid can to be used into VFP ?
>
>Try to replicate the schema design with another property name ...

Out of curiosity I added an assign method to the .IsValid property (which just has the default "THIS.isvalid = m.vNewVal" code) and the error went away......
Previous
Reply
Map
View

Click here to load this message in the networking platform