Re: LC & Mac M1 Chip

2020-12-30 Thread John Balgenorth via use-livecode
Good to know! 
Thanks for the  info.

JB



> On Dec 30, 2020, at 8:03 PM, Roger Guay via use-livecode 
>  wrote:
> 
> I think so, but others may be more informed.
> 
> Roger
> 
>> On Dec 30, 2020, at 7:29 PM, John Balgenorth via use-livecode 
>>  wrote:
>> 
>> Should any LC standalone work with the Mac M1 Chip
>> if it was working on Mojave and above?
>> 
>> JB
>> 
>> 
 On Dec 30, 2020, at 7:07 PM, Roger Guay via use-livecode 
  wrote:
>>> 
>>> Yes, I just tried it and it works fine! I’m happy to try yours out if you 
>>> wish??
>>> 
>>> Roger
>>> 
>>> 
 On Dec 30, 2020, at 2:47 PM, Marty Knapp via use-livecode 
  wrote:
 
 Has anyone tried an LC standalone on one of the new Macs with the M1 chip? 
 I have customers asking and I don’t want to go buy one just to find out!
 
 Thanks,
 Marty
 ___
 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
> 
> ___
> 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: LC & Mac M1 Chip

2020-12-30 Thread Roger Guay via use-livecode
I think so, but others may be more informed.

Roger

> On Dec 30, 2020, at 7:29 PM, John Balgenorth via use-livecode 
>  wrote:
> 
> Should any LC standalone work with the Mac M1 Chip
> if it was working on Mojave and above?
> 
> JB
> 
> 
>> On Dec 30, 2020, at 7:07 PM, Roger Guay via use-livecode 
>>  wrote:
>> 
>> Yes, I just tried it and it works fine! I’m happy to try yours out if you 
>> wish??
>> 
>> Roger
>> 
>> 
>>> On Dec 30, 2020, at 2:47 PM, Marty Knapp via use-livecode 
>>>  wrote:
>>> 
>>> Has anyone tried an LC standalone on one of the new Macs with the M1 chip? 
>>> I have customers asking and I don’t want to go buy one just to find out!
>>> 
>>> Thanks,
>>> Marty
>>> ___
>>> 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

___
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: LC & Mac M1 Chip

2020-12-30 Thread John Balgenorth via use-livecode
Should any LC standalone work with the Mac M1 Chip
if it was working on Mojave and above?

JB


> On Dec 30, 2020, at 7:07 PM, Roger Guay via use-livecode 
>  wrote:
> 
> Yes, I just tried it and it works fine! I’m happy to try yours out if you 
> wish??
> 
> Roger
> 
> 
>> On Dec 30, 2020, at 2:47 PM, Marty Knapp via use-livecode 
>>  wrote:
>> 
>> Has anyone tried an LC standalone on one of the new Macs with the M1 chip? I 
>> have customers asking and I don’t want to go buy one just to find out!
>> 
>> Thanks,
>> Marty
>> ___
>> 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: LC & Mac M1 Chip

2020-12-30 Thread Roger Guay via use-livecode
Yes, I just tried it and it works fine! I’m happy to try yours out if you wish??

Roger


> On Dec 30, 2020, at 2:47 PM, Marty Knapp via use-livecode 
>  wrote:
> 
> Has anyone tried an LC standalone on one of the new Macs with the M1 chip? I 
> have customers asking and I don’t want to go buy one just to find out!
> 
> Thanks,
> Marty
> ___
> 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: Server error?

2020-12-30 Thread Bob Sneidar via use-livecode
Just a shot in the dark, when you are working in the IDE, do you have a newer 
version of Livecode running?

Bob S


On Dec 30, 2020, at 3:09 PM, Klaus major-k via use-livecode 
mailto:use-livecode@lists.runrev.com>> wrote:

Hi Bob,

Am 30.12.2020 um 23:59 schrieb Bob Sneidar via use-livecode 
mailto:use-livecode@lists.runrev.com>>:

TLSv1 is dead. It uses the OpenSSL library that had the Heartbleed 
vulnerability. Not sure if v5 libraries can use the latest encryption 
libraries. I don’t know why not.

the big question is:
Why does it work in the IDE, but not in a runtime made with the same IDE?

Seems that the IDE and the runtime use different "revSecurity.dll"s?!

___
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: LiveCode Advanced Application Architecture eBook price reduced

2020-12-30 Thread Lagi Pittas via use-livecode
Hi,

Sorry maybe it's October 8th  as I think you use American format dates.

Lagi

On Wed, 30 Dec 2020 at 00:28, Andre Garzia via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hey Friends,
>
> I've reduced the price of my LiveCode eBook to £9.99. This book will teach
> you advanced techniques, and contains a ton tips and tricks from a seasoned
> LC developer.
>
> Get it from:
>
> https://andregarzia.com/books/livecode-advanced-application-architecture.html
>
> Kind regards
> Andre
>
> --
> https://www.andregarzia.com 
> Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
> ___
> 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
>


-- 
KIndest Regards Lagi
___
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: LiveCode Advanced Application Architecture eBook price reduced

2020-12-30 Thread Lagi Pittas via use-livecode
Hi Andre,
I have the version from leanpub which was last updated in August I believe.
Is this a later one
and will you be uploading to leanpub or do we have to buy it again.

Regards Lagi

On Wed, 30 Dec 2020 at 00:28, Andre Garzia via use-livecode <
use-livecode@lists.runrev.com> wrote:

> Hey Friends,
>
> I've reduced the price of my LiveCode eBook to £9.99. This book will teach
> you advanced techniques, and contains a ton tips and tricks from a seasoned
> LC developer.
>
> Get it from:
>
> https://andregarzia.com/books/livecode-advanced-application-architecture.html
>
> Kind regards
> Andre
>
> --
> https://www.andregarzia.com 
> Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
> ___
> 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
>


-- 
KIndest Regards Lagi
___
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: Server error?

2020-12-30 Thread Klaus major-k via use-livecode
Hi Bob,

> Am 30.12.2020 um 23:59 schrieb Bob Sneidar via use-livecode 
> :
> 
> TLSv1 is dead. It uses the OpenSSL library that had the Heartbleed 
> vulnerability. Not sure if v5 libraries can use the latest encryption 
> libraries. I don’t know why not. 

the big question is:
Why does it work in the IDE, but not in a runtime made with the same IDE?

Seems that the IDE and the runtime use different "revSecurity.dll"s?!

> Bob S
>> ...
>> I am currently working on a stack in LC 5.x for a customer.
>> This stack only loads another stack from a server and displays it.
>> 
>> Works fine in the IDE, but I get this error when trying this in the 
>> standalone, alle externals etc. are in fact present.
>> The error reads:
>> --
>> Cannot connect
>> error error:1407742E:SSL
>> routines:SSL23_GET_SERVER_HELLO:tlsv1
>> alert protocol version
>> ---
>> Maybe this is a mismatch between the SSL version on the server
>> and the SSL version in LC5.x? 
>> But then it should also not work in the IDE!? This is very strange.
>> Any insights and workarounds, if any, are very welcome, thanks!

Best

Klaus

--
Klaus Major
https://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: LiveCode Advanced Application Architecture eBook price reduced

2020-12-30 Thread Bob Sneidar via use-livecode
Done. 

Bob S


> On Dec 29, 2020, at 4:26 PM, Andre Garzia via use-livecode 
>  wrote:
> 
> Hey Friends,
> 
> I've reduced the price of my LiveCode eBook to £9.99. This book will teach
> you advanced techniques, and contains a ton tips and tricks from a seasoned
> LC developer.
> 
> Get it from:
> https://andregarzia.com/books/livecode-advanced-application-architecture.html
> 
> Kind regards
> Andre
> 
> -- 
> https://www.andregarzia.com 
> Want to support me? Buy me a coffee at https://ko-fi.com/andregarzia
> ___
> 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: Server error?

2020-12-30 Thread Bob Sneidar via use-livecode
TLSv1 is dead. It uses the OpenSSL library that had the Heartbleed 
vulnerability. Not sure if v5 libraries can use the latest encryption 
libraries. I don’t know why not. 

Bob S


> On Dec 30, 2020, at 7:09 AM, Klaus major-k via use-livecode 
>  wrote:
> 
> Hi all,
> 
> I am currently working on a stack in LC 5.x for a customer.
> This stack only loads another stack from a server and displays it.
> 
> Works fine in the IDE, but I get this error when trying this in the 
> standalone, alle externals etc. are in fact present.
> 
> The error reads:
> --
> Cannot connect
> error error:1407742E:SSL
> routines:SSL23_GET_SERVER_HELLO:tlsv1
> alert protocol version
> ---
> 
> Maybe this is a mismatch between the SSL version on the server
> and the SSL version in LC5.x? 
> 
> But then it should also not work in the IDE!? This is very strange.
> 
> Any insights and workarounds, if any, are very welcome, thanks!
> 
> 
> Best
> 
> Klaus
> --
> Klaus Major
> https://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

___
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


LC & Mac M1 Chip

2020-12-30 Thread Marty Knapp via use-livecode
Has anyone tried an LC standalone on one of the new Macs with the M1 chip? I 
have customers asking and I don’t want to go buy one just to find out!

Thanks,
Marty
___
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


Cmi5 eLearning Standard in LiveCode

2020-12-30 Thread Roger Guay via use-livecode
Just curious . . . is anyone using cmi5 in building LC eLearning modules? 

Roger
___
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: LiveCode Advanced Application Architecture eBook price reduced

2020-12-30 Thread Kee Nethery via use-livecode
Will ponder as I absorb it. Be safe in England.

Kee Nethery

> On Dec 30, 2020, at 8:44 AM, chipsm themartinz.com via use-livecode 
>  wrote:
> 
> Andre, I just purchased the book. I am reading as I send this email back to 
> you.
> Thanks for this resource. It is valuable resource and I hope to be a fervent 
> believer in your advice.
> I will continue reading but I am anticipating a very favorable review.
> I will update you soon - I can't stop reading the book.
> 
> -Original Message-
> From: use-livecode  On Behalf Of Andre 
> Garzia via use-livecode
> Sent: Tuesday, December 29, 2020 4:27 PM
> To: How to use LiveCode 
> Cc: Andre Garzia 
> Subject: LiveCode Advanced Application Architecture eBook price reduced
> 
> Hey Friends,
> 
> I've reduced the price of my LiveCode eBook to £9.99. This book will teach 
> you advanced techniques, and contains a ton tips and tricks from a seasoned 
> LC developer.
> 
> Get it from:
> https://andregarzia.com/books/livecode-advanced-application-architecture.html
> 
> Kind regards
> Andre
> 
> --
> https://www.andregarzia.com  Want to support me? 
> Buy me a coffee at https://ko-fi.com/andregarzia 
> ___
> 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: LiveCode Advanced Application Architecture eBook price reduced

2020-12-30 Thread chipsm themartinz.com via use-livecode
Andre, I just purchased the book. I am reading as I send this email back to you.
Thanks for this resource. It is valuable resource and I hope to be a fervent 
believer in your advice.
I will continue reading but I am anticipating a very favorable review.
I will update you soon - I can't stop reading the book.

-Original Message-
From: use-livecode  On Behalf Of Andre 
Garzia via use-livecode
Sent: Tuesday, December 29, 2020 4:27 PM
To: How to use LiveCode 
Cc: Andre Garzia 
Subject: LiveCode Advanced Application Architecture eBook price reduced

Hey Friends,

I've reduced the price of my LiveCode eBook to £9.99. This book will teach you 
advanced techniques, and contains a ton tips and tricks from a seasoned LC 
developer.

Get it from:
https://andregarzia.com/books/livecode-advanced-application-architecture.html

Kind regards
Andre

--
https://www.andregarzia.com  Want to support me? 
Buy me a coffee at https://ko-fi.com/andregarzia 
___
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: How to render a two-dimensional array correctly with empty/missing 'cell' elements?

2020-12-30 Thread Keith Clarke via use-livecode
Hi Alex,
Thanks for the response and suggested code - the change from iterating through 
array column items in each row to the header row[0] keys was the enlightenment 
I needed... “Eureka!" :) 

A couple of tweaks and it’s working very nicely!

function displayArray @pArray

local tLineItem, tTag -- variables for array line and column (headers)

local tPrintLine -- variable for output printing

put empty into tPrintLine


# loop through each row of the array

put item 2 of line 1 of the extents of pArray into tNumItems

repeat with I = 0 to tNumItems -- row 0 contains column labels

# loop through each column for each row

repeat for each key K in pArray[0]

put K into tTag

put pArray[I][tTag] & "," after tPrintLine -- write content of the row ‘cell' 
to tPrintLine

end repeat

put return after tPrintLine -- insert a return after each row we have written 
to tPrintLine

end repeat


return tPrintLine

end displayArray


Thanks & regards,
Keith

> On 30 Dec 2020, at 13:56, Alex Tweedly via use-livecode 
>  wrote:
> 
> Hi Keith
> 
> here's a quick answer typed into email (i.e. not tested at all, sorry)
> 
> function displayArray @pArray
>  # create variables that point to the line and column of the array
>  local tLineItem, tColumnItem
>  # create a variable that stores the output for printing
>  local tPrintLine
>  put empty into tPrintLine
>  # loop through each row of the array
>  put item 2 of line 1 of the extents of pArray into tNumItem
>  repeat with I = 1 to tNumItems
># loop through each column of the array
>repeat for each key K in pArray[0] -- loop through the tags
>  put [pArray[0][K] into tTag
>  # write content of the array to tPrintLine
>  put pArray[I] & "," after tPrintLine
>end repeat
># insert a return after each row we have written to tPrintLine
>put return after tPrintLine
>  end repeat
>  return tPrintLine
> end displayArray
> 
> Alex
> 
> On 30/12/2020 13:48, Keith Clarke via use-livecode wrote:
>> Hi folks,
>> I’m using LiveCode to parse a set of xml files with varying subsets of tags 
>> (dmarc reports) into a CSV file.
>> 
>> The utility iterates through the files in the folder and the lines of the 
>> files, to identify unique opening tags and their content, all of which get 
>> parsed into an array:
>> - Tags go into aDetails[0][tTagName]
>> - Values go into aDetails[tFileNumber][tTagName]
>> 
>> This is then displayed as a table, using the function below, borrowed from 
>> an LC lesson 
>> https://lessons.livecode.com/m/4071/l/12250-how-do-i-store-an-array-variable-inside-of-another-array-variable
>>  
>> …
>> 
>> function displayArray @pArray
>>   # create variables that point to the line and column of the array
>>   local tLineItem, tColumnItem
>>   # create a variable that stores the output for printing
>>   local tPrintLine
>>   put empty into tPrintLine
>>   # loop through each row of the array
>>   repeat for each element tLineItem in pArray
>> # loop through each column of the array
>> repeat for each element tColumnItem in tLineItem
>>   # write content of the array to tPrintLine
>>   put tColumnItem & "," after tPrintLine
>> end repeat
>>   # insert a return after each row we have written to tPrintLine
>>   put return after tPrintLine
>>   end repeat
>>   return tPrintLine
>> end displayArray
>> 
>> However, the above function seems to assume that all array elements have 
>> content, so I’m getting problems where there are empty elements in the xml 
>> files coming from various sources.
>> 
>> I’m sure the loop repeating for each element can be refined to check for 
>> ‘empty cells’ by the tTagName key in my array but my LC array knowledge is 
>> to sparse to begin the search.
>> 
>> Dos anyone have any tips on where I should start looking?
>> 
>> Thanks & regards,
>> Keith
>> ___
>> 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


Server error?

2020-12-30 Thread Klaus major-k via use-livecode
Hi all,

I am currently working on a stack in LC 5.x for a customer.
This stack only loads another stack from a server and displays it.

Works fine in the IDE, but I get this error when trying this in the 
standalone, alle externals etc. are in fact present.

The error reads:
--
Cannot connect
error error:1407742E:SSL
routines:SSL23_GET_SERVER_HELLO:tlsv1
alert protocol version
---

Maybe this is a mismatch between the SSL version on the server
and the SSL version in LC5.x? 

But then it should also not work in the IDE!? This is very strange.

Any insights and workarounds, if any, are very welcome, thanks!


Best

Klaus
--
Klaus Major
https://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: How to render a two-dimensional array correctly with empty/missing 'cell' elements?

2020-12-30 Thread Alex Tweedly via use-livecode

Hi Keith

here's a quick answer typed into email (i.e. not tested at all, sorry)

function displayArray @pArray
  # create variables that point to the line and column of the array
  local tLineItem, tColumnItem
  # create a variable that stores the output for printing
  local tPrintLine
  put empty into tPrintLine
  # loop through each row of the array
  put item 2 of line 1 of the extents of pArray into tNumItem
  repeat with I = 1 to tNumItems
# loop through each column of the array
repeat for each key K in pArray[0] -- loop through the tags
  put [pArray[0][K] into tTag
  # write content of the array to tPrintLine
  put pArray[I] & "," after tPrintLine
end repeat
# insert a return after each row we have written to tPrintLine
put return after tPrintLine
  end repeat
  return tPrintLine
end displayArray

Alex

On 30/12/2020 13:48, Keith Clarke via use-livecode wrote:

Hi folks,
I’m using LiveCode to parse a set of xml files with varying subsets of tags 
(dmarc reports) into a CSV file.

The utility iterates through the files in the folder and the lines of the 
files, to identify unique opening tags and their content, all of which get 
parsed into an array:
- Tags go into aDetails[0][tTagName]
- Values go into aDetails[tFileNumber][tTagName]

This is then displayed as a table, using the function below, borrowed from an LC 
lesson 
https://lessons.livecode.com/m/4071/l/12250-how-do-i-store-an-array-variable-inside-of-another-array-variable
 
…

function displayArray @pArray
   # create variables that point to the line and column of the array
   local tLineItem, tColumnItem
   # create a variable that stores the output for printing
   local tPrintLine
   put empty into tPrintLine
   # loop through each row of the array
   repeat for each element tLineItem in pArray
 # loop through each column of the array
 repeat for each element tColumnItem in tLineItem
   # write content of the array to tPrintLine
   put tColumnItem & "," after tPrintLine
 end repeat
   # insert a return after each row we have written to tPrintLine
   put return after tPrintLine
   end repeat
   return tPrintLine
end displayArray

However, the above function seems to assume that all array elements have 
content, so I’m getting problems where there are empty elements in the xml 
files coming from various sources.

I’m sure the loop repeating for each element can be refined to check for ‘empty 
cells’ by the tTagName key in my array but my LC array knowledge is to sparse 
to begin the search.

Dos anyone have any tips on where I should start looking?

Thanks & regards,
Keith
___
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


How to render a two-dimensional array correctly with empty/missing 'cell' elements?

2020-12-30 Thread Keith Clarke via use-livecode
Hi folks,
I’m using LiveCode to parse a set of xml files with varying subsets of tags 
(dmarc reports) into a CSV file.

The utility iterates through the files in the folder and the lines of the 
files, to identify unique opening tags and their content, all of which get 
parsed into an array:
- Tags go into aDetails[0][tTagName]
- Values go into aDetails[tFileNumber][tTagName]

This is then displayed as a table, using the function below, borrowed from an 
LC lesson 
https://lessons.livecode.com/m/4071/l/12250-how-do-i-store-an-array-variable-inside-of-another-array-variable
 
…

function displayArray @pArray
  # create variables that point to the line and column of the array
  local tLineItem, tColumnItem
  # create a variable that stores the output for printing
  local tPrintLine
  put empty into tPrintLine
  # loop through each row of the array
  repeat for each element tLineItem in pArray
# loop through each column of the array
repeat for each element tColumnItem in tLineItem
  # write content of the array to tPrintLine
  put tColumnItem & "," after tPrintLine
end repeat
  # insert a return after each row we have written to tPrintLine
  put return after tPrintLine
  end repeat
  return tPrintLine
end displayArray  

However, the above function seems to assume that all array elements have 
content, so I’m getting problems where there are empty elements in the xml 
files coming from various sources.

I’m sure the loop repeating for each element can be refined to check for ‘empty 
cells’ by the tTagName key in my array but my LC array knowledge is to sparse 
to begin the search.

Dos anyone have any tips on where I should start looking?

Thanks & regards,
Keith
___
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