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,063 |
Nodes: | 17 (0 / 17) |
Uptime: | 34:31:15 |
Calls: | 501,357 |
Calls today: | 2 |
Files: | 109,427 |
D/L today: |
1,143 files (176M bytes) |
Messages: | 302,459 |