flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Neverbirth <neverbi...@gmail.com>
Subject Determining which MXML elements are containers
Date Tue, 14 Oct 2014 19:34:39 GMT
Hello everyone, 

  Tried to contact Alex with no luck, so will try posting here. As you may
know I'm working on bringing first class Flex support in FlashDevelop, and
I've recently found a case where I'm a bit puzzled on how it should be
properly implemented.

   In particular, I want to know when a class can have another class as a
children. For example <s:Application> may have a <s:Button> as a child.

   Right now this check is made:

                         (tmpClass.Implements.Contains("IContainer") // Flex
                         || tmpClass.Implements.Contains("IPopUpHost") //
                         || tmpClass.Implements.Contains("IParent"))

   But I find it a bit hacky, and I already found a case where it's failing.
I've thought of adding a check for [DefaultProperty], which will also
improve which classes are shown, but unless I have missed something it seems
not all container classes have a default property defined.

   Do you happen to know which is the proper way of doing this? I'd like to
have proper support for Flex 4, FlexJS and Flex 3. I was thinking that maybe
it should check for both all those interfaces and a DefaultProperty
implementation, but I'm not too fond of that solution (unless there is no
other way, of course).

  Thanks for your help.

View this message in context: http://apache-flex-development.2333347.n4.nabble.com/Determining-which-MXML-elements-are-containers-tp41370.html
Sent from the Apache Flex Development mailing list archive at Nabble.com.

View raw message