Re: Printkeys() To Array

2012-01-20 Thread Bob Sneidar
Yes you can. But imagine an array with 10,000 keys. Wouldn't it be nice to be able to delete all the subkeys named "myKey" in that array with just one command? (ok 3 to be honest) Or how about renaming all of a certain key or subkey? I have yet to find a command for that. Those are just two exam

Re: Printkeys() To Array

2012-01-20 Thread Pete
Hi Bob, I might be misunderstanding your example below but you can delete a key from an array along with all its subkeys with "delete theArray[thekey]". Is that what you meant? On Fri, Jan 20, 2012 at 11:38 AM, Bob Sneidar wrote: > Why you say? Lets say you have an array that you want to delete

Re: Printkeys() To Array

2012-01-20 Thread Bob Sneidar
Whoops my bad. You can always test it: put "This is a test" into myArray[1];put printKeys(myArray) Bob On Jan 20, 2012, at 3:24 PM, Pete wrote: > It's part of the datagrid library so everyone has it, not just SQLYoga > customers. > Pete > > On Fri, Jan 20, 2012 at 3:10 PM, Michael Doub wrote

Re: Printkeys() To Array

2012-01-20 Thread Pete
It's part of the datagrid library so everyone has it, not just SQLYoga customers. Pete On Fri, Jan 20, 2012 at 3:10 PM, Michael Doub wrote: > How does one get it? > > > On 2012-01-20, at 4:36 PM, Bob Sneidar wrote: > > > printKeys() is a function included with sqlYoga, but Trevor was kind > enou

Re: Printkeys() To Array

2012-01-20 Thread Michael Doub
How does one get it? On 2012-01-20, at 4:36 PM, Bob Sneidar wrote: > printKeys() is a function included with sqlYoga, but Trevor was kind enough > to make it public domain. It converts an array to text in the format: > > firstkey > secondkey > thirdkey: This is the actual data >

Printkeys() To Array

2012-01-20 Thread Bob Sneidar
Note to self: ALWAYS debug first. THIS will work. > I have an update. I didn't account for the fact that keys can be multiple > words. This updated function should do the trick. function PKToArray thePrintKeys put 0 into theOldKeyCount put empty into theValue put the itemdelimiter int

Printkeys() To Array

2012-01-20 Thread Bob Sneidar
I have an update. I didn't account for the fact that keys can be multiple words. This updated function should do the trick. function PKToArray thePrintKeys put 0 into theOldKeyCount put empty into theValue put the itemdelimiter into theOldDelim set the itemdelimiter to space

Re: Printkeys() To Array

2012-01-20 Thread Bob Sneidar
printKeys() is a function included with sqlYoga, but Trevor was kind enough to make it public domain. It converts an array to text in the format: firstkey secondkey thirdkey: This is the actual data fourthkey: This is some more data Bob On Jan 20, 2012, at 1:19 PM, Mic

Re: Printkeys() To Array

2012-01-20 Thread Michael Doub
Bob, what is the printKeys function? I am not finding it in the dictionary. Is it some library? I like the concept that you are describing it could be useful. -= Mike On 2012-01-20, at 2:38 PM, Bob Sneidar wrote: > printKeys ___ use-livecod

Printkeys() To Array

2012-01-20 Thread Bob Sneidar
Hi all. I have been thinking practically since I first saw the printKeys() function how cool it would be to be able to take the output of the printKeys function, work with the text using things like filter and replace, and then recreate the array again. I thought it would be a real pain in the