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
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
Jim
You are a Godsend - I never knew of the metadata - I have a whole lot of
refactoring to do.
I was using the "hidden" tab fields trick but this is way better
This is going to make so much stuff so easy - and so much easier to debug
Thanks again
Lagi
On 8 May 2017 at 09:34, Tiemo Hollmann
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 <
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
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
> 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
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
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
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
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
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
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
> 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
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
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
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
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
19 matches
Mail list logo