jilouc / jplex

Automatically exported from code.google.com/p/jplex
0 stars 0 forks source link

Protected variable name on jplex.include: Window #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When calling jplex.include('....') the class name is used to define a new
variable. For example: jPlex.include('jplex.components.Tabs') => we can do
new Tabs(...).

*Problem*: There is no possible direct work-around for protected names.
Window for example is a native javascript type of the object window. A
warrior solution is: var Window = null in any js file of jplex but it may
unavoidly induce weird bug (I think). 

Another solution is avoiding protected class names... but a Window is a
Window (btw Frame is free but it's less focused)!

Either way I don't want to see in an include list:
{{{
var W = jplex.include(...)
}}}

Original issue reported on code.google.com by loic.petit@gmail.com on 25 Feb 2009 at 12:51

GoogleCodeExporter commented 9 years ago
The best solution would be to rename the component, as we chose not to use 
namespaced
variables to avoid verbose code (for instance, with YUI you have to write
YAHOO.<path>.<to>.<what>.<you>.<want> (yet it is possible to access jPlex 
components
via jplex.components.<the component> too)).
We've to find an accurate name. 'Frame' is not that bad.

Original comment by neming...@gmail.com on 25 Feb 2009 at 1:28

GoogleCodeExporter commented 9 years ago
I'll refactor tonight then if you find another name let me know

Original comment by loic.petit@gmail.com on 25 Feb 2009 at 1:36

GoogleCodeExporter commented 9 years ago
Refactor done in r15, closing issue

Original comment by loic.petit@gmail.com on 26 Feb 2009 at 10:00