|
OK, I'll deal with this.
(By the way, the blog post you link to is just about what is technically possible, not what is recommended. Indeed, another post from the same blog: http://www.zachleat.com/web/2007/08/28/namespacing-outside-of-the-yahoo-namespace/ Alright then. Thanks.
Though I do wonder about the following quote on the page you referred to, and about why didn't the yahoo folks then think of that, and where is the official documentation for YAHOO.namespace() (and frankly I also wonder why the snow that fell here yesterday had to melt last night), even though I don't see how two namespaces could coexist with the same name: "I'm glad you're enjoying using YUITest. I think your point about namespacing is well-taken, but the YAHOO.namespace() function is non-destructive. If you were already using YAHOO.tool, then YAHOO.namespace() won't overwrite the existing one so all of your functionality will be safe." Well, to my mind, the whole point of namespaces is to completely avoid naming conflicts. If we keep stuff starting with YAHOO == Yahoo's code, and put Moodle code in other namespaces, then we can be sure that there will never be a name collisions caused by anything YAHOO does. Anyway, should be easy to finish fixing when I get a moment.
The two dialogs seem to work OK. Thank you.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
http://www.zachleat.com/web/2007/08/09/yui-code-review-yahoonamespace/
From this I understand that the YAHOO namespace is indeed intended for other uses than just Yahoo!'s. However, I am not sure if that code applies otherwise to be used in a namespace.
So I am not sure what exactly to fix about the namespaces. If you still think it is necessary, please fix it? Thanks.