Table control for database work
Moderator: Klaus
Table control for database work
The table option on scrolling fields is very basic. To really get the product accepted in professional work, I would love to see a true table/grid control.
As a minimum, resizable and sortable columns are a must. Placing other controls (e.g checkboxes) in the table would be wonderful.
It seems odd to me that a 4GL RAD tool does not have this.
Best,
Dave.
As a minimum, resizable and sortable columns are a must. Placing other controls (e.g checkboxes) in the table would be wonderful.
It seems odd to me that a 4GL RAD tool does not have this.
Best,
Dave.
Hi Dave,
I hope I can save you some effort (and waiting). I just spent about a week building a table object with click-sortable columns (and with drag and drop resizing). Then today I discovered that Chip has already done this here:
http://www.altuit.com/webs/altuit2/altP ... nloads.htm
Look for the tool called 'altFldHeader' (although I'm guessing you will find some of his other goodies rather tasty too).
I wish I'd found that a week ago - I'm kicking myself! He's implemented it in a different way to me, but basically the functionality is very similar.
Bernard
I hope I can save you some effort (and waiting). I just spent about a week building a table object with click-sortable columns (and with drag and drop resizing). Then today I discovered that Chip has already done this here:
http://www.altuit.com/webs/altuit2/altP ... nloads.htm
Look for the tool called 'altFldHeader' (although I'm guessing you will find some of his other goodies rather tasty too).
I wish I'd found that a week ago - I'm kicking myself! He's implemented it in a different way to me, but basically the functionality is very similar.
Bernard
Hi Bernard,Bernard wrote:Hi Dave,
Look for the tool called 'altFldHeader' (although I'm guessing you will find some of his other goodies rather tasty too).
That looks like it will do the job! Thanks for heads up. It's always good to stand on the shoulders of giants

I'll download it when I get back to work. Like you, I was about to try and put some buttons above a table and wire them up to the tab & resize properties - at least I can continue to develop at a higher level with this.
Best,
Dave.
Hi Horst,
I don't personally use altFldHeader. But basically it is a set of buttons that are added above a field. The field has 'columns' based on where the 'tab' character appears in the field. You can use certain key combinations when clicking on the column headers (the buttons above the field) to change the way that clicking on the columns works (you have to add scripts behind those buttons e.g. to make the rows in the table below sort on those columns)
I don't have much time to go into this further now. But Chipp (the man behind Altuit) reads the use-list (rev user mailing list), and there are some other users of altFldHeader on the use-list. I'm not sure if any of them read this forum. It would probably be better to ask on that list today and I'm sure you will have some better answers by the end of the day.
I don't personally use altFldHeader. But basically it is a set of buttons that are added above a field. The field has 'columns' based on where the 'tab' character appears in the field. You can use certain key combinations when clicking on the column headers (the buttons above the field) to change the way that clicking on the columns works (you have to add scripts behind those buttons e.g. to make the rows in the table below sort on those columns)
I don't have much time to go into this further now. But Chipp (the man behind Altuit) reads the use-list (rev user mailing list), and there are some other users of altFldHeader on the use-list. I'm not sure if any of them read this forum. It would probably be better to ask on that list today and I'm sure you will have some better answers by the end of the day.
Just a quick update to say I tried this out and it is really good. There is just one "annoyance". If a user has selected one or more lines in the field and then decided to drag a column out to see other information, all of the previous selections are unselected.Bernard wrote:Hi Dave,
http://www.altuit.com/webs/altuit2/altP ... nloads.htm
Look for the tool called 'altFldHeader' (although I'm guessing you will find some of his other goodies rather tasty too).
Bernard
If I get chance, I'd like to have a dig through the code to see if I can find a workaround for this, otherwise perfect, plugin. (Maybe store the selections before refocus & drag, then restore afterwards).
Best,
Dave
There is an alternative table 'control' (ie a group) at the following address which I have found pretty useful, thanks to Ken Simon/ Tuviah Snyder. Also has a good graph 'control'.
http://www.rpi.edu/~simonk/technical.html
It's in metacard format but can be opened and saved as .rev
You will probably end up tweaking the scripts somewhat to suit your own purposes but it will get you most of the way there.
I added a basic Excel-style 'formula bar' to go with the table for my app, which I'm happy to share if anyone's interested.
http://www.rpi.edu/~simonk/technical.html
It's in metacard format but can be opened and saved as .rev
You will probably end up tweaking the scripts somewhat to suit your own purposes but it will get you most of the way there.
I added a basic Excel-style 'formula bar' to go with the table for my app, which I'm happy to share if anyone's interested.
How is the (full-featured) columned text field in the (2.
documentation window dictionary done? If that is coded in Rev too then there might be a built-in way to get a sortable, sizable, swappable gridded text field...
It seems to be a big missing element of Revolution, considering that this sort of text list is used as the main interface to all the big OSes.

It seems to be a big missing element of Revolution, considering that this sort of text list is used as the main interface to all the big OSes.
~ Nonsanity
~ Chris Innanen
~ Chris Innanen
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
These two links may be helpful:
http://lists.runrev.com/pipermail/use-r ... 09978.html
http://www.fourthworldlabs.com/table.jpg
Yes, it preserves selection after sorts.
http://lists.runrev.com/pipermail/use-r ... 09978.html
http://www.fourthworldlabs.com/table.jpg
Yes, it preserves selection after sorts.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
I've rolled my own similar field design too. I went for simplicity of design over looks, so the index strip at the top is just another field with the same tabstops. The column resizing script is in there, and the main field shares its horizontal scroll with it. I haven't needed to sort columns with it yet, but that would be simple enough to add.
It's functional, but this being the Feature Requests forum, I wanted to add my two cents in to get this style of table added to Revolution itself. It's a shocking omission, frankly.
It's functional, but this being the Feature Requests forum, I wanted to add my two cents in to get this style of table added to Revolution itself. It's a shocking omission, frankly.
~ Nonsanity
~ Chris Innanen
~ Chris Innanen
-
- VIP Livecode Opensource Backer
- Posts: 10043
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
I believe Kevin's noted that such a critter is on the list for inclusion in the engine.
In the meantime, as you've found most of it's pretty straightforward to do in script. The only tough challenge I encountered was supporting horizontal scrolling with the resizr, coupled with adjusting the sort indicator. That was a lot of work.
In the meantime, as you've found most of it's pretty straightforward to do in script. The only tough challenge I encountered was supporting horizontal scrolling with the resizr, coupled with adjusting the sort indicator. That was a lot of work.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn