A "listview" type module (editing tables)

For general discussion related FlowStone
Post Reply
Quentin
Posts: 37
Joined: Sat Jul 14, 2012 5:35 am

A "listview" type module (editing tables)

Post by Quentin »

Hi, I am looking at making an editable list of times that is more friendly then the edit module.
I got started doing it hybrid ruby and flowstone where a ruby hash provides values to each cell in the table using a wireless ruby connection. Each cell is just a modified label module. Each cell sends it position when it is lft clicked, wirelessly, which is the first step to incrementing/editing the value of that cell. This is where it got awkward, sending "position" wireless is additive. I worked around it by in the ruby code by sending 2 triggers
output 0, @position
output 0, nil
and filtering every other on the receiving side.
This seems like a very awkward way of doing a simple thing.
Generally I am interested in better ways to approach editing tables.
Maybe doing the whole table in a single chunk of ruby makes the most sense.
I am novice enough with ruby that I find that without line numbers for errors: development of long chunks of pure ruby UI is painful.
I attached the .fsm example
Any advice on this
Thanks,
Quentin
Attachments
listview.fsm
(2.96 KiB) Downloaded 799 times
KG_is_back
Posts: 1196
Joined: Tue Oct 22, 2013 5:43 pm
Location: Slovakia

Re: A "listview" type module (editing tables)

Post by KG_is_back »

In your ruby module, you can put:

Code: Select all

if @in!=nil
#your code
end


This way you do not have to filter every second trigger, because the code will run only if actual value is passed in.
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: A "listview" type module (editing tables)

Post by billv »

Quentin wrote:Generally I am interested in better ways to approach editing tables.

Trogs "Super Text Box" may be usefull ...its in examples somewhere.. (cant find link ATM)..
Quentin
Posts: 37
Joined: Sat Jul 14, 2012 5:35 am

Re: A "listview" type module (editing tables)

Post by Quentin »

Good point, that is an improvement. Sending two triggers still seems awkward but with your suggestion, I can live with it.
Thanks
Quentin
Quentin
Posts: 37
Joined: Sat Jul 14, 2012 5:35 am

Re: A "listview" type module (editing tables)

Post by Quentin »

The "super edit box" is an excellent jumping off point, and very well organized, documented.
It took me a second to find it in examples but it's a huge help.
Thanks,
QUentin
billv
Posts: 1165
Joined: Tue Aug 31, 2010 3:34 pm
Location: Australia
Contact:

Re: A "listview" type module (editing tables)

Post by billv »

Quentin wrote:It took me a second to find it in examples

Did you use the crappy FS search engine first..???
If yes...
Try using Google next time..
Type in whatever you want followed by "dsp robotics" as the tag..
EG: super text box dsp robotics
Works great for me....havn't used FS search for a while... :D
Post Reply