It's te components namespace you set in the component.
The compiler doesn't like xmlns:components="apps.common.components.*"
not sure why, perhaps components is a reserved word?!?

Using getters and setters is good practice for use within components.

Overall the code is fine.

--- In [email protected], "Tom Ortega" <[EMAIL PROTECTED]> wrote:
>
> I have this class:
> package apps.common.asFiles
> {
>     public class ScreenLabelConstants
>     {
>         public static const NAMEINFO_LABEL:String = "Name";
>     }
> }
> 
> I have this code in my app:
> <mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml"; width="100%"
> height="100%" label="Name" xmlns:components="apps.common.components.*">
>     <mx:Script>
>         <![CDATA[
>             import apps.common.asFiles.ScreenLabelConstants;
>         ]]>
>     </mx:Script>
>     <mx:Spacer height="30"/>
>         <components:FreedTextLabel id="nameTextLabel" ls="{
> ScreenLabelConstants.NAMEINFO_LABEL}" />
> </mx:VBox>
> 
> The FreedTextLabel has this:
> <?xml version="1.0" encoding="utf-8"?>
> <mx:Panel xmlns:mx="http://www.adobe.com/2006/mxml";
> creationComplete="initFunc()" borderThickness="1" cornerRadius="0"
> shadowDistance="0" width="80%">
> <mx:Script>
>     <![CDATA[
>         import apps.common.asFiles.ScreenLabelConstants;
>         [Bindable] private var _ls:String;
>         [Bindable] public var mainLabelText:String;
> 
>         public function get ls():String
>         {
>             return _ls;
>         }
> 
>         public function set ls(newValue:String):void
>         {
>             _ls = newValue;
>             mainLabelText = _ls + ":";
>         }
> 
>         public function initFunc():void
>         {
>             mainLabelText = ls + ":";
>         }
> 
>     ]]>
> </mx:Script>
>     <mx:Label id="mainLabel" text="{mainLabelText}"/>
> </mx:Panel>
> 
> 
> The problem is that it won't work.  No data gets passed to my custom
> component.  Why is that?  Is it because my app is binding the var to
> constant value?  Or because I'm using a setter/getter on the var
receiving
> the reference?
> 
> Thanks,
> Tom2
>






--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 


Reply via email to