 |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Fri Feb 20, 2009 5:29 pm
A small suggestion for the tree control in the Editor |
I suggest to add to the pop-up menu for the tree control in the Editor the "Copy full name" command. This command would place in clipboard full setting name, including module and class name(s).
|
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Feb 26, 2009 5:27 pm |
Actually, I do not plan to implement this. Using the full @//Module/Class/var syntax should only be used as a last resort. I do not want to encourage this usage because it violates the idea of keeping your modules and packages independent. Your packages should be like "black boxes" that perform some functionality. The current scoping system is designed to handle access to variables without the full syntax.
Now, I understand that in the current Beta version there is a problem with the mapper that prevents session variables from being access properly. But this is a bug that is fixed for the next version and isn't a reason to encourage full path names. |
|
|
 |
Arde Enchanter
Joined: 09 Sep 2007 Posts: 605
|
Posted: Thu Feb 26, 2009 8:38 pm |
Modules? Packages? I had Lua zs.var["varname"] syntax in mind when suggested this. And after all you can't force people to not use such syntax for their other purposes if they decided to do that.
|
|
_________________ My personal bug|wish list:
-Wrong Priority when copy-paste setting
-1 prompt trigger for Mapper, Session and General Options, not 3 different!
-#SECTION can terminate threads
-Buttons can't start threads |
|
|
 |
Zugg MASTER

Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Thu Feb 26, 2009 9:14 pm |
Of course I can't "force" people to not use such syntax. But I don't need to add any features that will make it any easier. Honestly, I've got enough to do right now without adding extra features that 99.99% of CMUD users are never going to use.
When using Lua you don't need to specify the full //module/class/name. Just specify the variable name just like you would in a normal CMUD script. That will look for the variable within the current scope of the script, which is what you are supposed to be doing.
As I said, in the vast majority of cases, if you are using the full //module/class/varname syntax, you are probably doing something wrong. This syntax is for advanced scripters who really understand exactly what they are doing and understand the issues involved in storing the full path in their scripts. And those advanced scripters don't need any right-click menu. And for novice users, this just clutters the right-click menu with an option that they rarely would use.
It's list hard-coding a full file path into an application. You don't write programs that hard-code something like "C:\MyDirectory\MyFile" into it, because the end user might not have the same disk or folder name as you might be expecting. Hard-coded paths are almost always a really bad idea. |
|
|
 |
|
|