benbjohnson / melomel

External ActionScript Interface.
https://github.com/benbjohnson/melomel/wiki
Other
42 stars 8 forks source link

Add support for LinkButtons in get_component_classes #38

Closed laran closed 13 years ago

benbjohnson commented 13 years ago

LinkButton is a subclass of Button. The thinking behind excluding LinkButton was that when you're specify a feature the end user would specify something as simply a "button" and not necessarily know that it should be called a "link button".

Do you need to specifically retrieve a "link button"?

laran commented 13 years ago

If I say "button", will it find all components which are of a type that subclasses Button as well? I'm curious because I have a number of custom control classes. I've been looking them up by their explicit classname because I didn't think Melomel would find them otherwise.

benbjohnson commented 13 years ago

Yes, Melomel will pick up any subclasses of the Halo or Spark Button when you specify "button". The comparison inside Melomel just does this:

if(displayObject is classRef) {
  return true;
}

There's actually no way (right now) to specify Melomel to find a Button but not a subclass of Button.

laran commented 13 years ago

Awesome!