RE: [flexcoders] Custom ComboBox Class issue
its a problem with the namespace. check out for manifest.xml Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me To: flexcoders@yahoogroups.com From: warrenony...@charter.net Date: Fri, 22 Jan 2010 09:17:16 -0600 Subject: [flexcoders] Custom ComboBox Class issue Yesterday I posted some code which fixes a bug and adds some features to the ComboBox. Because the ComboBox class has private functions in it, I was forced to copy the code into my own class and modify it. No problems except. I had named my class ComboBox simply because I copied the code directly from the sdk. Yesterday I decided it might be a better idea to name it something different to distinguish it from the one in the sdk. I went into my class and renamed it to ComboBoxSuper. Now it doesn't work some of the time. If I use ComboBoxSuper as straight a mxml tag, it fails. If I create one in AS and then addChild it to a container, it works fine. I don't get it. Can anyone explain this behavior? Warren
RE: [flexcoders] Public Arrays
If I got you right, are you getting the references as null inside the array or array itself as null ? Then you can call the function on the close event of the window, inside the pop-up component. Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me To: flexcoders@yahoogroups.com From: fotis.chatzini...@gmail.com Date: Fri, 22 Jan 2010 14:40:41 +0200 Subject: Re: [flexcoders] Public Arrays Can you post an example? I have tens of public arrays and arraycollections and they work without any problems... On Fri, Jan 22, 2010 at 2:35 PM, criptopus sd_br...@ntlworld.com wrote: I have an array of Video Players (yes video players, if people set up more than one in the CMS why should I deny them the luxury). I have just opened a preview window and there they are and they play lovely, just when I click the cross to close the TitleWindow they are displayed in I would like to stop them all playing. Fortunately or unfortunately I have references to the custom players in an array I was going to make public so that the calling program that opened the pop up could close all those that where playing. The the problem, don't seem to be able to make an array public, it will let me define it as public but it does not like me referencing it. Does anybody have a work around? - Stephen -- Fotis Chatzinikos, Ph.D. Founder, LivinData Technologies www.styledropper.com fotis.chatzini...@gmail.com,
RE: [flexcoders] How to parse xml with namespaces
Use regex and eliminate the namspaces from the root tag of the XML, check if it works. Root . . . /Root Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me To: flexcoders@yahoogroups.com From: lukevanderfl...@gmail.com Date: Fri, 22 Jan 2010 03:04:05 + Subject: [flexcoders] How to parse xml with namespaces Hi. Here is a snippet of xml: It contains an element with a namespace (c:question) and several elements without a namespace. If I get the whole thing as an XML object, how do I go about accessing all the different fields. E.G. I need to access the c:question text or c:question subelements So: 1. c:question text: This is a wine question 2. c:question subelements: p.ul.li: Penfolds Grange - no effect or p: A bottle shop in a remote country pub sells five different bottled wines. The publican increases the price of a bottle of Jacob's Creek core range by 50 cents. 3. question attribute format: radio Ive tried setting a namespace for c and a default namespace but cannot consistently access elements and values from both namespaces. Id love your help.. Thanks. Kr. Luke. = ?xml version=\1.0\ encoding=\UTF-8\? c:question xmlns=\http://www.w3.org/1999/xhtml\; xmlns:c=\http://www.eddygordon.com/namespaces/course\;This is a wine question pA bottle shop in a remote country pub sells five different bottled wines. The publican increases the price of a bottle of Jacob's Creek core range by 50 cents. /p pAssuming that the prices of the other wines do not change, the Jacob's Creek price increase is likely to affect sales of the other products as follows: /p p ul liPenfolds Grange - no effect; /li liWyndham Estate Bin Range - the Wyndham Estate products are slightly more expensive but the price increase has narrowed the gap so a slight increase can be expected; /li liLindemans Bin Range - large increase in sales as this is a direct competitor; /li liRosemount Split Label Range - large increase in sales as this is a direct competitor /li /ul/ppBased on this information, which wines are in the same market as Jacob's Creek? /p question format=\radio\ name=\part1\ answer correct=\true\Lindemans Bin Range and Rosemount Split Label Range are definitely in the same market and Wyndham Estate may be. /answer answerPenfolds Grange is the only wine in the same market. /answer answerLindemans Bin Range and Rosemount Split Label Range are the only wines in the same market. /answer /questionp/ /c:question
RE: [flexcoders] HSlider max/min position
Try rotating the control by 180 degree and give a thumb your own inverted icon, so that it can appear straight. Or else, don't set the values to the control directly, but use a function to set and get its value, take care of the inversion of the values in the setters and getters. Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me To: flexcoders@yahoogroups.com From: kashif.i...@gmail.com Date: Thu, 21 Jan 2010 12:15:22 -0500 Subject: [flexcoders] HSlider max/min position Hi, I have to swap max/min position in HSlider control. By default max come to right and min on left. Any help would be appreciated Thanks Kashif Inam Sent from my iPhone
RE: [flexcoders] How to dynamically populate the Header Text of Flex Datagrid from XML or from an arrayCollection
You need to make it hardcoded, as you hard code the dataField for every column. Else you need to make use of regex and apply it to the XML to make out your nodes for the headers. Good practice is not to pouplate it like this, instead make proper VOs and populate them with your data XML. Your work will be more structured and then you have control over the things you mentioned. Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me To: flexcoders@yahoogroups.com From: thomas_...@yahoo.com Date: Thu, 21 Jan 2010 11:55:41 -0800 Subject: [flexcoders] How to dynamically populate the Header Text of Flex Datagrid from XML or from an arrayCollection Hi, I currently return an XML File(below) to Flex and have been assigning it to an array collection in order to populate a data grid. As of now i have the header Text hardcoded . I want to put it dynamically from the arraycollection below, and some timee there are some of the columns need to hide and show too.How can i do this? var xLabels:Array = (Xs[0].label as Array); labels = new ArrayCollection(xLabels); var hObj:Object=new Object(); for (var lObj:int=0; lObj labels.length; lObj++) { hlabel =labels[lObj]; } public var arrRawData:ArrayCollection = new ArrayCollection(); __model.arrNewData = event.result.rawdata.record as ArrayCollection; var xmlResult:XML = XML(event.result); Any help would be greatly appreciated. Thanks, blue 1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: rawdata record ServiceSer1/Service Health1Health Availability100%Availability Risk2/Risk /record record ServiceSer1/Service Health1Health Availability100%Availability Risk2/Risk /record record ServiceSer1/Service Health1Health Availability100%Availability Risk2/Risk /record record ServiceSer1/Service Health1Health Availability100%Availability Risk2/Risk /record /rawdata
RE: [Spam] RE: [flexcoders] Using Cairngorm and how to display a Popup from aCommand
Hi, Thanks for the appreciation. Yups you have got it right. But in you statement: then I have the problem of getting that function reference over into the 2nd CairngormEvent, which isn't created and fired until the Web Service responder is called I think you are talking about dispatching an event from the command or Sequence Command type of thing. For that scenario, you can pass on that function reference to the the 2nd Cairngorm Event also. You can keep that parameter in the Event also. So that you always does not need to worry about it. And Function reference is in terms of instance of the command. If your command gets fired again before it returns you the result for the last executed method, even then you are safe. Keeping the view reference in the model have pros and cons. I will not prefer that way, simply because it breaks the encapsulation, view gets publicly exposed as the Model is a singleton class. But there is no hard and fast rule as well.. :) Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me To: flexcoders@yahoogroups.com From: n...@middleweek.co.uk Date: Tue, 22 Dec 2009 16:03:43 + Subject: Re: [Spam] RE: [flexcoders] Using Cairngorm and how to display a Popup from aCommand Nice post and thanks for replying... I understand your first solution, I think it's similar to a ChangeWatcher approach... but I'm a bit lost with the 2nd approach... In my circumstance, I have a button in my view that fires a Flash CLICK event, the view-mediator Handles it and fires a CairngormEvent, which invokes a CairngormCommand to call a Web Service to fetch some data. The data is loaded asynchronously and passed into a new CairngormEvent which then fires a CairngormCommand, this Command unpacks the data and if it's all gravy, it will update the model and the fetched data is displayed on the current View. If the data contains Fault event info then I need to show a custom PopUp component... I think, you're 2nd solution is storing a private or public function from inside the View on the CairngormEvent that is fired to reference it later... If I've got that right, then I have the problem of getting that function reference over into the 2nd CairngormEvent, which isn't created and fired until the Web Service responder is called... Which I believe is completely detached from the original CairngormEvent/ Command. I guess I could put the function ref on the model as a central repository but I could also just stick a reference to the View on the model and use that reference in the CairngormCommand and call PopUpManager.createPopup... What are your thoughts cause I'm a bit lost :) Cheers, nick 2009/12/21 Vaibhav Seth vaibhav.s...@live.com hi, Well that's a good question for the starters. Please go through my below blog. Hope you will get some thing out from there. http://groups.adobe.com/posts/ffa987b8a4 Thanks, Vaibhav Seth.
RE: [flexcoders] Using Cairngorm and how to display a Popup from a Command
hi, Well that's a good question for the starters. Please go through my below blog. Hope you will get some thing out from there. http://groups.adobe.com/posts/ffa987b8a4 Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me To: flexcoders@yahoogroups.com From: n...@middleweek.co.uk Date: Mon, 21 Dec 2009 19:05:46 + Subject: [flexcoders] Using Cairngorm and how to display a Popup from a Command Hi, If there's a preferred place to ask this, please let me know but I'm working on my first Cairngorm project and am getting used to how it all works which is great. I have a command that is fired after an event is notified that data is received from a Web Service. If there is a Fault or Error I want to show a custom Popup Component. My question is how do others deal with this? If I use PopupManager.add or create PopUp I need to pass in the parent : DisplayObject... What is best practice to reference the parent ? Would you create a reference on the model.rootApplication = this; and set that on the initialise event and pass that reference in or perhaps you would use ChangeWatcher to listen for changes on a model error property which woudl fire the Action Script on the mediator to create the PopUp... What is the best/ nicest/ standard approach to handling this? Thanks for your help... Nick
RE: [flexcoders] Re: How to dispatchevent in popup window?
var obj:PopUpComp = PopUpManager.createPopUp(this,PopUpComp); obj.addEventListener() Thanks, Vaibhav Seth. EMAILING FOR THE GREATER GOOD Join me To: flexcoders@yahoogroups.com From: valdhorli...@embarqmail.com Date: Thu, 17 Dec 2009 21:21:42 + Subject: [flexcoders] Re: How to dispatchevent in popup window? You need to add the event listener to the SystemManager. SystemManager handles all events from popup windows. --- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote: Hi, I want to dispatch event in popup window and capture the event in base page. Please give me a idea how to do this. Thanks Mark