[flexcoders] Re: this group isn't very good

2009-08-03 Thread Jason B
Yup that works perfect I love google search engine


--- In flexcoders@yahoogroups.com, Howard Fore  wrote:
>
> For heaven's sake don't fork the community, just use Google to search the
> group. Put use the following line in your search terms:
> 
> site:tech.groups.yahoo.com inurl:flexcoders
> 
> --
> Howard Fore, howard.f...@...
> "The worthwhile problems are the ones you can really solve or help solve,
> the ones you can really contribute something to. ... No problem is too small
> or too trivial if we can really do something about it." - Richard P. Feynman
> 
> 
> On Mon, Aug 3, 2009 at 8:14 AM, mitchgrrt  wrote:
> 
> > Sorry for the provocative message title.  The contents of the group, and
> > the people who are exchanging information, are fine.
> >
> > Yahoo Groups aren't very good.  Information is organized poorly, and Search
> > doesn't work.  I searched for a message I sent last week and it wasn't
> > found.  Searching for my name turns up some messages I sent several months
> > ago but no recent ones.
> >
> > Google Groups work much better than Yahoo Groups.  Information is easier to
> > find, and search works.  I wish this group were hosted on Google instead of
> > Yahoo.
> >
> >
> >
> > 
> >
> > --
> > 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
> >
> >
> >
> >
>




[flexcoders] Re: creation timing on panel component

2009-08-03 Thread Jason B
Found my issue was a higher Viewstack causing 1009 error
I've since now looked for creationpolicy to avoid this issue


--- In flexcoders@yahoogroups.com, claudiu ursica  wrote:
>
> Hi did not go throgh your code but the problem is that you get your data on 
> app creationComplete. By the time you have the data the poanel is not created 
> yet. That is why you get the error. I don't know what are you trying to 
> accomplish and why are you loading another swf in the main app. My suggestion 
> is to restructure you code a little bit MVC style. Get the data into a model, 
> put a variable currentPlanType and wit respect to that bind to you current 
> selected plan. It will work with binding as you already said, because the 
> bindings fire first when null and secionnd time after you get your data and 
> have the component created.
> You keep duplicated code in createBreakfast , Luynch and dinner which is not 
> OK. 
> 
> HTH,
> C
> 
> 
> 
> 
> 
> From: Jason B 
> To: flexcoders@yahoogroups.com
> Sent: Saturday, August 1, 2009 10:07:02 PM
> Subject: [flexcoders] Re: creation timing on panel component
> 
>   
> I didnt include all the code I'll zip it up and email it to you.
> 
> --- In flexcod...@yahoogro ups.com, claudiu ursica  wrote:
> >
> > From what I see here the button click does not make the call to the http 
> > service.
> > 
> > The general rule of the thumb is aftter the service call you push the data 
> > into a model which usually updates the view via binding. I always parse 
> > data into array collections or other strong typed objects. Having the items 
> > into an array collection enables you to bind to it if you're using List 
> > based components in the view. However in your case yuou could listed to the 
> > collection change event and do your thing manually. Send me the code via 
> > email and I'll try to debug it. I cannot figure it out from what I see. I 
> > guess you make the call for the data and the result gets back before the 
> > creation complete venet fopr the panel fires.
> > 
> > C
> > 
> > 
> > 
> > 
> >  _ _ __
> > From: Jason B 
> > To: flexcod...@yahoogro ups.com
> > Sent: Saturday, August 1, 2009 9:14:34 PM
> > Subject: [flexcoders] Re: creation timing on panel component
> > 
> > 
> > 
> >  
> > is in the main.mxml
> > 
> > --- In flexcod...@yahoogro ups.com, claudiu ursica  wrote:
> > >
> > > when are you calling the service?
> > > 
> > > C
> > > 
> > > 
> > > 
> > > 
> > > ________ _ _ __
> > > From: Jason B 
> > > To: flexcod...@yahoogro ups.com
> > > Sent: Saturday, August 1, 2009 5:51:26 PM
> > > Subject: [flexcoders] Re: creation timing on panel component
> > > 
> > > 
> > > Just so you know if I use this on the component it works fine
> > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > --- In flexcod...@yahoogro ups.com, "Jason B"  wrote:
> > > >
> > > > Main.mxml
> > > >  --
> > > > 
> > > > [Bindable]
> > > > private var nutritionData: XML;
> > > > 
> > > > 
> > > > //  create breakfast
> > > > private function createBreakfast( ):void
> > > > {
> > > > vsMain.selectedInde x = 1;
> > > > vsCreateMeals. selectedIndex = 0;
> > > > plantype = 'Breakfast';
> > > > 
> > > > #1009 ERROR HERE BELOW !
> > > > pnlCreateBreakfast. meal = 
> > > > nutritionData. breakfast;
> > > > 
> > > > }
> > > > 
> > > > 
> > > >  > > > result="nutritionRe sultHandler( event)"
> > > > fault="nutritionFau ltHandler( event)" resultFormat= 
> > > > "e4x"/>
> > > > 
> > > > 
> > > > 
> > > >  > > > borderStyle= "inset" borderThickness= "2" id="vsCreateMeals" >
> > > > 
> > > > 
> > > > 

[flexcoders] Re: Trying to build slideshow functionality with wipe effects.

2009-08-03 Thread Jason B
Have you seen this example slideshow by Adobe?

http://examples.adobe.com/flex2/inproduct/sdk/photoviewer/PhotoViewer.html



--- In flexcoders@yahoogroups.com, "Todd"  wrote:
>
> Hello All,
>   I've built a slideshow feature in our application.  One of the requirements 
> was that the images transition to the next with a nice wipe/slide effect.
> 
> I built up two solutions, both with drawbacks:
> 1) Used a view stack, added a repeater that added a VBox and Image for each 
> photo to display.  I was able to get the appropriate slide/scrolling effect 
> to work by attaching show and hide effects on a VBox that contained the 
> image.  This worked really well when there was 10 imgeas. However, when I 
> loaded 200 images...ouch memory management nightmare up to 1 gig of memory 
> being used before crashing.
> 
> Next solution, I tried something simpler:
> 2)  Used a HorizontalList component and built some code to scroll through all 
> the images.  This worked much better from a memory management perspective, 
> however, I've LOST the ability to have the transitions of sliding from one 
> image to the next.
> 
> My questions: 1) Has anyone seen any code that uses the List (HorizontalList) 
> components for sliding/moving images into the main view area?  How do you get 
> the effects to work with moving the itemRenderers around (this doesn't seem 
> possible?)
> 
> 2)  Anyone tried writing a component where there's a main view area, and an 
> area to the left and right where you buffer images off screen for the sake of 
> wiping/sliding them in?  Then when you move to the next image, the main image 
> slides left, the left (off-screen image container) is then moved to the 
> right, and he the right image slides into the middle.  This is a sort of 
> recycling of components.  Seems like a lot of work and would be prone to bugs.
> 
> I'm open for any other ideas on making a slideshow with these 
> sliding/scrolling transitions.
> 
> Thanks for any suggestions.
>




[flexcoders] Re: Unload several modules at the same time

2009-08-03 Thread Jason B
http://livedocs.adobe.com/flex/3/html/help.html?content=modular_3.html


--- In flexcoders@yahoogroups.com, "yonghan79"  wrote:
>
> Hi all,i want to ask.Suppose i got an application with several 
> modules..Suppose i load the modules,then i want to unload them at the same 
> time,is it possible?Also if i put a close button within the modules,what code 
> should i put?Thanks a lot... ^_^
>




[flexcoders] Re: creation timing on panel component

2009-08-01 Thread Jason B
I didnt include all the code I'll zip it up and email it to you.


--- In flexcoders@yahoogroups.com, claudiu ursica  wrote:
>
> From what I see here the button click does not make the call to the http 
> service.
> 
> The general rule of the thumb is aftter the service call you push the data 
> into a model which usually updates the view via binding. I always parse data 
> into array collections or other strong typed objects. Having the items into 
> an array collection enables you to bind to it if you're using List based 
> components in the view. However in your case yuou could listed to the 
> collection change event and do your thing manually. Send me the code via 
> email and I'll try to debug it. I cannot figure it out from what I see. I 
> guess you make the call for the data and the result gets back before the 
> creation complete venet fopr the panel fires.
> 
> C
> 
> 
> 
> 
> 
> From: Jason B 
> To: flexcoders@yahoogroups.com
> Sent: Saturday, August 1, 2009 9:14:34 PM
> Subject: [flexcoders] Re: creation timing on panel component
> 
>   
> 
>  
> is in the main.mxml
> 
> --- In flexcod...@yahoogro ups.com, claudiu ursica  wrote:
> >
> > when are you calling the service?
> > 
> > C
> > 
> > 
> > 
> > 
> >  _ _ __
> > From: Jason B 
> > To: flexcod...@yahoogro ups.com
> > Sent: Saturday, August 1, 2009 5:51:26 PM
> > Subject: [flexcoders] Re: creation timing on panel component
> > 
> > 
> > Just so you know if I use this on the component it works fine
> > 
> > 
> > 
> > 
> > 
> > 
> > --- In flexcod...@yahoogro ups.com, "Jason B"  wrote:
> > >
> > > Main.mxml
> > >  --
> > > 
> > >   [Bindable]
> > >   private var nutritionData: XML;
> > > 
> > > 
> > >   //  create breakfast
> > >   private function createBreakfast( ):void
> > >   {
> > >   vsMain.selectedInde x = 1;
> > >   vsCreateMeals. selectedIndex = 0;
> > >   plantype = 'Breakfast';
> > > 
> > > #1009 ERROR HERE BELOW !
> > >   pnlCreateBreakfast. meal = nutritionData. 
> > > breakfast;
> > > 
> > >   }
> > > 
> > > 
> > >  > >   result="nutritionRe sultHandler( event)"
> > >   fault="nutritionFau ltHandler( event)" resultFormat= "e4x"/>
> > > 
> > > 
> > >   
> > >> > borderStyle= "inset" borderThickness= "2" id="vsCreateMeals" >
> > > 
> > >   
> > > > > id="pnlCreateBreakf ast" />
> > >   
> > > 
> > > 
> > >  - - - - -
> > > panelcreatemeal. mxml
> > >  -
> > > 
> > > 
> > >   borderThicknessLeft ="0" borderThicknessRigh t="0" borderThicknessBott 
> > > om="0"
> > >   dropShadowEnabled= "false"
> > >horizontalAlign= "center" xmlns:containers= "com.dougmccune. 
> > > containers. *" title="Select An Item from below" creationPolicy= "all">
> > > 
> > >   
> > >   
> > >   
> > > 
> > >> > height="100% " 
> > >   horizontalGap= "1" borderStyle= "inset" backgroundColor= 
> > > "0xFF" 
> > >   segments="9" reflectionEnabled= "true"/>
> > > 
> > >
> > >   
> > >> > click="parentApplic ation.vsCreateMe als.selectedInde x=1;"/>
> > >       
> > > 
> > > 
> > > 
> > > 
> > >  -
> > > panelcreatemealitem .mxml
> > > -
> > > 
> > > http://www.adobe. com/2006/ mxml" width="310" 
> > > height="320" 
> > >title="{mealDetails .title}" horizontalAlign= "center" creationPolicy= 
> > > &q

[flexcoders] Re: creation timing on panel component

2009-08-01 Thread Jason B

 
is in the main.mxml



--- In flexcoders@yahoogroups.com, claudiu ursica  wrote:
>
> when are you calling the service?
> 
> C
> 
> 
> 
> 
> ________
> From: Jason B 
> To: flexcoders@yahoogroups.com
> Sent: Saturday, August 1, 2009 5:51:26 PM
> Subject: [flexcoders] Re: creation timing on panel component
> 
>   
> Just so you know if I use this on the component it works fine
> 
> 
> 
> 
> 
> 
> --- In flexcod...@yahoogro ups.com, "Jason B"  wrote:
> >
> > Main.mxml
> >  --
> > 
> > [Bindable]
> > private var nutritionData: XML;
> > 
> > 
> > //  create breakfast
> > private function createBreakfast( ):void
> > {
> > vsMain.selectedInde x = 1;
> > vsCreateMeals. selectedIndex = 0;
> > plantype = 'Breakfast';
> > 
> > #1009 ERROR HERE BELOW !
> > pnlCreateBreakfast. meal = nutritionData. 
> > breakfast;
> > 
> > }
> > 
> > 
> >  > result="nutritionRe sultHandler( event)"
> > fault="nutritionFau ltHandler( event)" resultFormat= "e4x"/>
> > 
> > 
> > 
> >  > borderStyle= "inset" borderThickness= "2" id="vsCreateMeals" >
> > 
> > 
> >   > id="pnlCreateBreakf ast" />
> > 
> > 
> > 
> >  - - - - -
> > panelcreatemeal. mxml
> >  -
> > 
> > http://www.adobe. com/2006/ mxml" width="100%" 
> > height="390" 
> > borderThicknessLeft ="0" borderThicknessRigh t="0" borderThicknessBott 
> > om="0"
> > dropShadowEnabled= "false"
> >  horizontalAlign= "center" xmlns:containers= "com.dougmccune. 
> > containers. *" title="Select An Item from below" creationPolicy= "all">
> > 
> > 
> > 
> > 
> > 
> >  > height="100% " 
> > horizontalGap= "1" borderStyle= "inset" backgroundColor= 
> > "0xFF" 
> > segments="9" reflectionEnabled= "true"/>
> > 
> >  
> > 
> >  > click="parentApplic ation.vsCreateMe als.selectedInde x=1;"/>
> > 
> >   
> > 
> > 
> > 
> >  -
> > panelcreatemealitem .mxml
> > -
> > 
> > http://www.adobe. com/2006/ mxml" width="310" 
> > height="320" 
> >  title="{mealDetails .title}" horizontalAlign= "center" creationPolicy= 
> > "all">
> > 
> > 
> > 
> > [Event(name= "addToMeal" )] 
> > [Event(name= "learnAboutThis" )] 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >  
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > --- In flexcod...@yahoogro ups.com, claudiu ursica  wrote:
> > >
> > > Quick and really dirty...
> > > wrap them inside a try catch block... but then I can't believe I just 
> > > said that... Share some more code and I'll come up with something more 
> > > engineering like...
> > > 
> > > C
> > > 
> > > 
> > > 
> > > 
> > >  _ _ __
> > > From: Jason B 
> > > To: flexcod...@yahoogro ups.com
> > > Sent: Saturday, August 1, 2009 5:25:33 PM
> > > Subject: [flexcoders] creation timing on panel component
> > > 
> > > 
> > > 
> > > I'm calling a httpservice which I populate into this nutritionData
> > > variable, I'm using a panel component to reuse it, and when I call the
> > > #SETTER below it throws a 1009 error, I was wondering if the panel is
> > > not yet created, if thats the case how can i wait until the panel is
> > > created?
> > > 
> > > [Bindable]
> > > private var nutritionData: XML;
> > > 
> > > #SETTER
> > > pnlCreateBreakfast. meal = nutritionData. breakfast;
> > >
> >
>




[flexcoders] Re: creation timing on panel component

2009-08-01 Thread Jason B
Just so you know if I use this on the component it works fine



 






--- In flexcoders@yahoogroups.com, "Jason B"  wrote:
>
> Main.mxml
> --
> 
>   [Bindable]
>   private var nutritionData:XML;
>   
> 
>   //  create breakfast
>   private function createBreakfast():void
>   {
>   vsMain.selectedIndex = 1;
>   vsCreateMeals.selectedIndex = 0;
>   plantype = 'Breakfast';
>   
> #1009 ERROR HERE BELOW !
>   pnlCreateBreakfast.meal = 
> nutritionData.breakfast;
>   
>   }
>   
> 
>result="nutritionResultHandler(event)"
>   fault="nutritionFaultHandler(event)" resultFormat="e4x"/>
>   
> 
>   
>borderStyle="inset" borderThickness="2" id="vsCreateMeals">
>   
>   
> id="pnlCreateBreakfast" />
>   
>   
> 
> -
> panelcreatemeal.mxml
> -
> 
> http://www.adobe.com/2006/mxml"; width="100%" height="390" 
>   borderThicknessLeft="0" borderThicknessRight="0" 
> borderThicknessBottom="0"
>   dropShadowEnabled="false"
>horizontalAlign="center" 
> xmlns:containers="com.dougmccune.containers.*" title="Select An Item from 
> below" creationPolicy="all">
>   
>   
>   
>   
>   
>height="100%" 
>   horizontalGap="1" borderStyle="inset" 
> backgroundColor="0xFF" 
>   segments="9" reflectionEnabled="true"/>
>   
>
>click="parentApplication.vsCreateMeals.selectedIndex=0;"/>
>click="parentApplication.vsCreateMeals.selectedIndex=1;"/>
>click="parentApplication.vsCreateMeals.selectedIndex=2;"/>
>   
> 
> 
> 
> -
> panelcreatemealitem.mxml
> -
> 
> http://www.adobe.com/2006/mxml"; width="310" height="320" 
>title="{mealDetails.title}" horizontalAlign="center" 
> creationPolicy="all">
>   
>   
>   
>   [Event(name="addToMeal")]   
>   [Event(name="learnAboutThis")]  
>   
>   
>   
>   
>   
>   
>   
> 
>   
>   
>
>   
>   
>   
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, claudiu ursica  wrote:
> >
> > Quick and really dirty...
> > wrap them inside a try catch block... but then I can't believe I just said 
> > that... Share some more code and I'll come up with something more 
> > engineering like...
> > 
> > C
> > 
> > 
> > 
> > 
> > 
> > From: Jason B 
> > To: flexcoders@yahoogroups.com
> > Sent: Saturday, August 1, 2009 5:25:33 PM
> > Subject: [flexcoders] creation timing on panel component
> > 
> >   
> > 
> > I'm calling a httpservice which I populate into this nutritionData
> > variable, I'm using a panel component to reuse it, and when I call the
> > #SETTER below it throws a 1009 error, I was wondering if the panel is
> > not yet created, if thats the case how can i wait until the panel is
> > created?
> > 
> > [Bindable]
> > private var nutritionData: XML;
> > 
> > #SETTER
> > pnlCreateBreakfast. meal = nutritionData. breakfast;
> >
>




[flexcoders] Re: creation timing on panel component

2009-08-01 Thread Jason B
Main.mxml
--

[Bindable]
private var nutritionData:XML;


//  create breakfast
private function createBreakfast():void
{
vsMain.selectedIndex = 1;
vsCreateMeals.selectedIndex = 0;
plantype = 'Breakfast';

#1009 ERROR HERE BELOW !
pnlCreateBreakfast.meal = 
nutritionData.breakfast;

}









 



-
panelcreatemeal.mxml
-

http://www.adobe.com/2006/mxml"; width="100%" height="390" 
borderThicknessLeft="0" borderThicknessRight="0" 
borderThicknessBottom="0"
dropShadowEnabled="false"
 horizontalAlign="center" 
xmlns:containers="com.dougmccune.containers.*" title="Select An Item from 
below" creationPolicy="all">







 







-
panelcreatemealitem.mxml
-

http://www.adobe.com/2006/mxml"; width="310" height="320" 
 title="{mealDetails.title}" horizontalAlign="center" 
creationPolicy="all">



[Event(name="addToMeal")]   
[Event(name="learnAboutThis")]  










 
















--- In flexcoders@yahoogroups.com, claudiu ursica  wrote:
>
> Quick and really dirty...
> wrap them inside a try catch block... but then I can't believe I just said 
> that... Share some more code and I'll come up with something more engineering 
> like...
> 
> C
> 
> 
> 
> 
> 
> From: Jason B 
> To: flexcoders@yahoogroups.com
> Sent: Saturday, August 1, 2009 5:25:33 PM
> Subject: [flexcoders] creation timing on panel component
> 
>   
> 
> I'm calling a httpservice which I populate into this nutritionData
> variable, I'm using a panel component to reuse it, and when I call the
> #SETTER below it throws a 1009 error, I was wondering if the panel is
> not yet created, if thats the case how can i wait until the panel is
> created?
> 
> [Bindable]
> private var nutritionData: XML;
> 
> #SETTER
> pnlCreateBreakfast. meal = nutritionData. breakfast;
>




[flexcoders] creation timing on panel component

2009-08-01 Thread Jason B

I'm calling a httpservice which I populate into this nutritionData
variable, I'm using a panel component to reuse it, and when I call the
#SETTER below it throws a 1009 error, I was wondering if the panel is
not yet created, if thats the case how can i wait until the panel is
created?


 [Bindable]
 private var nutritionData:XML;


#SETTER
pnlCreateBreakfast.meal = nutritionData.breakfast;




[flexcoders] Re: getting the xml data from a dispatched event

2009-07-05 Thread Jason B

It wont accept your suggestions

Severity and DescriptionPathResourceLocation
Creation Time   Id
1120: Access of undefined property Panelcreatemealitem. /srcMain.mxml   
line 1051246801954900   468962








--- In flexcoders@yahoogroups.com, "Tim Hoff"  wrote:
>
> 
> Wow, I've got to say; "What  a mess."  However, you can get it to work
> with the following changes:
> 
> [Bindable]
> private var customMeals:XMLListCollection = new XMLListCollection();
> 
> 
> 
> // addToMeal event Handler
> private function addToMealHandler(event:Event):void
> {
>   customMeals.addItem((event.target as
> Panelcreatemealitem).mealDetails);
>   Alert.show(customMeals.toString());
> }
> 
> You have some naming conflicts and, since you're dealing with xml,
> you'll need to use an XMLListCollection; instead of an ArrayCollection.
> 
> -TH
> 
> --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
> >
> > Heres my three mxml files two of which are under the com/ folder and
> get imported...hope that helps
> >
> >
> > 
> > http://www.adobe.com/2006/mxml";
> layout="vertical"
> > creationComplete="init()" styleName="plain"
> xmlns:nutrition="com.nutrition.*"
> > paddingLeft="10" paddingTop="10" paddingRight="10" paddingBottom="10">
> >
> > 
> > 
> > 
> >
> >  url="/main.php/flexnutrition/nutritioncal"
> > result="nutritionResultHandler(event)"
> > fault="nutritionFaultHandler(event)" resultFormat="e4x"/>
> >
> > 
> >
> >  fontSize="18"/>
> >
> > 
> >
> > 
> >
> > 
> >
> >  autoLoad="true" x="700" y="100" />
> >
> > 
> >
> > 
> >
> >  meal="{nutritionData.breakfast}"
> > title="Breakfast : Please select one meal from
> below({maindata.breakfast} Cal Goal)"/>
> >
> > 
> >  click="createBreakfast()"/>
> > 
> >
> >
> >  > title="Snack : Please select one snack from below({maindata.snack1}
> Cal Goal)"/>
> > 
> >
> >  > title="Lunch : Please select one meal from below({maindata.lunch} Cal
> Goal)"/>
> >
> >  > title="Snack : Please select one snack from below({maindata.snack2}
> Cal Goal)"/>
> > 
> >
> >  > title="Dinner : Please select one meal from below({maindata.dinner}
> Cal Goal)"/>
> >
> >  > title="Snack : Please select one snack from below({maindata.snack3}
> Cal Goal)"/>
> > 
> >
> >
> > 
> > 
> >
> >
> > 
> >
> > 
> > 
> > 
> >
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > 
> >
> > 
> >  borderThickness="2" id="vsCreateMeals">
> >
> > 
> >  meal="{nutritionData.breakfast}"/>
> > 
> >
> > 
> >  meal="{nutritionData.lunch}"/>
> > 
> >
> > 
> >  meal="{nutritionData.dinner}"/>
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> > 
> >
> >
> > 
> >
> > 
> >
> > 
> >
> >
> >
> >
> >
> > 
> > http://www.adobe.com/2006/mxml"; width="100%"
> height="390"
> > borderThicknessLeft="0" borderThicknessRight="0"
> borderThicknessBottom="0"
> > dropShadowEnabled="false"
> > horizontalAlign="center"
> xmlns:containers="com.dougmccune.containers.*" title="Select An Item
> from below">
> >
> > 
> > 
> > 
> >
> >  height="100%"
> > horizontalGap="1" borderStyle="inset" backgroundColor="0xFF"
> > segments="9" reflectionEnabled="true"/>
> >
> > 
> >  click="parentApplication.vsCreateMeals.selectedIndex=0;"/>
> >  click="parentApplication.vsCreateMeals.selectedIndex=1;"/>
> >  click="parentApplication.vsCreateMeals.selectedIndex=2;"/>
> > 
> > 
> >
> >
> >
> >
> > 
> > http://www.adobe.com/2006/mxml"; width="310"
> heig

[flexcoders] Re: getting the xml data from a dispatched event

2009-07-04 Thread Jason B
Heres my three mxml files two of which are under the com/ folder and get 
imported...hope that helps



http://www.adobe.com/2006/mxml"; layout="vertical"
creationComplete="init()" styleName="plain" 
xmlns:nutrition="com.nutrition.*"
paddingLeft="10" paddingTop="10" paddingRight="10" paddingBottom="10">










 
  








   




















  

  











 



















 



 



 


 


   
















http://www.adobe.com/2006/mxml"; width="100%" height="390" 
borderThicknessLeft="0" borderThicknessRight="0" 
borderThicknessBottom="0"
dropShadowEnabled="false"
 horizontalAlign="center" 
xmlns:containers="com.dougmccune.containers.*" title="Select An Item from 
below">







 










http://www.adobe.com/2006/mxml"; width="310" height="320" 
 title="{mealDetails.title}" horizontalAlign="center">



[Event(name="addToMeal")]   
[Event(name="learnAboutThis")]  










 







--- In flexcoders@yahoogroups.com, Sam Lai  wrote:
>
> It seems like wherever this code is -
> 
> [Bindable]
> private var customMeals:ArrayCollection = new ArrayCollection;
> 
> //throws error on this line
> customMeals.addItem((event.target as mealitem).mealDetails);
> 
> event.target is actually the panel containing the 'create meal item'
> button, as opposed to the mealitem itself. Can you post some more of
> the script and MXML for that part?
> 
> The src folder is empty for me too in the ZIP file.
> 
> 2009/7/2 Jason B :
> > yes heres the results
> > &quo

[flexcoders] Re: getting the xml data from a dispatched event

2009-07-03 Thread Jason B

any Idea?



--- In flexcoders@yahoogroups.com, "Jason B"  wrote:
>
> yes heres the results
> "Main0.vsMain.HBox8.VBox968.vsCreateMeals.VBox971.pnlCreateBreakfast.coverflow.Panelcreatemealitem1006"
> 
> How can I access the object data, it's in a file thats under the folder 
> /com/nutrition/file.mxml 
> 
> 
> 
> --- In flexcoders@yahoogroups.com, Sam Lai  wrote:
> >
> > I'd add a trace statement just before it to see what type of object
> > event.target is - it could be that the target is the UI component, and
> > not the data object.
> > 
> > //throws error on this line
> > trace(event.target);
> > customMeals.addItem((event.target as mealitem).mealDetails);
> > 
> > 2009/7/2 Jason B :
> > > I've got an problem when the user clicks on button "Add to Meal" it 
> > > throws an error because it can't seem to reference the data in 
> > > mealDetails object inside the com/ directory?
> > >
> > > I'm trying to add the item to the list control.
> > >
> > > I have the code located here in case you want more details
> > > http://files.getdropbox.com/u/228472/mealsflex.zip
> > >
> > >
> > > [Bindable]
> > > private var customMeals:ArrayCollection = new ArrayCollection;
> > >
> > > //throws error on this line
> > > customMeals.addItem((event.target as mealitem).mealDetails);
> > >
> > >
> > >
> > >
> > > 
> > > http://www.adobe.com/2006/mxml"; width="310" 
> > > height="320"
> > >         title="{mealDetails.title}" horizontalAlign="center">
> > >
> > >
> > >        
> > >                [Event(name="addToMeal")]
> > >                [Event(name="learnAboutThis")]
> > >        
> > >
> > >        
> > >                
> > >        
> > >
> > >        
> > >
> > >        
> > >
> > >        
> > >
> > >        
> > >
> > > 
> > >
> > >
> > >
> > >
> > > 
> > >
> > > --
> > > 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
> > >
> > >
> > >
> > >
> >
>




[flexcoders] Re: getting the xml data from a dispatched event

2009-07-02 Thread Jason B
yes heres the results
"Main0.vsMain.HBox8.VBox968.vsCreateMeals.VBox971.pnlCreateBreakfast.coverflow.Panelcreatemealitem1006"

How can I access the object data, it's in a file thats under the folder 
/com/nutrition/file.mxml 



--- In flexcoders@yahoogroups.com, Sam Lai  wrote:
>
> I'd add a trace statement just before it to see what type of object
> event.target is - it could be that the target is the UI component, and
> not the data object.
> 
> //throws error on this line
> trace(event.target);
> customMeals.addItem((event.target as mealitem).mealDetails);
> 
> 2009/7/2 Jason B :
> > I've got an problem when the user clicks on button "Add to Meal" it throws 
> > an error because it can't seem to reference the data in mealDetails object 
> > inside the com/ directory?
> >
> > I'm trying to add the item to the list control.
> >
> > I have the code located here in case you want more details
> > http://files.getdropbox.com/u/228472/mealsflex.zip
> >
> >
> > [Bindable]
> > private var customMeals:ArrayCollection = new ArrayCollection;
> >
> > //throws error on this line
> > customMeals.addItem((event.target as mealitem).mealDetails);
> >
> >
> >
> >
> > 
> > http://www.adobe.com/2006/mxml"; width="310" height="320"
> >         title="{mealDetails.title}" horizontalAlign="center">
> >
> >
> >        
> >                [Event(name="addToMeal")]
> >                [Event(name="learnAboutThis")]
> >        
> >
> >        
> >                
> >        
> >
> >         > width="285" height="159"/>
> >
> >        
> >
> >        
> >
> >        
> >
> > 
> >
> >
> >
> >
> > 
> >
> > --
> > 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
> >
> >
> >
> >
>




[flexcoders] getting the xml data from a dispatched event

2009-07-01 Thread Jason B
I've got an problem when the user clicks on button "Add to Meal" it throws an 
error because it can't seem to reference the data in mealDetails object inside 
the com/ directory? 

I'm trying to add the item to the list control.

I have the code located here in case you want more details
http://files.getdropbox.com/u/228472/mealsflex.zip


[Bindable]
private var customMeals:ArrayCollection = new ArrayCollection;

//throws error on this line 
customMeals.addItem((event.target as mealitem).mealDetails);





http://www.adobe.com/2006/mxml"; width="310" height="320" 
 title="{mealDetails.title}" horizontalAlign="center">



[Event(name="addToMeal")]   
[Event(name="learnAboutThis")]  










 








[flexcoders] Re: reference xml using variable dynamically

2009-06-05 Thread Jason B

Actually this works 
 nutritionXML.child(carousel).itemdata

NOT THIS
 nutritionXML.child(carousel).child("itemdata")

the second one seems to give me back the first itemdata node not all of them 
for the foreach, just an FYI for any future googler looking at this response




[flexcoders] Re: reference xml using variable dynamically

2009-06-05 Thread Jason B

weird how adobe does that kind of thing, as I remember I used + sign to concat 
a variable and string somewhere else but then they use no + sign ? Why the 
inconsistency.
It works by the way



--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Try:
> 
> for each(var item:Object in nutritionXML[carousel].itemdata)
> 
> 
> 
>  
> 
> Tracy Spratt,
> 
> Lariat Services, development services available
> 
>   _  
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jason B
> Sent: Thursday, June 04, 2009 7:50 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] reference xml using variable dynamically
> 
>  
> 
> 
> 
> 
> 
> 
> I'm using a e4x resultformat and returning from an httpservice a xml list of
> items which works fine when i just use
> 
> for each(var item:Object in nutritionXML.breakfast.itemdata)
> 
> but if i try to do it dynamically it wont work?
> 
> //DYNAMICALLY
> var carousel:String;
> 
> carousel = "breakfast"; 
> 
> for each(var item:Object in nutritionXML + [carousel].itemdata)
> {
> 
> 
> XML DATA RETURNED FROM HTTPSERVICE
> 
> 
> 
> 
> Oatmeal and Eggs Meal
> oatmeal_and_eggs_meal.jpg
> 1 cup oatmeal, 1 1/2 cups low fat milk|1 egg, 1 medium
> banana
> 60
> oatmeal_and_eggs_meal.swf
> yes
> 
> 
> Shredded Wheat Meal
> shredded_wheat_breakfast.jpg
> 1 cup shredded wheat, 2/3 cup fat free yogurt|2 slices can. bacon,
> 1/2 cup orange juice
> 400
> shredded_wheat_breakfast.swf
> yes
> 
>




[flexcoders] reference xml using variable dynamically

2009-06-04 Thread Jason B
I'm using a e4x resultformat and returning from an httpservice a xml list of 
items which works fine when i just use

for each(var item:Object in nutritionXML.breakfast.itemdata)

but if i try to do it dynamically it wont work?




//DYNAMICALLY
var carousel:String;

carousel = "breakfast"; 

for each(var item:Object in 
nutritionXML + [carousel].itemdata)
{






XML DATA RETURNED FROM HTTPSERVICE


  

  Oatmeal and Eggs Meal
  oatmeal_and_eggs_meal.jpg
  1 cup oatmeal, 1 1/2 cups low fat milk|1 egg, 1 medium 
banana
  60
  oatmeal_and_eggs_meal.swf
  yes


  Shredded Wheat Meal
  shredded_wheat_breakfast.jpg
  1 cup shredded wheat, 2/3 cup fat free yogurt|2 slices can. 
bacon, 1/2 cup orange juice
  400
  shredded_wheat_breakfast.swf
  yes





[flexcoders] render timing on coverflow

2009-05-29 Thread Jason B
I've been using the coverflow render item, but now I need to move it from mxml 
to actionscript so i started looking at what i can do and into addchild option.
I've not been successful in getting it to render my dynamic objects and im 
guessing the coverflow has already rendered and wont display them because it 
has to go through coverflow? How can i tell coverflow object to re-render ?


http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/


public function loadpanel(event:ResultEvent){
 var panel_c:Panel = new Panel();
 var label_c:Label = new Label();
if(event.result.info.title != ""){
 panel_c.id = "panel1";
 label_c.id="label1";
 label_c.text = "WORKS";
 coverflow.addChild(panel_c);
 coverflow.addChild(label_c);
 
}

} 











  




[flexcoders] Re: simple array?

2009-05-21 Thread Jason B
SWEET thanks

--- In flexcoders@yahoogroups.com, "Eric Cooper"  wrote:
>
> How about this:
> 
> var records:Array = new Array(
>   { code:"AC", text:"Remember to reset 
> the station address." },
>   { code:"RN", text:"Remember to reset 
> the station expiration date." },
>   { code:"CP", text:"Remember to contact 
> contractor to remove the certificates from this station." },
>   { code:"CR", text:"Remember to cancel 
> the refund payment." },
>   );
> 
> for each(test:Object in records){
>   if(grid.selectedItem.PAYMENT_TYPE_CODE == test[i].code)
>   Alert.show(test[i].text );
>   }
> 
> would that do it?
> 
> -eric
> 
> --- In flexcoders@yahoogroups.com, "Jason B"  wrote:
> >
> > var records:Array = new Array({
> > "AC": "Remember to reset the station address.", 
> > "RN": "Remember to reset the station expiration date.",
> > "CP": "Remember to contact contractor to remove the 
> > certificates from this station.",
> > "CR": "Remember to cancel the refund payment."
> > });
> > 
> > 
> > for each(test:Object in records){
> > 
> > //HERE we match up PAYMENT TYPE CODE with AC RN CP if one is a match we 
> > show the value  
> > 
> > if(grid.selectedItem.PAYMENT_TYPE_CODE == test[i])
> >  Alert.show(SHOW ME --->"Remember to reset the station address" );
> > 
> > 
> > 
> > }
> > 
> > 
> > datagrid hidden column AC, RN, CP are in datagrid
> > user selects RT item from grid and hits button
> > system match's that row with what message should be displayed
> > user never see's RT since its a hidden field in grid
> > user now see's a message displayed as a reminder
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> > --- In flexcoders@yahoogroups.com, "Paul Andrews"  wrote:
> > >
> > > Jason,
> > > 
> > > I'm not sure I follow exactly what the problem is now.
> > > 
> > > Paul
> > > - Original Message - 
> > > From: "Jason B" 
> > > To: 
> > > Sent: Thursday, May 21, 2009 4:02 PM
> > > Subject: [flexcoders] Re: simple array?
> > > 
> > > 
> > > >i want to loop the records and compare the value "addresschange" to the 
> > > >PAYMENT Type Code if its the right one display it
> > > >
> > > >
> > > > --- In flexcoders@yahoogroups.com, "Paul Andrews"  wrote:
> > > >>
> > > >>
> > > >> - Original Message - 
> > > >> From: "Jason B" 
> > > >> To: 
> > > >> Sent: Thursday, May 21, 2009 3:46 PM
> > > >> Subject: [flexcoders] Re: simple array?
> > > >>
> > > >>
> > > >> > Thanks but i dont know how to do a compare based on your example 
> > > >> > show?
> > > >>
> > > >>  for(var i:uint = 0; i < records.length; i++) {
> > > >>  //If array matchs show text
> > > >> if(payment_grid.selectedItem.PAYMENT_TYPE_CODE ==
> > > >> records[i].addresschange){
> > > >> Alert.show(records[i].addresschange);
> > > >> }
> > > >> }
> > > >>
> > > >>
> > > >> >
> > > >> >
> > > >> > for(var i:uint = 0; i < records.length; i++) {
> > > >> > //If array matchs show text
> > > >> > if(payment_grid.selectedItem.PAYMENT_TYPE_CODE == records.valueof 
> > > >> > ){
> > > >> >Alert.show(records[0].addresschange);
> > > >> >
> > > >> > }
> > > >> >
> > > >> >
> > > >> >
> > > >> > --- In flexcoders@yahoogroups.com, Pedro Sena  wrote:
> > > >> >>
> > > >> >> records[0].addresschange
> > > >> >>
> > > >> >> You are putting an object inside your array
> > > >> >&

[flexcoders] Re: simple array?

2009-05-21 Thread Jason B
var records:Array = new Array({
"AC": "Remember to reset the station address.", 
"RN": "Remember to reset the station expiration date.",
"CP": "Remember to contact contractor to remove the 
certificates from this station.",
"CR": "Remember to cancel the refund payment."
});


for each(test:Object in records){

//HERE we match up PAYMENT TYPE CODE with AC RN CP if one is a match we show 
the value  

if(grid.selectedItem.PAYMENT_TYPE_CODE == test[i])
 Alert.show(SHOW ME --->"Remember to reset the station address" );



}


datagrid hidden column AC, RN, CP are in datagrid
user selects RT item from grid and hits button
system match's that row with what message should be displayed
user never see's RT since its a hidden field in grid
user now see's a message displayed as a reminder







--- In flexcoders@yahoogroups.com, "Paul Andrews"  wrote:
>
> Jason,
> 
> I'm not sure I follow exactly what the problem is now.
> 
> Paul
> - Original Message - 
> From: "Jason B" 
> To: 
> Sent: Thursday, May 21, 2009 4:02 PM
> Subject: [flexcoders] Re: simple array?
> 
> 
> >i want to loop the records and compare the value "addresschange" to the 
> >PAYMENT Type Code if its the right one display it
> >
> >
> > --- In flexcoders@yahoogroups.com, "Paul Andrews"  wrote:
> >>
> >>
> >> - Original Message - 
> >> From: "Jason B" 
> >> To: 
> >> Sent: Thursday, May 21, 2009 3:46 PM
> >> Subject: [flexcoders] Re: simple array?
> >>
> >>
> >> > Thanks but i dont know how to do a compare based on your example show?
> >>
> >>  for(var i:uint = 0; i < records.length; i++) {
> >>  //If array matchs show text
> >> if(payment_grid.selectedItem.PAYMENT_TYPE_CODE ==
> >> records[i].addresschange){
> >> Alert.show(records[i].addresschange);
> >> }
> >> }
> >>
> >>
> >> >
> >> >
> >> > for(var i:uint = 0; i < records.length; i++) {
> >> > //If array matchs show text
> >> > if(payment_grid.selectedItem.PAYMENT_TYPE_CODE == records.valueof 
> >> > ){
> >> >Alert.show(records[0].addresschange);
> >> >
> >> > }
> >> >
> >> >
> >> >
> >> > --- In flexcoders@yahoogroups.com, Pedro Sena  wrote:
> >> >>
> >> >> records[0].addresschange
> >> >>
> >> >> You are putting an object inside your array
> >> >>
> >> >> Using records[0] you retrieve your object
> >> >> using records[0].addresschange you access its property called
> >> >> addresschange
> >> >>
> >> >> On Thu, May 21, 2009 at 11:14 AM, Jason B  wrote:
> >> >>
> >> >> >
> >> >> >
> >> >> > var records:Array = new Array({
> >> >> > addresschange: "Remember to reset the station address.",
> >> >> > etc.
> >> >> > });
> >> >> >
> >> >> >
> >> >> > Alert.show(records['addresschange']);
> >> >> > Alert.show(records[0]);
> >> >> > Alert.show(records.addresschange);
> >> >> >
> >> >> > how the heck can i access the item directly by index name?
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >>
> >> >> -- 
> >> >> /**
> >> >> * Pedro Sena
> >> >> * Systems Architect
> >> >> * Sun Certified Java Programmer
> >> >> * Sun Certified Web Component Developer
> >> >> */
> >> >>
> >> >
> >> >
> >> >
> >> >
> >> > 
> >> >
> >> > --
> >> > 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
> >> >
> >> >
> >> >
> >>
> >
> >
> >
> >
> > 
> >
> > --
> > 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
> >
> >
> >
>




[flexcoders] Re: simple array?

2009-05-21 Thread Jason B
i want to loop the records and compare the value "addresschange" to the PAYMENT 
Type Code if its the right one display it


--- In flexcoders@yahoogroups.com, "Paul Andrews"  wrote:
>
> 
> - Original Message - 
> From: "Jason B" 
> To: 
> Sent: Thursday, May 21, 2009 3:46 PM
> Subject: [flexcoders] Re: simple array?
> 
> 
> > Thanks but i dont know how to do a compare based on your example show?
> 
>  for(var i:uint = 0; i < records.length; i++) {
>  //If array matchs show text
> if(payment_grid.selectedItem.PAYMENT_TYPE_CODE == 
> records[i].addresschange){
> Alert.show(records[i].addresschange);
> }
> }
> 
> 
> >
> >
> > for(var i:uint = 0; i < records.length; i++) {
> > //If array matchs show text 
> > if(payment_grid.selectedItem.PAYMENT_TYPE_CODE == records.valueof ){
> >Alert.show(records[0].addresschange);
> >
> > }
> >
> >
> >
> > --- In flexcoders@yahoogroups.com, Pedro Sena  wrote:
> >>
> >> records[0].addresschange
> >>
> >> You are putting an object inside your array
> >>
> >> Using records[0] you retrieve your object
> >> using records[0].addresschange you access its property called 
> >> addresschange
> >>
> >> On Thu, May 21, 2009 at 11:14 AM, Jason B  wrote:
> >>
> >> >
> >> >
> >> > var records:Array = new Array({
> >> > addresschange: "Remember to reset the station address.",
> >> > etc.
> >> > });
> >> >
> >> >
> >> > Alert.show(records['addresschange']);
> >> > Alert.show(records[0]);
> >> > Alert.show(records.addresschange);
> >> >
> >> > how the heck can i access the item directly by index name?
> >> >
> >> >
> >> >
> >>
> >>
> >>
> >> -- 
> >> /**
> >> * Pedro Sena
> >> * Systems Architect
> >> * Sun Certified Java Programmer
> >> * Sun Certified Web Component Developer
> >> */
> >>
> >
> >
> >
> >
> > 
> >
> > --
> > 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
> >
> >
> >
>




[flexcoders] Re: simple array?

2009-05-21 Thread Jason B
Thanks but i dont know how to do a compare based on your example show?


for(var i:uint = 0; i < records.length; i++) {
//If array matchs show text 
if(payment_grid.selectedItem.PAYMENT_TYPE_CODE == records.valueof ){
 Alert.show(records[0].addresschange);  


}



--- In flexcoders@yahoogroups.com, Pedro Sena  wrote:
>
> records[0].addresschange
> 
> You are putting an object inside your array
> 
> Using records[0] you retrieve your object
> using records[0].addresschange you access its property called addresschange
> 
> On Thu, May 21, 2009 at 11:14 AM, Jason B  wrote:
> 
> >
> >
> > var records:Array = new Array({
> > addresschange: "Remember to reset the station address.",
> > etc.
> > });
> >
> >
> > Alert.show(records['addresschange']);
> > Alert.show(records[0]);
> > Alert.show(records.addresschange);
> >
> > how the heck can i access the item directly by index name?
> >
> >  
> >
> 
> 
> 
> -- 
> /**
> * Pedro Sena
> * Systems Architect
> * Sun Certified Java Programmer
> * Sun Certified Web Component Developer
> */
>




[flexcoders] simple array?

2009-05-21 Thread Jason B
var records:Array = new Array({
addresschange: "Remember to reset the station address.", 
etc.
});



Alert.show(records['addresschange']);
Alert.show(records[0]);
Alert.show(records.addresschange);

how the heck can i access the item directly by index name?



[flexcoders] Re: dynamic labels with public variable

2009-05-09 Thread Jason B
nevermind i had another try statement i forgot with the old code, thanks again 
Tracy your the best !


--- In flexcoders@yahoogroups.com, "Jason B"  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 flexcoders@yahoogroups.com, "Tracy Spratt"  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: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> > Behalf Of Jason B
> > Sent: Friday, May 08, 2009 9:37 PM
> > To: flexcoders@yahoogroups.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
> >
>




[flexcoders] Re: dynamic labels with public variable

2009-05-09 Thread Jason B
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 flexcoders@yahoogroups.com, "Tracy Spratt"  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: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jason B
> Sent: Friday, May 08, 2009 9:37 PM
> To: flexcoders@yahoogroups.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
>




[flexcoders] dynamic labels with public variable

2009-05-08 Thread Jason B
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





Re: re[flexcoders] use image source property causes 1009 ?

2009-05-04 Thread Jason B
interesting, I managed to also just use this and its working as should






--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> Binding has built in tolerance for null pointers and will 'try again'
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of Jason B
> Sent: Sunday, May 03, 2009 5:00 PM
> To: flexcoders@yahoogroups.com
> Subject: Re: re[flexcoders] use image source property causes 1009 ?
> 
> 
> 
> 
> 
> that binding source worked not sure why i cant do the same with actionscript?
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> atifarooq  wrote:
> >
> >
> > hi,
> >
> > you may set
> > breakfast_img_item2.source = fast_img_item1.source after the complete event
> > is dispatched on fast_img_item1 or use something similar
> >
> >  > destination="breakfast_img_item2.source"/>
> >
> >
> > aot2002 wrote:
> > >
> > > I have an image source property which i want to pass to another image on a
> > > different display? Is there something special to passing image sources?
> > >
> > >
> > > TypeError: Error #1009: Cannot access a property or method of a null
> > > object reference.
> > >
> > >
> > > breakfast_img_item2.source = fast_img_item1.source;
> > >
> > > 
> > >
> > > 
> > >
> > >
> > >
> >
> > --
> > View this message in context: 
> > http://www.nabble.com/reuse-image-source-property-causes-1009---tp23351700p23354554.html
> > Sent from the FlexCoders mailing list archive at Nabble.com.
> >
>




Re: re[flexcoders] use image source property causes 1009 ?

2009-05-03 Thread Jason B
that binding source worked not sure why i cant do the same with actionscript?



--- In flexcoders@yahoogroups.com, atifarooq  wrote:
>
> 
> hi,
>
>you may set
> breakfast_img_item2.source =  fast_img_item1.source after the complete event
> is dispatched on  fast_img_item1 or use something similar
> 
>  destination="breakfast_img_item2.source"/>
> 
> 
> aot2002 wrote:
> > 
> > I have an image source property which i want to pass to another image on a
> > different display? Is there something special to passing image sources?
> > 
> > 
> > TypeError: Error #1009: Cannot access a property or method of a null
> > object reference.
> > 
> > 
> > breakfast_img_item2.source =  fast_img_item1.source;
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/reuse-image-source-property-causes-1009---tp23351700p23354554.html
> Sent from the FlexCoders mailing list archive at Nabble.com.
>




[flexcoders] Re: reuse image source property causes 1009 ?

2009-05-03 Thread Jason B
TypeError: Error #1009: Cannot access a property or method of a null object 
reference.
at nutrition/saveplan()[/www/mass08/nutrition/src/createmeals.as:156]
at 
nutrition/___nutrition_Button39_click()[/www/mass08/nutrition/src/nutrition.mxml:412]

I've echo'd the img source of fast_img_item1.source and it shows the source 
path?





--- In flexcoders@yahoogroups.com, Alex Harui  wrote:
>
> If you got that error on that line, breakfast_img_item2 or fast_img_item1
> Is null and it could have to do with creationPolicy or just plain timing.  
> You didn't show when your code ran and you didn't include the full stacktrace 
> with line numbers which usually helps.
> 
> Alex Harui
> Flex SDK Developer
> Adobe Systems Inc.<http://www.adobe.com/>
> Blog: http://blogs.adobe.com/aharui
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On 
> Behalf Of Jason B
> Sent: Saturday, May 02, 2009 7:32 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: reuse image source property causes 1009 ?
> 
> 
> 
> 
> 
> mistype on the action script i didn't do a copy paste :( sorry
> but still just not allowing a image source to image source
> 
> --- In flexcoders@yahoogroups.com<mailto:flexcoders%40yahoogroups.com>, 
> "Jason B"  wrote:
> >
> > I have an image source property which i want to pass to another image on a 
> > different display? Is there something special to passing image sources?
> >
> >
> > TypeError: Error #1009: Cannot access a property or method of a null object 
> > reference.
> >
> >
> > breakfast_img_item2.source = fast_img_item1.source;
> >
> > 
> >
> > 
> >
>




[flexcoders] Re: reuse image source property causes 1009 ?

2009-05-02 Thread Jason B
mistype on the action script i didn't do a copy paste :( sorry
but still just not allowing a image source to image source


--- In flexcoders@yahoogroups.com, "Jason B"  wrote:
>
> I have an image source property which i want to pass to another image on a 
> different display? Is there something special to passing image sources?
> 
> 
> TypeError: Error #1009: Cannot access a property or method of a null object 
> reference.
> 
> 
> breakfast_img_item2.source =  fast_img_item1.source;
> 
> 
> 
> 
>




[flexcoders] reuse image source property causes 1009 ?

2009-05-02 Thread Jason B
I have an image source property which i want to pass to another image on a 
different display? Is there something special to passing image sources?


TypeError: Error #1009: Cannot access a property or method of a null object 
reference.


breakfast_img_item2.source =  fast_img_item1.source;







[flexcoders] module loading and progress load slow?

2009-04-23 Thread Jason B
loading modules 

I've been rearranging my application to use modules to reduce load time and 
prepare it to handle later larger development etc...
All is well I've got it loading modules and such and learned a lot over the 
past few days. 

I have several modules that have large images it uses with source= and some 
other swf's it loadsI prefer not to allow caching since these items change 
a lot.

On a localhost connection (dev) It can take 10 seconds to load the module etc.
At first I thought it was needing a preloading technique that adobe offers so i 
tried that to load while the app loaded etc.. no go

then i tried to see if i could add a progress bar on top of the module loading 
so the user is at least informed but to my dismay it loads too fast for the 
progress bar to show up

heres the size of the swif being loaded
364K 2009-04-23 13:54 nutrition.swf

the images and other swfs that load into this module are about 1-2 megs total. 

If i avoid using modules it loads on localhost almost instantly :(

I have a feeling the source = for images and swf loading is whats dragging it 
to load fast.


What options do i have for either preloading quicker for this module?
Is it possible that my custom component is causing this performance issue?
http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/


anyone had this kind of issue with rendering slow?

sources used already are:
http://livedocs.adobe.com/flex/3/html/help.html?content=modular_5.html

http://livedocs.adobe.com/flex/3/html/help.html?content=modular_6.html



[flexcoders] module loading and progress load slow?

2009-04-23 Thread Jason B
loading modules 

I've been rearranging my application to use modules to reduce load time and 
prepare it to handle later larger development etc...
All is well I've got it loading modules and such and learned a lot over the 
past few days. 

I have several modules that have large images it uses with source= and some 
other swf's it loadsI prefer not to allow caching since these items change 
a lot.

On a localhost connection (dev) It can take 10 seconds to load the module etc.
At first I thought it was needing a preloading technique that adobe offers so i 
tried that to load while the app loaded etc.. no go

then i tried to see if i could add a progress bar on top of the module loading 
so the user is at least informed but to my dismay it loads too fast for the 
progress bar to show up

heres the size of the swif being loaded
364K 2009-04-23 13:54 nutrition.swf

the images and other swfs that load into this module are about 1-2 megs total. 

If i avoid using modules it loads on localhost almost instantly :(

I have a feeling the source = for images and swf loading is whats dragging it 
to load fast.


What options do i have for either preloading quicker for this module?
Is it possible that my custom component is causing this performance issue?
http://dougmccune.com/blog/2007/11/19/flex-coverflow-performance-improvement-flex-carousel-component-and-vertical-coverflow/


anyone had this kind of issue with rendering slow?

sources used already are:
http://livedocs.adobe.com/flex/3/html/help.html?content=modular_5.html

http://livedocs.adobe.com/flex/3/html/help.html?content=modular_6.html



[flexcoders] Re: loading swf's dynamically

2009-04-21 Thread Jason B
Thanks, Tracy's example worked fine for what i need.

Funny you mentioned Cache issue
I was just extracting the project into modules now and ran into cache issue 
where the modules are being cached but not properly updated :( 
Will your link work for modules?

so far i found
http://stackoverflow.com/questions/300757/preventing-flex-application-caching-in-browser-multiple-modules

but its not working, because i get an error on line
var moduleSection:ModuleLoaderSection;

Severity and DescriptionPathResourceLocation
Creation Time   Id
1046: Type was not found or was not a compile-time constant: 
ModuleLoaderSection.   main/srcmain.mxml   line 23 
1240367390690   202994




--- In flexcoders@yahoogroups.com, Rick Winscot  wrote:
>
> Any chance the second load attempt is pulling from cache?
> 
> http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_14743
> 
> Rick Winscot
> 
> 
> On 4/21/09 9:21 AM, "Jason B"  wrote:
> 
> >  
> >   
> > 
> >   
> > 
> > The alert box never shows "loaded second swf" either
> > 
> > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ,
> > "Jason B"  wrote:
> >> >
> >> > That sounds good so far i got this built from your suggestion, but the
> >> second swf never loads/plays now?
> >> > 
> >> > 
> >> > public function init(){
> >> > vfc_guy.autoLoad = false;
> >> > vfc_guy.source = "vfcfaq.swf";
> >> > vfc_guy.addEventListener(Event.COMPLETE, vfc_guy_play);
> >> > }
> >> > 
> >> > 
> >> > 
> >> > public function vfc_guy_play(){
> >> > Alert.show("LOADED second swf");
> >> > vfc_guy.load();
> >> > }
> >> > 
> >> > 
> >> > --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ,
> >> "Kenneth Sutherland"  wrote:
> >>> > >
> >>> > > Why don't you listen for the complete event. The swfloader will fire 
> >>> > > of
> >>> > > the 'complete' event when its loaded.  So you don't try to display it
> >>> > > until it has fully loaded.  At the same time you can listen to the
> >>> > > 'progress' event to see how much has loaded and maybe inform the user
> >>> > > that your app is loading something and give a % loaded message or
> >>> > > similar.
> >>> > > 
> >>> > >
> >> >
> > 
> >   
> > 
> > 
> >>
>




[flexcoders] Re: loading swf's dynamically

2009-04-21 Thread Jason B
The alert box never shows "loaded second swf" either


--- In flexcoders@yahoogroups.com, "Jason B"  wrote:
>
> That sounds good so far i got this built from your suggestion, but the second 
> swf never loads/plays now?
> 
> 
> public function init(){
> vfc_guy.autoLoad = false;
> vfc_guy.source = "vfcfaq.swf";
> vfc_guy.addEventListener(Event.COMPLETE, vfc_guy_play);
> }
>   
>   
>   
> public function vfc_guy_play(){
>   Alert.show("LOADED second swf");
>   vfc_guy.load();
>   }
> 
> 
> --- In flexcoders@yahoogroups.com, "Kenneth Sutherland"  
> wrote:
> >
> > Why don't you listen for the complete event. The swfloader will fire of
> > the 'complete' event when its loaded.  So you don't try to display it
> > until it has fully loaded.  At the same time you can listen to the
> > 'progress' event to see how much has loaded and maybe inform the user
> > that your app is loading something and give a % loaded message or
> > similar.
> > 
> >
>




[flexcoders] Re: loading swf's dynamically

2009-04-21 Thread Jason B
That sounds good so far i got this built from your suggestion, but the second 
swf never loads/plays now?


public function init(){
vfc_guy.autoLoad = false;
vfc_guy.source = "vfcfaq.swf";
vfc_guy.addEventListener(Event.COMPLETE, vfc_guy_play);
}



public function vfc_guy_play(){
Alert.show("LOADED second swf");
vfc_guy.load();
}


--- In flexcoders@yahoogroups.com, "Kenneth Sutherland" 
 wrote:
>
> Why don't you listen for the complete event. The swfloader will fire of
> the 'complete' event when its loaded.  So you don't try to display it
> until it has fully loaded.  At the same time you can listen to the
> 'progress' event to see how much has loaded and maybe inform the user
> that your app is loading something and give a % loaded message or
> similar.
> 
>  




[flexcoders] loading swf's dynamically

2009-04-19 Thread Jason B

I'm using the below to load swf files dynamically, but the user of course must 
download the files fast enough for it to go from the first swf to the next 
without chopping.
Is there a way to preload the items into the application without playing them 
or embeding them ?

my goal is to preload the swf's while the app loads or on initial load then 
play them when ready using an event, any suggestions would be great 






[flexcoders] Re: Hiding/Showing swf in a web app

2009-04-09 Thread Jason B
unless your app uses AJAX preventing the html from reloading the page, your 
options are using a div to hide show flex app or an iframe to reload the html 
pages only

--- In flexcoders@yahoogroups.com, "rondo_smith"  wrote:
>
> Hey,
> 
> I am working on a web app which is a mixture of a typical web app (HTML/JS + 
> Java backend) and a Flex app. Some old features of the existing app are being 
> replaced by new Flex UI. There are scenarios in which the user would go 
> through HTML (old part) then Flex UI (new part) then back to HTML (old part). 
> I am thinking of having the swf file loaded once and then hiding/showing it 
> whenever needed. I would like to avoid reloading it because even though it is 
> cached the client state will be lost.
> Any suggestions how to achieve this behavior are very welcome.
> 
> Thanks,
> Rondo
>




[flexcoders] Re: How to catch Error 302 from RemoteObject?

2009-04-09 Thread Jason B
Why not make a url that checks access without being logged in and it returns 
access control back to flex,
example

localhost/access/checkusercontrol?user_id=3434267

would return the xml 
DENIEDYES

thats how we do it on our app and it works quite well


--- In flexcoders@yahoogroups.com, "Dan"  wrote:
>
> Thanks for the reply Tracy,
> 
> Actually, I am trying to figure out what is the best practice to integrate 
> the SiteMinder and the LCDS. So that when there is multi login decide by the 
> SiteMinder, the flex application can get the noticed. Since currently what we 
> did is the SiteMinder trying to throw a redirection when ever a LCDS called 
> is issued. The RemoteObject catch an exception as channel disconnection, 
> rather than the specific multi login from SiteMinder.
> 
> Dan
> 
> --- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
> >
> > A fault handler?
> > 
> >  
> > 
> > Tracy Spratt,
> > 
> > Lariat Services, development services available
> > 
> >   _  
> > 
> > From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> > Behalf Of Dan
> > Sent: Tuesday, April 07, 2009 3:58 AM
> > To: flexcoders@yahoogroups.com
> > Subject: [flexcoders] How to catch Error 302 from RemoteObject?
> > 
> >  
> > 
> > Hi dear flexpert,
> > 
> > This may be a simple question, but after searching through flex doc and this
> > forum, i still cannot figure out how can I, for instance, catch an session
> > timeout exception from SSO such as Siteminder, when I invoke a RemoteObject
> > call? The Siteminder is set so that it will sent back an temp redirection
> > 302 back when the someone is multilogin or session is expired for the
> > application. Anyone come accross this before??
> > 
> > Many Thanks.
> > 
> > Regards,
> > Dan
> >
>




[flexcoders] reading a simple array dump?

2009-04-06 Thread Jason B
this is my first array dump and i was wondering how to show an item in an alert 
box

I have an httpservice with resultformat to array now how do i alert the first 
name in the list?

Alert.show(myhttpservice.lastResult.DATARESULTS.info.NAME);
Doesn't work 





(mx.collections::ArrayCollection)#0
  filterFunction = (null)
  length = 1
  list = (mx.collections::ArrayList)#1
length = 1
source = (Array)#2
  [0] (Object)#3
DATARESULTS = (Object)#4
  info = (mx.collections::ArrayCollection)#5
filterFunction = (null)
length = 4
list = (mx.collections::ArrayList)#6
  length = 4
  source = (Array)#7
[0] (Object)#8
  NAME = (null)
[1] (Object)#9
  NAME = "Dory, Jason"
[2] (Object)#10
  NAME = "Doe, Jason"
[3] (Object)#11
  NAME = "Daniel, Jason"
  uid = "EA885A5B-71B3-346D-2A21-7BC841863233"
sort = (null)
source = (Array)#7
uid = "C9FAD864-FEE7-6523-6EEF-7BC84187A68B"
  sort = (null)
  source = (Array)#2




[flexcoders] autocomplete difference in array vs httpservice

2009-04-02 Thread Jason B
I've been trying to use this autocomplete

http://examples.adobe.com/flex2/exchange/AutoComplete/CustomizeAutoComplete/CustomizeAutoComplete.html

and i got it working but httpservice loads a [object Object] on load of the 
app, and when i clear that out and start typing it works.

I just want to use an httpservice and avoid the object object on load it should 
just be blank on load.
it works fine with an ARRAY just trouble when i try to use httpservice like 
this 



I've tried to add resultformat to array on httpservice and i get no results.

I also tried to use ArrayUtil.toArray(





[flexcoders] Re: get selected datagrid dynamically

2009-01-12 Thread Jason B
It's funny after i posted i tried that but then it still threw an
error, it wasn't until you posted the same thing i went back and seen
i had a lowercase I in selecteditem instead of selectedItem
:( i need some coffee


--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Bracket notation replaces dot notation, so try:
> 
> create_test.text =
> parentApplication.reftables_grid.selectedItem[fieldname];
> 
>  
> 
> Tracy Spratt 
> Lariat Services 
> 
> Flex development bandwidth available 
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jason B
> Sent: Monday, January 12, 2009 10:00 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: get selected datagrid dynamically
> 
>  
> 
> also tried
> 
> create_test.text =
> parentApplication.reftables_grid.selecteditem.this[fieldname];
>




[flexcoders] Re: Styling Alert box default button

2009-01-12 Thread Jason B
--- In flexcoders@yahoogroups.com, "achegedus"  wrote:
>
> I have a custom styled alert box with two buttons (ok and cancel), I'm
> trying to make the default button look slightly different, but I can't
> figure out how to do this.  Does anyone know?  The default style can
> achieve this.
>

have you looked at 
http://mfolio.wordpress.com/2008/06/07/flex-custom-popup-and-alert-box/




[flexcoders] Re: get selected datagrid dynamically

2009-01-12 Thread Jason B
also tried

create_test.text =
parentApplication.reftables_grid.selecteditem.this[fieldname];



[flexcoders] get selected datagrid dynamically

2009-01-12 Thread Jason B
Im trying to get the selected item value from the parent app but i
cannot seem to put the name as a variable?

var fieldname:String = columnData.field;

create_text = new TextInput();
 create_text.percentWidth = 80;
 create_text.id = "inputtext" + counter;

//***THIS LINE IS THE ISSUE
create_test.text =
parentApplication.reftables_grid.selecteditem.[fieldname];

I can alert the fieldname fine showing the data grid's field name but
i need to use it as a variable to get the selected items value from
the grid



[flexcoders] Re: looping xml structure

2009-01-08 Thread Jason B
Nevermind this works

var tmp:String = xmlitems;
if(tmp.indexOf("NOT PRESENT") > -1)
trace("FOUND ITEM AT " + xmlitems);




--- In flexcoders@yahoogroups.com, "Jason B"  wrote:
>
> I've so far got an xmlcollection
> 
> using this code shows the xml code
> 
> for each (var xmlitems in xmlcollection_data)
>{
>   trace(xmlitems);
>}
> 
> but i'd like to know how to loop the collection and search for strings
> etc.. any link to an example would be fine too, my googling for 
> "for loop xmllistcollection"
> "loop xmllistcollection"
> and many others turned sour
>




[flexcoders] looping xml structure

2009-01-08 Thread Jason B
I've so far got an xmlcollection

using this code shows the xml code

for each (var xmlitems in xmlcollection_data)
 {
trace(xmlitems);
 }

but i'd like to know how to loop the collection and search for strings
etc.. any link to an example would be fine too, my googling for 
"for loop xmllistcollection"
"loop xmllistcollection"
and many others turned sour



[flexcoders] Re: Slow datagrid updates

2009-01-07 Thread Jason B
I want to say thanks again for your help all is working 

Do you have a recommended Flex 3 book?

--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> It is a letter "case" error.  Check the spelling on that line.
> 
> Tracy
> 



[flexcoders] Re: Slow datagrid updates

2009-01-07 Thread Jason B
hmm im getting errors in the IDE on this line
>> searchmcrefundDataProvider = new XMLListcollection(xlResult);
 
1180: Call to a possibly undefined method XMLListcollection.


code im using is
==


import mx.collections.XMLListCollection;

[Bindable]
public var searchmcrefundDataProvider:XMLListCollection;



private function searchrefundstickersResult(event:ResultEvent){
var xmlResult = XML(event.result);
 
var xlResult = xmlResult.children();  //or other e4x 
expression
searchmcrefundDataProvider = new 
XMLListcollection(xlResult);
   
   



}




--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Ok, setItemAt() is a method of *collections*, it is not a method of XML
> or XMLlist.  Hence that error.
> 
>  
> 
> In this case the best thing to do is wrap your remote call result in
> XMLListcollection.  Decalre a bindable instance var typed as
> XMLListcolleetciton, and bind the DG to that.  In the result handler, do
> something like:
> 
> private function resultHandler(event:ResultEvent):void
> 
>  var xmlResult = XML(event.result);
> 
>  var xlResult = xmlResult.children();  //or other e4x expression
> 
>  _xlcDataProvider = new XMLListcollection(xlResult);
> 
>  
> 
>  
> 
> Now you can use _xlcDataProvider.setItemAt();
> 
>  
> 
> Tracy
> 
> ____
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jason B
> Sent: Wednesday, January 07, 2009 10:31 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Slow datagrid updates
> 
>  
> 
> Sorry Don't give up I might of missed what you meant
> 
> > "1010"? What the heck is that?
> 
> An actionscript error has occured:
> TypeError: Error #1010 A term is undefined and has no properties.
> at line 69
> 
> At that line is where it uses setItem
> 
> > What is the data type of the DG dataProvider? 
> I'm using XML datatype 
> 
> hope this helps
>




[flexcoders] Re: Slow datagrid updates

2009-01-07 Thread Jason B
Sorry Don't give up I might of missed what you meant


> "1010"? What the heck is that?

An actionscript error has occured:
TypeError: Error #1010 A term is undefined and has no properties.
at line 69

At that line is where it uses setItem

  

> What is the data type of the DG dataProvider?  
I'm using XML datatype 

hope this helps



[flexcoders] Re: Slow datagrid updates

2009-01-06 Thread Jason B
var oSelectedItem:Object = mccert_refund_grid.selectedItem;
oSelectedItem.CERTPRESENT = "NOT PRESENT";
var iIndex:int = mccert_refund_grid.selectedIndex;
search_cert_refund_dataprovider.lastResult.DATARESULTS.setItemAt(oSelectedItem,iIndex);




{refund_number.text}




Its an error 1010




--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Then answer the questions in my previous post.
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jason B
> Sent: Tuesday, January 06, 2009 9:49 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Slow datagrid updates
> 
>  
> 
> 
> No using httpservice throws an error but your example with an array is
> working, how can i get this to work with httpservice?
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Tracy Spratt"  wrote:
> >
> > So you have everything working as you wish now?
> > 
> > Tracy
> > 
> > 
> >
>




[flexcoders] Re: Slow datagrid updates

2009-01-06 Thread Jason B

No using httpservice throws an error but your example with an array is
working, how can i get this to work with httpservice?


--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> So you have everything working as you wish now?
> 
> Tracy
> 
>  
> 





[flexcoders] Re: Slow datagrid updates

2009-01-05 Thread Jason B
> "...im only changing the data in the grid..." No, you are not.  You are
> changing the data in the dataProvider.   

Yes correct i am changing the DG dataprovider is what i meant, im
using an httpservice dataprovider, let me know if this helps




--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> The source of the data is irrelevant.  setItemAt() is a method of the
> *collection*, and can be used with any collection.
> 
>  
> 
> What is the data type of the DG dataProvider?  What error are you
> getting?
> 
>  
> 
> "...im only changing the data in the grid..." No, you are not.  You are
> changing the data in the dataProvider.   When you loop to build your
> server update data, you will be working with the dataProvider.
> 
>  
> 
> Tracy
> 
>  
> 
> ____
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jason B
> Sent: Monday, January 05, 2009 4:39 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: Slow datagrid updates
> 
>  
> 
> Thanks 
> To show the example i used an Array collection but in reality im using
> httpservice populating the grid.
> So would setItemAt() still work 
> 
> your code works perfect for Array example but i get an error on 
> setting the httpservice dataprovider
> search_cert_refund_dataprovider.setItemAt(oSelectedItem,iIndex);
> 
> remember im only changing the data in the grid so i can later loop it
> to post back to my code.
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Tracy Spratt"  wrote:
> >
> > It is not taking a long time to display, it will never display.
> > 
> > 
> > 
> > The problem is with the way you are updating the dataProvider.
> Directly
> > setting a property on an item does not dispatch the necessary events
> to
> > cause the DG to update. The two ways to do this are, 1, use the
> > collection API, which in this casw would be setItemAt() or 2, call
> > itemUpdated(). 
> > 
> > 
> > 
> > Here is an example of the first:
> > 
> > var oSelectedItem:Object = mc_searchrefund_grid.selectedItem;
> > 
> > oSelectedItem.DATA2 = "NOT PRESENT";
> > 
> > var iIndex:int = mc_searchrefund_grid.selectedIndex;
> > 
> > testdata.setItemAt(oSelectedItem,iIndex);
> > 
> > 
> > 
> > Here is an example of the latter:
> > 
> > ...
> > 
> > mc_searchrefund_grid.selectedItem.DATA2 = "NOT PRESENT";
> > 
> > testdata.itemUpdated(mc_searchrefund_grid.selectedItem,"DATA2");
> > 
> > 
> > 
> > Tracy
> >
>




[flexcoders] Re: Slow datagrid updates

2009-01-05 Thread Jason B
Thanks 
To show the example i used an Array collection but in reality im using
httpservice populating the grid.
So would setItemAt() still work 

your code works perfect for Array example but i get an error on 
setting the httpservice dataprovider
search_cert_refund_dataprovider.setItemAt(oSelectedItem,iIndex);

remember im only changing the data in the grid so i can later loop it
to post back to my code.



--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> It is not taking a long time to display, it will never display.
> 
>  
> 
> The problem is with the way you are updating the dataProvider.  Directly
> setting a property on an item does not dispatch the necessary events to
> cause the DG to update.  The two ways to do this are, 1, use the
> collection API, which in this casw would be setItemAt() or 2, call
> itemUpdated().  
> 
>  
> 
> Here is an example of the first:
> 
> var oSelectedItem:Object = mc_searchrefund_grid.selectedItem;
> 
> oSelectedItem.DATA2 = "NOT PRESENT";
> 
> var iIndex:int = mc_searchrefund_grid.selectedIndex;
> 
> testdata.setItemAt(oSelectedItem,iIndex);
> 
>  
> 
> Here is an example of the latter:
> 
> ...
> 
> mc_searchrefund_grid.selectedItem.DATA2 = "NOT PRESENT";
> 
> testdata.itemUpdated(mc_searchrefund_grid.selectedItem,"DATA2");
> 
>  
> 
> Tracy
> 



[flexcoders] Re: Slow datagrid updates

2009-01-05 Thread Jason B
Heres my example code on the issues im having
excuse the pasting mess :(


http://www.adobe.com/2006/mxml";
layout="absolute" backgroundColor="#FF">




 

Test1
PRESENT



Test2
PRESENT
























[flexcoders] Re: Slow datagrid updates

2009-01-05 Thread Jason B
Thanks for your reply Tracy, no i currently am not using renders in
the grid just a simple two column grid which has a value changed upon 
button click and I'm not using Vbox just absolute layout.

the reason i dont care about undo is that the user can
change the value back by just clicking the button again.

i dont see anything that might throw off the grid but i'm going to try
to just put the grid into its own canvas and test it with only a few
items instead of this entire application.



--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> That is not normal behavior.  Typically such updates happen nearly
> instantly.
> 
>  
> 
> First, are you using custom itemRenderers?  If so, how many are visible
> at any one time?  Are they optimized for performance, or are they based
> on a container, like Vbox?
> 
>  
> 
> Next, you understand that when you do:
> 
> mccert_refund_grid.selectedItem.CERTPRESENT = "NOT PRESENT";
> 
> you ARE updating the dataProvider?  selectedItem is a reference to a
> dataProvider item.
> 
>  
> 
> If you want to be able to provide an "undo" capability, you will need to
> make a copy of the data before allowing the user to modify it.
> 
>  
> 
> Debug to find out where the speed bottleneck happens.  Simplify the
> conditions until the problem goes away, then re-apply functionality
> until the problem returns.
> 
>  
> 
> Tracy
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jason B
> Sent: Monday, January 05, 2009 10:26 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Slow datagrid updates
> 
>  
> 
> I'm using a datagrid with httpservice then allowing the user to click
> on an item in the datagrid.
> 
> once they select the datagrid item they then hit a button which
> updates the value in the grid like this, 
> mccert_refund_grid.selectedItem.CERTPRESENT = "NOT PRESENT";
> 
> trouble is the datagrid takes almost 20-30 seconds to update it i
> kinda need this to happen instantly since its all locally cached it
> should be fast.
> 
> i looked into datagrid refresh but my understanding is that is for the
> dataprovider, and im not trying to refresh the data that would over
> right their changes they made. when all is said and done they will be
> able to hit another button to save results back to the database.
> 
> so how come this is taking so long to change values?
>




[flexcoders] Re: Slow datagrid updates not commiting right away

2009-01-05 Thread Jason B
I was looking into the commit properties to see if this would help but
it seems that the datagrid has its own timer to update the commit?
anyway to force this


--- In flexcoders@yahoogroups.com, "Jason B"  wrote:
>
> I'm using a datagrid with httpservice then allowing the user to click
> on an item in the datagrid.
> 
> once they select the datagrid item they then hit a button which
> updates the value in the grid like this, 
> mccert_refund_grid.selectedItem.CERTPRESENT = "NOT PRESENT";
> 
> trouble is the datagrid takes almost 20-30 seconds to update it i
> kinda need this to happen instantly since its all locally cached it
> should be fast.
> 
> i looked into datagrid refresh but my understanding is that is for the
> dataprovider, and im not trying to refresh the data that would over
> right their changes they made. when all is said and done they will be
> able to hit another button to save results back to the database.
> 
> so how come this is taking so long to change values?
>




[flexcoders] Re: geting info of a user who has loged in

2009-01-05 Thread Jason B
yes just pass the info back to the httpservice 
maybe this example will help you 
http://blog.flexexamples.com/2007/10/29/passing-parameters-to-an-httpservice/

you call the httpservice upon login button clicked
login.send();

and then the httpservice provider passes the login to your backend code





{name.text}

 
{password.text}















John Doe";

?>



--- In flexcoders@yahoogroups.com, "johndoematrix" 
wrote:
>
> the example shown there using the datagrid's selecteditem to populate
> the textinputs. is there a way of populating them without the need of
> a datagrid, combobox or list based selected item? like when i sign in
> i can view my profile based on my userid and username used to signin.
> thanks
>




[flexcoders] Re: error in HTTPService

2009-01-05 Thread Jason B
Another option is to bypass flex and use the url directly in the
browser or a simple script to post to the url with the xml data to
find out details on whats being returned to flex and if its valid XML


--- In flexcoders@yahoogroups.com, "Tracy Spratt"  wrote:
>
> Also, a declaratively created request object is very difficult to debug.
> I suggest you build that XML in an as function, then trace it out and
> verify it is valid as a whole.  I suspect that you have invalid xml the
> second time.
> 
>  
> 
> Using a utility will also let you do this, but simply tracing the XML
> might be simpler.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On
> Behalf Of Jason B
> Sent: Monday, January 05, 2009 10:56 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: error in HTTPService
> 
>  
> 
> show us your result="handleSimUpdateResult(event)" function
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "weezee49"  wrote:
> >
> > I have the following HTTPService:
> > 
> >  > contentType="application/xml" 
> > url="http://localhost:3000/simulations/
> <http://localhost:3000/simulations/> 
> > {userModelsCB.selectedItem.id}?_method=put"
> > resultFormat="e4x" 
> > method="POST" 
> > result="handleSimUpdateResult(event)">
> > 
> > 
> > 
> > {runControlBox.simNameTI.text}
> > {runControlBox.descTI.text}
> > {runControlBox.runLengthTI.text}
> > {getTimeUnits
> > (runControlBox.timeUnitsCB.selectedIndex)}
> > 
> > 
> > {_selectedSim.id}
> > Arrival1
> > {getDistName
> > (loadBox.loadDistCB.selectedIndex)}
> > {loadBox.loadParam1TI.text}
> > {loadBox.loadParam2TI.text}
> > {loadBox.loadParam3TI.text}
> > {getTimeUnits
> > (loadBox.timeUnitsCB.selectedIndex)}
> > 
> > 
> > Server1
> > {_selectedSim.id}
> > {rscBox.capacityTI.text}
> > {getDistName
> > (rscBox.distributionCB.selectedIndex)}
> > {rscBox.distParam1TI.text}
> > {rscBox.distParam2TI.text}
> > {rscBox.distParam3TI.text}
> > {getTimeUnits
> > (rscBox.timeUnitsCB.selectedIndex)}
> > 
> > 
> > Queue1
> > {_selectedSim.id}
> > {queueBox.capacityTI.text}
> > 
> > 
> > 
> > 
> > 
> > This service works perfectly the first time - my data base is 
> > updated correctly and everything is fine. However, if I try to run 
> > the service again, I get a "Thread suspended" with an error that 
> > starts out like this:
> > 
> > undefined
> > at flash.xml::XMLNode()
> > at flash.xml::XMLDocument/createElement()
> > at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> > [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> > .as:133]
> > at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> > [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> > .as:146]
> > at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> > [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> > .as:146]
> > at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> > [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> > .as:146]
> > ... 
> > 
> > I have verified that the fields used in the  have the 
> > correct data in them just before the send() call.
> > 
> > Why does the service work okay the first time but then die the 2nd 
> > time?
> > 
> > Thanks,
> > LG Rains
> >
>




[flexcoders] Re: error in HTTPService

2009-01-05 Thread Jason B
show us your result="handleSimUpdateResult(event)" function



--- In flexcoders@yahoogroups.com, "weezee49"  wrote:
>
> I have the following HTTPService:
> 
>  contentType="application/xml" 
> url="http://localhost:3000/simulations/
> {userModelsCB.selectedItem.id}?_method=put"
> resultFormat="e4x" 
> method="POST" 
> result="handleSimUpdateResult(event)">
> 
> 
> 
> {runControlBox.simNameTI.text}
> {runControlBox.descTI.text}
> {runControlBox.runLengthTI.text}
> {getTimeUnits
> (runControlBox.timeUnitsCB.selectedIndex)}
> 
> 
> {_selectedSim.id}
> Arrival1
> {getDistName
> (loadBox.loadDistCB.selectedIndex)}
> {loadBox.loadParam1TI.text}
> {loadBox.loadParam2TI.text}
> {loadBox.loadParam3TI.text}
> {getTimeUnits
> (loadBox.timeUnitsCB.selectedIndex)}
> 
> 
> Server1
> {_selectedSim.id}
> {rscBox.capacityTI.text}
> {getDistName
> (rscBox.distributionCB.selectedIndex)}
> {rscBox.distParam1TI.text}
> {rscBox.distParam2TI.text}
> {rscBox.distParam3TI.text}
> {getTimeUnits
> (rscBox.timeUnitsCB.selectedIndex)}
> 
> 
> Queue1
> {_selectedSim.id}
> {queueBox.capacityTI.text}
> 
> 
> 
> 
> 
> This service works perfectly the first time - my data base is 
> updated correctly and everything is fine.  However, if I try to run 
> the service again, I get a "Thread suspended" with an error that 
> starts out like this:
> 
> undefined
>   at flash.xml::XMLNode()
>   at flash.xml::XMLDocument/createElement()
>   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> .as:133]
>   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> .as:146]
>   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> .as:146]
>   at mx.rpc.xml::SimpleXMLEncoder/encodeValue()
> [E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SimpleXMLEncoder
> .as:146]
> ...   
> 
> I have verified that the fields used in the  have the 
> correct data in them just before the send() call.
> 
> Why does the service work okay the first time but then die the 2nd 
> time?
> 
> Thanks,
> LG Rains
>




[flexcoders] Re: geting info of a user who has loged in

2009-01-05 Thread Jason B
http://livedocs.adobe.com/flex/3/html/help.html?content=data_access_2.html





[flexcoders] Slow datagrid updates

2009-01-05 Thread Jason B
I'm using a datagrid with httpservice then allowing the user to click
on an item in the datagrid.

once they select the datagrid item they then hit a button which
updates the value in the grid like this, 
mccert_refund_grid.selectedItem.CERTPRESENT = "NOT PRESENT";

trouble is the datagrid takes almost 20-30 seconds to update it i
kinda need this to happen instantly since its all locally cached it
should be fast.

i looked into datagrid refresh but my understanding is that is for the
dataprovider, and im not trying to refresh the data that would over
right their changes they made. when all is said and done they will be
able to hit another button to save results back to the database.

so how come this is taking so long to change values?



[flexcoders] Re: geting info of a user who has loged in

2009-01-05 Thread Jason B
You'll need an httpservice to get info to and from your backend language


--- In flexcoders@yahoogroups.com, "johndoematrix" 
wrote:
>
> hi guys, i have a database with user info like username, password,
> firstname, lastname, email and so on... so i created a flex login such
> that a user is prompted to login and if login is successful he/she is
> shown a page with their details from database.. how can i do that..
> the login works but i would like to pull the info of the user who
> logged in from the database and show it to them. thanks
>




[flexcoders] loading two swf's based on either timer or knowing if its done playing

2008-12-30 Thread Jason B
example 

user logs in and main.swf loads   apptest.html?user=amanda

init script loads first swf which plays the the url requested
amanda.swf file and says "welcome amanda"

then once that plays it loads the second swf which says "please use
the control panel to handle ..." etc..

the second SWF is a flash object which has a virtual character and the
sound is in sync with the users mouth.
the first swf only plays sound

i've been successful in getting it compile loading the swf with no
errors but using either SWF loader or other items does not play the
audio on the first object nor loads the second swf display?

has anyone experience on what i might be doing wrong on this 




[flexcoders] Re: radio button is chosen when passing it through httpsservice

2008-12-19 Thread Jason B
nevermind looks like it was caching my old verison :(
its working now



[flexcoders] Re: radio button is chosen when passing it through httpsservice

2008-12-19 Thread Jason B
I tried selected Value but it passes null


--- In flexcoders@yahoogroups.com, Maciek Sakrejda  wrote:
>
>
http://livedocs.adobe.com/flex/3/langref/mx/controls/RadioButtonGroup.html#selectedValue
> 
> 
> -Original Message-
> From: Jason B 
> Reply-To: flexcoders@yahoogroups.com
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] radio button is chosen when passing it through
> httpsservice
> Date: Fri, 19 Dec 2008 16:55:38 -
> 
> I was wondering if theres a way to pass which radio button is chosen
> when passing it through httpsservice, currently i have to specify an
> ID for each button then pass that but I'd like to handle one parameter
> being passed.
> 
> 
> 
> 
> {rmvpaymentdate.text}
> 
> 
> {rmvpayments_searchtype_group.??}
> 
> 
> 
> 
> 
> 
>  groupName="rmvpayments_searchtype"/>
>  groupName="rmvpayments_searchtype"/>
>  groupName="rmvpayments_searchtype" selected="true"/>
>




[flexcoders] radio button is chosen when passing it through httpsservice

2008-12-19 Thread Jason B
I was wondering if theres a way to pass which radio button is chosen
when passing it through httpsservice, currently i have to specify an
ID for each button then pass that but I'd like to handle one parameter
being passed.






{rmvpaymentdate.text}


{rmvpayments_searchtype_group.??}















[flexcoders] clear request parameters httpservice

2008-09-25 Thread Jason B
is there a way to clear an httpservice?

im defining items as

tabpermissions = new httpservice();
tabpermissions.request.test;
tabpermissions.send();


tabpermissions = new httpservice();
tabpermissions.request.test2;
tabpermissions.send();



now i keep adding new requests dynamically but i dont want to send
test since i already sent it until the event is chosen.
how do i clear request area ?

example i want to post only the items i need ?




[flexcoders] Re: Httpservice request clear

2008-09-25 Thread Jason B
sorry not sure how i wrote that subject line?


--- In flexcoders@yahoogroups.com, "Jason B" <[EMAIL PROTECTED]> wrote:
>
> is there a way to clear an httpservice?
> 
> im defining items as 
> 
> tabpermissions.request.tabnav_announcements =
> tabnav_announcements.selectedIndex;   
> tabpermissions.send(); 
> 
> 
> now i keep adding new requests how the heck do i clear all items in
> the request area ?
>




[flexcoders] Tab Events

2008-09-25 Thread Jason B
is there a way to clear an httpservice?

im defining items as 

tabpermissions.request.tabnav_announcements =
tabnav_announcements.selectedIndex; tabpermissions.send(); 


now i keep adding new requests how the heck do i clear all items in
the request area ?



[flexcoders] Re: flex showing always the same SWF

2008-09-24 Thread Jason B
Also I've seen this and found that i had to delete the project NOT THE
CONTENTS just the project in eclipse and re-add it, I've found several
blogs on the internet pertaining to this too, although it doesnt
happen often it can happen.

if browser cache clear and rebuilding project doesnt work that is.



--- In flexcoders@yahoogroups.com, "Ryan Gravener" <[EMAIL PROTECTED]> wrote:
>
> When that happens to me, I either have some compile errors, or its
cached in
> the browser.  So I delete cache and clean the project.
> 
> On Wed, Sep 24, 2008 at 12:33 PM, BENABDALLAH Abdelaziz <
> [EMAIL PROTECTED]> wrote:
> 
> >   eash time I hit run in flex builder, I get an old version of my
> > project, nothing seems to work except renaming the project,
> > I reinstalled flex builder and it worked fine, but recently the same
> > problem came again.
> > what is the deal with it and how can I fix this problem ?
> > thanks
> >
> >  
> >
> 
> 
> 
> -- 
> Ryan Gravener
> http://twitter.com/ryangravener
>




[flexcoders] dynamic variable reference getting error 1084

2008-09-24 Thread Jason B


var tmp:String = "tabnav1";

[tmp].selectedIndex = 0;


Im trying to use a string to reference an item but the compiler wont
allow the brackets, i remember Tracy telling me to reference a dynamic
variable use brackets? 

my compiler says

error 1084: Syntax error: expecting identifier before dot.

but im sure this is correct 



[flexcoders] Re: Tab Navigator

2008-09-15 Thread Jason B
I guess your either stating it can't be done what im asking or you
maybe you didn't see what i wrote i already know what you wrote?

Either way let me try and explain what im doing, I wont know the
canvas name since and explaining why is beyond the scope of this
question, so i know the tabnav's index number and would like to
disable the tabnav based on that?



--- In flexcoders@yahoogroups.com, "Willy Ci" <[EMAIL PROTECTED]> wrote:
>
>
>   
>   
>   
>   
>enabled="false">
>   
>
> 
> 
> 
> Willy
> 617-606-3437
> --
> 6 X 9 = 42
> 
> Q: How do you spell "google"?
> A: Why don't you google it?
> ------
> 
> 
> 
> On Mon, Sep 15, 2008 at 9:09 AM, Jason B <[EMAIL PROTECTED]> wrote:
> > Is it possible to disable a tab inside a tab navigator?
> >
> > I know i can put it in a canvas or panel etc and do it that way but my
> > question is it possible to disable tabs inside a tab nav, I would like
> > to do this if possible.
> >
> >
>




[flexcoders] Tab Navigator

2008-09-15 Thread Jason B
Is it possible to disable a tab inside a tab navigator?

I know i can put it in a canvas or panel etc and do it that way but my
question is it possible to disable tabs inside a tab nav, I would like
to do this if possible.




[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-21 Thread Jason B
Yes i tried that and while it loops it doesnt give KEY what i need

example

for (var key:String in dynamicallyCreatedComponents){

   var t:TextInput = dynamicallyCreatedComponents[key] as TextInput;
   Alert.show(t.text); //produces error
}



--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> If you want to loop over the keys (the names of the components), you
> need a for-in loop:
> 
>  
> 
> for (var key:String in dynamicallyCreatedComponents)
> 
>  
> 
> A for-each-in loop loops over the values (the references to the
> componetns).
> 
>  
> 
> There is no such thing as a for-each-as loop as you've written below.
> 
>  
> 
> Gordon Smith
> 
> Adobe Flex SDK Team
> 
>  
> 
> ____
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason B
> Sent: Wednesday, August 20, 2008 11:09 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: getChildByName using it to get the value of a
> textbox
> 
>  
> 
> Can i loop through the items in that object 
> 
> example
> 
> for each(var items:String as dynamicallyCreatedComponents){
> var t:TextInput = dynamicallyCreatedComponents[items] as TextInput;
> Alert.show(t.text); //THROWS ERROR
> 
> }
> 
> I was hoping to set the array key dynamically and loop through it later?
> can this be done Gordan
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Gordon Smith"  wrote:
> >
> > Declare an instance variable of type Object or Dictionary for storing
> > named references to dynamically created components:
> > 
> > 
> > 
> > public var dynamicallyCreatedComponents:Object = {};
> > 
> > 
> > 
> > In a method where you create a component at runtime, do
> > 
> > 
> > 
> > var b:Button = new Button();
> > 
> > b.label = "OK";
> > 
> > dynamicallyCreatedComponents["okButton"] = b;
> > 
> > 
> > 
> > Later you can access this button as follows:
> > 
> > 
> > 
> > dynamicallyCreatedComponents["okButton"]
> > 
> > 
> > 
> > Gordon Smith
> > 
> > Adobe Flex SDK Team
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of Jason B
> > Sent: Tuesday, August 19, 2008 7:38 AM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Re: getChildByName using it to get the value of
> a
> > textbox
> > 
> > 
> > 
> > thanks Tracy could you provide an example of how this is done,
> > examples always help others out, or tell me what i should be searching
> > for to find an example
> > 
> > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > , "Tracy Spratt"  wrote:
> > >
> > > A good solution to that issue is to maintian a structure of
> references
> > > pointing to each dynamically created component.
> > > 
> > > 
> > > 
> > > I personally like an Associative Array/Object/Hashtable. This is way
> > > more positive than attempting to loop through the DOM.
> > > 
> > > 
> > > 
> > > There will be plenty examples available.
> > > 
> > > 
> > > 
> > > Tracy
> > > 
> > > 
> > > 
> > > 
> > > 
> > > From: flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > ] On
> > > Behalf Of Jason B
> > > Sent: Monday, August 18, 2008 5:47 PM
> > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com> 
> > > Subject: [flexcoders] Re: getChildByName using it to get the value
> of
> > a
> > > textbox
> > > 
> > > 
> > > 
> > > Because the items are not in MXML its in actionscript which
> > > dynamically creates the items for my form from a database and i want
> > > to dynamically loop the text 

[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-20 Thread Jason B
Can i loop through the items in that object 

example

for each(var items:String as dynamicallyCreatedComponents){
 var t:TextInput = dynamicallyCreatedComponents[items] as TextInput;
 Alert.show(t.text); //THROWS ERROR

}

I was hoping to set the array key dynamically and loop through it later?
can this be done Gordan


--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> Declare an instance variable of type Object or Dictionary for storing
> named references to dynamically created components:
> 
>  
> 
> public var dynamicallyCreatedComponents:Object = {};
> 
>  
> 
> In a method where you create a component at runtime, do
> 
>  
> 
> var b:Button = new Button();
> 
> b.label = "OK";
> 
> dynamicallyCreatedComponents["okButton"] = b;
> 
>  
> 
> Later you can access this button as follows:
> 
>  
> 
> dynamicallyCreatedComponents["okButton"]
> 
>  
> 
> Gordon Smith
> 
> Adobe Flex SDK Team
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason B
> Sent: Tuesday, August 19, 2008 7:38 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: getChildByName using it to get the value of a
> textbox
> 
>  
> 
> thanks Tracy could you provide an example of how this is done,
> examples always help others out, or tell me what i should be searching
> for to find an example
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Tracy Spratt"  wrote:
> >
> > A good solution to that issue is to maintian a structure of references
> > pointing to each dynamically created component.
> > 
> > 
> > 
> > I personally like an Associative Array/Object/Hashtable. This is way
> > more positive than attempting to loop through the DOM.
> > 
> > 
> > 
> > There will be plenty examples available.
> > 
> > 
> > 
> > Tracy
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of Jason B
> > Sent: Monday, August 18, 2008 5:47 PM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] Re: getChildByName using it to get the value of
> a
> > textbox
> > 
> > 
> > 
> > Because the items are not in MXML its in actionscript which
> > dynamically creates the items for my form from a database and i want
> > to dynamically loop the text box's so i can then save the data back to
> > the database.
> > you cant refer to a ID since the components are created at runtime
> > 
> > --- In flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > , "Gordon Smith"  wrote:
> > >
> > > Why are you trying to use getChildByName to get a reference to a
> > > component? If you give it an 'id' attribute in MXML, you can then
> > refer
> > > to it by that id.
> > > 
> > > 
> > > 
> > > Gordon Smith
> > > 
> > > Adobe Flex SDK Team
> > > 
> > > 
> > > 
> > > 
> > > 
> > > From: flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > [mailto:flexcoders@yahoogroups.com
> <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com>
> > ] On
> > > Behalf Of Jason B
> > > Sent: Monday, August 18, 2008 8:07 AM
> > > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> <mailto:flexcoders%40yahoogroups.com> 
> > > Subject: [flexcoders] getChildByName using it to get the value of a
> > > textbox
> > > 
> > > 
> > > 
> > > when using getchildbyname variable i've not been able to get the
> value
> > > can someone please post an example of how to get a value using
> > > getChildByName.
> > > 
> > > var test:DisplayObject = this.getChildByName("inputtext" + i);
> > >
> >
>




[flexcoders] SOLVED Re: getChildByName using it to get the value of a textbox

2008-08-19 Thread Jason B
Nevermind Got it working Thanks


--- In flexcoders@yahoogroups.com, "Jason B" <[EMAIL PROTECTED]> wrote:
>
> is this what you mean i've tried to access but i still get a #1009 error
> 
> 
> public var dynamicallyCreatedComponents:Object = {};
> 
> 
>public function loaditems(){
>   
> create_text = new TextInput();
> create_text.percentWidth = 100;
> create_text.id = "test";
> create_text.text =create_text.id;
>   dynamicallyCreatedComponents["test"] = create_text; 
> dataBox.addChild(create_text);  
> 
>   }
> 
>public function saveall(){
>   
>  var t:TextInput = dynamicallyCreatedComponents["test"];
>   try{
>   Alert.show( 
> dynamicallyCreatedComponents["test"].text);
>   }catch(errObject:Error){
>   Alert.show(errObject.message);
>   }   
> 
> 
> 
> 
>   }
> 
> 
> --- In flexcoders@yahoogroups.com, "Gordon Smith"  wrote:
> >
> > Declare an instance variable of type Object or Dictionary for storing
> > named references to dynamically created components:
> > 
> >  
> > 
> > public var dynamicallyCreatedComponents:Object = {};
> > 
> >  
> > 
> > In a method where you create a component at runtime, do
> > 
> >  
> > 
> > var b:Button = new Button();
> > 
> > b.label = "OK";
> > 
> > dynamicallyCreatedComponents["okButton"] = b;
> > 
> >  
> > 
> > Later you can access this button as follows:
> > 
> >  
> > 
> > dynamicallyCreatedComponents["okButton"]
> > 
> >  
> > 
> > Gordon Smith
> > 
> > Adobe Flex SDK Team
> > 
> >
>




[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-19 Thread Jason B
is this what you mean i've tried to access but i still get a #1009 error


public var dynamicallyCreatedComponents:Object = {};


   public function loaditems(){

create_text = new TextInput();
create_text.percentWidth = 100;
create_text.id = "test";
create_text.text =create_text.id;
  dynamicallyCreatedComponents["test"] = create_text; 
dataBox.addChild(create_text);  

  }

   public function saveall(){

 var t:TextInput = dynamicallyCreatedComponents["test"];
try{
Alert.show( 
dynamicallyCreatedComponents["test"].text);
}catch(errObject:Error){
Alert.show(errObject.message);
}   




  }


--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> Declare an instance variable of type Object or Dictionary for storing
> named references to dynamically created components:
> 
>  
> 
> public var dynamicallyCreatedComponents:Object = {};
> 
>  
> 
> In a method where you create a component at runtime, do
> 
>  
> 
> var b:Button = new Button();
> 
> b.label = "OK";
> 
> dynamicallyCreatedComponents["okButton"] = b;
> 
>  
> 
> Later you can access this button as follows:
> 
>  
> 
> dynamicallyCreatedComponents["okButton"]
> 
>  
> 
> Gordon Smith
> 
> Adobe Flex SDK Team
> 
>  



[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-19 Thread Jason B
thanks Tracy could you provide an example of how this is done,
examples always help others out, or tell me what i should be searching
for to find an example




--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> A good solution to that issue is to maintian a structure of references
> pointing to each dynamically created component.
> 
>  
> 
> I personally like an Associative Array/Object/Hashtable.  This is way
> more positive than attempting to loop through the DOM.
> 
>  
> 
> There will be plenty examples available.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason B
> Sent: Monday, August 18, 2008 5:47 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] Re: getChildByName using it to get the value of a
> textbox
> 
>  
> 
> Because the items are not in MXML its in actionscript which
> dynamically creates the items for my form from a database and i want
> to dynamically loop the text box's so i can then save the data back to
> the database.
> you cant refer to a ID since the components are created at runtime
> 
> --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> , "Gordon Smith"  wrote:
> >
> > Why are you trying to use getChildByName to get a reference to a
> > component? If you give it an 'id' attribute in MXML, you can then
> refer
> > to it by that id.
> > 
> > 
> > 
> > Gordon Smith
> > 
> > Adobe Flex SDK Team
> > 
> > 
> > 
> > 
> > 
> > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com>
> ] On
> > Behalf Of Jason B
> > Sent: Monday, August 18, 2008 8:07 AM
> > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> 
> > Subject: [flexcoders] getChildByName using it to get the value of a
> > textbox
> > 
> > 
> > 
> > when using getchildbyname variable i've not been able to get the value
> > can someone please post an example of how to get a value using
> > getChildByName.
> > 
> > var test:DisplayObject = this.getChildByName("inputtext" + i);
> >
>




[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Jason B
Because the items are not in MXML its in actionscript which
dynamically creates the items for my form from a database and i want
to dynamically loop the text box's so i can then save the data back to
the database.
you cant refer to a ID since the components are created at runtime



--- In flexcoders@yahoogroups.com, "Gordon Smith" <[EMAIL PROTECTED]> wrote:
>
> Why are you trying to use getChildByName to get a reference to a
> component? If you give it an 'id' attribute in MXML, you can then refer
> to it by that id.
> 
>  
> 
> Gordon Smith
> 
> Adobe Flex SDK Team
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason B
> Sent: Monday, August 18, 2008 8:07 AM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] getChildByName using it to get the value of a
> textbox
> 
>  
> 
> when using getchildbyname variable i've not been able to get the value
> can someone please post an example of how to get a value using
> getChildByName.
> 
> var test:DisplayObject = this.getChildByName("inputtext" + i);
>




[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Jason B

Yes your code works since its not dynamically building the form but what
happens if you try this code...it gets an error like i do


http://www.adobe.com/2006/mxml";
layout="vertical" horizontalAlign="left" creationComplete="loaditem()" >













--- In flexcoders@yahoogroups.com, Nik Derewianka <[EMAIL PROTECTED]> wrote:
>
> That #1009 error means that it returned a null from the first line
> because it couldn't find the child with that name.   getChildByName is
> not recursive so you need to be mindful of the nesting of your
> requested object.
>
> The following app has the functionality working as you need it, but it
> also has a really handy listing function that displays all of the
> current children recursively (outputs to the console window in Flex,
> if you have the debug player) so that you can see the children that
> are present and how they are nested.
>
> Regards,
> Nik
>
> 
> http://www.adobe.com/2006/mxml";
> layout="vertical" horizontalAlign="left">
>  
>   
>  
>
>  
>  
> 
>




[flexcoders] Re: getChildByName using it to get the value of a textbox

2008-08-18 Thread Jason B

Thanks a lot for the reply...

turns out i get an error 1009 when i try to something as simple as an
alert

 var test:TextInput = TextInput(this.getChildByName("inputtext" + a));
Alert.show(test.text.toString());


--- In flexcoders@yahoogroups.com, Nik Derewianka <[EMAIL PROTECTED]> wrote:
>
> 
> 
> You need to cast it to the type of object you want to operate on:
> 
> var test:TextBox = this.getChildByName("inputtext" + 1) as TextBox;
> 
> or
> 
> var test:TextBox = TextBox(this.getChildByName("inputtext" + 1));
> 
> The first form will return null if it cannot cast the displayObject to  
> that type as opposed to the second which will cause an error.
> 
> Of course the Eclipse help system is so utterly useless that searching  
> for 'as' will return nothing and displayObject will not be in the  
> first 3 items you search for.
> 
> Regards,
> Nik
>




[flexcoders] getChildByName using it to get the value of a textbox

2008-08-18 Thread Jason B
when using getchildbyname variable i've not been able to get the value
can someone please post an example of how to get a value using
getChildByName.



var test:DisplayObject = this.getChildByName("inputtext" + i);
  




[flexcoders] Re: using dynamic variables in flex?

2008-08-15 Thread Jason B
Thanks Tracy...Yes I wish to use a variable at the end then have it
dynamically express the sentence.
Do you know where i can find this parser you speak of?

--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> That is not a dynamic variable, it is a dynamic expression.  Dynamic
> variables are pretty easy using bracket notation to resolve the
> reference, but evaluating expressions is much harder.  I believe someone
> has done an expression parser.
> 
>  
> 
> Also, don't use lastResult in an AS expression unless it is a binding.
> 
>  
> 
> Tracy
> 
>  
> 
> 
> 
> From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
> Behalf Of Jason B
> Sent: Thursday, August 14, 2008 2:39 PM
> To: flexcoders@yahoogroups.com
> Subject: [flexcoders] using dynamic variables in flex?
> 
>  
> 
> I want to have a dynamic variable in actionscript
> 
> //skey is a label which should contain the xml node VALUE
> skey.text =
> 'reftables_additem_load_dataprovider.lastResult.DATARESULTS.VER_DATA.' +
> stringfunctions.toString();
> Alert.show(skey.text);
> 
> Currently it shows
> reftables_additem_load_dataprovider.lastResult.DATARESULTS.VER_DATA.VEHI
> CLE_SKEY
> which is correct behavior but now how do i use that text as a dynamic
> variable like?
> 
> 
> heres my current code
> 
>  var stringfunctions:String = new String();
> var searchfor_skey:Number = new Number();
> stringfunctions = columnData.field;
> //search for primary key
>  searchfor_skey = stringfunctions.indexOf("SKEY", 0);
> 
> if(searchfor_skey != -1){
> //we got the skey column now store the value in the text box
> for http service later when saving !
>   skey.text =
> reftables_additem_load_dataprovider.lastResult.DATARESULTS.VER_DATA. +
> searchfor_skey.toString();
> Alert.show(skey.text); //shows just string
>  
>  
> Alert.show(reftables_additem_load_dataprovider.lastResult.DATARESULTS.VE
> R_DATA.VEHICLE_SKEY);  //WORKS showing value?
> 
>   
> }
>




[flexcoders] using dynamic variables in flex?

2008-08-14 Thread Jason B
I want to have a dynamic variable in actionscript

//skey is a label which should contain the xml node VALUE
skey.text =
'reftables_additem_load_dataprovider.lastResult.DATARESULTS.VER_DATA.' +
stringfunctions.toString();
Alert.show(skey.text);

Currently it shows 
reftables_additem_load_dataprovider.lastResult.DATARESULTS.VER_DATA.VEHI\
CLE_SKEY
which is correct behavior but now how do i use that text as a dynamic
variable like?


heres my current code

  var stringfunctions:String = new String();
 var searchfor_skey:Number = new Number();
 stringfunctions = columnData.field;
 //search for primary key
  searchfor_skey = stringfunctions.indexOf("SKEY", 0);

 if(searchfor_skey != -1){
 //we got the skey column now store the value in the text box
for http service later when saving !
   skey.text =
reftables_additem_load_dataprovider.lastResult.DATARESULTS.VER_DATA. +
searchfor_skey.toString();
 Alert.show(skey.text); //shows just string


Alert.show(reftables_additem_load_dataprovider.lastResult.DATARESULTS.VE\
R_DATA.VEHICLE_SKEY);  //WORKS showing value?


 }






[flexcoders] Re: How long to build a Flex app....

2008-07-29 Thread Jason B
It really depends on the flex coder since each coder could take longer
depending on thier understanding of the project and database functions
etc...and whether or not they are building the middleware code too?
We have an app with about 30 tabs and over 600 objects total on the
flex code, and about 1400 lines in mxml and 3500 lines in action script.
It took me about 1 month and im the only developer and im also
developing the middleware and database writes with php too.
The more you do the more you learn and faster too.


--- In flexcoders@yahoogroups.com, Alan <[EMAIL PROTECTED]> wrote:
>
> I know this is a pretty broad question...
> 
> I'm new to Flex, and having fun with it, but I'd like to get an idea  
> how long these things take to make.
> 
> Instead of me trying to pitch a hypothetical situation, maybe anyone  
> interested in answering could  describe an app they made  
> and how long it took and maybe even some juicy gossip about crazy  
> clients.
> 
> Thanks,
> 
> Alan
>




[flexcoders] Hotkey Class type variable for certain labels

2008-07-29 Thread Jason B
I've got several labels which shouldnt be shown on screen but if a
user hits a hotkey it would be nice to show them, what im wondering...
Is there a way to tag these items with a class like in Html so i can
have a function trigger the visible field on and off.

I know i can reference the ID but I was wondering if theres a class
like also available then i wouldnt have to reference every id flag for
all objects which are about 500 or so.



[flexcoders] Re: how to handle pausing or selecting an item on datagrid with a wait

2008-07-24 Thread Jason B
FYI

it works on the second call to the function im using but not the first
call?



[flexcoders] how to handle pausing or selecting an item on datagrid with a wait

2008-07-24 Thread Jason B
I'm trying to have action script handle selecting an item on the
datagrid then loading a httpservice already defined.
The code works in terms of selecting the item on the grid but only works
on a second call ...it's almost like i need a pause in between the
selectedIndex and the http service call.

I also tried selecteditem but that doesnt work at all, at least i have
it working on a second call but just wondering how to handle the call on
the first try.



 stations_info_request.send();  //this sends off the http service
 station_searchgrid.selectedIndex=0; //this selects the item in the
grid
 stationsearchgrid_click.send(); //this sends off the http service
which gets a primary key from the selected item on the grid FAILS HERE !





[flexcoders] cant reference datefield or alert it within another tab ?

2008-07-05 Thread Jason B
in my code i cant seem to clear or even alert the datefield its called
id="test" and I get errors if i try to reference it or attempt to alert
it in any way, yet if i move the datefield to the same tab it works?




http://www.adobe.com/2006/mxml";
layout="absolute">



 
 
 {search_username.text}
 
 
 {search_email.text}
 
 
 {search_userid.text}
 

 



 
 
 {usersearch_grid.selectedItem.USER_ID}
 
 
   {test.text}
 
 
 {navigation.text}
 




 
 
   {test.text}
 
 




 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 



 
 
 

{http_usergridclick.lastResult.RESULTS.SIGNUPDATE}
 
 
 
 
 
 
 
 

{http_usergridclick.lastResult.RESULTS.USER_USERNAME}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

 
  

 
 
 
 
 
 
 







[flexcoders] error 1009 Solved tabnavigator issue hiding items not shown to user

2008-06-02 Thread Jason B

if you dont use creationPolicy="all" on a TabNavigator it will throw
an error 1009 when trying to access objects on multiple tabs not shown
hope this helps other users who run into it



--- In flexcoders@yahoogroups.com, "Jason B" <[EMAIL PROTECTED]> wrote:
>
> Ok i was able to isolate why the error occurs
> 
> if i reference an object which is in the tabnavigator and that tab is
> not selected it will throw an error
> 
> 
> but if i reference a checkbox on the current selected tab its fine?
>




[flexcoders] Ok i was able to isolate why the error occurs maybe this will help you

2008-06-02 Thread Jason B
Ok i was able to isolate why the error occurs

if i reference an object which is in the tabnavigator and that tab is
not selected it will throw an error


but if i reference a checkbox on the current selected tab its fine?



[flexcoders] Re: working with resulthandler httpservice and referencing lastresult?

2008-06-02 Thread Jason B
Tracy im confused? you keep mentioning my data from XML but that is
working fine like i said i am able to comment out the line throwing
the error and use alert.show and it works fine...

but this line event.result.DATARESULTS.SEVEND_ALOWED; will not work
for me and never has i think the reason is because you do it under
resultformat="e4x" and i do it as the default Object for httpservice




you mention i have to loop? i dont loop any results for binding? 

ALL I do is return this XML from php


XYZ12345


and then bind like this



{httpservice_loadstationinfo.lastResult.DATARESULTS.STATION_ID}



And it works fine 

Why would anyone not want to use object by default from Flex which is
so much less effort then conversion of XML like you just showed me?

Have you used the objects and ran into something that i have not?
or do you use it for another reason?

I just want to set a checkbox from actionscript? can this be done ?
i would think it would be syntax like this

OBJECT_ID.selected = true 






[flexcoders] Re: referencing inside resulthandler error 1009

2008-06-02 Thread Jason B

NO


--- In flexcoders@yahoogroups.com, "Tracy Spratt" <[EMAIL PROTECTED]> wrote:
>
> Ok, is the checkbox in a ViewStack or Tabnavigator or Accordion or any
> navigation component?
> 
>



[flexcoders] Re: referencing inside resulthandler error 1009

2008-06-02 Thread Jason B
> Actually, I think the error is coming from this:
> 
> event.target.lastResult.DATARESULTS.SEVEND_ALOWED == "N"
> 

Actually i know its not since i put in 

   Alert.show("sevenD not allowed");
  else
  Alert.show("sevenD is allowed");

and it works perfect and its detecting all the data correctly and
showing the correct alerts? now im trying to modify the checkbox value
as selected from the data instead of an alert box



[flexcoders] Re: referencing inside resulthandler error 1009

2008-06-02 Thread Jason B
> When you say "stationslicense_7D is a checkbox item", what do you mean?
ITS A CHECKBOX LIKE THIS


> Do you mean you have a checkbox with an id=" stationslicense_7D"?
> 
YES correct


> If so, where is that checkbox declared in relation to the result
> handler?  Same file?

YES SAME FILE



[flexcoders] Re: working with resulthandler httpservice and referencing lastresult?

2008-06-02 Thread Jason B
Tracy thanks for answering so quickly...
let me answer these items for you.


> First, don't use lastResult except in bindings. Use event.result.  

Ok i wont anymore try this...! but i know the below line
event.target.lastResult.DATARESULTS.SEVEND_ALOWED works great !


> you have that in the handler, why did you switch back to lastResult?

I could never get your example to work i asked you for a example but
setting resultformat to anything i get blank info returned? im lost on
that? 


> Second, what is your resultFormat?  I think we have been through
this once before.

heheh yes i tried the resultformat you suggested a while back but it
never would work it would destroy my entire bindings
example my current binding in a textinput is 




> Third, what is: "DATARESULTS.SEVEND_ALOWED"?  Is this part of the data
> that is being returned?

I return XML file from php

XYZ12345
 



> You first step needs to be verifying you have the data you expect within
> the result handler.  

I did this already i have logging enabled and can see the xml being
returned it is ok on the php side





[flexcoders] referencing inside resulthandler error 1009

2008-06-02 Thread Jason B
when trying to reference a item on the flex form inside a
resulthandler from an httpservice i run into error 1009 cannot access
method or property

example stationslicense_7D throws the error below



public function stationloadResult(event:ResultEvent){
 var result:Object = event.result;

//stationslicense_7D is a checkbox item

if(event.target.lastResult.DATARESULTS.SEVEND_ALOWED == "N"){
   stationslicense_7D.selected = false;
   }else{
   stationslicense_7D.selected = true;
} 



[flexcoders] working with resulthandler httpservice and referencing lastresult?

2008-06-02 Thread Jason B
im very lost when i need to handle things in the resulthandler from an
httpservice

heres what i got Not working

public function stationloadResult(event:ResultEvent){   
var result:Object = event.result;

if(event.lastResult.DATARESULTS.SEVEND_ALOWED == "N")
  Alert.show("sevenD not allowed");
  else
  Alert.show("sevenD is allowed");


}

im trying to understand how to handle referencing the httpservice when
it finishes loading data i can manipulate the flex front end while
looking at specific return data?
hope that makes sense.





[flexcoders] Flex Freelancers please apply

2008-05-30 Thread Jason B
We are developing a product and need help on some of the items we have
not been able to solve while we could post here we prefer to work one
on one with someone to get the answers we need.

if your interested in applying please contact us including 

hourly rate 
location
email 
phone if possible


thanks

Jason



  1   2   >