SUGGESTION: Case sensitivity hints for dummies

Started by SSH, Wed 05/04/2006 14:47:04

Previous topic - Next topic

SSH

When a struct member is referenced in AGS that doesn't exist, could AGS put in something in the error message that does a caseless search on struct members and says something like "value is not a public member of listbox. Did you mean listbox.Value?" as I've seen quite a few people get this wrong...?
12

Radiant

Good point. Also, some structs have a lowercase and an uppercase variant (for instance, character.Loop and character.loop) and it's not necessarily clear what the difference is.

m0ds

Could AGS not capitalise some of these things in some instances? That'd be so helpful.

monkey0506

#3
well For One Thing, character[ x ].loop Is A Deprecated Integer (int) To Hold The Integral Value Of The Character's (Character Determined By The Index 'x') Loop.  Character.Loop Is Exactly The Same Thing.  only The 'l' Is Catipillarized.  and Can Be Accessed Using A Character* (Pointer-To-Character).  :P

the Capitarlization Is Used By All Data Members Of Built-In Types Of wMGS (Except For Those Previously Implemented Members Such As character.x/y and mouse.x/y (And Possibly Some Others) Which Are Not UpperCasded.

Pumaman

Although something like this would be possible, autocomplete should mean that you don't really make the mistake. Perhaps some generic text like "are you sure you capitalized the text correctly?" would be useful.

SSH

Well, the threads in Beginners Tech would suggest that autocomplete doesn't stop n00bs like.... m0ds.... getting it wrong ;)
12

Radiant

How about, just like the option that forces you to use new-style strings, creating an option that forces you not to use the lower case versions? IIRC char[].view == (char[].View - 1) which at any rate is confusing.

Pumaman

"Enforce object-based scripting" already does this.

SMF spam blocked by CleanTalk