RunRev for iPhone and iPod Touch
Björnke von Gierke
bvg at mac.com
Sat Feb 23 11:56:54 EST 2008
On 23 Feb 2008, at 02:27, Richard Gaskin wrote:
> Suppose you want to display records from a database in a multi-
> column list field. You'll want to keep track of the ID field, but
> that's just noise to the end-user so you don't want to display it.
> Currently, you'd have to parse out that column and store it in a
> separate field. When the user clicks on a line in the list, you
> look up the corresponding line in the ID field to do whatever you
> need to do with that record.
> But then you want to sort the list. So you have to recombine the ID
> field with the rest of the list contents, do the sort, then parse
> them apart again for display.
Not to say this isn't a nice feature request, but removing or adding
columns isn't exactly the rocket science you make it out to be. For
put 1 into doNotWantColumn
put 2 into sortByThisColumn
put the data of field 1 into theData
sort theData by item sortByThisColumn of each
split theData by column
delete variable theData[doNotWantColumn]
combine theData by column
put theData into field 1
Obviously not as simple as not showing a column in the field, and less
memory efficient too, but on the plus side this is available now, and
most likely faster then a modified field object (everything that has
to do with fields is slow).
official ChatRev page:
Chat with other RunRev developers:
go stack URL "http://homepage.mac.com/bvg/chatrev1.3.rev"
More information about the Use-livecode