Suggestion:View names - non alphanumeric? (IMPLEMENTED)

Started by Janik, Fri 16/09/2005 06:18:49

Previous topic - Next topic

Janik

This is a pretty minor point, but ...

Is there any particular reason that view names can't have any characters other than capital letters and numbers? I would like to name a view "Davy_Walk" for instance, because "DAVYWALK" is harder to read.

Like I said, this is really minor, but if it's easy to change then it would be great.

Thanks!

Edit by strazer:

AGS v2.71 RC1:
* Underscores can now be used in GUI and view names, and invalid names pasted into the box are now rejected.
Play pen and paper D&D? Then try DM Genie - software for Dungeons and Dragons!

scotch

The usual way of making the start and end of words in a variable name clear is to capitalise the first letter of each new word, like "DavyWalk" or "MoveCharacterBlocking", if you use a capital letter to start depends on taste really, I use lower case for the start of variable names and upper case for functions, I personally prefer this way, and it is what AGS uses for most in built things, but some people use underscores and there's no harm in supporting them I guess.

SSH

And of course, view names are all uppercase anyway  :P
12

Pumaman

Because view names are implemented as #defines, for consistency they are upper case to show that they are not objects that you can call methods on.

As for supporting an underscore in the names, I guess it would be possible if people would find it useful.

Scorpiorus

I would find this really useful, especially if it would be possible to have underscore in GUI names (and hence in their script O-names) too.

Janik

I just found an interesting work-around: if I type the view name I want elsewhere (notepad), and then copy/paste into the text box, it works. So I tried doing that and making a view "DAVY_WALK", and it works fine when I refer to that in a script.

Note that it's possible to create invalid view names that way (putting punctuation or spaces in there) and those may or may not cause problems with other stuff. Certainly the underscore worked fine.

It looks like it works with GUI names too. The same warning applies there.
Play pen and paper D&D? Then try DM Genie - software for Dungeons and Dragons!

Scorpiorus

Hehe, nice hack! I guess it will also be fixed along with the possibility to use underscore I hope. :)

Pumaman

Hehe well spotted, I'll take a look at that ;)

SMF spam blocked by CleanTalk