Ulysses
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Home
Help
Search
Login
Register
Ulysses
»
General
»
Developers Corner
»
integer and string input
« previous
next »
Print
Pages: [
1
]
Go Down
Author
Topic: integer and string input (Read 1853 times)
0 Members and 1 Guest are viewing this topic.
bender180
Full Member
Posts: 217
Karma: 42
integer and string input
«
on:
May 12, 2013, 08:06:29 AM »
is it possible to have a user be able to input an integer only when a certain string is selected? so say the string is slay is it possible to have a integer input feild enabled for the user to add a value but when any other string is selected the input field is disabled?
Logged
Made community pool and community bowling and for the life of me couldn't tell you why they are popular.
Also made the ttt ulx commands.
JamminR
Ulysses Team Member
Hero Member
Posts: 8096
Karma: 390
Sertafide Ulysses Jenius
Re: integer and string input
«
Reply #1 on:
May 12, 2013, 08:27:10 AM »
In ULX?
http://ulyssesmod.net/docs/files/lua/ulib/shared/commands-lua.html#cmds.NumArg
As for determining it's optionality based on the previous input string, well, uh, I don't think so.
Megiddo and perhaps MrP/Stickly can weigh in on that.
Logged
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming
Megiddo
Ulysses Team Member
Hero Member
Posts: 6214
Karma: 394
Project Lead
Re: integer and string input
«
Reply #2 on:
May 13, 2013, 11:47:34 AM »
Yes, command arguments are static. Creating an API for dynamic arguments as you're suggesting would be a nightmare... *shudder*
You can enforce the dynamic aspect yourself by always taking it as a string argument.
Logged
Experiencing God's grace one day at a time.
Print
Pages: [
1
]
Go Up
« previous
next »
Ulysses
»
General
»
Developers Corner
»
integer and string input