function foo() : void
{
var bar : XML = <mytag attr1="1"/>;
}
function bar() : void
{
}
However, the fact that your XML variable has an implicit closing tag instead of an explicit one will confuse poor FlexBuilder's brain, so that it doesn't detect bar (or, in fact, anything after foo) as a function. Symptoms include:
- Functions after foo won't show up in the Outline View
- FlexBuilder won't let you use F3 ("Goto Definition") to go to anything in that class
The solution is to put in a closing tag:
function foo() : void
{
var bar : XML = <mytag attr1="1"></mytag>;
}
function bar() : void
{
}