Re: Multidimensional array issue

2021-03-10 Thread Tom Glod via use-livecode
>> (tArray["key1","key1.1"]["key2","key2.1"]) Sean never even thought about this form of arrays. I gotta test the functionality of this. Thanks. I know you are busy, but if you have the time, feel free to blow my mind. On Wed, Mar 10, 2021 at 8:12 PM Sean Cole (Pi) via

Re: Array Split vs Combine

2021-03-10 Thread Monte Goulding via use-livecode
Ideally we wouldn’t introduce an additional iteration of the array to pre-calculate but yes there’s probably a few ways to go. It could also be possible to flag a string with a buffer allocation strategy on creation so the cases where the engine creates a string then repeatedly appends to it

Re: Array Split vs Combine

2021-03-10 Thread Sean Cole (Pi) via use-livecode
Monte, Would it be possible to precalculate (ish) how big a string buffer is required from the size (memalloc) of the array? Then, if later down the process, it works out it doesn't have enough, it can add a bunch more memory to the buffer, thus reducing the frequency of buffer resizing. Or maybe

Re: Multidimensional array issue

2021-03-10 Thread Sean Cole (Pi) via use-livecode
In the message box: > put "data" into tArray["key1"]["key2"]; answer the value of tArray["key1”] > - returns EMPTY (so this works) Correct put "data" into tArray["key1"]["key2"]; answer tArray["key1”] is empty - > returns FALSE (it should return true IMHO) Because it is not empty. It has a

Re: Array Split vs Combine

2021-03-10 Thread Monte Goulding via use-livecode
It’s probably most likely to do with the string buffer needing to be constantly resized as the array is iterated for combine. Some googling suggests Windows may have issues with this. Our strategy for growing string buffers at the moment is to allocate just enough for the string. Mark would

Re: Array Split vs Combine

2021-03-10 Thread Sean Cole (Pi) via use-livecode
The code for 'Split': void MCArraysExecSplit(MCExecContext& ctxt, MCStringRef p_string, MCStringRef p_element_delimiter, MCStringRef p_key_delimiter, MCArrayRef& r_array) { if (MCStringSplit(p_string, p_element_delimiter, p_key_delimiter, ctxt . GetStringComparisonType(), r_array)) return; ctxt

Re: mergFTPd example?

2021-03-10 Thread Phil Davis via use-livecode
Thanks Håkan - Phil On 3/10/21 2:05 AM, ha...@exformedia.se wrote: I would go for a REST API on the desktop and then use the https protocol. On the mobile app you can then just use the powerful url command. Take a look at ”post data to URL” in the dictionary. And maybe also the ”put url …

Re: Array Split vs Combine

2021-03-10 Thread Tom Glod via use-livecode
following this . On Tue, Mar 9, 2021 at 4:06 PM Sean Cole (Pi) via use-livecode < use-livecode@lists.runrev.com> wrote: > It's looking to be a Windows only issue. I need to see how far this goes > back and then I'll post a bug report. It's making a process that should > only take 30s max on

Re: Multidimensional array issue

2021-03-10 Thread Jim Lambert via use-livecode
This is a very interesting discussion of LC arrays. But back to the original post: > HENRY LOWE wrote: > > I am using multidimensional arrays to process data read from JSON files. > Some of the data in the JSON files can be represented in alternative forms in > files from different sources. >

Re: Array Split vs Combine

2021-03-10 Thread Bob Sneidar via use-livecode
Now THAT is fascinating, considering the Windows performance issues with file access reported in the past. Could it be that combine is somehow caching data to virtual memory? Bob S On Mar 9, 2021, at 1:05 PM, Sean Cole (Pi) via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: It's

Re: Multidimensional array issue

2021-03-10 Thread Bob Sneidar via use-livecode
What he said. :-) Bob S On Mar 9, 2021, at 10:19 AM, Ralph DiMola via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: If (not(tArray[“status”] is an array)) and (tArray[“status”] is not empty) then -- ***tArray[“status”] is not an array and is not empty. As MW said empty is

Re: Multidimensional array issue

2021-03-10 Thread Bob Sneidar via use-livecode
If tArray [“status”] is an array or tArray [“status”] is not empty It’s an odd array structure though if a key can contain either. Bob S On Mar 9, 2021, at 10:02 AM, HENRY LOWE via use-livecode mailto:use-livecode@lists.runrev.com>> wrote: Thanks to all for your excellent discussion and

Re: mergFTPd example?

2021-03-10 Thread Håkan Liljegren via use-livecode
I would go for a REST API on the desktop and then use the https protocol. On the mobile app you can then just use the powerful url command. Take a look at ”post data to URL” in the dictionary. And maybe also the ”put url … into” for getting data in the opposite direction. :-Håkan On 10 Mar

Re: mergFTPd example?

2021-03-10 Thread matthias rebbe via use-livecode
The demo stack should also be found in earlier versions of Livecode as long as they include mergFTPd . Regards, Matthias - Matthias Rebbe Life Is Too Short For Boring Code > Am 10.03.2021 um 10:52 schrieb Phil Davis via use-livecode > : > > Thank you Matthias! I haven't played with 9.6.2 yet

Re: mergFTPd example?

2021-03-10 Thread Phil Davis via use-livecode
Thank you Matthias! I haven't played with 9.6.2 yet but will now be doing so very soon. I'll look into it tomorrow (it's almost 2 AM here) and see what I can learn. Thanks again - Phil On 3/10/21 1:47 AM, matthias rebbe via use-livecode wrote: Hi Phil, i would say mergFTPd is the easiest

Re: mergFTPd example?

2021-03-10 Thread matthias rebbe via use-livecode
Hi Phil, i would say mergFTPd is the easiest way to accomplish that. Did you already check the mergFTP Demo stack which is inside the Livecode app bundle, e.g. here for LC 9.6.2 /Applications/LiveCode Business 9.6.2 (rc 2).app/Contents/Tools/Ext/mergFTPD-1.0.56 You just need to set/select