console.getstr([string] [,maxlen=128] [,mode=K_NONE])
What is the [string] for?
I was thinking it was a default value for the input but I cannot get that to work.
console.print("Input Here: ");
console.getstr("value", 25, K_NOSPIN);
would display:
Input Here: value
and the "value" would be highlighted and changed on first keystroke.
Am I missing something or am I mis-interpreting what [string] is for?
console.getstr("value", 25, K_EDIT|K_AUTODEL);
You might want to throw K_LINE onto the mode argument as well.
Working on something and can't seem to figure it out. Looking at the JavaScript Objet Model Reference for the getstr command, I see the usage:
console.getstr([string] [,maxlen=128] [,mode=K_NONE])
What is the [string] for?
I was thinking it was a default value for the input but I cannot get that to work.
eg:
console.print("Input Here: ");
console.getstr("value", 25, K_NOSPIN);
would display:
Input Here: value
and the "value" would be highlighted and changed on first keystroke.
Am I missing something or am I mis-interpreting what [string] is for?
It's the default value for the string for K_EDIT mode.
Add the K_EDIT mode flag. (e.g. "K_NOSPIN|K_EDIT").
Sysop: | fluid |
---|---|
Location: | wickliffe, ohio |
Users: | 5 |
Nodes: | 10 (0 / 10) |
Uptime: | 202:51:18 |
Calls: | 50 |
Files: | 15,838 |
Messages: | 50,758 |