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
EDIT BOX that recieves only numbers?
6 posts
• Page 1 of 1
EDIT BOX that recieves only numbers?
Is it possible to restrict edit box to recieve only numbers as valid data? (like in windows when you enter non-number character it will not get written - instead you get a "ding" sound).
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: EDIT BOX that recieves only numbers?
The easiest way would be to convert the string to the data you loke to have and then Feedback it to the input string of the editbox
Then you neet to "send Trigger only on finish" to true
And adding a Switch to get also input back
I did an short simple example
Regards
Then you neet to "send Trigger only on finish" to true
And adding a Switch to get also input back
I did an short simple example
Regards
- Attachments
-
- edit box mod.fsm
- (1016 Bytes) Downloaded 774 times
100% accuracy is the guarantee to your success. The value alters if you combine it with musical creativity.
-
chackl - Posts: 233
- Joined: Tue Aug 17, 2010 8:46 pm
- Location: Austria / Salzburg
Re: EDIT BOX that recieves only numbers?
i did one once here: viewtopic.php?f=2&t=1421&start=20
it also has some optimizations in using the edit box
and it has a restrictions module inside, where you can set ruby restrictions, this one takes only numbers everything else is gonna be ignored
but this one is only for int values...
it also has some optimizations in using the edit box
and it has a restrictions module inside, where you can set ruby restrictions, this one takes only numbers everything else is gonna be ignored
but this one is only for int values...
- Attachments
-
- editbox_nubeat_v2.fsm
- (4.66 KiB) Downloaded 787 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: EDIT BOX that recieves only numbers?
chackl wrote:The easiest way would be to convert the string to the data you loke to have and then Feedback it to the input string of the editbox Then you neet to "send Trigger only on finish" to trueAnd adding a Switch to get also input back
That's how I'm doing it already. I was more looking for something that would not even allow you to write numbers while editing... It's not really biggie... I'm just trying to make my plugin idiot-proof by not allowing to input random stuff.
Is it possible to make edit box within ruby?
- KG_is_back
- Posts: 1196
- Joined: Tue Oct 22, 2013 5:43 pm
- Location: Slovakia
Re: EDIT BOX that recieves only numbers?
yes you can make a ruby edit box but i know no way of restriction while typing
here it would just 0.0 if you type wrong..
here it would just 0.0 if you type wrong..
- Attachments
-
- editbox_ruby.fsm
- (984 Bytes) Downloaded 748 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
Re: EDIT BOX that recieves only numbers?
here using regex to extract floatingpoint from input string
- Attachments
-
- editbox_ruby1.fsm
- (995 Bytes) Downloaded 771 times
-
Nubeat7 - Posts: 1347
- Joined: Sat Apr 14, 2012 9:59 am
- Location: Vienna
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 72 guests