Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Name expresions not working with WITH..ENDWITH
Message
From
23/10/2000 14:59:41
Jorge Haro
Independent Consultant
Juarez, Mexico
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Name expresions not working with WITH..ENDWITH
Miscellaneous
Thread ID:
00433086
Message ID:
00433086
Views:
55
I'm having trouble with the following code:
with (lcObjectName)
    .IncreaseUsageCounter()
    .visible = .t.
endwith
lcObjectName contains the name of an object, but I'm getting a data type mismatch, I know the object exists, and I can see it and it's properties in the debugger, I've also tried it with "thisform" as the value for lcObjectName just for testing, and I get the same error.

It works using macro substituion, but I'm doing this inside a do while loop and AFIK macro substitutions are only evaluated once in this circumstances so it's not an option.

basically this:

with (oObject)

and this:

with oObject

behave the same way, as if the parentheses had no effect whatsoever.

TIA
Next
Reply
Map
View

Click here to load this message in the networking platform