But when?  Why?  In every case?  If that was a generic, universal rule and
you're supposed to cast everything as it's original object type then a
little further in the line we should see:

' at ' + Date(model.loginDate) }" />

I'm just curious why the LoginVO is cast here.  Is there some rule like "you
don't have to cast an object when simply accessing an attribute of that
object, but you do have to cast an object if it contains other objects with
an attributes you need to access."  That sounds kinda silly to me, that's
why I'm asking :-)

Thanks!
Darren



>From: Suresh Akula <[EMAIL PROTECTED]>
>Reply-To: flexcoders@yahoogroups.com
>To: flexcoders@yahoogroups.com
>Subject: Re: [flexcoders] Flex 2 B 2 + Cairngorm 2 - Simple Question
>Date: Tue, 25 Apr 2006 12:59:59 -0700 (PDT)
>
>Hello Darren,
>
>    its good partice to typecast with orginal object
>and invoke the object members.
>
>--Suresh Akula.
>
>
>--- Darren Houle <[EMAIL PROTECTED]> wrote:
>
> > I'm fairly new to Flex and really new to Cairngorm
> > and am trying to break
> > Cg2 down and understand it (I'm not trying to
> > understand Cg.99 and then
> > learn Cg2, I'm just jumping into 2.)  I have a quick
> > question:
> >
> > In the Cg2 sample CairngormLogin.mxml theres a Label
> > in the "loggedIn"
> > VBox...
> >
> > <mx:Label text="{ 'Logged in as ' + LoginVO(
> > model.loginVO ).username + ' at
> > ' + model.loginDate }" />
> >
> > This seems to still work fine when changed to...
> >
> > <mx:Label text="{ 'Logged in as ' +
> > model.loginVO.username + ' at ' +
> > model.loginDate }" />
> >
> > Is there some reason why the first form must be used
> > over of the second
> > form?  If I were writing this code myself from
> > scratch it would seem more
> > intuitive to bind directly to the
> > model.loginVO.username.  Am I missing
> > something?
> >
> > Thanks,
> > Darren
> >
> >
> >
>
>
>__________________________________________________
>Do You Yahoo!?
>Tired of spam?  Yahoo! Mail has the best spam protection around
>http://mail.yahoo.com
>
>
>--
>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
>
>
>
>
>
>




--
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




Reply via email to