"Richard A. DeVenezia" <radevenz@ix.netcom.com> writes:
[color=blue]
> functions are objects / objects are functions[/color]
No. Functions are objects. Not all objects are functions.
[color=blue]
> Does NS permitting foo.bar imply it implictly thisifies a function in a
> function and implicity (anonymously?) instantiates the function when
> invoked?[/color]
I am not sure what you mean by "thisify"
[color=blue]
> Does ECMA script spec indicate foo.bar should work as in NS ?[/color]
No.
[color=blue]
> This is a way that 'works' in IE (and I presume NS), however to use the
> funtion _I_ would have to instantiate it first, and use news to get at inner
> function declarations, which is annoying. Does NS handle nesting > 1
> (outer.inner1.inner2) ?[/color]
Yes (just tested).
[color=blue]
> alert (outer) // IE source
> alert ((new outer).innerOne) // IE source
> alert ((new (new outer).innerOne).innerTwo) // IE source[/color]
Normal constructor behavior.
[color=blue]
> alert (outer.innerOne) // IE undefined
> alert (outer.innerOne.innerTwo) // IE error[/color]
IE doesn't allow you to access "local" functions that way. It is
Netscape/Mozilla only.
/L
--
Lasse Reichstein Nielsen -
lrn@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit.html>
'Faith without judgement merely degrades the spirit divine.'