Table control for database work

Something you want to see in a LiveCode product? Want a new forum set up for a specific topic? Talk about it here.

Moderator: Klaus

Post Reply
davec
Posts: 30
Joined: Tue Dec 12, 2006 9:08 pm
Contact:

Table control for database work

Post by davec » Fri Dec 15, 2006 6:21 pm

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.

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm

Post by Bernard » Fri Dec 15, 2006 9:56 pm

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

davec
Posts: 30
Joined: Tue Dec 12, 2006 9:08 pm
Contact:

Post by davec » Sat Dec 16, 2006 9:32 am

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).
Hi Bernard,

That looks like it will do the job! Thanks for heads up. It's always good to stand on the shoulders of giants :D

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.

inselfan
Posts: 42
Joined: Fri Nov 10, 2006 11:33 am

Post by inselfan » Sun Dec 17, 2006 7:16 pm

Hi Bernhard,

Thanks for the Info, I downloaded, but I do not understand how to use. Maybe ikt's my poor english? Could you -Please- let me know?

best regards

Horst

Bernard
Posts: 351
Joined: Sat Apr 08, 2006 10:14 pm

Post by Bernard » Mon Dec 18, 2006 10:03 am

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.

davec
Posts: 30
Joined: Tue Dec 12, 2006 9:08 pm
Contact:

Post by davec » Tue Dec 19, 2006 8:09 am

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
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.

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

mblackman
Posts: 22
Joined: Fri Apr 14, 2006 12:02 pm

Post by mblackman » Wed Jan 10, 2007 2:09 pm

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.

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Contact:

Post by Nonsanity » Mon Apr 21, 2008 1:54 am

How is the (full-featured) columned text field in the (2.8) 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.
~ Nonsanity
~ Chris Innanen

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Mon Apr 21, 2008 4:36 am

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Nonsanity
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 86
Joined: Thu May 17, 2007 9:15 pm
Contact:

Post by Nonsanity » Mon Apr 21, 2008 3:57 pm

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.
~ Nonsanity
~ Chris Innanen

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Post by FourthWorld » Mon Apr 21, 2008 5:26 pm

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.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply