Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Method call returns the wrong value
Message
From
26/01/2004 17:26:23
Gary Foster
Pointsource Consulting LLC
Chanhassen, Minnesota, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Method call returns the wrong value
Miscellaneous
Thread ID:
00870801
Message ID:
00870801
Views:
60
I have an interesting ( read: highly annoying) problem. I have an array of form controls that have a method named GetDisplayValue that takes an integer parameter and returns a string value. I add an object at runtime to the controls that has this method and has a BINDEVENT call to bind the method call. When I step through the method, everything works like a champ, yet after the call, cValue = the passed value, even if the method is hardcoded to return a string. The BINDEVENTS seems to be working since program flow calls the method and the return value is set. I just don’t seem to be able to “catch” the return value.

*-- Sample call
LOCAL cValue
cVAlue = ''
cValue = aObjArray[1].GetDisplayValue(nSomeKeyNumber)
? cValue && nSomeKeyNumber instead of the true return value


I even re-did the object's method to do this:
PROCEDURE GetDisplayValue
LPARAMETER tnKey
RETURN 'ABCDEF'
ENDPROC

I still get the passed value back instead of the ‘ABCFEF’! I hope I'm missing something obvious here. Any hints? Thanks.

Gary
Next
Reply
Map
View

Click here to load this message in the networking platform