On 9/18/18 7:15 AM, Tore Nilsen via use-livecode wrote:
You can not put the incrementing numeric key inside an associative array the
way you want. The key of any array must be unique, and you can not have several
instances of a key in an array. Think of the keys of the array it as the
primary k
It my case it was "ignorance about arrays" that may my head hurt.
It would nice if the dictionary's "associations" include every keyword
related.
For example, search on array"
One find zero reference to
extents
But I found them the user guide
1) Chapter on Arrays
2) Section on Processing Text
I was going to say something similar, but thought better of it. Sometimes you
need to step back and ask yourself, "What exactly am I trying to do here", or a
better question is, "How do I get from where I am to where I want to be (in
terms of the data) with the least amount of fuss?"
Bob S
>
I always forget about "extents". I like concise code, Alex wins. :)
--
Jacqueline Landman Gay | jac...@hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
On September 18, 2018 9:25:02 PM Sannyasin Brahmanathaswami via
use-livecode wrote:
Well Alex won with "extents"
_
Well Alex won with "extents"
in fact while he wrote that, I was in the User look at extents.'
Jacque does that some thing..
put the number of lines in keys
USE CASE
Jacque and created a puzzle together, it take quotes of various lengths,
creates image tiles of the words. Each tile has a c
When solving a problem with a given data structure makes your head hurt,
that may be an indication that your head's fine and the problem is with
the data structure. :)
Can you tell us a bit more about your goal with this?
In your example output, if we look at this line:
WordLocationA["Cut"
or,
repeat for each trueword X in tQuote
put (item 2 of the extents of tWordLocationA[X]) + 1 into t1
put tWordLocation into tWordLocationA[X][t1]
end repeat
Alex
On 18/09/2018 23:57, J. Landman Gay via use-livecode wrote:
On 9/18/18 5:01 PM, Sannyasin Brahmanathaswami via
On 9/18/18 5:01 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
# how to get "x" to increment? but only by each key in the array?
Okay, try this:
put fld 1 into tQuote
repeat with x = 1 to the number of truewords in tQuote
put the number of lines in keys(tWordLocationA[trueword
We are not talking about different things, but the same thing from different
angles. I misinterpreted what you wanted to do from your example. What you do
manually is creating an associative array with a numeric array as the values
for each key in the associative array, which should work well.
Tore, must be talking about different things.
fld "tQuote" =
Cut the apple. Cut the banana.
I CAN manually create what we need
*on*mouseup
*put*"100,320"intoWordLocationsA["Cut"][1]
*put*"300,320"intoWordLocationsA["Cut"][2]
*put*"200,320"intoWordLocationsA["the"][1]
*put*"
On 9/18/18 10:41 AM, Sannyasin Brahmanathaswami via use-livecode wrote:
I want to analyse the quote by going through each word.
*--*
*repeat* withx = 1tothenumberofwordsoffld"_quote"
# get the location of the word, put it into variable tWordLocation
put tWordLocation to the
On 9/18/18 7:15 AM, Tore Nilsen via use-livecode wrote:
> You can not put the incrementing numeric key inside an associative array the
> way you want. The key of any array must be unique, and you can not have
> several instances of a key in an array. Think of the keys of the array it as
> the pr
You can not put the incrementing numeric key inside an associative array the
way you want. The key of any array must be unique, and you can not have several
instances of a key in an array. Think of the keys of the array it as the
primary keys of a database table. It serves as a unique identifier
Hi Craig,
> Am 18.09.2018 um 18:47 schrieb dunbarxx via use-livecode
> :
>
> Also, be careful. The string:
> "Cut the apple. Cut the banana"
> contains only one word.
true, but also contains 6 TRUEWORDS! :-)
> Craig
Best
Klaus
--
Klaus Major
http://www.major-k.de
kl...@major-k.de
___
Also, be careful. The string:
"Cut the apple. Cut the banana"
contains only one word.
Craig
--
Sent from:
http://runtime-revolution.278305.n4.nabble.com/Revolution-User-f278306.html
___
use-livecode mailing list
use-livecode@lists.runrev.com
Plea
Hi.
Is this what you want?
on mouseUp
repeat with y = 1 to the number of words of fld 1
select word y of fld 1
put the selectedLoc into wordLocationA[y][word y of fld 1]
end repeat
end mouseUp
I suspect not. Is it that you want the output to be:
WordLocationA["Cut"][100,320]
W
16 matches
Mail list logo