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: | Eric Oulashin |
|---|---|
| Location: | Beaverton, Oregon, USA |
| Users: | 104 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 20:00:15 |
| Calls: | 7,088 |
| Calls today: | 7 |
| Files: | 9,223 |
| D/L today: |
182 files (25,958K bytes) |
| Messages: | 374,157 |