Comma delimited into Field with VGrid set.

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Comma delimited into Field with VGrid set.

Post by keyless » Sat Apr 05, 2008 12:46 am

I'm trying to get a comma delimited string of data into a field.

I've set the tabstops of the field and set Vgrid to true.

I'm not finding the info I need on how to now put the delimited string into the field so that each item of data in the string goes into a different cell of the vGrid.

Do I need to split the string by its delimiter first? I've tried that but then nothing showed up when I put it into the field.

keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless » Sat Apr 05, 2008 4:24 am

Ok I got something going converting to tab delimited. Is this the best way, or am i missing something?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sat Apr 05, 2008 6:53 am

Nope, that's the way to go - if you have a delimited string and need to display it in a grid field:

Code: Select all

replace the itemDelimiter with tab in myItemDelimitedString
put myItemDelimitedString into field "MyGrid"
Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless » Sat Apr 05, 2008 9:29 am

Janschenkel wrote:Nope, that's the way to go - if you have a delimited string and need to display it in a grid field:

Code: Select all

replace the itemDelimiter with tab in myItemDelimitedString
put myItemDelimitedString into field "MyGrid"
Jan Schenkel.
Thanks much Jan, I'm on my way with this. I specifically wanted to put File details into the list box and now I've got that.

Now I'm working on getting check boxes into the field. I had found your CheckboxList stack link among my search of the rev list. I'm going to try an implement that. Is that still a good method? or has something newer come along?

Janschenkel
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 977
Joined: Sat Apr 08, 2006 7:47 am
Contact:

Post by Janschenkel » Sat Apr 05, 2008 5:18 pm

Oh boy, I wrote that ages ago, and there are better solutions to that problem - don't get me wrong, it works, but others have rolled their own checkbox-lists in a simplified manner.

Their solution is based on putting images into the field using the 'imageSource' property, setting the 'link' property of the chunk and reacting to the 'linkClicked' message to modify the imageSource again.
Of course, if you use snapshots of a checkbox button, then you need to update the images per platform, or make your own platform-independent checkbox images - with the additional advantages that you can then make tri-state checkboxes, which is not directly supported in Revolution.

If you need more help, don't hesitate to post.

Jan Schenkel.
Quartam Reports & PDF Library for LiveCode
www.quartam.com

keyless
Posts: 211
Joined: Wed Dec 12, 2007 11:21 pm

Post by keyless » Sun Apr 06, 2008 6:43 am

Janschenkel wrote:Oh boy, I wrote that ages ago, and there are better solutions to that problem - don't get me wrong, it works, but others have rolled their own checkbox-lists in a simplified manner.

Their solution is based on putting images into the field using the 'imageSource' property, setting the 'link' property of the chunk and reacting to the 'linkClicked' message to modify the imageSource again.
Of course, if you use snapshots of a checkbox button, then you need to update the images per platform, or make your own platform-independent checkbox images - with the additional advantages that you can then make tri-state checkboxes, which is not directly supported in Revolution.

If you need more help, don't hesitate to post.

Jan Schenkel.
For this project I'm working on, I actually decided on using a multi-select field and then a button to move selected into another field. I wanted to use re-sizable fields (Chip's plug in), and saw that was going to be difficult with the method used in your old stack.

I did think about using the imageSource of first character for check boxes and changing the character and imageSource on click, but multi-select was quick and easy.

Thanks for the info I probably will roll my own in the future.

Post Reply