Hey,

hoz wrote:
> Hey Shaun,
> 
> Thanks for the reply, and YES, it finally worked. It's always those little
> typos that gotcha's!! The $'s were just taken from code relating to PHP
> format; obviously, not needed.
> 

Right, i see.  :)

> I did find it interesting that I could also do this and skip the metadata
> tag in the popup:

Yep. You use that metadata tag when you want to expose the event to a 
container component via mxml
(Eg.)
<mx:Button click="handleClick(event)" />
If you look at the source of mx:Button you'll see the metadata for the 
click event.

I wasn't sure if you knew that so i didn't comment on it.

So you would use the metadata tag if you wanted to do the following.

<Canvas>

<script>
  private function handleFormSubmitted(e:CustomEvent):void {...}
</script>

<MyComponent
   id="mc"
   formSubmitted="handleFormSubmitted(event)"
/>

</Canvas>

MyComponent would have the metadata tag declaring the name and the type 
of the event it dispatches and then it appears in FlexBuilder as a hint.

This is pretty much the same as writing the following:
mc.addEventListener("formSubmitted", handleForSubmitted);

HTH.

cheers,
  - shaun

Reply via email to