Note also that datagrids will only display the data for columns that have been
defined in the datagrid properties. You can have all sorts of data in the
dgData of the datagrid that is invisible to the user. I do this all the time,
storing whole database records, but displaying only the informati
Every time you state the problem you are trying to solve, I catch myself saying
"This is not how I would do it." Array values are not searchable, which makes
it unsuitable for searching. Fields can be searched easily enough, datagrids
without too much more trouble are searchable, and databases a
Gesendet: Samstag, 6. Mai 2017 22:15
> An: How to use LiveCode
> Cc: J. Landman Gay
> Betreff: Re: looking for a smart approach to "sort" an array
>
> Use tabwidths instead of tabstops. I was working off faulty memory.
>
>
> On 5/6/17 2:32 PM, Mike Bonner via use-liv
smart approach to "sort" an array
Use tabwidths instead of tabstops. I was working off faulty memory.
On 5/6/17 2:32 PM, Mike Bonner via use-livecode wrote:
> Cool stuff! Didn't know you could hide things with tab, and will have
> to look at metadata now. Thanks!
>
>
Use tabwidths instead of tabstops. I was working off faulty memory.
On 5/6/17 2:32 PM, Mike Bonner via use-livecode wrote:
Cool stuff! Didn't know you could hide things with tab, and will have to
look at metadata now. Thanks!
On Sat, May 6, 2017 at 1:30 PM, Jim Lambert via use-livecode <
use-
On 5/6/17 2:30 PM, Jim Lambert via use-livecode wrote:
But I realized Tiemo might not even need to bother hiding the
otherData if he takes advantage of another property of fields - the
metadata property:
I forgot all about that, even though I've used it in the past. That's
the best idea so far
Cool stuff! Didn't know you could hide things with tab, and will have to
look at metadata now. Thanks!
On Sat, May 6, 2017 at 1:30 PM, Jim Lambert via use-livecode <
use-livecode@lists.runrev.com> wrote:
>
> > Jacque wrote:
> > I've done this often, it's a nice clean solution. And now that we ca
> Jacque wrote:
> I've done this often, it's a nice clean solution. And now that we can
> set tabstops to 0, the second item won't be visible whether there's a
> horizontal scrollbar or not.
That’s right! tabwidths are handy for this hiding too.
But I realized Tiemo might not even need to bo
On 5/6/17 12:10 PM, Jim Lambert via use-livecode wrote:
Set the tabstops to a number greater than the width of the field.
Set the itemdelimter to tab.
Then put the OtherData of each line into the second item of each line.
As long as there’s no horizontal scrollbar on the field the user will neve
Tiemo,
> I have a list field of words and a correspondent array with the words of the
> field as the keys plus some data per key. I can store the array in a file,
> read it later from file and rebuild the list of words from the keys of the
> array. Up to now, I had this list of words alphabeticall
Wasn't my post originally, but the gist of the problem was, how does one
get data back out of an array based on a custom sorted list of words that
are used as main array key back out of the array in the desired sequence.
IE there is a list of words in a field. And an array that has extra
informat
sez "Tiemo Hollmann TB" :
To: "LiveCode User Liste senden"
> I have a list field of words and a correspondent array with the words of the
> field as the keys plus some data per key. I can store the array in a file,
> read it later from file and rebuild the list of words from the keys of the
> arra
Oh, sorry Mike, I didn't think deep enough.
Then your approach to add the field as "sort-element" to the array is
from my point of view clearly the easiest way to go.
> > > Mike B. wrote:
> > > repeat for each line tKey in myArrayA["sortedWords"]
> > > -- do whatever with each one myArrayA[tKey
True, wasn't sure the field would still be available. I think the O.P.
mentioned rebuilding the list in user order at a later time (as in from a
later program run) by loading the array data from a file. By storing the
list from the field as part of the array data, it carries the user index
along
> Mike B. wrote:
> repeat for each line tKey in myArrayA["sortedWords"]
> -- do whatever with each one myArrayA[tKey].
> end repeat
Why administrate another object while you have already one?
One could rebuild to string from array and sort in one step:
put fld "myListField" into mySortList
I read your post a bit closer. Can you just repeat for each line tLine in
tText, then increment a counter and use the counter as the key in the array?
Bob S
put "Bob" & cr & "Andy" & cr & "Fred" into tText
repeat for each line tWord in tText
add 1 to tCount
put tWord into myArray [tCount]
end r
Might a numbered array work for you, where the key corresponds to the line
number?
[1][theWordonLineOne][otherData]
[2][theWordonLineTwo][otherData]
Jim Lambert
___
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to sub
Bob, can you do a custom sort using order by with sqlite? I did some
digging and see a way, but for this purpose it seems complicated and I'm
wondering if there is something better than what I found. Basically what I
found was this..
ORDER BY
CASE ID
WHEN 4 THEN 0
WHEN 3 THEN 1
WHEN
Why not load the array into a memory sqlite database and query using order by?
Bob S
> On May 5, 2017, at 02:30 , Tiemo Hollmann TB via use-livecode
> wrote:
>
> Hello,
>
> I have a list field of words and a correspondent array with the words of the
> field as the keys plus some data per ke
for a smart approach to "sort" an array
It might be easiest to just have a single separate key that contains the
user sorted list, then use the data of that key itself to access the rest of
the array.
So if you have 5 keys, word1,word2,word3,word4,word5, but the user orders
them in rev
It might be easiest to just have a single separate key that contains the
user sorted list, then use the data of that key itself to access the rest
of the array.
So if you have 5 keys, word1,word2,word3,word4,word5, but the user orders
them in reverse, your sorted words single key would contain
wor
Hello,
I have a list field of words and a correspondent array with the words of the
field as the keys plus some data per key. I can store the array in a file,
read it later from file and rebuild the list of words from the keys of the
array. Up to now, I had this list of words alphabetically sorted
22 matches
Mail list logo