When I want to determine whether or not an array element contains
non-whitespace, I usually say:
if word 1 of tDataA["item"] is empty then ... (or is NOT empty)
Just another option.
Phil Davis
On 3/8/21 5:36 PM, Bob Sneidar via use-livecode wrote:
Are you testing for empty, or are you
Are you testing for empty, or are you testing if there is a value in an array
variable? If there is no key matching your array variable, LC will return an
empty string. An empty string is a value.
Mark is using a different method, seeing if a key of an array is itself an
array. If bobtest ["va
On 3/8/21 4:58 PM, Ralph DiMola via use-livecode wrote:
Also works,
if tArray[“status”] an array -- It's an array
if (not (tArray[“status”] an array)) and (tArray[“status”] is not empty) --
it's a value
Well, technically "empty" is also a value.
Just an... er... empty one.
--
Mark Wiede
Also works,
if tArray[“status”] an array -- It's an array
if (not (tArray[“status”] an array)) and (tArray[“status”] is not empty) --
it's a value
Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net
-Original Message-
From: use-livecode [mailto:use-livecod
On 3/8/21 4:25 PM, HENRY LOWE via use-livecode wrote:
My code is trying to do the following:
No, I *do* see what you're trying to do.
Here... try it for yourself:
on mouseUp pMouseBtnNo
local tArray
put "hello" into tArray["status"]
put tArray["status"] is an array into msg # false
Typed too fast(left out a "the")
If the number lines of the keys of tArray[“status”] > 0 -- It's an array
Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net
-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of
H
If the number lines of keys of tArray[“status”] > 0 -- It's an array
Ralph DiMola
IT Director
Evergreen Information Services
rdim...@evergreeninfo.net
-Original Message-
From: use-livecode [mailto:use-livecode-boun...@lists.runrev.com] On Behalf Of
HENRY LOWE via use-livecode
Sent: Monda
Thanks Mark. There are two possible states:
tArray[“status”] holds a value and tArray[“status”][“text”] does not
or
tArray[“status”][“text”] holds a value and tArray[“status”] does not
My code is trying to do the following:
If tArray[“status”] does not hold a value then check if
tArray[“stat
On 1/16/21 10:30 AM, Richard Gaskin via use-livecode wrote:
This report for Linux Mint seems perhaps relevant:
https://quality.livecode.com/show_bug.cgi?id=21131
In my comment #13 on that bug report I suggest a workaround. Is that a
possible way forward for you?
--
Mark Wieder
ahsoftw...@
On 3/8/21 3:46 PM, HENRY LOWE via use-livecode wrote:
I have often used the form 'if tArray[“key1”] is empty' to determine whether an
array element hold a value but this breaks if tArray[“key1”][“key2”] holds a
value.
Same here. Not that I've every liked that paradigm, just that it's been
t
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.
For example a field named “status” may be represented as either:
“status": {
"text": “active"}
or
“status":
Hi all,
Read about new developments in LiveCode open source and the open source
community in today's edition of the "This Week in LiveCode" newsletter!
Read issue #257 here: http://bit.ly/38lT3mX
This is a weekly newsletter about LiveCode, focussing on what's been
going on in and around
12 matches
Mail list logo