Page 1 of 1

A "listview" type module (editing tables)

Posted: Fri Dec 19, 2014 11:50 pm
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

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

Posted: Sat Dec 20, 2014 12:03 am
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.

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

Posted: Sat Dec 20, 2014 1:48 am
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)..

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

Posted: Sat Dec 20, 2014 2:03 am
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

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

Posted: Tue Dec 23, 2014 8:29 pm
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

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

Posted: Wed Dec 24, 2014 2:06 am
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