Re: Dinamyc variables.

2018-03-19 Thread Phil Davis via use-livecode

On 3/19/18 9:29 AM, Mike Bonner via use-livecode wrote:

Use an array instead...
put empty into tCardArrayA[the short name of this card]
Newly created cards where you don't specify the card name on creation, will
have a card name set to the id of the card. (like "card id 1002")


And the array approach allows the card names to contain spaces (consist 
of multiple words), where the "do" approach does not.


Phil Davis



On Mon, Mar 19, 2018 at 9:43 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:


This is what Macro Substitution was created for, but LC doesn't have that
function. Say you have an accounting app where you can load different
companies. The names of the tables and support files on disk are serialized
with a 2 digit number representing the company number. In Foxpro when you
load a new company, you *could* reference the files using macro
substitution:

open file &tCompanyPath&tModule&tCompanynum

Of course there are ways around this. Someone pointed out using an array,
which is a variable containing other variables in essence.


On Mar 18, 2018, at 19:08 , Heriberto Torrado via use-livecode <

use-livecode@lists.runrev.com> wrote:

[This message was identified as a phishing scam. Learn about phishing at

http://aka.ms/LearnAboutPhishing]

Dear Livecode programmers,

I am trying to create a new variable with the name of a dynamically
generated card.
Please note that I would like to create a new variable, not to put the
name of the card inside the variable.

I would like to have something like this (PseudoCode)

"Get the name of this card and create a variable with the name of the

card."

I searched the forum and the dictionary but I cannot find how to do that.

Best regards/ Saludos cordiales/ Cordialement

Heriberto Torrado
​Chief Technology Officer (CTO)
​Director de informática
Directeur informatique

*NetDreams S.C.*
http://www.networkdreams.net

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your

subscription preferences:

http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your
subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


--
Phil Davis


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Dinamyc variables.

2018-03-19 Thread Mike Bonner via use-livecode
Use an array instead...
put empty into tCardArrayA[the short name of this card]
Newly created cards where you don't specify the card name on creation, will
have a card name set to the id of the card. (like "card id 1002")

On Mon, Mar 19, 2018 at 9:43 AM, Bob Sneidar via use-livecode <
use-livecode@lists.runrev.com> wrote:

> This is what Macro Substitution was created for, but LC doesn't have that
> function. Say you have an accounting app where you can load different
> companies. The names of the tables and support files on disk are serialized
> with a 2 digit number representing the company number. In Foxpro when you
> load a new company, you *could* reference the files using macro
> substitution:
>
> open file &tCompanyPath&tModule&tCompanynum
>
> Of course there are ways around this. Someone pointed out using an array,
> which is a variable containing other variables in essence.
>
> > On Mar 18, 2018, at 19:08 , Heriberto Torrado via use-livecode <
> use-livecode@lists.runrev.com> wrote:
> >
> > [This message was identified as a phishing scam. Learn about phishing at
> http://aka.ms/LearnAboutPhishing]
> >
> > Dear Livecode programmers,
> >
> > I am trying to create a new variable with the name of a dynamically
> > generated card.
> > Please note that I would like to create a new variable, not to put the
> > name of the card inside the variable.
> >
> > I would like to have something like this (PseudoCode)
> >
> > "Get the name of this card and create a variable with the name of the
> card."
> >
> > I searched the forum and the dictionary but I cannot find how to do that.
> >
> > Best regards/ Saludos cordiales/ Cordialement
> >
> > Heriberto Torrado
> > ​Chief Technology Officer (CTO)
> > ​Director de informática
> > Directeur informatique
> >
> > *NetDreams S.C.*
> > http://www.networkdreams.net
> >
> > ___
> > use-livecode mailing list
> > use-livecode@lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Dinamyc variables.

2018-03-19 Thread Bob Sneidar via use-livecode
This is what Macro Substitution was created for, but LC doesn't have that 
function. Say you have an accounting app where you can load different 
companies. The names of the tables and support files on disk are serialized 
with a 2 digit number representing the company number. In Foxpro when you load 
a new company, you *could* reference the files using macro substitution: 

open file &tCompanyPath&tModule&tCompanynum

Of course there are ways around this. Someone pointed out using an array, which 
is a variable containing other variables in essence. 

> On Mar 18, 2018, at 19:08 , Heriberto Torrado via use-livecode 
>  wrote:
> 
> [This message was identified as a phishing scam. Learn about phishing at 
> http://aka.ms/LearnAboutPhishing]
> 
> Dear Livecode programmers,
> 
> I am trying to create a new variable with the name of a dynamically
> generated card.
> Please note that I would like to create a new variable, not to put the
> name of the card inside the variable.
> 
> I would like to have something like this (PseudoCode)
> 
> "Get the name of this card and create a variable with the name of the card."
> 
> I searched the forum and the dictionary but I cannot find how to do that.
> 
> Best regards/ Saludos cordiales/ Cordialement
> 
> Heriberto Torrado
> ​Chief Technology Officer (CTO)
> ​Director de informática
> Directeur informatique
> 
> *NetDreams S.C.*
> http://www.networkdreams.net
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Dinamyc variables.

2018-03-19 Thread Klaus major-k via use-livecode
Hola Heriberto,

> Am 19.03.2018 um 03:08 schrieb Heriberto Torrado via use-livecode 
> :
> 
> Dear Livecode programmers,
> 
> I am trying to create a new variable with the name of a dynamically generated 
> card.
> Please note that I would like to create a new variable, not to put the name 
> of the card inside the variable.
> I would like to have something like this (PseudoCode)
> "Get the name of this card and create a variable with the name of the card."
> I searched the forum and the dictionary but I cannot find how to do that.

this is a case for DO! :-)

...
put the short name of this cd into tCardName
do ("put empty into " & tCardName)
...
Et voila, an empty variable with the name of your card.

If you need to create MORE than one variable from strings, just create an array 
with the string(s) as keys.
...
put the short name of this cd into tCardName
put empty into tArray[tCardName]
...

> Best regards/ Saludos cordiales/ Cordialement
> 
> Heriberto Torrado

Best

Klaus

--
Klaus Major
http://www.major-k.de
kl...@major-k.de


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


Re: Dinamyc variables.

2018-03-18 Thread Monte Goulding via use-livecode


> On 19 Mar 2018, at 1:08 pm, Heriberto Torrado via use-livecode 
>  wrote:
> I am trying to create a new variable with the name of a dynamically generated 
> card.
> Please note that I would like to create a new variable, not to put the name 
> of the card inside the variable.

This seems a little strange. Are you sure you aren’t suffering from an X/Y 
problem here. Perhaps explain what it is you are wanting to do with the 
variable?

Cheers

Monte
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Re: Dinamyc variables.

2018-03-18 Thread prothero--- via use-livecode
Can you use value(cdname) ? Haven’t tried it, tho.
Bill

William Prothero
http://es.earthednet.org

> On Mar 18, 2018, at 7:08 PM, Heriberto Torrado via use-livecode 
>  wrote:
> 
> 
> Dear Livecode programmers,
> 
> I am trying to create a new variable with the name of a dynamically generated 
> card.
> Please note that I would like to create a new variable, not to put the name 
> of the card inside the variable.
> 
> I would like to have something like this (PseudoCode)
> 
> "Get the name of this card and create a variable with the name of the card."
> 
> I searched the forum and the dictionary but I cannot find how to do that.
> 
> Best regards/ Saludos cordiales/ Cordialement
> 
> Heriberto Torrado
> ​Chief Technology Officer (CTO)
> ​Director de informática
> Directeur informatique
> 
> *NetDreams S.C.*
> http://www.networkdreams.net
> 
> ___
> use-livecode mailing list
> use-livecode@lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription 
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Dinamyc variables.

2018-03-18 Thread Heriberto Torrado via use-livecode


Dear Livecode programmers,

I am trying to create a new variable with the name of a dynamically 
generated card.
Please note that I would like to create a new variable, not to put the 
name of the card inside the variable.


I would like to have something like this (PseudoCode)

"Get the name of this card and create a variable with the name of the card."

I searched the forum and the dictionary but I cannot find how to do that.

Best regards/ Saludos cordiales/ Cordialement

Heriberto Torrado
​Chief Technology Officer (CTO)
​Director de informática
Directeur informatique

*NetDreams S.C.*
http://www.networkdreams.net

___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode