Ah, I see. Thanks for the clarification.
----- Original Message ---- From: Josh McDonald <[EMAIL PROTECTED]> To: flexcoders@yahoogroups.com Sent: Wednesday, July 23, 2008 6:23:19 PM Subject: Re: [flexcoders] Re: Encapsulating a custom flex component? You're almost right. [Exclude] doesn't affect the compiled code at all - it only affects the introspector built into Builder, and ASDoc generation. It's different from "private". -Josh On Thu, Jul 24, 2008 at 11:17 AM, Sid Maskit <[EMAIL PROTECTED] com> wrote: Well, unfortunately, I did some further testing, and it turns out not to be as complete a solution as it initially appears to be. Here's a comment that I just posted on that blog entry: It is sort of true that "btn" won't be accessible outside that component, but there are limits on this. Let's say that your custom component is in the file MyComponent. mxml, and that we would therefore instantiate it within another file as follows: <myNamespace: MyComponent id="myComponent" /> If we try to use the btn attribute within that tag, it will not be available to us. However, we can still access the button subcomponent for things such as binding. Thus we can add another tag which would bind to the button subcomponent, like this: <mx:Text text="{myComponent. btn.label}" /> Not only would this not cause a compiler error, but it would work correctly. Further, we can access the subcomponent button using ActionScript, such as this: this.myComponent. btn.label = "modified"; And that will also work. Thus it turns out that [Exclude] is limited to altering what attributes are available within the tag that declares a component. ----- Original Message ---- From: Josh McDonald <[EMAIL PROTECTED] com> To: [EMAIL PROTECTED] ups.com Sent: Wednesday, July 23, 2008 4:52:15 PM Subject: Re: [flexcoders] Re: Encapsulating a custom flex component? Damn, why didn't I think of that? I'd been trying to think of ways to do that for ages a few months ago, trying to clean up the ctrl-space on some APIs :) -Josh On Thu, Jul 24, 2008 at 8:40 AM, Sid Maskit <[EMAIL PROTECTED] com> wrote: I just found this blog post which seems to provide a way of doing this that is very straightforward: http://blog. ashier.com/ 2008/03/25/ hiding-propertie s-in-flex- components/ ----- Original Message ---- From: Nate Beck <[EMAIL PROTECTED] com> To: [EMAIL PROTECTED] ups.com Sent: Wednesday, July 23, 2008 9:27:13 AM Subject: [flexcoders] Re: Encapsulating a custom flex component? A feature request has been opened for adding accessors to MXML. Please vote on this if you see fitting. It also better explains the issue that I am running into. http://bugs. adobe.com/ jira/browse/ SDK-16181 There is also discussion going on about this issue at Jeff's blog: http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- 65B3-D59C- 464EC981E0A2EA8F Thanks, Nate --- In [EMAIL PROTECTED] ups.com, Jeffry Houser <[EMAIL PROTECTED]> wrote: > > > In an ActionScript component, you can make the component internal to > the package. You might also combine it with the "ExcludeClass" metadata > tag to 'hide' the class name from people using your SWC. > > I'm not sure if I'd equate either of these approach to private, though. > > I blogged about this in a bit more detail: > > http://www.jeffryho user.com/ index.cfm? mode=entry& entry=4DC9B79C- > 65B3-D59C- 464EC981E0A2EA8F > > Josh McDonald wrote: > > Not in MXML components. > > > > -Josh > > > > On Wed, Jul 23, 2008 at 9:53 AM, Nate Beck <[EMAIL PROTECTED] > > <mailto:nate@ ...>> wrote: > > > > Newbish question... but after searching on google, I can't get a > > concise answer. > > > > Is it possible to encapsulate (mark private) components within a > > Flex component? > > > > So I have custom MXML component (ResourcesTree) that has a Tree > > inside of it. I don't want > > the Tree to directly be available outside the ResourcesTree Component. > > > > Any input? > > > > > > ------------ --------- --------- ------ > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder > > sFAQ.txt > > Search Archives: > > http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! > > Groups Links > > > > > > mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com > > <mailto:flexcoders-fullfeat [EMAIL PROTECTED] .com> > > > > > > > > > > > > -- > > "Therefore, send not to know For whom the bell tolls. It tolls for thee." > > > > :: Josh 'G-Funk' McDonald > > :: 0437 221 380 :: [EMAIL PROTECTED] <mailto:josh@ ...> > > > > -- > Jeffry Houser > Flex, ColdFusion, AIR > AIM: Reboog711 | Phone: 1-203-379-0773 > -- > Adobe Community Expert <http://www.adobe. com/communities/ experts/members/ JeffryHouser. html> > My Company: <http://www.dot- com-it.com> > My Podcast: <http://www.theflexs how.com> > My Blog: <http://www.jeffryho user.com> > -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] com -- "Therefore, send not to know For whom the bell tolls. It tolls for thee." :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] com