Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dash-dev] Naming convention for core DOMs?

Shouldn't the wrapper override the core DOM object?  I mean the language specific DOM extension should be a 'wrapper' for the core DOM object right?  In fact, it could be something to enforce...  In Beanshell, Groovy, Ruby, etc.. the resources binding should directly connect to the Java object and in _javascript_ the resources var should bind to the wrapper that intercedes between it and the core DOM object. 

As an aside, in Groovy Monkey I experimented with allowing a script writer to change the name of the binding variable to help avoid naming conflicts and to allow for more (hopefully) readable and usable scripts.  I added a groovy like mapping operator to the end of the URL identifying the DOM plugin.  For example my org.eclipse.eclipsemonkey.dom Console DOM allows you to print strings to a console in Eclipse, much like if you had access to the console with System.out.  By default I have the binding mapped to out so that out.println and etc work, you could choose to add [ console:out ] ( or was it [ out:console ] ? I am not at a machine with Eclipse loaded ) and you could use console.println instead... 

example:
* DOM: http://groovy-monkey.sourceforge.net/update/plugins/org.eclipse.eclipsemonkey.dom [ console: out ]

In fact I have always meant to put in some more support in the editor/outline view to aid the writer with remapping vars and to highlight potential naming conflicts.  So much that could be done, so little time...

Being able to remap DOM bindings could be a nice way to allow script writers to handle their own naming conflicts.  This could be important because as Eclipse Monkey goes more mainstream and public, there should be more and more 3rd party DOM plugins, which will increase the chance of having naming conflicts.

James E. Ervin, IV

A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyze a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.

-Robert A. Heinlein

Back to the top