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: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,039 |
Nodes: | 17 (0 / 17) |
Uptime: | 34:40:26 |
Calls: | 501,749 |
Calls today: | 4 |
Files: | 104,423 |
D/L today: |
986 files (194M bytes) |
Messages: | 298,778 |
Posted today: | 1 |