Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread hh via use-livecode
> Richard H. wrote: > I'm also bothered by *not* being able to use a text literal in quotes; > I'm generally vary careful about declared variables, etc. (I'd really > like an option to enforce case in variable names!) on mouseUp put "hello" into p1 put quote&"hello""e into p2 set the p1 of m

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Dr. Hawkins via use-livecode
On Tue, Aug 8, 2017 at 8:56 AM, Bob Sneidar via use-livecode < use-livecode@lists.runrev.com> wrote: > > Years ago I knew a woman who wanted to use special characters on her mac > for file names which were perfectly legal with HFS, but NOT legal for NTFS. > When we moved her files to a Windows sha

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Dr. Hawkins via use-livecode
On Tue, Aug 8, 2017 at 8:33 AM, Mark Waddingham via use-livecode < use-livecode@lists.runrev.com> wrote: > On 2017-08-08 17:25, J. Landman Gay via use-livecode wrote: > >> The answer to the first case is "don't do that". Use a different >> variable name for the local. >> > > Well, yes, that is cer

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Wieder via use-livecode
On 08/08/2017 08:56 AM, Bob Sneidar via use-livecode wrote: Again, don't do that. Years ago I knew a woman who wanted to use special characters on her mac for file names which were perfectly legal with HFS, but NOT legal for NTFS. When we moved her files to a Windows share, some of her files,

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Waddingham via use-livecode
On 2017-08-08 17:59, Mark Wieder via use-livecode wrote: On 08/08/2017 08:49 AM, hh via use-livecode wrote: JLG wrote: In what circumstance would it be necessary to quote the property name? Use "&" in a key, for example the "G&T" of me Is there any use case where punctuation in a property n

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Bob Sneidar via use-livecode
I agree here with Mark that this is an oversight, an aberration. It should't work the way it presently does, and I would not count on it being this way forever. Some other issue may arise in the future requiring someone to "fix this" and your code will break. Swim away from the other fish if y

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Waddingham via use-livecode
On 2017-08-08 17:49, hh via use-livecode wrote: From a viewpoint of the "get property /set property" syntax "unexpected results" sounds convincing here, but, TMHO, it is exactly what I would expect from a **viewpoint of array syntax**. on mouseUp local catness put "minimal" into catness --

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Wieder via use-livecode
On 08/08/2017 08:49 AM, hh via use-livecode wrote: JLG wrote: In what circumstance would it be necessary to quote the property name? Use "&" in a key, for example the "G&T" of me Is there any use case where punctuation in a property name is a good idea? -- Mark Wieder ahsoftw...@gmail.com

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Bob Sneidar via use-livecode
Again, don't do that. Years ago I knew a woman who wanted to use special characters on her mac for file names which were perfectly legal with HFS, but NOT legal for NTFS. When we moved her files to a Windows share, some of her files, though visible, were inaccessible. (Why Windows even allowed

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Waddingham via use-livecode
On 2017-08-08 17:46, Bob Sneidar via use-livecode wrote: famous last words. :-) Indeed - perhaps a slight case of over-optimism on my part... :'( Mark. -- Mark Waddingham ~ m...@livecode.com ~ http://www.livecode.com/ LiveCode: Everyone can create apps __

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread hh via use-livecode
> JLG wrote: > In what circumstance would it be necessary to quote the property name? Use "&" in a key, for example the "G&T" of me > Mark wrote: > What doesn't work at the moment is if you have a var name which is > quoted: > > local catness > put "minimal" into catness > set the "catness" of

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Bob Sneidar via use-livecode
famous last words. :-) Bob S > On Aug 8, 2017, at 08:15 , Mark Waddingham via use-livecode > wrote: > > I think the latter is probably something which is unlikely to hurt anyone if > tweaked though... > > Warmest Regards, > > Mark. > ___ use-li

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Waddingham via use-livecode
On 2017-08-08 17:33, Mark Waddingham via use-livecode wrote: (Of course, I'm now going to go off and see if you can use quoted variables in other places - I bet that's going to a 50/50 chance in every place!) Okay - so: the of ... Is the *only* place where a check to make sure something

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Waddingham via use-livecode
On 2017-08-08 17:25, J. Landman Gay via use-livecode wrote: The answer to the first case is "don't do that". Use a different variable name for the local. Well, yes, that is certainly one way to look at it! However, *usually* quotes are used to ensure something is treated as the literal value s

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread J. Landman Gay via use-livecode
The answer to the first case is "don't do that". Use a different variable name for the local. The second case is interesting. I wouldn't mind having multiple-word property names. -- Jacqueline Landman Gay | jac...@hyperactivesw.com HyperActive Software | http://www.h

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Waddingham via use-livecode
On 2017-08-08 17:09, J. Landman Gay via use-livecode wrote: In what circumstance would it be necessary to quote the property name? The original case Dr Hawkins encountered was something along the lines of: local someVar put 100 into someVar put the someVar of me Here, this will fetch the cu

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread J. Landman Gay via use-livecode
In what circumstance would it be necessary to quote the property name? On August 8, 2017 6:05:21 AM Mark Waddingham via use-livecode wrote: What doesn't work at the moment is if you have a var name which is quoted: local catness put "minimal" into catness set the "catness" of me t

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread Mark Waddingham via use-livecode
On 2017-08-08 12:43, hh via use-livecode wrote: Two examples for testing ambiguity. [a] set "8.1" of me to "I dreamt to be quoted" set 8.1 of me to "I dreamt to be 8.2" put the customProperties of me into cp put cp["8.1"] &" : "& cp[8.1] &" : "& cp[8+1/10] Test and then interchange the f

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-08 Thread hh via use-livecode
Two examples for testing ambiguity. [a] set "8.1" of me to "I dreamt to be quoted" set 8.1 of me to "I dreamt to be 8.2" put the customProperties of me into cp put cp["8.1"] &" : "& cp[8.1] &" : "& cp[8+1/10] Test and then interchange the first two lines and test again. [b] set "G&T" of

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-07 Thread Mark Waddingham via use-livecode
On 2017-08-03 05:39, Monte Goulding via use-livecode wrote: Er… why if you know the name wouldn’t you type it unquoted? Are you really suggesting to put any expression there? The property/function ambiguity with `the` will make our heads explode! For the reason Dr Hawkins originally asked about

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-03 Thread Bob Sneidar via use-livecode
If the handler is in the same script as the constant, why would you? A constant is for representing values that do not change after compile. Variables are for values that change during runtime. I cannot imagine a use case for putting a constant name into a variable, although I have thought about

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-03 Thread Dr. Hawkins via use-livecode
On Wed, Aug 2, 2017 at 8:39 PM, Monte Goulding via use-livecode < use-livecode@lists.runrev.com> wrote: > > Er… why if you know the name wouldn’t you type it unquoted? Are you really > suggesting to put any expression there? The property/function ambiguity > with `the` will make our heads explode!

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Monte Goulding via use-livecode
> On 3 Aug 2017, at 7:36 am, Mark Waddingham via use-livecode > wrote: > > Of course, if you'd like to file a bug report / enhancement about being able > to do 'the "mycustompropname" of ... - then that is probably the 'future' > much better solution :) Er… why if you know the name wouldn’t

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Paul Hibbert via use-livecode
> > let´s say a card has a custom property name cMyProp. > > The variable tMyVar contains the word “cMyProp” > > How do i get the value of the custom property using the variable tMyVar? Using the “do” command, a quick test and this works OK: on mouseUp put "cMyProp" int

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Dr. Hawkins via use-livecode
On Wed, Aug 2, 2017 at 2:36 PM, Mark Waddingham via use-livecode < use-livecode@lists.runrev.com> wrote: > You can put the name of the property into a local var and use that (unless > I misunderstood the problem). > That's what I do > > > Of course, if you'd like to file a bug report / enhanceme

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Mark Waddingham via use-livecode
You can put the name of the property into a local var and use that (unless I misunderstood the problem). Ali's suggestion is however the very pragmatic one - there are always going to be cases where var names might conflict with other things 'in context' and require disambiguation. (Although ev

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Ali Lloyd via use-livecode
A good reason to use consistent prefixes to distinguish custom props and variables perhaps. On Wed, 2 Aug 2017 at 20:56, Dr. Hawkins via use-livecode < use-livecode@lists.runrev.com> wrote: > On Wed, Aug 2, 2017 at 10:25 AM, Klaus major-k via use-livecode < > use-livecode@lists.runrev.com> wrote:

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Dr. Hawkins via use-livecode
On Wed, Aug 2, 2017 at 10:25 AM, Klaus major-k via use-livecode < use-livecode@lists.runrev.com> wrote: > > answer the tMyVar of this cd > This is an area that is awkward in live code. The use of unquoted literals for this is inconsistent with most of live code (but quoting would be inconsistent

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Matthias Rebbe via use-livecode
Thanks Klaus Tried your suggestion already before posting, but that did not work. Therefore I thought i have to use value or so. But i just had a “little” error in my script. I should check my code twice before asking. Thanks again. Matthias Matthias Rebbe +49 5741 31 ‌matthiasrebbe

Re: how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Klaus major-k via use-livecode
Hi Matthias, > Am 02.08.2017 um 19:20 schrieb Matthias Rebbe via use-livecode > : > > Hi, > > let´s say a card has a custom property name cMyProp. > The variable tMyVar contains the word “cMyProp” > How do i get the value of the custom property using the variable tMyVar? ... answer the tMyVar

how to get the value of a custom property if the name of the cProperty is in a variable?

2017-08-02 Thread Matthias Rebbe via use-livecode
Hi, let´s say a card has a custom property name cMyProp. The variable tMyVar contains the word “cMyProp” How do i get the value of the custom property using the variable tMyVar? Regards, Matthias Matthias Rebbe +49 5741 31 ‌matthiasrebbe.eu ‌ __