On Tue, Jan 13, 2009 at 9:02 PM, stldvd <[email protected]> wrote:

> I don't think there's an <mx:string tag. But even if I do this:


There is but it should be Capitaliased. I found this via playing arround
basically type <mx:[any mx data type] id="variableName" /> creates a
variable with that name in scope.  Try it if you don't believe me.

>
>                        <mx:Text id="summary" text="Start Time:
>  {model.start}\nRepeat:
> {model.repeat}"  /> etc. I don't think it will work. If  there is no value
> for model.repeat then
> I want to leave it out of the summary description. This means I need a
> function which
> says, if (model.repeat) !=''
>     {
>      summary += "Repeat: " + model.repeat;
>     }
>
> If I create such a function, how would it automatically update? Even if the
> bindings work,
> such that the values in the function are automatically updating
> (model.whatever), how
> would I assure that the function itself is called each time there's a
> change, so that the
> correct summary is returned to the Text control?
>

you can create the function as bindable. If the functions values are bound
then there shouldn't be a problem. I don't think unsure I would have to
test.

very nasty you could do.

<mx:Text id="summary" text="Start Time:  {model.start +
model.repeat?'\nRepeat: '+model.repeat:new String()}"  />

Well I wouldn't actually use new String() I would rather use two single
quotes '' but that looks like a double quote on this monitor so I deemed it
confusing.

but if you have a model object. Why not add summary as a field to that
object?

Regards,

Wesley Acheson

--- In [email protected], "Wesley Acheson" <wesley.ache...@...>
> wrote:
> >
> > I think you can add something like.
> >
> > <mx:string id="summary">{model.duration + model.start}</mx:string>
> >
> > Regards,
> >
> > Wesley
> >
> > On Tue, Jan 13, 2009 at 8:37 PM, stldvd <stl...@...> wrote:
> >
> > > Hi guys,
> > >
> > > I'm trying to concatenate a series of string literals and bound
> variables
> > > into a model
> > > variable called 'summary', which will be displayed in a 'summary'
> textarea
> > > or text control.
> > >
> > > The variables come from various control settings -- numeric steppers
> etc.
> > > I can bind the variables to UI controls, for example
> > > <mx:NumericStepper id="durStep"  value="{model.duration}"
> > > change="model.duration =
> > > durStep.value"/>
> > > <mx:NumericStepper id="startStep"  value="{model.start}"
> > > change="model.start = startStep.value"/>
> > >
> > > But I'm not sure how or where to create this concatenated summary
> variable.
> > > I declare it in
> > > the model, but then where do I do the concatenating such that binding
> will
> > > actually work?
> > > Each time the steppers and combo boxes values change, I need to have
> the
> > > entire
> > > summary update.
> > >
> > > Ideally I just have a bindable variable in the model and then my
> textarea
> > > looks like this: <mx:Text id="ruleSummary" text=" {model.summary}"  />
> > >
> > > Can someone help?
> > >
> > > Thanks,
> > >
> > > David
> > >
> > >
> > >
> > >
> > > ------------------------------------
> > >
> > > --
> > > Flexcoders Mailing List
> > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > > Alternative FAQ location:
> > >
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-
> 1e62079f6847<https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847>
> > > Search Archives:
> > > http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> > > Links
> > >
> > >
> > >
> > >
> >
>
>
>
>
> ------------------------------------
>
> --
> Flexcoders Mailing List
> FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> Alternative FAQ location:
> https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
> Search Archives:
> http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups
> Links
>
>
>
>

Reply via email to