Re: String Reference to Object

2018-02-16 Thread AndyHC
may I suggest SCATTER NAME ... but using a cursoradapter is better! ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list:

Re: String Reference to Object

2018-02-16 Thread AndyHC
may I suggest SCATTER NAME ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive:

Re: String Reference to Object

2018-02-15 Thread Fernando D. Bozzo
(part 2) Gene, about the alias thing: If you have your table already open with something like this: use ccli Then you can re-open the same table under another alias this way: use ccli alias *mytable again shared* ? *mytable*.clcode ... use in

Re: String Reference to Object

2018-02-15 Thread Ken Dibble
> Unfortunately, it does not work in my usual use case: as an alias. > Example: > use ccli > where=evaluate("ccli") && Nope > ? where.clcode Well, in that case you should be using an alias: use ccli alias TheTable ? TheTable.clcode Well, I don't

Re: String Reference to Object

2018-02-15 Thread Fernando D. Bozzo
Gene, you did talk about objects, not tables and fields. They are not treated the same way. In this case, then Ted is right, the alias must be used. You can use generically with something like this: use ccli alias *mytable* ? *mytable*.clcode Nice thing about aliases is

Re: String Reference to Object

2018-02-15 Thread Ted Roche
EVAL() is really your best choice for Objects, though not for tables as you used in your example. loObject1=EVAL(somestring) loObject2=EVAL(someotherstring) Do Something With loObject1, loObject2 Eval evaluates the string's value, where & dynamically recompiles the entire line of code with

Re: String Reference to Object

2018-02-15 Thread Gene Wirchenko
At 11:07 2018-02-15, Jean MAURICE wrote: Hi Gene, have you tried WITH (m.reference) .referredto = etc ENDWITH ? The WITH gives a datatype mismatch error. At any rate, I want to avoid WITH, because, 1) it gets messy for complicated statements and 2) I

Re: String Reference to Object

2018-02-15 Thread Ted Roche
On Thu, Feb 15, 2018 at 2:16 PM, Gene Wirchenko wrote: > > Unfortunately, it does not work in my usual use case: as an alias. > Example: > use ccli > where=evaluate("ccli") && Nope > ? where.clcode > Well, in that case you should be using

Re: String Reference to Object

2018-02-15 Thread Koen Piller
You cannot use a field as an form Property. What are you trying to accomplish here? Op do 15 feb. 2018 om 20:17 schreef Gene Wirchenko > At 11:07 2018-02-15, Gene Wirchenko wrote: > >At 10:57 2018-02-15, "Fernando D. Bozzo" wrote: > > >>To

Re: String Reference to Object

2018-02-15 Thread Gene Wirchenko
At 11:07 2018-02-15, Gene Wirchenko wrote: At 10:57 2018-02-15, "Fernando D. Bozzo" wrote: To talk with an example, if you have this: oObj = createobject("custom") reference = "oObj" The you have at least 3 options: 1) The way you know => 2) Using

Re: String Reference to Object

2018-02-15 Thread Gene Wirchenko
At 10:57 2018-02-15, "Fernando D. Bozzo" wrote: Hi Gene: To talk with an example, if you have this: oObj = createobject("custom") reference = "oObj" The you have at least 3 options: 1) The way you know => 2) Using evaluate => =Evaluate(reference + ".referredto") 3)

Re: String Reference to Object

2018-02-15 Thread Jean MAURICE
Hi Gene, have you tried WITH (m.reference) .referredto = etc ENDWITH ? The Foxil ___ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list:

Re: String Reference to Object

2018-02-15 Thread Fernando D. Bozzo
Hi Gene: To talk with an example, if you have this: oObj = createobject("custom") reference = "oObj" The you have at least 3 options: 1) The way you know => 2) Using evaluate => =Evaluate(reference + ".referredto") 3) My preferred: Caching the object and then using it: oRef =

Re: String Reference to Object

2018-02-15 Thread Stephen Russell
Cast it to a string comes to mind but VFP will let you change the value of a type in a heartbeat. () On Thu, Feb 15, 2018 at 12:51 PM, Gene Wirchenko wrote: > Dear Foxers: > > I sometimes have a "reference" to an object that is in the form of a > string variable. I

String Reference to Object

2018-02-15 Thread Gene Wirchenko
Dear Foxers: I sometimes have a "reference" to an object that is in the form of a string variable. I have used Is there a better way of doing this? (reference).referredto would be nice, but it does not compile. Sincerely, Gene Wirchenko