cannot correctly check keys of array stored as a custom prooperty

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

cannot correctly check keys of array stored as a custom prooperty

Mark Waddingham via use-livecode
I have an elaborate routine that sorts through my stacks to find the needed
variables, and it saves the array, with the name as a key and the variable
type as a property, in my master stack.  ("set the swizzle of stack whosit
to myArray")

This gets used as an integrity check when opening data tables. So

put the swizzle of stack whosit into dflds

put "dlPdTx" is among the keys of dflds


Yields false.  So does every variant I can come up with--looping through
the keys, checking "the words of the keys of", and so forth.  Even "put the
keys of dflds into dnames" and checking whether dlPdTx is among the words
or lines.

Nonetheless, I can see the entry dlPdTx in each and every one of these,
whether as a word or line, or as a key in either the custom property of
that property copied to dflds.

Could there be a glitch in either the storage or retrieval of the custom
property?  I used save the property as a list back in 7, and turn it back
into an array.

--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cannot correctly check keys of array stored as a custom prooperty

Mark Waddingham via use-livecode
Doesn't the script editor's variable viewer now display the elements of an array? Can you check it there?

Bob S


On Apr 17, 2017, at 15:11 , Dr. Hawkins via use-livecode <[hidden email]<mailto:[hidden email]>> wrote:

I have an elaborate routine that sorts through my stacks to find the needed
variables, and it saves the array, with the name as a key and the variable
type as a property, in my master stack.  ("set the swizzle of stack whosit
to myArray")

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cannot correctly check keys of array stored as a custom prooperty

Mark Waddingham via use-livecode
Also, (and I know you will not refactor now) but sqlYoga has these checks built in. It also has commands to get the schema of the database, as well as the schema of a table, which will return as an element of that array, an array with each field and it's type, length, etc.

Bob S


> On Apr 17, 2017, at 15:54 , Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> Doesn't the script editor's variable viewer now display the elements of an array? Can you check it there?
>
> Bob S
>
>
> On Apr 17, 2017, at 15:11 , Dr. Hawkins via use-livecode <[hidden email]<mailto:[hidden email]>> wrote:
>
> I have an elaborate routine that sorts through my stacks to find the needed
> variables, and it saves the array, with the name as a key and the variable
> type as a property, in my master stack.  ("set the swizzle of stack whosit
> to myArray")
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: cannot correctly check keys of array stored as a custom prooperty

Mark Waddingham via use-livecode
In reply to this post by Mark Waddingham via use-livecode
On Mon, Apr 17, 2017 at 3:54 PM, Bob Sneidar via use-livecode <
[hidden email]> wrote:

> Doesn't the script editor's variable viewer now display the elements of an
> array? Can you check it there?


Yep.  And the element shows there, and also in the property inspector for
the stack.


--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Loading...