Support

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

help ruby

For general discussion related FlowStone

help ruby

Postby mimine » Thu Feb 28, 2013 8:17 pm

just need to simply remove a line in the list array (ruby my nightmare) :cry:
Attachments
teste teste ruby.fsm
(370 Bytes) Downloaded 903 times
mimine
 
Posts: 12
Joined: Sat Feb 09, 2013 11:47 am

Re: help ruby

Postby TrojakEW » Thu Feb 28, 2013 11:14 pm

Something like this?
Attachments
teste teste ruby.fsm
(453 Bytes) Downloaded 882 times
User avatar
TrojakEW
 
Posts: 111
Joined: Sat Dec 25, 2010 10:12 am
Location: Slovakia

Re: help ruby

Postby trogluddite » Fri Mar 01, 2013 1:44 am

And if you swap...
im.delete_at(<number>)
...which deletes at a soecific location.
...for...
im.delete(<string>)
You can delete an entry by its name; for example...
im.delete("lo")
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK

Re: help ruby

Postby mimine » Fri Mar 01, 2013 9:20 am

thank you for the help. I changed a little, the entry number in array or text. this is exactly what I wanted. good job. ;)
Attachments
teste teste ruby.fsm
(1.39 KiB) Downloaded 875 times
mimine
 
Posts: 12
Joined: Sat Feb 09, 2013 11:47 am

Re: help ruby

Postby trogluddite » Fri Mar 01, 2013 3:37 pm

Great - glad it is now working.

A couple of little tips for the Ruby.

- The line with only "@ins[1]" is not required - using that value inside the "delete" or "delete_at" is enough to make Ruby read the value.

- When putting the values inside '(...)' it is better not to put a space between the method name and the values, e.g...
im.delete(@ins[1])
(no space follows 'delete')
Mostly, using a space is OK, but I have noticed that sometimes putting a space will give an error.
All schematics/modules I post are free for all to use - but a credit is always polite!
Don't stagnate, mutate to create!
User avatar
trogluddite
 
Posts: 1730
Joined: Fri Oct 22, 2010 12:46 am
Location: Yorkshire, UK


Return to General

Who is online

Users browsing this forum: No registered users and 55 guests