id's are set in global by $lzc$set_id. We could put them someplace
else if that would work better. I don't understand how we have things
set up in swf9. Is there some reason things are not in the global
scope? Should we be inserting id's in some other scope? Also, if you
change $lzc$set_id, you need to also change $lzc$set_name for the top-
level case, since a top-level name is supposed to be equivalent to an
id.
Er, that's the other choice, is that id's all get set in the canvas
object and looked up in the canvas object, perhaps by `with(canvas)`.
On 2008-03-28, at 23:30 EDT, Henry Minsky wrote:
Hmm, I need to investigate a little; when you declare an 'id="foo" '
on a
view, what happens to that? Something is binding
global.foo to the view object. Maybe we need to have the compiler
declare a
top level var in the LzApplication class also,
and declare script block bodies as methods? How else can you refer
to "foo"
in your script block and have it see the
view who's id is foo?
On Fri, Mar 28, 2008 at 5:56 PM, P T Withington <[EMAIL PROTECTED]> wrote:
I don't quite understand. Maybe we need to do something to make
id's be
in the application class scope? There's no particular reason to
use global,
in fact, not using global is probably better.
On 2008-03-28, at 17:15 EDT, Henry Minsky wrote:
I was writing a test case like this
<view id="foo" ..>
<script>
foo.setAttribute('x', ...);
</script>
And it doesn't compile in swf9 because foo is not in scope of the
application class.
Should we be wrapping the body of the script in a 'with (global)
{ ...}'
so
it has access to global id's like that?
Or should be be discouraging using global id's in that fashion? We
need
them
for applications certainly..
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]
--
Henry Minsky
Software Architect
[EMAIL PROTECTED]