Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Assign method works sporadically with objects
Message
From
20/08/2002 12:10:54
 
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00690435
Message ID:
00691516
Views:
15
it's weird

the only obvious possibility left is that you have a current alias with a field name that is equal to the parameter name of the assign method

like tablesomething.FieldName && and alias() = tablesomething

ppp_assign
lparameters FieldName &&

What if you use m.FieldName in the assign method ??

or change the parameter name to something like xyz12345 eg

I'm out of ideas ...

>Oops, forgot to come back and see if there were any more responses. Sorry about that.
>
>I'm not sure how that would help. The timer _is_ the current object. I can see that in the debugger. The problem isn't the object, it's the parameter.
>
>It's like this:
>
>x = y
>
>in x_assign, the parameter being passed in isn't the value of y; it's null. I can trace it through and see that y clearly has the proper value, but when the assign method fires, it doesn't pass it in. Which makes the assign method useless. So I took it out and put the code in there in the same place as the x=y. Works just fine that way.
>
>All I can figure is this new assign thingy isn't ready for prime time, yet. I just won't use it anymore. Problem solved. :)
>
>Thanks,
>
>Michelle
>
>
>>I wouldn't know. Your problem is more or less similar to the one I had. The only difference is that it does not happen in the timer event.
>>
>>Try the things below. If it doesn't help it doesn't harm
>>
>>To make sure add the code I sent to the timer event (with the assert enabled)
>>
>>Also make your assign method look like
>>
>>
>>lparameters NewVal
>>
>>local obj
>>obj = this
>>
>>assert (obj.BaseClass = 'Timer')
>>
>>&& rest of your code
>>
>>
>>That way, if this is the case, you should have a failing assert prior to your error
>>
>>Success,
Gregory
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform