Glad you got it.

 

One more piece of advice, avoid using lastResult in AS code.  It is intended
for use in binding expressions only.  Normally, it is not a problem, but in
more complex architectures, lastResult can be null or can contain what you
do not expect.

 

Tracy Spratt,

Lariat Services, development services available

  _____  

From: [email protected] [mailto:[email protected]] On
Behalf Of Jason B
Sent: Saturday, May 09, 2009 10:14 AM
To: [email protected]
Subject: [flexcoders] Re: dynamic labels with public variable

 






nevermind i had another try statement i forgot with the old code, thanks
again Tracy your the best !

--- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Jason B" <nos...@...> wrote:
>
> Thanks Tracy 
> I put that into a try catch statement and still get the 
> ReferenceError: Error #1069
> but it's working now? Should i be concerned with the error
> 
> I tried only one line to less complicate things
> 
> try{
> 
> this["public_" + whichmeal + "_image1"] = urlpath +
createmeal_http.lastResult.breakfast.itemdata[id].imgsource;
> 
> }catch(err:Error){
> Alert.show(err.toString());
> }
> 
> 
> 
> 
> --- In flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com,
"Tracy Spratt" <tracy@> wrote:
> >
> > {Braces} are not legal in Actionscript except to create a new Object, or
in
> > literal XML.
> > 
> > 
> > 
> > You probably want something like:
> > 
> > this["public_" + whichmeal + "_item1_label"]
> > 
> > 
> > 
> > Tracy Spratt,
> > 
> > Lariat Services, development services available
> > 
> > _____ 
> > 
> > From: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com
[mailto:flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com]
On
> > Behalf Of Jason B
> > Sent: Friday, May 08, 2009 9:37 PM
> > To: flexcod...@yahoogro <mailto:flexcoders%40yahoogroups.com> ups.com
> > Subject: [flexcoders] dynamic labels with public variable
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > I'm trying to set a set of labels but its based on public variable
> > whichmeal.
> > 
> > Is there a special way to use these labels dynamically?
> > 
> > try{
> > this["public_{whichmeal}_item1_label"] = item1_label.text;
> > this["public_{whichmeal}_serving1_label"] = serving1_label.text;
> > }catch(err:Error){
> > Alert.show(err.toString());
> > }
> > 
> > Shows
> > Reference Error 1069
> > Reference Error 1056
> >
>



Reply via email to