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,042 |
Nodes: | 16 (1 / 15) |
Uptime: | 10:23:57 |
Calls: | 500,918 |
Calls today: | 5 |
Files: | 109,372 |
D/L today: |
13,317 files (2,182M bytes) |
Messages: | 305,038 |
Posted today: | 6 |