The docs say that this is an associative array of all directories. This is the only time it is mentioned in the docs. It has no properties.
The docs say that this is an associative array of all directories. This
is the only time it is mentioned in the docs. It has no properties.
So what use is it?
This brings up my remaining little question. I would like my .js to recognize whether the change of directory is successful by comparing newcode to bbs.curdir_code after an attempt to change it. However,
if the cases of the two strings don't match, the comparison returns false How do I change the case of a string to upper or lower? The guide mentio toLowerCase and toUpperCase as methods of strings, but I can't make them work. Are they obsolete? Could someone give an example of the syntax?
Re: file_area.dir object
By: Digital Man to Tegularius on Sat Jul 11 2009 00:09:49
The little job is almost done. I've discovered that it is just a matter
of assigning the desired internal code to bbs.curdir_code, i.e.:
bbs.curdir_code=newcode
If newcode is valid, then the change is made; if not, it isn't. The case (upper or lower) of newcode doesn't matter. However, the value
of bbs.curdir_code is reported all in lower-case.
This brings up my remaining little question. I would like my .js to recognize whether the change of directory is successful by comparing
newcode to bbs.curdir_code after an attempt to change it. However,
if the cases of the two strings don't match, the comparison returns false. How do I change the case of a string to upper or lower? The guide mentions toLowerCase and toUpperCase as methods of strings, but I can't make them work. Are they obsolete? Could someone give an example of the syntax?
Oh yes, one more question, about console.getstr. This takes a string
as an optional argument. What is the purpose of this argument?
It
doesn't appear to be either the string variable to be assigned (which
is done via the returned value) or a prompt. Something needs to be
there if one wants to use the other arguments, but I can't determine
what it does.
No, they're not obsolete. What did you try?
There's an example here: https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Strin oLowerCase
Oh yes, one more question, about console.getstr. This takes a string
as an optional argument. What is the purpose of this argument?
It's the default value of the string (e.g. when used with the K_EDIT mode flag).
Web and FTP are basically working now. This is starting to be fun...
Sysop: | digital man |
---|---|
Location: | Riverside County, California |
Users: | 1,043 |
Nodes: | 15 (0 / 15) |
Uptime: | 42:08:35 |
Calls: | 500,900 |
Calls today: | 3 |
Files: | 109,370 |
D/L today: |
4,752 files (492M bytes) |
Messages: | 304,224 |