If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
Some help with Trog's Super Text Box
4 posts
• Page 1 of 1
Some help with Trog's Super Text Box
Hi..Greetings from Down Under
I need some help. My ruby skills aren't good enough.
Trog has explained the code really well in this schematic, but I can't work it out
All I need is Sort 'trigger" for the QTY Column.The problem is how to make all the rows
sort the same way according to the values in the QTY Column...
I need some help. My ruby skills aren't good enough.
Trog has explained the code really well in this schematic, but I can't work it out
All I need is Sort 'trigger" for the QTY Column.The problem is how to make all the rows
sort the same way according to the values in the QTY Column...
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: Some help with Trog's Super Text Box
I'm not sure I understood. Anyway, here's an external trigger, that sorts based on qty. The first time it's sorting low to high, the second time high to low.
If you wanted to know the general technique, it's :sort_by! of the array class.
If you wanted to know the general technique, it's :sort_by! of the array class.
- Code: Select all
array = [
["John", "Doe", 20],
["Jane", "Doe", 18],
["Annie", "Thing", 34]
]
array.sort_by! { |obj| obj[2] }
##sorts the array of arrays based on the contents of their third items, here the age number##
- Attachments
-
- Super Text Box Problem (tula).fsm
- (11.91 KiB) Downloaded 713 times
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
Re: Some help with Trog's Super Text Box
Awesome..works perfect..thanks tulamide
BV MUSIC SYDNEY AUSTRALIA..Songwriting and Software development
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
Headquartershttps://www.bvmusicsydneyaustralia.com/
Spotifyhttps://open.spotify.com/artist/7JO8QM40mVmHb7pAwKPJi0
Donatationhttps://www.paypal.com/donate/?hosted_button_id=HEUR8R7K8GZ4L
- billv
- Posts: 1157
- Joined: Tue Aug 31, 2010 3:34 pm
- Location: Australia
Re: Some help with Trog's Super Text Box
billv wrote::D Awesome..works perfect..thanks tulamide
You're welcome
I just want to take the opportunity to point out, that this was only possible, because Trog, although having a large code base, has it structured very well, so that I could relatively easy follow his thoughts and layout of the code. That was even more important than the documentation!
Most people neglect that. Please don't. At one point sooner or later, you will need help with your own code. Make sure it is easily readable (for someone who knows Ruby). Stick to the conventions and styles, the Ruby community agreed on, and it will be so much easier to help you.
https://rubystyle.guide/
"There lies the dog buried" (German saying translated literally)
- tulamide
- Posts: 2714
- Joined: Sat Jun 21, 2014 2:48 pm
- Location: Germany
4 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 75 guests