RE: [flexcoders] Working with date/Time in FB
Instead of binding, use a result handler and inspect the actual xml. Have you set resultFormat=e4x? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Sunday, June 27, 2010 4:27 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Working with date/Time in FB I just verified both server and client are at the same time and same timezone. I wasn't doing anything special with the object I was returning initially when it was giving me the wrong time. I literally assigned the dataGrid to the CFobject that was being passed. mx:DataGrid x=68 y=446 id=dataGrid dataProvider={getAlltblreservationResult.lastResult} visible=false mx:columns mx:DataGridColumn headerText=pkReservationID dataField=pkReservationID/ mx:DataGridColumn headerText=fkPilotID dataField=fkPilotID/ mx:DataGridColumn headerText=fkPlaneID dataField=fkPlaneID/ mx:DataGridColumn headerText=szSourceAirport dataField=szSourceAirport/ mx:DataGridColumn headerText=szDestAirport dataField=szDestAirport/ mx:DataGridColumn headerText=dtStart dataField=dtStart/ mx:DataGridColumn headerText=dtEnd dataField=dtEnd/ mx:DataGridColumn headerText=szSpecialRequests dataField=szSpecialRequests/ mx:DataGridColumn headerText=pkPilotID dataField=pkPilotID/ mx:DataGridColumn headerText=szPilotLastName dataField=szPilotLastName/ mx:DataGridColumn headerText=szDescription dataField=szDescription/ mx:DataGridColumn headerText=szPilotFirstName dataField=szPilotFirstName/ /mx:columns /mx:DataGrid Both dtStart and dtEnd were exactly one hour ahead of where they should be when I made the CF call. _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Smin Rana Sent: Sunday, June 27, 2010 7:30 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Working with date/Time in FB Are you sure server and FB got same timezone? I think you got some problem with your manipulation of before you set it to datagrid can you show the code where you set date on datagrid? Response date as a string from cf and set it on datagrid without any formatting? -Original Message- From: Scott Sent: 06-27-2010 19:19:40 Subject: [flexcoders] Working with date/Time in FB There's something I'm not completely understanding yet. I've coded around it but I'm not feeling comfortable with my solution. My FB4 app links up with CF9 and I'm working with dates and times. When I pull up a date from CF9 into a FB4 datagrid the time shows off by one hour. Eg. 2010-06-01 23:30:00 is in my MySQL DB (11:30pm). When I load the time from CF9 to a FB4 dataGrid it shows 2010-06-02 as the date and 12:30:00 as the time so the day advances because the time is one hour ahead. My initial thought is that it's something to do with either the timezone or day light savings time. Right now I just set a variable that I call DST, set it to -1 and then subtract it from the date before I manipulate the date and time. Even getting the UTC date/time then using the timezone still gets it off one hour without accounting for DST (that's why I think I'm dealing with daylight savings time) Can anyone confirm this or shed any light on what is going on? I don't want FB to worry about date and time; I want to do all of this through CF9 on the server side. I don't want to worry if the user has their computer set correctly for their timezone and daylight savings time. I just want FB to display the time it pulls directly from the CF9 object I provide it. Thanks a ton. sj -- This message has been scanned for viruses and dangerous content by http://www.mailscanner.info/ MailScanner, and is believed to be clean.
[flexcoders] Job opportunity in Atlanta
Flexcoders, My employer, the Atlanta engineering division of an American manufacturer of international consumer products, is looking for help with a Flex development project. We want a contractor that can start immediately, and the project is long term, with serious potential for permanent hire. I would prefer someone with a strong animation and effects background (a Flash guy would be ideal), to complement my data-flow orientation, but any experienced Flex developer will be able to do the job. This is not an entry level opportunity. We need someone who can be immediately productive. I'd say four years of full-time Flex experience is the minimum, but if you got to that proficiency level in three years, I'd be ok with that. If you are interested, do NOT respond to this message. This is a technical forum, and has enough traffic already, but I doubt anyone will object to this single posting of a real opportunity. Instead, reply to the email address below. It is the company HR person, not me, but if you are a serious candidate, your response will get to me. Note, the physical location is actually in Alpharetta, just off exit 12 on 400. Fellow flexcoders who might have noted my absence, this is why, I am crazy busy! Tracy Spratt Contact: David Holley dhol...@johnsonoutdoors.com
RE: [flexcoders] ResultEvent from HttpService not parsing xml
ourXML is already at the one node. Try: var name:String = ourXML.two.name.text(); //the text() is not always necessary When in doubt view the xml by doing: trace(ourXML.toXMLString()); Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Raymond Brown Sent: Thursday, April 22, 2010 8:44 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] ResultEvent from HttpService not parsing xml I have an xml doc: one two nameBob/name /two /one I have a Httpservice tage with url, resulthandler, faulthandler and resultformat=e4x. In my resulthandler, I have this: var ourXML:XML = event.result as XML; var name:String = ourXML.one.two.name; var x:int = 0; Here is the problem, I put a break point on the int assignment and look at the variables. I see that event.result AND ourXML both have the xml document in them but my name variable is empty. I even tried something like this - if (event.result.one.two.name ==Bob) and it fails. What are we missing? The debugger clearly shows the data is there but I can never seem to get it out.
RE: [flexcoders] What is the best Way - Multiple DataProvider's or one?
As usual, it depends. If your data is small enough and static enough, get it all at once and avoid the inherent latency of remote data retrieval entirely. But rarely is data retrieval or processing the performance bottleneck. Most often it is screen rendering, and TileList can be a hog, depending on how you have implemented it. (How many and how complex are the tiles?) Use getTimer() to benchmark the various steps to verify where your bottleneck actually is. Regardless, consider disabling the TileList while it is rendering. I am not sure what the best event to use to indicate rendering complete will be. Knowing when a screen is fully rendered is not a simple thin, but I do not think you have to get the very latest event, just late enough to prevent clicking on stale data. Tracy Spratt, _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of James Sent: Tuesday, April 20, 2010 7:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] What is the best Way - Multiple DataProvider's or one? In my app I have a tilelist with an array collection as it's dp which is populated via remote xml from a mysql database. When a user clicks a certain category button in my app it sends a request to the server to tell it which category items the user wants to see which in turn changes the array collection that populates the tilelist so it shows items within that category. The thing is though this seems to be a bit unreliable as it means the user has to wait for a while for the dataprovider to change so sometimes they click to the next category and the items from the previous category are still shown in the tilelist. Is it better practice to have multiple dataproviders initialsed at startup which the user can switch between as they click each category rather than modifying the same dataprovider? Basically I'm just wondering what way would you guys do it? I thought using just one dataprovider would slim down the code and make the app faster and more reliable but now I'm not sure.
RE: [flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome)
Yes. Manually incrementing the version at each build will be more work for you, but will be a better experience for your users. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of handitan Sent: Monday, April 19, 2010 8:17 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome) Hi Cato or anyone, Where do you put that change? Is it on this part of index.template.html? else if (hasRequestedVersion) { // if we've detected an acceptable version // embed the Flash Content SWF when all tests are passed AC_FL_RunContent( src, ${swf}?version=1.0, width, ${width}, height, ${height}, Thanks for the help! --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Cato Paus ca...@... wrote: Or just do this src, ${swf}?version=1.0, and increment it each time you crate a new build, I have filed a request to adobe about this issue https://bugs. https://bugs.adobe.com/jira/browse/FB-16764 adobe.com/jira/browse/FB-16764 go and vote for it :) --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tspratt@ wrote: The only reliable, cross platform/browser solution I have seen is to append a unique string to the swf url. Modify the index.template like this: AC_FL_RunContent( src, ${swf}?nocache=+(new Date()).getTime(), It does make that app slow to load every time. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of anuj181 Sent: Tuesday, March 17, 2009 7:32 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] How to clear cache for all major browsers (IE, Mozilla, Safari and Chrome) Hi Guys Anyone has any idea which is the best way to clear the cache for my web application (which is made in Flex and PHP), For some reason it keeps on pulling old entries from cache and is confusing user and me with the inconsistent results, I guess that it is pulling values from the cache as everything works fine when I manually clear the cache.I did little research and tried following tags in the index.template.html but somehow it is not working efficiently , Whats the best way to clear the cache for all the major browsers (IE, Mozilla, Safari and Chrome) for my web application? Anyone has any idea? Thanks in advance for your help, head meta http-equiv=Content-Type content=text/html; charset=utf-8 / meta http-equiv=Pragma content=no-cache / meta http-equiv=Expires content=-1 / /head
RE: [flexcoders] Re: Problems With my XML Created Array Collection
I know this is very late in the game, and I haven’t read the full thread, but this seems like a very complicated solution to the problem. Further, the default resultFormat has other consequences, data type conversions for example. If you have a string that looks like a number, it will get converted to a number, removing trailing and leading zeros and such, and sometimes this is not desired. Using e4x and looping over the categories.category XMLList is very simple. XMLLists are never null, but empty nodes just result in a zero length, which is easy to test for. Tracy Spratt _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of James Sent: Monday, April 19, 2010 3:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Problems With my XML Created Array Collection I've noticed that if I remove all items from the mysql table which populates the remote xml file the xml that is produced is simply this:- ?xml version=1.0 ? categories / i.e. all of the nodes are removed so this means my app is looking for nodes that aren't actually there so it seems I need another else if bracket to deal with this but I haven't got a clue for how to check if an xml file is empty or null or whatever you'd call the above in flex and what to do within this else if bracket if it's not. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Robert Moss rdm0...@... wrote: In essence yes, I do not think I would do it as part of the button click, but instead clear it before the IF in the result handler with LinksFullAC.source = new Array(); or LinksFullAC.removeAll(); I prefer the former. As for your error, I'm not sure what's happening, but you should be able to set a break in the result handler and see what is getting returned. It looks like for the combination you describe, categories is not getting returned for some reason. You'll need to figure out why and trap for it. The same goes for returning 0 records. See what is getting returned and trap for it. From: James garymoorcroft_...@... To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Sent: Mon, April 19, 2010 12:47:15 PM Subject: [flexcoders] Re: Problems With my XML Created Array Collection Hi Robert. Thanks so much for that my friend. I have some problems with it though. You see I have an event in my app applied to a button (refresh button) which resends data via the LinksService i.e. LinksService. send and I've noticed that with your code if there is only 1 link i.e. 1 node and I click the refresh button it seems to keep recreating that 1 over and over again as if it's recreating the same object in the array collection or something. This doesn't happen if their are 2 or more links/nodes/ objects. Perhaps I'll have to get the refresh button to empty the array collection first before sending the data i.e. it's click function would be LinksFullAC. flush; LinksService. send() Am I right? I've also noticed now with your code applied if I select an item in the tilelist and click the reresh button I get the error Property categories not found on String and there is no default value which is indicating the error at the if statement in the code you gave me and the LinksService itself. Any idea what's causing this? Another question though what if the xml contains no nodes? You see my xml file is dynamic, I have a variable in my app called categoryid and that variable is based on a category that the user selects in my app and is submitted to getlinks.php which gets all the records from my mysql table which contain that specific submitted categoryid and output them as the xml file. Some categoryids have no records (the user can add and delte records via my app). Is there any way of getting it to handle 0 records/nodes as well as handling muliple records/1record which it seems to already do? Thanks so much for your help. Sorry to be a pain :-( --- In flexcod...@yahoogro ups.com, Robert Moss rdm0004@ wrote: This is not exactly how I would implement, but you should get the idea. If you have multiple category nodes, then your LinksService. lastResult. categories. category is returned as an ArrayCollection and your code works. If it only has one node then LinksService. lastResult. categories. category is returned as an ObjectProxy. So in your return method you could have the following. if(LinksService. lastResult. categories. category is ArrayCollection) { LinksFullAC= LinksService. lastResult. categories. category as ArrayCollection; }else { var oCat:Object = new Object(); oCat.id = LinksService. lastResult. categories. category. id; oCat.label = LinksService. lastResult. categories. category. label; oCat.icon = LinksService. lastResult. categories. category. icon; LinksFullAC. addItem(oCat) ; // NOTE
RE: [flexcoders] Re: Problems With my XML Created Array Collection
Here is some untested code to loop (you will need to correct the automatic capitalization ): It is also more verbose than necessary, just for clarity. Var xmlResult:XML = event.result as XML; Trace(xmlResult.toXMLString()); //to verify your xml Var xlResult:XMLList = xmlResult.category; Var acResult:ArrayCollection = new ArrayCollection(); Var xmlCategory:XML; For (var i:uint=0;ixlResult.length()) { //watch out for the length() method, not property xmlCategory = xlResult[i]; acResult.addItem({id:xmlCategory.id.text(),label:xmlCategory.label.text(),icon:xmlCategory.icon.text()}); //usually the text) can be omitted, but I use it by habit. } myTileList.dataProvider = acResult; And DO avoid using lastResult in functions. It is intended for binding espressions. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Tuesday, April 20, 2010 12:39 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Problems With my XML Created Array Collection I know this is very late in the game, and I haven’t read the full thread, but this seems like a very complicated solution to the problem. Further, the default resultFormat has other consequences, data type conversions for example. If you have a string that looks like a number, it will get converted to a number, removing trailing and leading zeros and such, and sometimes this is not desired. Using e4x and looping over the categories.category XMLList is very simple. XMLLists are never null, but empty nodes just result in a zero length, which is easy to test for. Tracy Spratt _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of James Sent: Monday, April 19, 2010 3:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Problems With my XML Created Array Collection I've noticed that if I remove all items from the mysql table which populates the remote xml file the xml that is produced is simply this:- ?xml version=1.0 ? categories / i.e. all of the nodes are removed so this means my app is looking for nodes that aren't actually there so it seems I need another else if bracket to deal with this but I haven't got a clue for how to check if an xml file is empty or null or whatever you'd call the above in flex and what to do within this else if bracket if it's not. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Robert Moss rdm0...@... wrote: In essence yes, I do not think I would do it as part of the button click, but instead clear it before the IF in the result handler with LinksFullAC.source = new Array(); or LinksFullAC.removeAll(); I prefer the former. As for your error, I'm not sure what's happening, but you should be able to set a break in the result handler and see what is getting returned. It looks like for the combination you describe, categories is not getting returned for some reason. You'll need to figure out why and trap for it. The same goes for returning 0 records. See what is getting returned and trap for it. From: James garymoorcroft_...@... To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Sent: Mon, April 19, 2010 12:47:15 PM Subject: [flexcoders] Re: Problems With my XML Created Array Collection Hi Robert. Thanks so much for that my friend. I have some problems with it though. You see I have an event in my app applied to a button (refresh button) which resends data via the LinksService i.e. LinksService. send and I've noticed that with your code if there is only 1 link i.e. 1 node and I click the refresh button it seems to keep recreating that 1 over and over again as if it's recreating the same object in the array collection or something. This doesn't happen if their are 2 or more links/nodes/ objects. Perhaps I'll have to get the refresh button to empty the array collection first before sending the data i.e. it's click function would be LinksFullAC. flush; LinksService. send() Am I right? I've also noticed now with your code applied if I select an item in the tilelist and click the reresh button I get the error Property categories not found on String and there is no default value which is indicating the error at the if statement in the code you gave me and the LinksService itself. Any idea what's causing this? Another question though what if the xml contains no nodes? You see my xml file is dynamic, I have a variable in my app called categoryid and that variable is based on a category that the user selects in my app and is submitted to getlinks.php which gets all the records from my mysql table which contain that specific submitted categoryid and output them as the xml file. Some categoryids have no records (the user can add and delte records
RE: [flexcoders] Tilelist Populated by Remote XML Only showing Data from files with 1 Node
I suspect you have left the resultFormat at its default object. This has Flex parse the xml into a tree of dynamic objects. It turns xml lists into arrays, and because the player cannot differentiate between an array with one element and an object, you have this known issue. I suggest setting resultFormat=e4x and processing the resulting xml as needed for your dataProvider. You can use the xml directly, or use an XMLListCollection, or convert the data into an ArrayCollection of stronglyTyped value objects. There are other solutions, including inspecting the result object to determine what it contains. You can also use the toArray() function. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of James Sent: Tuesday, March 30, 2010 3:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Tilelist Populated by Remote XML Only showing Data from files with 1 Node Sorry for the long title but I couldn't think of another way to sum it up. I have a tilelist which is populated by different remote xml files. The problem is if any of these files contain only 1 node then their data doesn't appear within the tilelist. I know this is due to the xml files only having 1 node because I tried adding an extra node to one of them and all of a sudden boom their data appears in the tilelist. Is this a known problem and if so is there any way around it so that tilelists can be populated even by xml files that only contain a single node? Thanks for any help.
RE: [flexcoders] Re: Loading swf in child window?
If I am understanding correctly you will want to use SWFLoader. It allows you to load pretty much any swf. Normally the swf's must be compiled with the same version of AS, because if the two swfs run in different virtual machines, they will only be able to communicate via LocalConnection. You typically use SWFLoader when the swf you want to load is a complete application. those are big, because they include so much of the framework. If your swf is not a full application, you can use modules. The primary value of both is that the loaded thing does not need to be compiled into the loading app. I have loaded applications into applications very often, with several apps in production for years and it works extremely well. All those apps were intranet apps on fast, wired networks, so swf size was not a critical constraint. Communication with the loaded swf is simple via a reference to the .content property. However, there are some timing issues to handle, because the complete event of the swf loader does not mean that the application being loaded is also complete. Here is a sample application that demonstrates this communicatin setup: http://www.cflex.net/showFileDetails.cfm?ObjectID=690 Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of newflexer Sent: Wednesday, March 24, 2010 10:38 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Loading swf in child window? Thanks...anyone ever tried it? --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, valdhor valdhorli...@... wrote: I believe that it's possible to do what you want but I have never tried it. What I would do is implement modules and an interface so that the main app and modules can exchange data. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, newflexer dhay@ wrote: We need to be able to open a window from our main application, in which we want to load a swf file to perform some configuration for the content in the main application. We also need to be able to pass the information from the child window to the main app. Is this possible? Any pointers? What container would we use for the child window? How do we load it? How do you pass the data from child to main app? thanks! David
RE: [flexcoders] XML Problem ? how to retreive children from XML without having the same attributs of the principal object
Be aware that the @AttrName syntax is a bit risky. All of the examined nodes must have the attribute or the line will error. Only use it when you have complete and permanent control of the xml A safer syntax is attribute(AttrName). Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nini7016 Nini7016 Sent: Wednesday, March 24, 2010 10:45 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] XML Problem ? how to retreive children from XML without having the same attributs of the principal object Thank you very very much :):) _ To: flexcoders@yahoogroups.com From: olegsivo...@gmail.com Date: Wed, 24 Mar 2010 15:42:59 +0200 Subject: Re: [flexcoders] XML Problem ? how to retreive children from XML without having the same attributs of the principal object default xml namespace = http://docs. http://docs.oasis-open.org/wsbpel/2.0/process/executable oasis-open.org/wsbpel/2.0/process/executable; var xml:XML = process name=beInAssInAcEn targetNamespace=http://enterprise. http://enterprise.netbeans.org/bpel/SimulationEmprunt1/beInAssInAcEn netbeans.org/bpel/SimulationEmprunt1/beInAssInAcEn xmlns=http://docs. http://docs.oasis-open.org/wsbpel/2.0/process/executable oasis-open.org/wsbpel/2.0/process/executable xmlns:xsd=http://www.w3. http://www.w3.org/2001/XMLSchema org/2001/XMLSchema xmlns:sxt=http://www.sun. http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Trace com/wsbpel/2.0/process/executable/SUNExtension/Trace xmlns:sxed=http://www.sun. http://www.sun.com/wsbpel/2.0/process/executable/SUNExtension/Editor com/wsbpel/2.0/process/executable/SUNExtension/Editor xmlns:tns=http://enterprise. http://enterprise.netbeans.org/bpel/SimulationEmprunt1/beInAssInAcEn netbeans.org/bpel/SimulationEmprunt1/beInAssInAcEn sequence invoke name=Invoke_2/ assign name=Assign1/ copy from /from to /to /copy invoke name=Invoke_4/ invoke name=Activity_18/ /sequence /process; trace(xml.sequence.invoke.(valueOf()@name.tostring() === Invoke_2).toXMLString()); _ Commander un cadeau en ligne discrètement? Voir la http://clk.atdmt.com/FRM/go/207186971/direct/01/ solution offerte par Internet Explorer8
RE: [flexcoders] XML Problem ? how to retreive children from XML without having the same attributs of the principal object
Very interesting, thanks! Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Oleg Sivokon Sent: Wednesday, March 24, 2010 12:46 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] XML Problem ? how to retreive children from XML without having the same attributs of the principal object Tracy, You are wrong on that remark, if you do valueOf()@attributename, then you are safe. This is because E4X-specific opcodes act like with() construction, i.e. they just push the current XML node context in front of every other context in the context lookup chain. While XML class is dynamic, it is OK to try to access a non-existent property on it, however, the context lookup behavior verifies for the property existence, and if the property doesn't exist, it advances to the next link in the chain - to function arguments - function local variables - class fields - open namespaces - global context. Global context is not dynamic, and it is difficult to believe that some of the scopes will happen to be a Proxy subclass which implements getProperty() + isAttribute(). So, the error you are talking about is caused by that while resolving scope the VM will hit an instance of the sealed class object, which will cause it to throw NPE. But, if you limit the scope lookup to only the context of XML node - that is by calling it on valueOf(), you will not traverse the scopes chain - thus no NPE, you'll get empty-string, which is the default XMLList behavior for converting a null-XMLList. So, it is safe to do: foo/.(trace( valueOf()@bar ) ); but it is not safe to do: foo/.(trace( @bar ) ); Best. Oleg
RE: [flexcoders] Using Server Stored Images In An Air Application?
Sure, load the images dynamically. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of James Sent: Sunday, March 21, 2010 1:13 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Using Server Stored Images In An Air Application? Is there any way to display server stored images within an Air application?
RE: [flexcoders] Re: Problem reading an XML file
If you can see the xml when you do: var myXML:XML = XML(event.result); trace(myXML.toXMLString()); //do yo see the whole xml? then go one level deeper: myXML = myXML.data[0] trace(myXML.toXMLString()); //do you see the data xml If so, go one level deeper, and trace that, etc. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Friday, March 19, 2010 8:31 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Problem reading an XML file I am not very good with XML (That's Tracy's expertise) but you can get it with the following: myXML..woeid myXML[0]..woeid and probably a dozen different ways. You may like to check these out for more detail... http://www.adobe. http://www.adobe.com/devnet/flex/quickstart/accessing_xml_data/ com/devnet/flex/quickstart/accessing_xml_data/ http://livedocs. http://livedocs.adobe.com/flex/3/langref/XML.html adobe.com/flex/3/langref/XML.html --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Sneha bhansal...@... wrote: Hello All, Can anybody help me find out the bug in my program which doesn't read children in an XML file. I am trying to get WOEID of the location provided from Yahoo webservice API. I have given below what I am doing and also the XML file generated from Yahoo. mx:HTTPService id=weatherService url = http://where. http://where.yahooapis.com/v1/places.q yahooapis.com/v1/places.q('{txtCity.text}');start=0;count=1?appid=your AppID result=getWOEID(event) fault=faultEventHandler(event) resultFormat= e4x/ This is what I am doing in Script tag. But nothing works. I am able to read the complete XML file but not the children of an XML file. Could someone help find the problem. private function init():void{ var city:String = txtCity.text; //Alert.show(Your City:+city); weatherService.cancel(); //var params:Object = new Object(); //params.q = city; //Alert.show(params.q+params.q); //weatherService.send(params); weatherService.send(); } private function getWOEID(event:ResultEvent):void{ var myXML:XML = XML(event.result); taXML.text = myXML; var cityList:XMLList = myXML.data.place.children(); Alert.show( getting woeid: +cityList); //taXML = cityList.toString(); //cityList = myXML.places.place.name ; //cityList = myXML.place.woeid; //Alert.show(in getWOEID() +cityList); //lblWOEID.text = cityList; } This is the XML file generated and I am interested in accessing woeid: places yahoo:start=0 yahoo:count=1 yahoo:total=55 #8722; place yahoo:uri=http://where. http://where.yahooapis.com/v1/place/2371464 yahooapis.com/v1/place/2371464 xml:lang=en-us woeid2371464/woeid placeTypeName code=7Town/placeTypeName nameBuffalo/name country type=Country code=USUnited States/country admin1 type=State code=US-NYNew York/admin1 admin2 type=County code=Erie/admin2 admin3/ locality1 type=TownBuffalo/locality1 locality2/ postal/ #8722; centroid latitude42.885441/latitude longitude-78.878464/longitude /centroid #8722; boundingBox #8722; southWest latitude42.824860/latitude longitude-78.942909/longitude /southWest #8722; northEast latitude42.970741/latitude longitude-78.771393/longitude /northEast /boundingBox /place /places Any help would be appreciated. Thank you Sneha
RE: [flexcoders] Using Server Stored Images In An Air Application?
You should be able to use mx:Image and set the source to the url of the image on the server. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Gary Moorcroft Sent: Monday, March 22, 2010 1:16 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Using Server Stored Images In An Air Application? Cheers Tracy. How exactly would I go about doing that though? The reason I can't figure it out is the images folder is on the server and the app is on each user's desktop. Normally this wouldn't matter as both the app and the images folder would both be on the server in a regular flex app which I'm used to using but how can I access the images folder from an air application? How is it done generally I mean? --- On Mon, 22/3/10, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Using Server Stored Images In An Air Application? To: flexcoders@yahoogroups.com Date: Monday, 22 March, 2010, 3:04 Sure, load the images dynamically. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of James Sent: Sunday, March 21, 2010 1:13 AM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Using Server Stored Images In An Air Application? Is there any way to display server stored images within an Air application?
RE: [flexcoders] Re: I need some basic ActionScript help that I'm stumped on
There is some data type confusion going on here. If you are using the xml as the data source, how are you getting it into Flex? I strongly suspect you are letting Flex do its default resultFormat conversion into a tree of dynamic objects. Actionscript can't tell the difference between an Object and an Array with a single element so it opts for object. You can't get the length of an object. This, selectedItem.links.link is object tree syntax, not XML or ArrayCollection syntax. There are several solutions. I advise using resultFormat=e4x, then processing that xml into an ArrayCollection of strongly typed value objects. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Monday, March 15, 2010 12:53 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: I need some basic ActionScript help that I'm stumped on I'm not great with XML (That's more Tracy's forte) but shouldn't it be trace(myADG.selectedItem.links.length); --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Mark mark.pusat...@... wrote: I'm having an issue with finding the length of the number of children items in my ArrayCollection. A small part of the xml that is being pulled in is below. You'll see that I have a node links with a child or children node link. If I have 2 or more link nodes then the length comes back with the proper number, but if I only have 1 it comes back as undefined. Here's my basic function that I'm putting together now. private function dgChanged(evt:Event):void { if (myADG.selectedItem.links != null) { trace(myADG.selectedItem.links.link.length); } else { trace (NULL ); } items item eID4/eID eName![CDATA[3 Event with link]]/eName sDate1/2/2010/sDate eDate2/18/2010/eDate sTime12:00:00 PM/sTime eTime3:00:00 PM/eTime description![CDATA[Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.]]/description aNameAIT/aName cNameLearning/cName lNameUK/lName links link ID=1 description=description of the link title=Apple url=www.apple.com/ /links /item Any ideas as to why I'm getting undefined? Thanks, Mark
RE: [flexcoders] xml parsing
The double colon is the namespace accessor. But I do not really understand that example. Unless you can use a wildcard as a namespace? I have managed to mostly avoid dealing with namespaces so far. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of luvfotography Sent: Monday, March 15, 2010 8:06 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] xml parsing What does '*::' do in the following example: (can someone explain how this works, where aspectRatios ends up with 'widescreen') var aspectRatios:XMLList = atomXml..*::aspectRatio; where atomxml = ?xml version=1.0 encoding=utf-16? entry gd:etag=W/quot;C0QCQ347eCp7ImA9WxBbFkk.quot; xmlns=http://www.w3. http://www.w3.org/2005/Atom org/2005/Atom xmlns:media=http://search. http://search.yahoo.com/mrss/ yahoo.com/mrss/ xmlns:gd=http://schemas. http://schemas.google.com/g/2005 google.com/g/2005 xmlns:yt=http://gdata. http://gdata.youtube.com/schemas/2007 youtube.com/schemas/2007 idtag:youtube.com,2008:video:yNq5vC_EHAg/id published2009-03-17T07:44:54.000Z/published yt:accessControl action=syndicate permission=allowed / gd:comments gd:feedLink href=http://gdata. http://gdata.youtube.com/feeds/api/videos/yNq5vC_EHAg/comments?v=2 youtube.com/feeds/api/videos/yNq5vC_EHAg/comments?v=2 countHint=1031 / /gd:comments media:group yt:aspectRatiowidescreen/yt:aspectRatio yt:duration seconds=232 / yt:uploaded2009-03-17T07:44:54.000Z/yt:uploaded yt:videoidyNq5vC_EHAg/yt:videoid /media:group gd:rating average=4.794872 max=5 min=1 numRaters=3159 rel=http://schemas. http://schemas.google.com/g/2005#overall google.com/g/2005#overall / yt:statistics favoriteCount=9429 viewCount=4563767 / /entry
RE: [flexcoders] Rendering HTML table in a rich text editor
If you are talking about the Flex RichTextEditor, it will only support the limited tags that the htmlText filed will support, and that does not include tables. Doing full html in browser hosted Flex is a headache. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jerry_gagliano Sent: Monday, March 15, 2010 9:57 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Rendering HTML table in a rich text editor Hi, I am trying to figure out how to render HTML Table tags in the rich text editor. I created a button that generates the table structure but when it gets inserted to the editor it strips out all the table tags. Does anyone have any solutions? Thanks in advance
RE: [flexcoders] Automatically update ValueObjects...
I have not used Remote object enough to be an authority on your specific issue, but that looks like a package path and typically package paths are relative, starting at the project root, (in my setups, this is src) , so the deployment location is never an issue. Are yo sure you need to specify MyworkingFolder? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Ivan Wang Sent: Saturday, March 13, 2010 7:46 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Automatically update ValueObjects... But In what case do you have to change a package name? If you really did, the Flex Builder has some refactor feature, but not too much. You can try it, I'm not sure. - Original Message - From: Laurence mailto:lmacne...@comcast.net To: flexcod...@yahoogro mailto:flexcoders@yahoogroups.com ups.com Sent: Saturday, March 13, 2010 6:46 AM Subject: [flexcoders] Automatically update ValueObjects... I have several ValueObjects in my app... When I work with them in my test website, everything's fine. But when I want to export a release build, the ValueObjects no longer work because the folder-name is different... All my VO's have the following type of declaration at the top: [RemoteClass(alias=MyWorkingFolder.cfcs.vo.MyValueObjectVO)] And on the ColdFusion9 side it's: cfcomponent output=false alias=MyWorkingFolder.cfcs.vo.MyValueObjectVO Thus, when I export the release-build from MyWorkingFolder to MyLiveFolder (for example) all of the VOs stop working -- they're still looking for MyWorkingFolder. How do I get FlexBuilder to change the names inside the VOs automatically to match the release-build destination? So far, I've been doing it manually, but what a pain that is -- my patience is wearing thin, having to manually update a bunch of damn VOs, then change them back, every time I want to export a release build... There has to be a better way that I'm just not aware of... Thanks, Laurence MacNeill Mableton, Georgia, USA
RE: [flexcoders] How do I set the borderStyle in Flex
The first is the correct syntax. If it is not working, perhaps there is another style that needs to be set also, like width or color. Have you tried this using the flex StyleExplorer? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of criptopus Sent: Friday, March 12, 2010 6:38 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] How do I set the borderStyle in Flex I have tried both with no luck... .setStyle(borderStyle,solid); .borderStyle=solid;
RE: [flexcoders] Re: HTTPService not returning ArrayCollection...
This is an issue when you use the default resultFormat=object. This causes Flex to convert your xml into a tree of dynamic objects. There can be problems with this conversion. The problem you posted is one. Another is that if you have strings that look like numbers, they will get converted to numbers. Also, dynamic objects are slower than strongly typed objects, which might be an issue for a complex data grid. There might be other problems as well. If any of these become a problem, I'd advise using resultFormat=e4x, then processing that xml into an Array Collection of strongly typed VOs. And to clarify, with the default resultFormat conversion, you are getting Array, not ArrayCollection. Note Steve's code. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: Wednesday, March 10, 2010 4:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: HTTPService not returning ArrayCollection... I discovered that (event.result.people.person.source != null) when the result is an ArrayCollection. So I used that in an if statement so I could choose simply to set my variable equal to the result, or if I had to variable.addItem() the result. Your way is much neater. I'll give that a try, thanks. L. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, valdhor valdhorli...@... wrote: I use new ArrayCollection(ArrayUtil.toArray(event.result)). It works for 1 or more items in the result. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Laurence LMacNeill@ wrote: I'm trying to read data from an XML file, and put that data into an ArrayCollection. This works great when I have more than one object in the XML file. But when there's only one object in there, my HTTPService RPC returns it as an Object instead of an ArrayCollection of Objects. So when I assign the event.result to my ArrayCollection I get a Cannot Convert to ArrayCollection error message... Let me give an example: MyXMLFile.xml: people person firstNameJoe/firstName lastNameSmith/lastName /person /people If I have more than one person/person pair in my XML file, then they get returned as an ArrayCollection in event.result.people.person. But with only one person/person pair in my XML file, event.result.people.person is an ObjectProxy -- which can't be converted to an ArrayCollection, apparently. If event.result.people had a length property, I could just loop over it for {length} number of times and addItem() each person to my ArrayCollection -- but I see no length property on the event.result... So how do I get this to work? I won't know in advance how many person/person pairs are in the XML file, so I can't make any assumptions about the length... Could be 1, could be 100... Is there a way to programmatically tell whether or not event.result.people.person is an ArrayCollection or an ObjectProxy? If I could tell what it was, then I could use that information to let the program decide how to deal with it... Thanks for any suggestions... Laurence MacNeill Mableton, Georgia, USA
RE: [flexcoders] Convert ArrayCollection to Array
You are getting the array, so the issue is further along the line. For any data more complex than simple values, I pass data using xml, so I do not even know how an array gets serialized/deserialized by HTTPService. If you look at that parameter in PHP, what is actually in it? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of s_hernandez01 Sent: Wednesday, March 10, 2010 2:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Convert ArrayCollection to Array I'm trying to convert my ArrayCollection in my datagrid to an Array so I can use the post method to send out the array to php from flex, but php is not recognizing the array can someone tell me what I'm doing wrong: public var ac:ArrayCollection = new ArrayCollection(); public function uploadData():void{ var postArray:Array = new Array(); postArray = ac.source; }
RE: [flexcoders] sending email from actionscript / flex REFdn6005077818
Yes (or some other server technology), in which case the server is actually sending the email. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of dennis Sent: Wednesday, March 10, 2010 1:07 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] sending email from actionscript / flex REFdn6005077818 This is a solution, but I would like to send email as the user fills a flex form. I think that the only solution is to talk with php. dennis ...we are what we are doing... P Think! before you print. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Roman Protsiuk Sent: Monday, March 08, 2010 7:54 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] sending email from actionscript / flex REFdn6005077818 navigateToURL(mailto:f...@bar.com;); R On Mon, Mar 8, 2010 at 4:44 PM, dennis den...@anel.cc wrote: Hi, does any body knows how can we send emails from flex projects? (in order to implement a send email form) dennis ...we are what we are doing... P Think! before you print. __ NOD32 4924 (20100308) Information __ This message was checked by NOD32 antivirus system. http://www.eset. http://www.eset.com com
RE: [flexcoders] Load files on the fly?
Search on Web tier Compiler. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of newflexcoder Sent: Monday, March 08, 2010 5:24 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Load files on the fly? Hi, We are building a new configurator. The configuration will come from an XML file, and the correct type of controls and values will be displayed based on this XML. We'd like to take the XML, transform it into mxml, compile it on the fly, and load it into Flex at runtime. Is this possible? If so, can someone point me in the right direction? thanks.
RE: [flexcoders] SWC not getting updated everytime
This is not normal behavior. Usually it happens when there is an error in the code. In that case a swf will not be compiled. Have you looked at the Problems pane? Also, try menu, Project, Clean Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Fahim Akhter Sent: Monday, March 08, 2010 1:57 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] SWC not getting updated everytime My swf has sprites (classes) which are used to extend other classes in my project e.g BodyView is a movieclip in my swc BodyModel is a class in my main project extended through BodyView When I was using flash develop everytime I compiled the swc it automatically got updated in the project on compilation. This does not happen in flex Builder. The only way I get the flex Develop to update is when I goto project options change the options of SWC to merge code click ok. Go back and then click on runtime press ok and compile. On Sun, Mar 7, 2010 at 10:22 PM, Peeyush Tuli peeyus...@gmail. mailto:peeyus...@gmail.com com wrote: are you compiling a library project and then unable to get the updated swc? - must be an access problem in the output directory or is your flex project dependent one of your library projects? - why did you add the swc as a reference, if you are also coding the lib project. A better practice would be to add a project reference on the lib project instead. If you have already done that, your build order in the workspace might be a problem. On Sun, Mar 7, 2010 at 1:52 PM, akhter.fahim akhter.fahim@ mailto:akhter.fa...@gmail.com gmail.com wrote: Hi, Whenever I compile my SWC it doesn't get compiled with the project itself. In project Properties I delete the swc and then add it again only then it compiles again. How do I get flex to get the changes automatically?
RE: [flexcoders] How to access web page on own web site.
You want to use Flex to navigate to html pages? If so, that is a serious waste of Flex RIA technology. But you can call navigateToUrl(). Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of raja_s_patil Sent: Friday, March 05, 2010 2:04 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] How to access web page on own web site. Hello, I am beginner in flex and developing a test project using flex, spring, spring-flex, spring security and iBatis. The test application is mix of jsp pages and flex. The application is embedded in one of jsp pages. We are using a jsp page for logging in and on successful login page with flex application is shown. Till this it works fine. In flex application i have put few buttons which control state of a view stack and few buttons like Home, logout etc. etc. should take user to respective internal web pages. What shall I put in the onclick events so that user is diverted to respective pages of the application and with logout button it should logout from spring security. For logout the equivalent code in jsp is a href=c:url value=/j_spring_security_logout/Logout/a for home it is a href=./../index.jspHome/a Thanks and best regards Raja
RE: [flexcoders] Where can I find a lot of Flex 3 AS3 examples?? Code that from other people?
Got me again on that one! And I was truly thinking at the time, and dont forget google Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Igor Costa Sent: Sunday, February 28, 2010 10:59 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Where can I find a lot of Flex 3 AS3 examples?? Code that from other people? Try this. http://tinyurl. http://tinyurl.com/ya6ofba com/ya6ofba Igor Costa 2010/2/28 Csomák Gábor csom...@gmail. mailto:csom...@gmail.com com did you try 'tour de flex'? http://www.adobe. http://www.adobe.com/devnet/flex/tourdeflex/ com/devnet/flex/tourdeflex/ 2010/2/28 fred44455 fred44...@yahoo. mailto:fred44...@yahoo.com com I am trying to learn Flex 3 AS3 but I need a lot of examples where can I find this?? I need real examples maybe from real sites or books or even source code in Flex that I could purchase. Thanks for your time. -- before printing, think about enviromental responsibility
RE: [flexcoders] Accessing checkbox inside a Datagrid ItemRenderer
No, you don't want to do that. You must have your renderer's checkbox state be set by a property value in the dataProvider item. Then when the checkbox is changed, change the value in the dataProvider item. To programmatically change the state of the checkbox, get a reference to the dataProvider item, and set the property value as desired. You cannot directly access a control in a renderer because they are re-cycled. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Angelo Anolin Sent: Friday, February 26, 2010 11:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Accessing checkbox inside a Datagrid ItemRenderer Hi FlexCoders, Having some troubles trying to resolve this. I hope someone can give me guidelines on how I would be able to achieve this. I need to reference a checkbox inside the datagrid. Below please find some codes I have used. mx:DataGrid id=dgCurrentTasks width=100% height=100% dataProvider={xmllcCurrentTasks} horizontalScrollPolicy=on verticalScrollPolicy=on click=dgCurrentTasks_Click(event) mx:columns mx:DataGridColumn headerText=Task ID width=70 dataField=TaskID/ mx:DataGridColumn headerText=System width=100 dataField=SystemDescription/ mx:DataGridColumn headerText=Task Description width=300 dataField=TaskDescription/ mx:DataGridColumn headerText=Complete width=30 textAlign=center mx:itemRenderer mx:Component mx:VBox horizontalAlign=center verticalAlign=middle mx:CheckBox id=cbxComplete click=outerDocument.cbxComplete_Click(event, data.TaskID, data.SystemDescription)/ /mx:VBox /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid And the function called by the checkbox inside the datagrid. public function cbxComplete_Click(e:Event, issueID:String, systemDescription:String) :void { if(e.currentTarget.selected) { Alert.show('Are you sure you want to set Task ID ' + taskID + ' to Complete?', 'Task Complete Confirmation', Alert.YES | Alert.NO, null, completeTaskAlertHandler, null, Alert.NO); } } And the alert handler private function completeTaskAlertHandler(evt:CloseEvent) { if (evt.detail == Alert.YES) { // Do the TASK COMPLETION Here. Alert.show('Setting Task Status to COMPLETE', 'TEST ALERT'); } else { // Uncheck the checkbox which was checked. Alert.show('NO??', dgCurrentTasks.selectedIndices.toString()); //dgCurrentTasks.selectedIndices.cbxComplete.selected = false; --- This does not work... // I need to reference the checkbox here so that I could UN-Select it. } } Another question, would it be possible that instead of declaring the function completeTaskAlertHandler, is it possible to simply place it inline inside the cbxComplete_Click function? Like: public function cbxComplete_Click(e:Event, issueID:String, systemDescription:String) :void { if(e.currentTarget.selected) { Alert.show('Are you sure you want to set Task ID ' + taskID + ' to Complete?', 'Task Complete Confirmation', Alert.YES | Alert.NO, null, (completeTaskAlertHandler() { if (evt.detail == Alert.YES) { // Do the TASK COMPLETION Here. Alert.show('Setting Task Status to COMPLETE', 'TEST ALERT'); } else { // Uncheck the checkbox which was checked. Alert.show('NO??', dgCurrentTasks.selectedIndices.toString()); //dgCurrentTasks.selectedIndices.cbxComplete.selected = false; --- This does not work... } }), null, Alert.NO); } } Appreciate your inputs. Thanks a lot. Angelo
RE: [flexcoders] Do I need a crossdomain policy file?
I think you will. Flash Player is very strict about what it considers the same domain. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of dogra_daman Sent: Thursday, February 25, 2010 8:53 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Do I need a crossdomain policy file? I am hosting a Flex based application on Amazon Cloud. The swf file for this app would be served from a url which looks something like https://ec-sfdkmds- https://ec-sfdkmds-sifdhsu.pilot-1.amazonaws.com. sifdhsu.pilot-1.amazonaws.com. This swf would be needed to make http calls to url https://ec2. https://ec2.amazonaws.com...which amazonaws.com...which is essentially the same domain, but a different host. Would I need a croosdomain policy file on https://ec2. https://ec2.amazonaws.com amazonaws.com ? ..and are there any Flash Player/Browser version related dependencies here ? Thanks DD
RE: [flexcoders] advanced datagrid in popped up titlewindow issue
Probably a timing issue. Binding is difficult to debug. Make sure your dataSource var is bindable. Initialize might be too early. Test the content in a handler function and also check it in a creationComplete handler. I rarely use initialize for any data oriented work. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nick Middleweek Sent: Thursday, February 25, 2010 9:15 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] advanced datagrid in popped up titlewindow issue It's a bit hard without seeing the full code: http://pastebin. http://pastebin.com/ com/ But... It might be worth changing your attributesData.initialize to a function call and perform the layerGroup.refresh() inside that function. But just before that call drop in a break point and debug what the grouping.source is... Just an idea. On 25 February 2010 13:55, Paul Hastings paul.hastings@ mailto:paul.hasti...@gmail.com gmail.com wrote: i have a flex (3.5 SDK) advanced datagird that works fine in the app's main layout but when moved into a popup titlewindow it won't fill with data. a normal datagrid in the same titlewindow component using the same datasource works fine. component creation data passed in: idResultWindow=IdentifyResultWindow(PopUpManager.createPopUp(this,IdentifyRe sultWindow,false)); idResultWindow.dataSource=featureAttributes; datagrid in question (in idResultWindow): mx:AdvancedDataGrid x=10 y=10 id=attributesData initialize=layerGroup.refresh(); width=100% height=100% mx:dataProvider mx:GroupingCollection id=layerGroup source={dataSource} mx:grouping mx:Grouping mx:GroupingField name=layer/ /mx:Grouping /mx:grouping /mx:GroupingCollection /mx:dataProvider mx:columns mx:AdvancedDataGridColumn headerText= dataField=attribute/ mx:AdvancedDataGridColumn headerText= dataField=value/ /mx:columns /mx:AdvancedDataGrid gone blind looking thru these few lines of code now kind of stumped, anyone have any ideas? thanks.
RE: [flexcoders] addPopUp above application but below component
Don't use PopUp, but rather a normal component, so you can control the order in the display list, which determines the z-order. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of dorkie dork from dorktown Sent: Thursday, February 25, 2010 5:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] addPopUp above application but below component i have an application that has a header title bar running along the top. i have a window that slides in from the top of the screen. right now it slides in from above the screen over the header title bar. what would be the easiest way to make it so that it is below the header title bar but above everything else? dorkie dork
RE: [flexcoders] Strategies for switching between testing and deployment addresses
Or pass the IP address in via flashvars from the wrapper. You just need one wrapper for production and one for development. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Peeyush Tuli Sent: Monday, February 22, 2010 6:47 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Strategies for switching between testing and deployment addresses you can always read the ip address from an xml file at application startup and bind your service to it.. On Mon, Feb 22, 2010 at 6:30 AM, David Adams dpad...@gmail. mailto:dpad...@gmail.com com wrote: I've been writing some small programs that use HTTPService calls to fetch data from a back-end. During testing, I'm using 127.0.0.1 or an IP address on my subnet. When I deploy, I update the IP address in service definitions to the right external address and build the app. Or at least I mean to. It's all too easy to accidentally change the addresses for internal testing and then forget to switch them back before building. Is there a best practice or simple strategy for putting the IP address somewhere outside of the source code that it can easily be edited without a rebuild? Thanks for any advice.
RE: [flexcoders] Re: Still getting Security Sandbox violations...
Also be aware that there are a couple additional lines required in the crossdomain file in some circumstances, especially for webservce: site-control permitted-cross-domain-policies=master-only/ allow-http-request-headers-from domain=* headers=*/ I'm with you on despising the constraints of security. But resistance is futile. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: Saturday, February 20, 2010 12:28 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Still getting Security Sandbox violations... Ok -- I figured out #2 below... flex.messaging.endpoints.SecureAMFEndpoint in the services-config.xml file only belongs there in ColdFusion 8. For ColdFusion 9 it's different: coldfusion.flash.messaging.SecureCFAMFEndPoint (Warren's message earlier said my endpoints were funky -- I'm guessing he's using CF8.) So I changed it, and now I'm not getting the 404 error. But I still want to know about the secure=false tag. Will setting that prevent my channel from being secure? Yet setting it seems to be the only way I can access my data, which is very stupid if that's going to un-secure my channel. I mean, what's the point? Thanks, L. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Laurence lmacne...@... wrote: 2) If I go ahead and set secure=false and leave the domain=*, instead of getting the Security Sandbox violation, I'm getting a Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Status 404: url: 'https://mydomain. https://mydomain.com/flex2gateway/secureamf com/flex2gateway/secureamf' So HTTP 404, that's file-not-found... What file is it not finding?
RE: [SPAM] [flexcoders] Re: Get Rid of [SPAM] tag
Dang. I have checked both goDaddy and my local Norton, but both say spam protection is off. I will keep looking. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Tuesday, February 16, 2010 7:58 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Get Rid of [SPAM] tag I'm sorry to say that I've only ever seen it from your mails. I wonder if it's GoDaddy adding these. Do they have a spam filter setting somewhere? --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: Is it just me? I hate it myself, but don't know where it is coming from. I have googled the issue and found no clear solutions. I am using outlook through an email account a goDaddy. I will keep trying to stop that.
RE: [SPAM] Re: [SPAM] [flexcoders] How to stop execution?
I hear that. The non-blocking, single threaded, asynchronous data calls nature of Flex takes a bit of getting used to. OT, Laurence, I am nearly a neighbor. I live in Carrollton, and am currently commuting to Alpharetta 3-4 days a week. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: Monday, February 15, 2010 3:24 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] How to stop execution? Yeah, that's what I thought Ugh... That means re-writing a bunch of code just to add a damn Yes/No choice for the user... Not fun... I just with the bosses would stop wanting stuff changed!! LOL L. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: .Is there a way to stop the program's running until. No, there is no way to stop a function from running. A Flex app is essentially single threaded, from the developers perspective. You must have your alert box call a handler function, then in that function, complete whatever action you need based on the event.detail. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Laurence Sent: Sunday, February 14, 2010 10:32 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [SPAM] [flexcoders] How to stop execution? Here's what I've got... I have an 'if' statement that calls a boolean function -- problem is, that function pops up a Yes/No Alert window. In order to know what button the user clicked, the handler-function must be called from the Alert pop-up, thereby preventing the boolean function from returning a proper value based on the outcome of the Alert window... Lemme 'splain a bit better with an example: private myMainFunction():void { //many things going on here before we get to the 'if' statement below. if (myBooleanFunction()) { //set a local-to-this-function variable here. } else { //set a local-to-this-function variable to something else. } //More things going on here that need the above-referenced local-to-this-function variable to be set before they can run. } private function myBooleanFunction():Boolean { Alert.show(Do you want to do this?,Alert...,(Alert.YES | Alert.NO, this, alertHandler, null, Alert.NO); //Flex is expecting a true/false return HERE, but I can't give one because I don't know the result until the alertHandler has run. } private function alertHandler(event:CloseEvent):void{ if (event.detail == Alert.YES) { return true; //of course alertHandler isn't a boolean, so this doesn't work. } else { return false; //of course alertHandler isn't a boolean, so this doesn't work. } Of course the above example does NOT work, because the alertHandler function is of type void, and the myBooleanFunction doesn't return anything. So, how do I get the myBooleanFunction to return true/false based on the outcome of the alertHandler function? Is there any way to do this? If not, what's my alternative? Is there a way to stop the program's running until alertHandler sets a public variable, perhaps? What's the proper way to handle this? Thanks, Laurence MacNeill Mableton, Georgia, USA
RE: [SPAM] Re: [SPAM] RE: [SPAM] [flexcoders] Component Data Calls
Is it just me? I hate it myself, but don't know where it is coming from. I have googled the issue and found no clear solutions. I am using outlook through an email account a goDaddy. I will keep trying to stop that. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Monday, February 15, 2010 4:23 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] RE: [SPAM] [flexcoders] Component Data Calls Tracy (Totally Off topic) Is there any way you could get rid of the [SPAM] tag that gets added to all of your replies? It really screws up my spam filter. Thanks and Best Regards Steve --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: I believe you will want to use Modules for that. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Dan Pride Sent: Sunday, February 14, 2010 11:28 AM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [SPAM] RE: [SPAM] [flexcoders] Component Data Calls Thank you for your answer. Question if you would, I have been asking it everywhere and get NO satisfactory answers. How to approach a multi-windowed application, particurarly in FB4? 1) Different Urls? 2) ViewStacks? 3) States? 4) ViewStacks of States (Master-Detail in one ViewStack as two states)? 5) Do States initialize in Flash Builder 4? I had heard they do not? I am trying to design a 50 or so screen application but I don't want the entire thing to download on first sight? Just what is needed when it is needed. Thanks Dan Pride thanks Dan Pride --- On Sun, 2/14/10, Tracy Spratt tr...@... wrote: From: Tracy Spratt tr...@... Subject: RE: [SPAM] [flexcoders] Component Data Calls To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Date: Sunday, February 14, 2010, 10:37 AM Yes, certainly. I normally do all of my data access in a special component and then update a local model with the data. I use binding and ChangeWatchers to respond to updates to the model. I typically use the singleton pattern for my model. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Dan Pride Sent: Sunday, February 14, 2010 10:30 AM To: Flex Coders Subject: [SPAM] [flexcoders] Component Data Calls Is it possible to make a service call from inside a component? In other words the component would be totally independent, getting its own data from the back end rather than passing it in from the parent mxml? Thanks Dan Pride
RE: [SPAM] Re: [flexcoders] Adding dynamic LinkButtons and views (modules)
I would suggest using repeater for this, instead of manually using addChild. You will find that much easier when the time comes to change the buttons, especially if there are any other children in navACB. Use your logic to manipulate the dataProvider for the repeater. Tracy Spratt, Lariat Services, development services available -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Wally Kolcz Sent: Sunday, February 14, 2010 9:23 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] Adding dynamic LinkButtons and views (modules) Nevermind...figures it out. I am a moron. Just extended the LinkButton (to MyLinkButton) to add my own variable. Split the function off to its own to change the stack order, and used the e.target.index (index being my own custom variable) and it works fine. On 2/14/2010 8:41 AM, Wally Kolcz wrote: Ok, I am requesting the collection brain power to get over this mental hump of how to add dynamic buttons and have them control a view stack of modules. I have 4 different portals for kids, siblings, parents, and hospitals. When the user logs in, it finds their type and loads an XML document containing module file names and button names. Each portal contains different number of modules and depending on the XML document, that can change. Right now I am looping through the XML and creating LinkButtons with the name node being added as the label. Problem is that I want to then load the modules in a viewstack and use the buttons to switch through the stack using the index of the loop to tell the button what selectedIndex of the stack to show. (I.E. the first loop, i = 0, so the MouseClick eventlistener will set the viewstack's selectedIndex to 0 (the first level). I want the module to match up with the button. Hope that makes sense Anyways I am adding an embedded function to the MouseClick eventlistener I am associating with each LinkButton before I addChild() it to the application. Problem is, the index I am associating with it is wrong when I attempt to trace it. Ok, all that to show you this and hope you can help me. What I want is to loop through the XML document, create LinkButtons with the label from thename node and then, when clicked, change the ViewStack (appVS) to the index that matches the current loop. I am up for both modifying my code (or pointing out what is wrong) or a better idea. public function init():void { for (var i:int = 0; i moduleList.module.length(); i++){ var button:LinkButton = new LinkButton; button.label = moduleList.module[i].name; button.setStyle(fontSize,12); button.addEventListener(MouseEvent.CLICK, function():void{appVS.selectedIndex=i;}); navACB.addChildAt(button, i); } } The first button should be created, put in the 0 space on the navACB, and move the ViewStack to the 0 level when clicked. Next should be created, put it in the 1 space on the navACB, then move the ViewStack to the 1 level when clicked...and so on. Thanks! -- 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-1e62 079f6847 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-1e62 079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
RE: [SPAM] [flexcoders] Component Data Calls
Yes, certainly. I normally do all of my data access in a special component and then update a local model with the data. I use binding and ChangeWatchers to respond to updates to the model. I typically use the singleton pattern for my model. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dan Pride Sent: Sunday, February 14, 2010 10:30 AM To: Flex Coders Subject: [SPAM] [flexcoders] Component Data Calls Is it possible to make a service call from inside a component? In other words the component would be totally independent, getting its own data from the back end rather than passing it in from the parent mxml? Thanks Dan Pride
RE: [SPAM] RE: [SPAM] [flexcoders] Component Data Calls
I believe you will want to use Modules for that. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dan Pride Sent: Sunday, February 14, 2010 11:28 AM To: flexcoders@yahoogroups.com Subject: [SPAM] RE: [SPAM] [flexcoders] Component Data Calls Thank you for your answer. Question if you would, I have been asking it everywhere and get NO satisfactory answers. How to approach a multi-windowed application, particurarly in FB4? 1) Different Urls? 2) ViewStacks? 3) States? 4) ViewStacks of States (Master-Detail in one ViewStack as two states)? 5) Do States initialize in Flash Builder 4? I had heard they do not? I am trying to design a 50 or so screen application but I don't want the entire thing to download on first sight? Just what is needed when it is needed. Thanks Dan Pride thanks Dan Pride --- On Sun, 2/14/10, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [SPAM] [flexcoders] Component Data Calls To: flexcoders@yahoogroups.com Date: Sunday, February 14, 2010, 10:37 AM Yes, certainly. I normally do all of my data access in a special component and then update a local model with the data. I use binding and ChangeWatchers to respond to updates to the model. I typically use the singleton pattern for my model. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of Dan Pride Sent: Sunday, February 14, 2010 10:30 AM To: Flex Coders Subject: [SPAM] [flexcoders] Component Data Calls Is it possible to make a service call from inside a component? In other words the component would be totally independent, getting its own data from the back end rather than passing it in from the parent mxml? Thanks Dan Pride
RE: [SPAM] [flexcoders] Killing a Singleton
You could add a method newInstance() that sets the internal instance variable to a new instance; Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Wally Kolcz Sent: Sunday, February 14, 2010 1:08 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Killing a Singleton I want when the user logs out, the instance of the Singleton that supports their global information to get set to null. How can you delete a Singleton existence or set it to null? package org.mywindow.model { [Bindable] public final class UserDataModel { private static var instance:UserDataModel; public function UserDataModel(singletonEnforcer:MySingletonEnforcer) { if (singletonEnforcer == null) { throw new Error (UserDataModel is a singleton class, use getInstance() instead); } } public static function getInstance():UserDataModel { if (instance == null) instance = new UserDataModel(new MySingletonEnforcer()); return instance; } } } class MySingletonEnforcer {} Thanks!
RE: [SPAM] [flexcoders] How to stop execution?
.Is there a way to stop the program's running until. No, there is no way to stop a function from running. A Flex app is essentially single threaded, from the developers perspective. You must have your alert box call a handler function, then in that function, complete whatever action you need based on the event.detail. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: Sunday, February 14, 2010 10:32 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to stop execution? Here's what I've got... I have an 'if' statement that calls a boolean function -- problem is, that function pops up a Yes/No Alert window. In order to know what button the user clicked, the handler-function must be called from the Alert pop-up, thereby preventing the boolean function from returning a proper value based on the outcome of the Alert window... Lemme 'splain a bit better with an example: private myMainFunction():void { //many things going on here before we get to the 'if' statement below. if (myBooleanFunction()) { //set a local-to-this-function variable here. } else { //set a local-to-this-function variable to something else. } //More things going on here that need the above-referenced local-to-this-function variable to be set before they can run. } private function myBooleanFunction():Boolean { Alert.show(Do you want to do this?,Alert...,(Alert.YES | Alert.NO, this, alertHandler, null, Alert.NO); //Flex is expecting a true/false return HERE, but I can't give one because I don't know the result until the alertHandler has run. } private function alertHandler(event:CloseEvent):void{ if (event.detail == Alert.YES) { return true; //of course alertHandler isn't a boolean, so this doesn't work. } else { return false; //of course alertHandler isn't a boolean, so this doesn't work. } Of course the above example does NOT work, because the alertHandler function is of type void, and the myBooleanFunction doesn't return anything. So, how do I get the myBooleanFunction to return true/false based on the outcome of the alertHandler function? Is there any way to do this? If not, what's my alternative? Is there a way to stop the program's running until alertHandler sets a public variable, perhaps? What's the proper way to handle this? Thanks, Laurence MacNeill Mableton, Georgia, USA
RE: [SPAM] Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid
If you can get what you need easily from a rendered renderer, then it sounds like the hidden DG with all of the rows rendered might be the way to go. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mike Sent: Saturday, February 13, 2010 2:10 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid I have no control over the dataProvider at all. Performance is not an issue, because the data extraction only happens once, and it can be time-sliced it so the webapp does not appear to freeze. Passing through multiple event handlers, including EnterFrame would be perfectly acceptable. 3) Depth: Since you have no control over the renderers, you don't have any way of knowing whether they're composed of containers within containers, etc. True. The routine needs to deal with that. 4) Layout: Presumably, you want to have the text appear in the same order it appears in the columns, and then within the individual renderers. There's no guarantee that your iteration will go from top left to bottom right, so you'll have to record where the text was found and then arrange it in some way that tries to make sense (but may not, depending on what is going on in the renderers). Yes, doing this right will be a lot of work. 5) Random surprises from the renderer developers. If the renderer developer makes a reference to its parent, owner, or something else like that and you instantiate it in a way that doesn't involve a List of some sort, you may wind up with Null Pointer Exceptions. They may come up with other stuff that won't come up in your testing with reasonable renderers that you wrote, but it will be your fault when they do something stupid and YOUR logic errors out. Yep, that is true. In short, you have to work together with your other team members one way or another to make this work. There are no other team members. This is a library routine. I want this to be as general as possible, and am prepared to do what it takes to make it work properly. Why not just shortcut to the most performant method? Performance is not important, general utility is important. The library feature should just work, no excuses.
RE: [SPAM] [flexcoders] Re: navigateToURL error
.creating a custom component and repeating that yes, yes, yes. Pass in the entire currentItem and store it in a public variable, and then you will be able to code the repeated item cleanly and clearly. I'd suggest having the component dispatch an event on click, then listen for that in the repeater's parent. Use event.target.itemData(or whatever you named the public var) to get the text of the link and then build the full argument to navigateToeURL. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Friday, February 12, 2010 11:43 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: navigateToURL error Try this... mx:Text text={imageRepeater.currentItem.linkText} click={navigateToURL(new URLRequest(imageRepeater.currentItem.link), 'blank');} x=109 y=200 fontFamily=Gunplay fontSize=14/ Although I would recommend creating a custom component and repeating that. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Darrin Kay dar...@... wrote: I am tring to get some text become a link in a Flex3 app, but getting an error I know the data is getting pulled in, in this case I hard coded the xml with http://www.espn. http://www.espn.com com for testing so it is not the link. mx:Repeater id=imageRepeater dataProvider={imageData.lastResult.panel} mx:Panel id=MainPanel xmlns:mx=http://www.adobe. http://www.adobe.com/2006/mxml com/2006/mxml layout= absolute title={imageRepeater.currentItem.title} width=450 height=253 themeColor=#C4BA88 borderColor=#C4BA88 headerColors=#C4BA88 roundedBottomCorners=true backgroundImage=@Embed(source='images/backgroungLeftLogo.jpg') cornerRadius=15 mx:TextArea id=panelSub x=109 y=24 width=316 height=33 alpha=0 fontFamily=Gunplay htmlText={imageRepeater.currentItem.sub} fontSize=22 / mx:TextArea id=panelBody x=109 y=56 width=316 height=136 alpha=0 fontFamily=Gunplay htmlText={imageRepeater.currentItem.body} fontSize= 16 textAlign=center themeColor=#C4BA88/ mx:Text text={imageRepeater.currentItem.linkText} click=navigateToURL(* new* URLRequest({imageRepeater.currentItem.link}), *'blank'*); x=109 y= 200 fontFamily=Gunplay fontSize=14/ !-- the errors are on this line -- /mx:Panel /mx:Repeater the above code will not compile: 1084 : Syntax error: expection colon before dot. 1084 : Syntax error: expection identifier before rightbrace. thanks for the help, D
RE: [SPAM] [flexcoders] Re: Air File Is Damaged Error
Yes, look at the appinstall log. I don't recall exactly how to do that so just google it. In my case it was a bad character in the filename, an ampersand if I recall correctly. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of James Sent: Friday, February 12, 2010 1:35 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Air File Is Damaged Error Thanks for that. I'll try it. How can I solve a lack of space in my temp directory exactly? I've heard of the airappinstall thing too but how exactly do I do this? I'm on vista. Sorry if this all sounds stupid. I'm just a flex student at the moment. Cheers for your help so far. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Jim Hayes j...@... wrote: Are you including any other files in the package? I seem to remember that certain characters in their file names could cause this problem. Maybe an ampersand ??? I'm sorry, it was quite a while ago and I've forgottten exactly which char(s) caused it for me. There was a bug open on it at the time as I remember. Maybe worth having a quick scan through and see if theres anything unusual in there? An .air file is basically a .zip achive, by the way, if you need to look inside - take a copy and rename It to.zip These damaged errors seem to occur when the archive cannot be expanded, so a lack of space in your temp directory can also cause this. You can log the process by placing a file called .airappinstall.log in your home directory, by the way - the install process will be logged to that, so it may give you a litte more info as to the cause. -Original Message- From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of James Sent: 12 February 2010 15:48 To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] Re: Air File Is Damaged Error I don't think so. In a project I made a while ago I have an app called coolvisi1. A few months back I created an air file from this very app called coolvisi1.air and I've tested it just now and it works perfectly. The app in question hasn't even been touched since back then. I've just tried to create another air file from it called coolvisi2.air and I got the error. However I've made another app the other day and tried to make an air file from that and it worked upon installation. This makes me think it's something to do with the code inside the app but how would I be able to find out what is causing this? Is there any way of looking at the contents of an air file to see exactly what is damaged and compare it to the contents of the one that works or something along those lines? Totally crazy problem and I've had a few of them this week :-( --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com mailto:flexcoders%40yahoogroups.com , seanmcmonahan sean@ wrote: Have you recently changed sign certificates? Had a similar problem when our certain expired. Ended up having to migrate the old one to the new for each update. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com mailto:flexcoders%40yahoogroups.com , James garymoorcroft_ict@ wrote: Yes but the fact that other air files I make are working shows that it's not a flex/air related problem doesn't it? If it is this though how would I fix it? --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com mailto:flexcoders%40yahoogroups.com , Johannes Nel johannes.nel@ wrote: one thing which can cause this is if the update.xml file and the air file have different versions. On Fri, Feb 12, 2010 at 2:54 PM, James garymoorcroft_ict@wrote: I keep getting the same The application could not be installed because the AIR file is damaged. etc... message every time I attempt to test the install of an air file I've just made from an application in flex. I've tried exporting other applications for release build and they work fine but it just seems this particular one won't work so I know it's not a flex problem. I've tried starting a whole new project and creating a new app and copying and pasting all of the code from the app I need into this new app and exporting that for release build from there but again I get the same error. Is there any way of finding out what is causing this error and is there a fix for this? -- j:pn \\no comment __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165
RE: [SPAM] [SPAM] [flexcoders] Re: Air File Is Damaged Error
Im my case it was an image file in the assets folder. Look in the app install log. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of James Sent: Friday, February 12, 2010 2:36 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [SPAM] [flexcoders] Re: Air File Is Damaged Error Ah right. The name of the swf file itself contained an ampersand or the air file which you compiled from your application? I tried changing the name of the air file to include only letters but that didn't seem to work either. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: Yes, look at the appinstall log. I don't recall exactly how to do that so just google it. In my case it was a bad character in the filename, an ampersand if I recall correctly. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of James Sent: Friday, February 12, 2010 1:35 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [SPAM] [flexcoders] Re: Air File Is Damaged Error Thanks for that. I'll try it. How can I solve a lack of space in my temp directory exactly? I've heard of the airappinstall thing too but how exactly do I do this? I'm on vista. Sorry if this all sounds stupid. I'm just a flex student at the moment. Cheers for your help so far. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Jim Hayes jim@ wrote: Are you including any other files in the package? I seem to remember that certain characters in their file names could cause this problem. Maybe an ampersand ??? I'm sorry, it was quite a while ago and I've forgottten exactly which char(s) caused it for me. There was a bug open on it at the time as I remember. Maybe worth having a quick scan through and see if theres anything unusual in there? An .air file is basically a .zip achive, by the way, if you need to look inside - take a copy and rename It to.zip These damaged errors seem to occur when the archive cannot be expanded, so a lack of space in your temp directory can also cause this. You can log the process by placing a file called .airappinstall.log in your home directory, by the way - the install process will be logged to that, so it may give you a litte more info as to the cause. -Original Message- From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of James Sent: 12 February 2010 15:48 To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] Re: Air File Is Damaged Error I don't think so. In a project I made a while ago I have an app called coolvisi1. A few months back I created an air file from this very app called coolvisi1.air and I've tested it just now and it works perfectly. The app in question hasn't even been touched since back then. I've just tried to create another air file from it called coolvisi2.air and I got the error. However I've made another app the other day and tried to make an air file from that and it worked upon installation. This makes me think it's something to do with the code inside the app but how would I be able to find out what is causing this? Is there any way of looking at the contents of an air file to see exactly what is damaged and compare it to the contents of the one that works or something along those lines? Totally crazy problem and I've had a few of them this week :-( --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com mailto:flexcoders%40yahoogroups.com , seanmcmonahan sean@ wrote: Have you recently changed sign certificates? Had a similar problem when our certain expired. Ended up having to migrate the old one to the new for each update. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com mailto:flexcoders%40yahoogroups.com , James garymoorcroft_ict@ wrote: Yes but the fact that other air files I make are working shows that it's not a flex/air related problem doesn't it? If it is this though how would I fix it? --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com mailto:flexcoders%40yahoogroups.com , Johannes Nel johannes.nel@ wrote: one thing which can cause this is if the update.xml file and the air file have different versions. On Fri, Feb 12, 2010 at 2:54 PM, James garymoorcroft_ict@wrote: I keep getting the same The application could not be installed because the AIR file is damaged. etc... message every time I
RE: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid
I will answer, but you probably won't like the answer. This is simply not possible. In order to optimize performance, DataGrid and the other list components only create(render) the visible elements. If a row is not visible, it does not exist. You can't look sideways into your tv screen and see beyond the edges. You must do wok like this using the dataProvider. What are you trying to do? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mike Sent: Friday, February 12, 2010 4:06 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Obtaining rendered text from a DataGrid I need extract the rendered text from all cells of a DataGrid, whether or not they are all displayed. The following code dies because renderer is null: public var dp:ArrayCollection = new ArrayCollection(); /** Obtain formatted text data from the DataGrid's dataProvider. * Other data generated by item renderers such as images are ignored. */ protected function extractData(originalComponent:*):void { var dg:DataGrid = DataGrid(originalComponent); for (var col:int=0; coldg.columnCount; col++) { var rowArray:Array = []; for (var row:int=0; rowdg.rowCount; row++) { var index:int = dg.indicesToIndex(row, col); var renderer:IListItemRenderer = dg.createItemRenderer(index); var value:* = renderer.data; rowArray.push(value); } dp.addItem(rowArray); } } Most of my posts to this group go unanswered. Hopefully this one won't suffer the same fate! :) Mike
RE: [SPAM] [flexcoders] Re: Problem with dealing with loads of XML data
Me too. Plus, be aware that with a large number of renderers visible on screen at once (spreadsheet for example) there is a significant performance issue with XML items as compared to a VO item with strongly typed properties. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of valdhor Sent: Wednesday, February 10, 2010 8:56 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Problem with dealing with loads of XML data I would have used a datagrid with editing turned on. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, shail shail_l...@... wrote: Hi, In my application I created a panel full of TextInput controls to make it look like a excelsheet. I pushed my TextInputs Ids in Array while creation complete event. I assign data to respective TxtInput by looping though Array. Data is coming as XML, so its taking much time and got application slow. Any other approach, work around could be of some help. how can I make it faster?? Thanks, Shailendra
RE: [SPAM] Re: [flexcoders] Re: Flex Project Hosting
I have used GoDaddy to host a large data-deriven app, using their hosted sql server and it works very well. I do not have anything in production hosted, though. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Vasudev Sent: Wednesday, February 10, 2010 12:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] Re: Flex Project Hosting As Laurence said, any normal hosting providers can host your swf file (Flex after all throws a SWF file). Flex/ Flash CS4 are just IDEs both finally build a swf file only. Flex builder is just a name to differentiate the IDEs. So normally any hosting providers can host your swf files. There are number of ways to connect your flex/flash applications with the Database...Say if you are using Java as the back end, use Blaze DS, Web ORB to connect Database, For PHP there is AMFPHP, ZendAMF etc. Or using XML and Http Services we can achieve the same task with any programming language. Regards Dev --- On Wed, 10/2/10, Laurence lmacne...@comcast.net wrote: From: Laurence lmacne...@comcast.net Subject: [flexcoders] Re: Flex Project Hosting To: flexcod...@yahoogroups..com Date: Wednesday, 10 February, 2010, 5:36 PM If your host can send a .SWF file to the client's browser, you can run a simple Flex program. If you want the program to do anything useful, like storing data on the server, for example, the host needs to offer back-end support for ColdFusion, and some sort of SQL database. There are many other back-ends that will work also (besides ColdFusion), but I'm not knowledgeable enough to list them all here... Someone else, I'm sure, will have that info. Laurence MacNeill Mableton, Georgia, USA --- In flexcod...@yahoogro http://in.mc951.mail.yahoo.com/mc/compose?to=flexcoders%40yahoogroups.com ups.com, Shabir Gilkar shabirgilkar@ ... wrote: Hi All! Do we need to purchase special hosting plans from any particular hosting company to host flex projects/ website OR we can go far any normal hosting plan e.g of Godaddy. As i personally host flash websites on simple godaddy hosting accounts. Now i wanna to know about Flex project hosting. -- With Regards Shabir Ahmad Gilkar Srinagar Kashmir JK Voice: +91 9419942501 email: shabirgilkar@ ... URL: http://shabirgilkar http://shabirgilkar.wordpress.com/ .wordpress. com Skype: shabirgilkar _ Your Mail works best with the New Yahoo Optimized IE8. Get it NOW! http://in.rd.yahoo.com/tagline_ie8_new/*http:/downloads.yahoo.com/in/intern etexplorer/ .
RE: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working...
You said, I scroll up and down, and the selected value in the ComboBox does NOT change, but the values in the drop-down DO change So I have been trying to solve the wrong problem. The problem is that the combo box dataProvider is not updating correctly when you scroll, is that correct? Did you try directly assigning the dataProvider instead of binding as I suggested earlier? Yes, use commitProperties. Find an example, mine on www.cflex.net http://www.cflex.net/ is one, there are many others. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: Monday, February 08, 2010 8:44 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working... --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: Post it here, the more eyes that look at it the better for you. Know an easy way to export my SQL data as something I can post here? Something like an SQL to XML conversion, so I can include the data in a text file that the test-program can read? Your DataGrid is not editable, correct? And your render is not set as an editor, right? The data grid IS editable, and one of the columns has renderer-as-editor set. NOT the column that's giving me the trouble. In fact all the columns have editable set to false, except one column -- again, NOT the one that's giving me trouble. I assume you have debugged this and have tested to see that the dataProvider is set when you set selectedItem? Maybe there is a timing issue with the bound dataProvider. Loop over the items to make sure the item exists. And make sure it matches the selectedIndex. I'd probably suggest you do this any way and use selectedItem always. I would use a conditional, testing for the selectedItem, rather than blindly setting selectedIndex every time. Not 100% certain what you mean here... Check to see if the selectedItem isn't null? The problem I'm having is not that the selectedItem changes (or appears to change) when you scroll. It's solely in the drop-down. The data that appears in the drop-down will change from time-to-time as you scroll -- but the selected value doesn't change ever, unless you change it manually. And when you do change it manually, it shows the value it's supposed to show! Then you re-open the drop-down and THAT show's the correct values, too! That's what's so weird about this problem. Finally, I strongly suggest you move that work into commitProperties() The set data() function gets called much more often than you may realize. I've never used the commitProperties() function... What does it do? And when does it get called? Would that work 100% of the time? Basically you're telling me to do super.data = value in the set data() function, then populate the drop-down and selectedItem stuff in the commitProperties() function? Is that what you're saying? I'll be working on writing a test-case -- the biggest part of it seems to be exporting my data. I can't find a shortcut to doing that. But if you can answer my above questions, then maybe I won't have to write the test-case? Anyway, thanks a bunch! Laurence MacNeill Mableton, Georgia, USA
RE: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working...
Post it here, the more eyes that look at it the better for you. Your DataGrid is not editable, correct? And your render is not set as an editor, right? I assume you have debugged this and have tested to see that the dataProvider is set when you set selectedItem? Maybe there is a timing issue with the bound dataProvider. Loop over the items to make sure the item exists. And make sure it matches the selectedIndex. I'd probably suggest you do this any way and use selectedItem always. I would use a conditional, testing for the selectedItem, rather than blindly setting selectedIndex every time. Finally, I strongly suggest you move that work into commitProperties() The set data() function gets called much more often than you may realize. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: Sunday, February 07, 2010 6:19 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working... --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Alex Harui aha...@... wrote: Maybe Tracy can figure it out from just the renderer code, but I think I need a complete (but small) test case with some sample data. Can I send it to you via this list? Or do I have to e-mail you privately somehow? Just let me know where to send it, and I'll put together a small test-case for ya sometime in the next couple of days. The only thing I see that looks unusual (besides calling refrehs() is setting both selectedItem and selectedIndex. One should be good enough. Yeah, one should be good enough, I agree... If you notice, however, that I set selectedItem first, then selectedIndex. There are times (rare, but it happens) when the database has been corrupted or accidentally changed, and none of the items match in the selectedItem list. The boss wants it to default, in that case, to whatever is returned by selectedIndex. Kind of an auto-repair for his database. LOL Thanks, Laurence MacNeill Mableton, Georgia, USA
RE: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working...
If I am understanding your problem, Array should be fine. The problem with array is when you update elements. The change events should get fired when the entire array is replaced. Besides, it sounds like the list part is working correctly. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: Friday, February 05, 2010 3:20 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working... Well, hmmm... I can't rewrite it so data.course_fees is an ArrayCollection -- when I change the 'EventVO.as' such that course_fees is an ArrayCollection instead of an Array, it comes back from the database as null... Perhaps that's a problem with my CF code (EventVO.cfc and EventDAO.cfc)? How do you get CF to send data back as an ArrayCollection instead of an Array? I'm thinking that's not possible... If I leave the EventVO.as alone, and course_fees is an Array, then I still have the same problem in my ItemRenderer -- doesn't seem to matter if I make listOfFees an Array or ArrayCollection... --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Laurence lmacne...@... wrote: Hmmm... That's an idea... data.course_fees is coming out of the database as an Array -- perhaps I should rewrite that so it comes out as an ArrayCollection from the very beginning... I'll give that a shot... (Yes, I know I can put an Array into an ArrayCollection, but if Array isn't behaving properly, I shouldn't use it at all, right?) If I were to do something like: listOfFees:ArrayCollection = new ArrayCollection(data.course_fees); would that pass a reference to the ArrayCollection, or will that be making a copy? --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, wrhinfl wrhinfl@ wrote: I thought array does not broadcast updates nicely (uniformly/as expected), can you change the declaration of listOfFees from: [Bindable]private var listOfFees:Array; to:[Bindable]private var listOfFees:ArrayCollection;
RE: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working...
Refresh() is intended to re-apply a sort of filter to a collection. If it is working in your case it is a side effect. I couldn't find your previous post to look at the code, but I still suspect recycling issues. For a combo box, you have to do two actions on set data (actually in commitProperties, of course). You must re-assign to dataProvider, and you must set the selectedIndex (you can only use selectedItem if your items are simple strings or numbers). Are you doing both of those things? I have an example on cflex. It is more complex than necessary because I wanted it to be generic: http://www.cflex.net/showFileDetails.cfm?ObjectID=767 Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: Saturday, February 06, 2010 4:29 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Custom ItemRenderer still not working... Well, I found a work-around... I added the following code inside my ComboBox ItemRenderer: override protected function focusInHandler(event:FocusEvent):void { listOfFees.refresh(); } For some reason, with this in there, you have to double-click on the combo box to open it, but the drop-down shows the correct data 100% of the time. Good enough for now. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Laurence lmacne...@... wrote: Well, I installed FlashBuilder 4 Premium Beta 2, imported the project into there, and ran the code. It is EXACTLY THE SAME in FB3 and FB4 -- the exact same problem appears. I scroll down in the DataGrid, and the numbers in the ItemRenderer's drop down change (but not the selected number being displayed.) If I select one of the incorrect numbers, the drop-down immedately changes to the correct numbers, and the number I would've selected (had it been displayed correctly) shows as the selected item in the combo box. It's just SO WEIRD! So... What is that problem, exactly? Anyone able to figure it out? I'm totally confused... It should be working! (See my earlier post for the code -- I beg you, PLEASE help me figure this out!) Thanks, Laurence MacNeill Mableton, Georgia, USA --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Laurence LMacNeill@ wrote: --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Alex Harui aharui@ wrote: I didn't take the time to debug your code, just looked for the usual suspects and didn't see any. It was supposed to be fixed in 3.5 but somehow got busted so now will be in 3.6 but not sure when that ships. I didn't really want you to port the whole project, just write a test case with Flex 4 to see if you are hitting that same problem, then we can figure out what to do from there. I will try that if the Array vs. ArrayCollection idea doesn't pan out... Hate to go through all the trouble of installing Flex 4 Beta just for this, though... Or can I just install the 4.0 SDK in my existing FlexBuilder Pro?
RE: [SPAM] Re: [flexcoders] Encoding XML Character Entity References *properly*
As far as I know, there is not built-in way to do this. There are many different solutions, including tricks with xml, and a base 64 encoder that apparently does this as a side effect, and I saw one manual replacement class that looked very complete. I have not had to work with completely free test and have used a combination of manual replacement and controlling the allowed input characters. You will need to choose the solution that best fits your needs. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Peter Valdemar Mørch Sent: Friday, February 05, 2010 10:39 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] Encoding XML Character Entity References *properly* Hi, I didn't get any replies, so here is a polite bump... My question is basically this: How do I create an XML node with a toXMLString() value of: valuea lt;foogt;stringlt;/foogt;/amp;/value from a value of var value:String = a foostring/foo/; Is this really something one is expected to code by hand using RegExp or splitjoin? Isn't this something everybody who needs to send / recieve XML needs to be safe? I just can't find it anywhere. Also, I wrote: P.S.: Please don't tell me about escape() because it URL-encodes, which is not the same thing. (For ab I want aamp;b, not a%26b). Sorry if this offended anyone. I didn't mean to be rude. Peter -- Peter Valdemar Mørch http://www.morch. http://www.morch.com com
RE: [SPAM] [flexcoders] Re: Issue in TabNavigator component
Use TabBar and ViewStack instead, and stop that crazy manipulation of the children. Just control access by manipulating the dataProvider of the TabBar only. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Pradeep Chaudhary Sent: Friday, February 05, 2010 11:26 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Issue in TabNavigator component Has anybody ran into similar behavior ? I am still not able to resolve it. Please help. On Thu, Feb 4, 2010 at 11:26 PM, Pradeep Chaudhary pradeep.chaudhary@ mailto:pradeep.chaudh...@gmail.com gmail.com wrote: I am trying to dynamically add tabs to a TabNavigator. Tabs are removed on certain event on the client and I need to add it again. Problem is that even though tabs are added correctly, the selected tab header is not correct. For example, If I have two tabs and the second tab is selected when they are removed. On adding the tabs again, first tab should be the selected one. But instead the second tab header is shown as selected but the content is of first tab. I have attached sample example for reference. Please suggest what do I need to do to fix the problem. Thanks in advance. Pradeep
RE: [SPAM] [flexcoders] checkbox code like yahoo check box
This is a common requirement. The basic concept is that the checkbox item renderer must be correctly written (find an example, do not start from scratch), and then on the change event of the header renderer, update the appropriate field in each of the dataProvider items. You will find several examples if you search for them. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of charles_aug15 Sent: Friday, February 05, 2010 11:27 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] checkbox code like yahoo check box Hi everyone, Any of tell me the check box code like yahoo check box,.When i check the header checkbox in a column all checkboxes in the row should be checked,..vice versa... And when i check all the checkboxes in the row manually the header check box should be checked ,..vice versaCan any one help me Thanks in advance... Regards.. CHARLES.V
RE: [SPAM] [flexcoders] rendering HTML markup in AdvancedDataGrid
Item Renderers are only created for the visible rows plus a few buffers. Performance is primarily determined by the rendering and item data access. Be aware that htmlText only renders a small subset of html tags. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tim Romano Sent: Saturday, February 06, 2010 12:36 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] rendering HTML markup in AdvancedDataGrid I am considering using an AdvancedDataGrid in hierarchical mode but am not sure it can do what my app needs to do, or if it can, whether the approach will be efficient--execute quickly and use up a lot of memory. I haven't worked with the AdvancedDataGrid before. The grid will look like this: [v] Category A [v] Title 1 * passage one blah blah blah * passage two [v] Title 2 [v] Title 3 . . . [v] Title n [v]Category B [v] Title 1 [v] Title 2 [v] Title 3 . . . Title n etc etc When the user clicks on a Title node to expand it, some passages excerpted from the corresponding document would be fetched from the database, already formatted as HTML like this: span class='foo'this is an excerpt span class='abc'100 to 1000/span characters in length/span. A style sheet must control how the css classes in the passage excerpts are rendered. The grid might have as many as 100 rows, and each row could contain a couple of paragraphs of html text. Up to 1K each, but more typically around 100-200 characters. If I create an item-renderer using TextArea, will 100 TextAreas be created if the grid has 100 Title rows even if only 3 titles are expanded by the user? Or are the item renderers created only for the rows that actually get expanded and displayed? Is there another way to render HTML markup in the ADG? Thanks
RE: [SPAM] [flexcoders] Size of an application
I doubt that that question can be answered. Someone would have had to survey the size of a large number of applications, and I have never participated in such a survey. Most of my apps are larger than that, but I have never had swf size as a significant requirement. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Christophe Sent: Saturday, February 06, 2010 5:46 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Size of an application Hello, My application has a size of 900 Kb. What is the meam size of a RIA application ? Thank you, Christophe,
RE: [SPAM] Re: [flexcoders] Loading XML
Yes, the physical location is not what matters, it is the domains. Post the error message, it will tell us a lot. Often times people will launch their app using a file url, an then try to access a resource via a net url, this will produce a security error. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of cholid cholid Sent: Tuesday, February 02, 2010 10:49 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] Loading XML can you tell how you call the xml is? _ From: ztpi1 zt...@yahoo.com To: flexcoders@yahoogroups.com Sent: Wed, February 3, 2010 8:53:59 AM Subject: [flexcoders] Loading XML I am getting a security error when trying to load an xml file into my swf. The xml and swf are right next to each other in the same directory. What gives? From what I understand, the swf should have access to the xml file. I have no problem loading jpg, or png.
RE: [SPAM] [flexcoders] popup dialog with grow ability?
I don't have one handy but google will. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of MicC Sent: Saturday, January 30, 2010 7:10 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] popup dialog with grow ability? Looking for a popup example where the popup can be grabbed and expanded. TIA, Mic.
RE: [SPAM] [flexcoders] popup dialog with grow ability?
I don't have one handy but google will. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of MicC Sent: Saturday, January 30, 2010 7:10 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] popup dialog with grow ability? Looking for a popup example where the popup can be grabbed and expanded. TIA, Mic.
RE: [SPAM] [flexcoders] filter out empty rows
There are three ways I know of to handle this. First, change the xml generation to not put in the empty nodes. Second, preprocess the xml and remove the empty nodes, and third, create a custom dataDescriptor. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of cvsikh Sent: Sunday, January 31, 2010 4:32 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] filter out empty rows Hi, I have a dynamically generated xml which has some empty nodes. These nodes cause blank rows in a tilelist. Is there a way to filter out these nodes? For example, if the node 'name' is null, hide it from the tilelist? This is my sample xml: galleries photo sourcefile1.jpg/source name / descDesc 1/desc height800/height width1280/width /photo photo sourcefile2.jpg/source name / desc / height800/height width1280/width /photo /galleries Thanks!
RE: [SPAM] Re: [SPAM] [flexcoders] using a one slider to filter two different price ranges
Like you would set any other property on anything. What are you asking? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ZIONIST Sent: Friday, January 29, 2010 1:31 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] using a one slider to filter two different price ranges how can i set the min, max and step properties of the slider using a radio button or check box?
RE: [SPAM] [flexcoders] Load/parse XML file stored in flex project
If you want the xml compiled in to the swf, use mx:XML id=xmlLinks source=assets/links.xml / If you want the xml read at runtime, use HTTPService. The url can be relative url= assets/links.xml HTTPService is asynchronous. You will want to use a result handler function. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aramsdell2000 Sent: Thursday, January 28, 2010 12:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Load/parse XML file stored in flex project I have an XML file of various hyperlinks that I put in an assets folder in my flex application. How do I load that file from actionscript? I have seen numerous ways to load XML but not directly from a project. Doesn't seem like URLRequest ot httpservice is applicable and it isn't a mxml widget with attached xml config file so I am confused at what to do. to load the file. In the web application depending on what the user clicks I want to load the file, parse it and populate a URL to navigate to. Thanks! Amy
RE: [SPAM] [flexcoders] using a one slider to filter two different price ranges
Have the checkbox(I'd use RadioButton) change event set a instance variable identifying the filter. Also have it set the min, max and step properties of the slider. Have the slider change event call a handler function. In the handler, examine the variable and respond accordingly Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ZIONIST Sent: Thursday, January 28, 2010 11:52 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] using a one slider to filter two different price ranges Hi guys i successfully used a slider to filter one range of prices say 0 to 1. but then a senario arose where by i had to use that very same slide to filter another range of prices say 0-10. how can i use this one slider to filter these two ranges. the two ranges are sale prices and rental prices for cars. when one selects rental check box, the slider shld be populated with the 0 - 10 price ranges which it then filters and when someone selects the sale check box, the slider shld be populated with the sale price range (0 - 1) which it also shld filter. anyone with a solution please help out. thanks
RE: [SPAM] [flexcoders] MenuEvent causes 1046 error
I bet it is because you used MenuEvent for your click handler function name and there is a name collision with the built-in MenuEvent. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of williamchadwick Sent: Monday, January 25, 2010 1:26 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] MenuEvent causes 1046 error I have a menu bar component mx:MenuBar id=mainMenu labelField=@label click={MenuEvent(event)} itemClick={MenuItemEvent(event)} Everytime I create a handler like this: private function MenuItemEvent(e:MenuEvent):void I get a Type was not found or was not a compile-time constant: MenuEvent But, I've explicitly imported this event: import mx.events.MenuEvent; Am I going mad? What am I doing wrong? I'm using standalone Flex Builder 3.0.2.214193 on Windows XP- not the Eclipse plug-in. Please help, William Chadwick
RE: [SPAM] Re: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change
Sure. States can be very useful, but I reserve them for more minor changes the content of a component. They are very powerful, but messy to code and understand, compared to a viewstack. And I do see occasional reports of strange behaviors interactions with them. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Saturday, January 23, 2010 6:01 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change On Sun, Jan 24, 2010 at 1:40 AM, Tracy Spratt tr...@nts3rd. mailto:tr...@nts3rd.com com wrote: A ViewStack is simply a way to switch between components. It has no visible presence of its own. The children of a ViewStack can be anything (in some container), including a full TabNavigator. You can nest ViewStacks as desired. Thanks very much for your suggestions - it's working beautifully now. And, as you say, there's no reason not to put a full TabNavigator within the ViewStack. Have a good weekend. -- PL
RE: [SPAM] [flexcoders] Reading URL arguments from within initApp()
There are several ways to do this. I usually use javascript in the html wrapper to split the url params in to an array: var _sPassedUrlParms = new String(document.location).split('?')[1]; //Get any passed-in querystring parms then, I pass that into the Flex app using flashvars: AC_FL_RunContent( src, ${swf}, . flashvars, _sPassedUrlParms, . Then I access those flashvar values in Flex using application.application.parameters object, which will have a property:value for each passed in url param. You can also use ExternalInterface to get the URL information instead of using the javascript, google for examples of that. I found this component that seems to encapsulate that functionality: http://www.flexpasta.com/index.php/2008/03/15/getting-url-parameters-host-na me-port-in-flex-actionscript/ Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Saturday, January 23, 2010 10:41 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Reading URL arguments from within initApp() I'm working on a registration system that will be used by new and existing participants. The customer would like to be able to email existing participants a URL that bypasses the login screen. So, if the usual URL is http://www.foo. http://www.foo.com/register.html com/register.html They would like to use a URL that skips the landing screen and goes right to the registration details (name, address, etc.): http://www.foo. http://www.foo.com/register.html?user=bobpassword=pluto com/register.html?user=bobpassword=pluto (Those aren't the exact arguments but should illustrate the point.) I've been hunting around but haven't sorted out where to find the correct properties. If I can read in the URL, I can pass the data to my existing login function and carry on from there. If there's a more standard/best-practice way of starting the app with URL arguments, I'm all ears. Would someone be so kind as to point me in the right direction? Chances are, I just haven't figured out the right name for the feature I'm after. Thanks!!!
RE: [SPAM] Re: [SPAM] [flexcoders] Reading URL arguments from within initApp()
Yes. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of David Adams Sent: Sunday, January 24, 2010 4:39 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] Reading URL arguments from within initApp() On Mon, Jan 25, 2010 at 2:27 AM, Tracy Spratt tr...@nts3rd. mailto:tr...@nts3rd.com com wrote: There are several ways to do this. I usually use javascript in the html wrapper to split the url params in to an array: Thanks for the suggestion. Is there a way to do it from within the Flex code itself?
RE: [SPAM] Re: [SPAM] [flexcoders] Reading URL arguments from within initApp()
What is the problem with the wrapper? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Sunday, January 24, 2010 5:33 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] Reading URL arguments from within initApp() Could anyone point me to a working example of customized wrapper that inserts URL parameters into FlashVars? As it is, I've had zero luck tweaking the default template. In fact, it seems like its HTML is invalid (?) The concept seems clear enough, as explained by Tracy, in the docs and elsewhere: * Update FlashVars with the name/value pairs from the URL. * Read the name/value pairs out in initApp() using Application.application,parameters.NameGoesHere Sadly, I'm not succeeding at implementation. Pointers much appreciated!
RE: [SPAM] Re: [SPAM] [flexcoders] Reading URL arguments from within initApp()
Try the link I posted previously, or google this. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Sunday, January 24, 2010 4:43 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] Reading URL arguments from within initApp() On Mon, Jan 25, 2010 at 2:27 AM, Tracy Spratt tr...@nts3rd. mailto:tr...@nts3rd.com com wrote: There are several ways to do this. I usually use javascript in the html wrapper to split the url params in to an array: var _sPassedUrlParms = new String(document.location).split('?')[1]; //Get any passed-in querystring parms then, I pass that into the Flex app using flashvars: Thanks a lot - I've found the relevant docs for these tools and will experiment. As you mention there are several ways to go about it, can you suggest one that lets me keep the code inside Flex? Or is that a lot more trouble than it's worth for some reason? From comments on the livedocs http://livedocs. http://livedocs.adobe.com/flex/3/html/help.html?content=passingarguments_3. html adobe.com/flex/3/html/help.html?content=passingarguments_3.html it sounds like perhaps I should be looking at Application or stage ?
RE: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change
A ViewStack is simply a way to switch between components. It has no visible presence of its own. The children of a ViewStack can be anything (in some container), including a full TabNavigator. You can nest ViewStacks as desired. A side note on TavNavigator; if you think you will ever want to dynamically control the visible tabs, say based on user identity/permissions, I advise TabBar + ViewStack. To remove hide a tab in a TabNavigator, you have to manipulate the childen directly. If you use a TabBar, you can control its content just by manipulating its dataProvider. A hidden view will still be in the ViewStack, but its tab will not be visible, thus the view will be unavailable. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Saturday, January 23, 2010 2:06 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change On Sat, Jan 23, 2010 at 5:28 PM, Tracy Spratt tr...@nts3rd. mailto:tr...@nts3rd.com com wrote: For a change as significant as that, I suggest using ViewStack instead of states. Tracy, Thanks very much for responding - I always read your postings with attention. In my case are you suggesting I put everything into a ViewStack and not use states? So, I'd have something like ViewStack 0 - My landing screen with the login/send password/add registration 1 - 2 -3 My registration details Am I right in thinking that I could use a TabBar to make ViewStack 1, 2 3 look and act like a TabNavigator? Thanks for the help!
RE: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change
For a change as significant as that, I suggest using ViewStack instead of states. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Penny Laus Sent: Saturday, January 23, 2010 1:22 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] TabNavigator switches to second tab when revealed after a currentState change I've run into a funny problem in a registration application I'm working on. The base state for this application is a TabNavigator with three Canvas subelements. On its own, this works fine. When the application loads, I switch away from the base state to a screen to let the user login/get their password emailed/add a new registration. If they want to add a new registration, currentState is set back to to return to the base state - the full data entry form. The funny part is that when the state changes, the selectedIndex of the TabNavigator switches from 0 to 1. I've stepped through in the debugger and before this line the (hidden) TabNavigator has an index of 0. this.currentState = ; // Base state has input form After this line, the TabNavigator has an index of 1. If I explicitly reset the selectedIndex back to 0, the TabNavigator is drawn with elements from the first two pages drawn on top of each other. I can see that the Canvas for index 0 is drawn and the Canvas for index 1 is drawn on top of that. I've tried using a ViewStack instead of TabNavigator but, as you would expect, it makes no difference. I've been going around in circles for some time here without any progress - is this problem ringing a bell? I didn't find anything like it in the archives. I've tried with the 3.2 and 3.5 SDKs but the behavior is the same in both cases. I could skip the TabNavigator completely and do everything with ViewStates but, honestly, I'd rather not. I find it simpler to work with the TabNavigator in the visual designer. Then again, if it isn't going to work right it's not really eaiser any more. Thanks in advance for any help or suggestions.
RE: [SPAM] [flexcoders] How to parse xml with namespaces
Namespaces are a pain. You can declare a default' namespace, assigning it http://www.w3.org/1999/xhtml;. That will give you access to the nodes without a specific namespace. Then I guess you will need to use the :: syntax for the specified namespcaces. Google this there are several detailed discussions. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of luketvanderfluit Sent: Thursday, January 21, 2010 10:04 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [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. http://www.w3.org/1999/xhtml org/1999/xhtml\ xmlns:c=\http://www.eddygord http://www.eddygordon.com/namespaces/course on.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: [SPAM] Re: [SPAM] [flexcoders] e4x to Datagrid not removing the tags when rendered
Yes. I think that will give the automatic column generation functionality a problem. I think you should manually loop over the repeat nodes, and for each, populate a value object with strongly typed properties assigned the values from the appropriate feature and value nodes. Your code to make the assignment will have to use the positional syntax instead of e4x filters. For example in psuedocode: Var voRepeat: RepeatVO; For each(var xmlItem:XML in root.repeat) { voRepeat = new RepeatVO(); voRepeat.featue1 = xmlItem.feature[0].text(); voRepeat.featue2 = xmlItem.feature[1].text(); voRepeat.value1 = xmlItem.value[0].text(); . myArrayCollection.addItem(voRepeat) } MydataGrid.dataProvider = myArrayCollection; Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Quintjer Sent: Monday, January 18, 2010 11:33 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] e4x to Datagrid not removing the tags when rendered Thank you for taking the time to answer my question and explaining the datagrid dataprovider. I think what what problem is the way the xml I am importing is formatted. The root node is the name of the xml, then I have the repeating node. Within the repeating node I have data that needs to go in the datagrid. Problem is the tag names within the repeating node. Please see my example: root repeat feature/feature value/value feature/feature value/value /repeat repeat feature/feature value/value feature/feature value/value /repeat /root What I need to do is to put the feature data in repeat[0].feature into a datagrid. But because feature is in repeat[0] twice(20 in the real app) it will not load it properly. Any idea how to accomplish this? I have been trying for several weeks now with no luck.Ha! Thanks in advance. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: First, the DataGrid dataProvider itself must be some kind of list. It can be an ArrayCollection, an XMLListCollection, an Array or XMLList(avoid these if you plan to programmatically update the dataProvider) There are two ways to get an HTTPService result into a dataProvider. One is to bind to lastResult.avoid this. Instead, use a resultHandler to assign the appropriate list type to a variable, and bind to that. If you dataProvider is valid, you might have just forgotten to specify the dataField for the columns. If you are setting that property, then you need to know that dataField can only handle a string, not an expression, and the property specified must be a top-level property of the dataProvider item. If the dataProvider items are XML nodes, the datafield must specify a first-level childNode(data in the text node of that node) or an attribute. If it is an attribute then you need to use the @ symbol. Example: dataField=@myAttribute. Hope this helps. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Quintjer Sent: Sunday, January 17, 2010 10:49 AM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [SPAM] [flexcoders] e4x to Datagrid not removing the tags when rendered Hello all, I am importing an xml file in air to a datagrid but the data in the grid is still showing the tags. I have tried everying that I can think of. Earlier I tried imporing the file using HTTP server as an object and then got the data to display properly at that point but this has be be imported as xml. AnyIdeas are greatly appreciated.
RE: [SPAM] [flexcoders] Re: Flex, SOAP and Process Flow
One simple way to do this is to use the result and fault handlers in the service, put an identifying key in the asyncToken on send, extract that key in the result, and use it in a switch to determine processing. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of trefalgar Sent: Tuesday, January 19, 2010 2:03 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Re: Flex, SOAP and Process Flow --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, trefalgar trefal...@... wrote: --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Amy amyblankenship@ wrote: I always use mx.rpc.Responder instead of AsyncResponder (is that a custom class?). There's a working example of using AsyncToken with AMFPHP here http://flexdiary. http://flexdiary.blogspot.com/2009/01/lazy-loading-tree-example-file-posted .html blogspot.com/2009/01/lazy-loading-tree-example-file-posted.html . Maybe that will help you see something the docs aren't showing you. var token:AsyncToken = myService.disableStatistics(user,pass,email,tArray); token.info = email; token.addResponder(new AsyncResponder(myResults,myFaults,token)); I forgot this little bit - using Responder over AsyncResponder. As far as I can tell, it's not a custom class as it's included by default in the SDK. As far as usage, if I use Responder over AsyncResponder, I get the following error: 1067: Implicit coercion of a value of type flash.net:Responder to an unrelated type mx.rpc:IResponder. I'll see if I can figure that out, but AsyncTokens definitely don't seem to like me. Tref
RE: [SPAM] Re: [flexcoders] DataGrid is blank
I think I would create a composite component with a header and either a List or a VBox and a repeater. Instead of using DataGrid Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Thursday, January 21, 2010 12:10 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] DataGrid is blank It is unusual to be creating new DataGrids in a loop On 1/20/10 8:08 PM, normc_actionscript normcousin...@hotmail.com wrote: My DataGrid contains data, but is now showing it. (See itemClickEvent function.) Anybody know why? (PS feel free to critisize any other aspect of my code, i'm just learning) public function itemClickEvent(e:ListEvent):void{ Alert.show(String(e.target.selectedItem)); // THIS SHOWS WHAT'S EXPECTED } public function addToGrid(e:Event):void{ // This adds several 1 column dataGrids to an hbox, because I need lists with column headers. // One dataGrid won't work, because the lists are different lengths. categories = new XMLList(urlLoader.data) for each (var cat:XML in categories.*){ var partsGrid:DataGrid = new DataGrid(); var partsListCollection:XMLListCollection = new XMLListCollection(cat.children()) var df:XML=XML(partsListCollection.getItemAt(0)) partsGrid.dataProvider = partsListCollection; var dgc:DataGridColumn = new DataGridColumn(); dgc.headertext=c...@name.tostring(); dgc.dataField=df.name(); var cols:Array =new Array() cols.push(dgc) partsGrid.columns = cols; gridHbox.addChild(partsGrid) partsGrid.addEventListener(ListEvent.ITEM_CLICK, itemClickEvent) partsGrid.validateNow()// just to show you that I tried this but it doesn't work. } } -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs. http://blogs.adobe.com/aharui adobe.com/aharui
RE: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection
Try filtering a separate ArrayCollection then re-assignng the dataProvider. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ZIONIST Sent: Monday, January 18, 2010 4:11 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Animating items in a tilelist when filtering arraycollection i guys i have probably asked this several times but i have never gotten anything solid. i have a tile list that is populated with an array collection of data from a database. i also have a filter function that i use to filter the array collection based on multiple criteria. i would like to have some kind of effect play as data is filtered to show data change just like in the flex store example. but apparently the itemschangeeffect in flex 3 does not work with filter functions. any way of achieving that goal?
RE: [SPAM] [flexcoders] How long does it take to learn Flex and get a job?
That question has no answer. When will you know that have you learned Flex? I am not sure I have learned Flex and I have been writing production applications for seven years. You say 1 year, but how many hours a day? If you write Flex apps for forty hours a week for a year, then I would be confident you could qualify for an entry level (whatever that is) position. If you spend four hours a week, I would not be so confident. And there is much more to software development than just coding. But still, go for it. Don't wait until you have learned Flex. Once you get the basics of the language, start trying to find a job. The pressures of deliverables, deadlines, designer/client negotiation and solving business problems are what will really make you learn a language. And I have found that resources like flexcoders can make me look a lot smarter than I really am! Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of fred44455 Sent: Saturday, January 16, 2010 9:43 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How long does it take to learn Flex and get a job? I am new to Flex and started learning Flex 3 months ago. I have no programming background. I wonder how long does it take to learn Flex and how long will take me before I can apply for an entry level position? I gave myself 1 year but I wonder if it is a realistic time frame? Thanks for your time. Fred.
RE: [SPAM] [flexcoders] e4x to Datagrid not removing the tags when rendered
First, the DataGrid dataProvider itself must be some kind of list. It can be an ArrayCollection, an XMLListCollection, an Array or XMLList(avoid these if you plan to programmatically update the dataProvider) There are two ways to get an HTTPService result into a dataProvider. One is to bind to lastResult.avoid this. Instead, use a resultHandler to assign the appropriate list type to a variable, and bind to that. If you dataProvider is valid, you might have just forgotten to specify the dataField for the columns. If you are setting that property, then you need to know that dataField can only handle a string, not an expression, and the property specified must be a top-level property of the dataProvider item. If the dataProvider items are XML nodes, the datafield must specify a first-level childNode(data in the text node of that node) or an attribute. If it is an attribute then you need to use the @ symbol. Example: dataField=@myAttribute. Hope this helps. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Quintjer Sent: Sunday, January 17, 2010 10:49 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] e4x to Datagrid not removing the tags when rendered Hello all, I am importing an xml file in air to a datagrid but the data in the grid is still showing the tags. I have tried everying that I can think of. Earlier I tried imporing the file using HTTP server as an object and then got the data to display properly at that point but this has be be imported as xml. AnyIdeas are greatly appreciated.
RE: [SPAM] [flexcoders] What server do I put my crossdomain.xml file on?
I am fairly certain that it will need to go on the server that is hosting the servlet, since that is the only domain that the FlashPlayer is going to know about. That would be: http://da803299:8080 http://da803299:8080/ . I am not sure how the sandbox handles port specifications in the url, though. When in doubt, put a completely open crossdomain everywhere until it works, them remove them until it breaks. Then close up the domain and port specs as needed. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Matthew Sent: Thursday, January 14, 2010 4:44 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] What server do I put my crossdomain.xml file on? Hi - I have a Flex app that uses an HTTPService to call a Servlet. The servlet retrieves a file on another domain and passes back to Flex where they are prompted by a Windows dialog to either save or open it: It works fine locally. When deployed, I get this error: Error #2044: Unhandled SecurityErrorEvent:. text=Error #2048: Security sandbox violation: http://bopswdmmk1: http://bopswdmmk1:15010/oats/FlexClient/OATSMain.swf 15010/oats/FlexClient/OATSMain.swf cannot load data from http://da803299: http://da803299:8080/oats/FTPFile?filename=/oats/oatsftp/feed/Session.csv.0 1062010. 8080/oats/FTPFile?filename=/oats/oatsftp/feed/Session.csv.01062010. I'm assuming this is because I need a crossdomain.xml file, right? If so, where do I put it? On the domain that hosts the servlet, or the domain the file is retrieved from? Crossdomain issues can be confusing and any insight would be greatly appreciated. Thanks, Matt
RE: [SPAM] Re: [flexcoders] HTTPService Responder ResultEvent -- how to know when the JSON data sent via HTTP are complete?
You are using Firefox, I bet. I have sent this behavior and I think it is just a bug in FF. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tim Romano Sent: Tuesday, January 12, 2010 4:31 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] HTTPService Responder ResultEvent -- how to know when the JSON data sent via HTTP are complete? Jeff, Thanks for the reply. I am confused by the behavior of my Flex app. The status bar says Transferring data from localhost... and that status message never goes away. But, as you suggested, the data are complete: I pop the raw JSON string returned by the webservice into a TextArea, and it's all there, a string literal representing an array of objects: [{...},{...},{...}], and the string literal decodes into a well-formed ActionScript array. Is there something my results-handler has to do to clear that status message? Tim Maybe I'm missing something here, but to my understanding when the result event of your HTTP service fires, your call IS complete. You should have access to the json string that was pulled back from the service. Is there something else you need that the json string doesn't' supply?
RE: [SPAM] [flexcoders] Multiple linkbuttons added through datagrid itemrenderer actionscript
Are you setting rendereIsEditor=true? For interactive renderers, I usually do not do this and handle all the interactivity in the renderer itself. Using a container for the renderer is easiest, but can have performance issues if you have a lot of renderers on screen at once. Basing the renderer on UIComponent is most performant, but you have to do a lot of work yourself. You can do: datagrdcol.itemrenderer = new ClassFactory(MyCustomRenderer) Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aramsdell2000 Sent: Monday, January 11, 2010 8:23 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Multiple linkbuttons added through datagrid itemrenderer actionscript (Forgive me if this got posted twice...) I have a datagrid column that for each row, has several text values each with its own hyperlink. Ex: the data in the datafield looks like: Atext, Btext, Ctext. As it is now, I was able to add href anchor tags but they only open in a new window with the right mouse click. The datagrid item click event takes over the left mouse click and I am not sure how to prevent that. So I thought I would add multiple link buttons in the datagrid column instead. My question is how to add these multiple buttons using an itemrenderer in actionscript. If I was adding just one I would assume it would be datagrdcol.itemrenderer = new ClassFactory(LinkButton) and then you just set the properties of the link button. But how do you do it if there are multiple buttons for the data in the datafield. Do you extend the LinkButton or list data in a customitemrenderer class? How?
RE: [SPAM] [flexcoders] Multiple linkbuttons added through datagrid itemrenderer actionscript
Are you setting rendereIsEditor=true? For interactive renderers, I usually do not do this and handle all the interactivity in the renderer itself. Using a container for the renderer is easiest, but can have performance issues if you have a lot of renderers on screen at once. Basing the renderer on UIComponent is most performant, but you have to do a lot of work yourself. You can do: datagrdcol.itemrenderer = new ClassFactory(MyCustomRenderer) Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of aramsdell2000 Sent: Monday, January 11, 2010 8:23 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Multiple linkbuttons added through datagrid itemrenderer actionscript (Forgive me if this got posted twice...) I have a datagrid column that for each row, has several text values each with its own hyperlink. Ex: the data in the datafield looks like: Atext, Btext, Ctext. As it is now, I was able to add href anchor tags but they only open in a new window with the right mouse click. The datagrid item click event takes over the left mouse click and I am not sure how to prevent that. So I thought I would add multiple link buttons in the datagrid column instead. My question is how to add these multiple buttons using an itemrenderer in actionscript. If I was adding just one I would assume it would be datagrdcol.itemrenderer = new ClassFactory(LinkButton) and then you just set the properties of the link button. But how do you do it if there are multiple buttons for the data in the datafield. Do you extend the LinkButton or list data in a customitemrenderer class? How?
RE: [SPAM] Re: [flexcoders] registration points
You can also do this using Transform, but I usually just use the offset approach myself. Google Flex rotate around center for some examples of both. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, January 13, 2010 12:21 AM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [flexcoders] registration points Not really. RegPoint is the location of 0,0 in the lines and other graphics. You can take the display object and make it a child of another display object and offset it. On 1/12/10 7:59 PM, ztpi1 zt...@yahoo.com wrote: Is there a way to move the registration point of a Display Object with actionScript? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs. http://blogs.adobe.com/aharui adobe.com/aharui
RE: [SPAM] [flexcoders] Override private ComboBox function
Copy the ComboBox code into a new component and modify it as you need. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Warren Sent: Monday, January 11, 2010 9:17 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Override private ComboBox function I'm want to make a ComboBox on which I can force the dropdown menu to go up or down. It should be a simple matter of adding a variable and changing the way the displayDropdown method works. I tried extending the ComboBox and overriding the displayDropdown method but I can't do that since the method is private. How can I do this with my own class ? I feel like I'm missing something basic here. I'm using Flex 3.2.0 SDK Thanks!
RE: [SPAM] [flexcoders] How to get all tree node parents upon select
. i did not encode the result into xml format eh? I don't understand what you mean by that. You are using e4x xml here. parent is a property pointing to the parent component in the document model. I do not think you want that. parent(), applied to an XML node return an XML node, Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of eric v Sent: Sunday, January 10, 2010 5:14 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to get all tree node parents upon select maybe this will give you some insight. i did not encode the result into xml format.. ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ [Bindable] var xml:XML = products label=products item label=item1 sku label=sku1001/skuquantity label=quantity100/quantity /item item label=item2 sku label=sku1002/skuquantity label=quantity100/quantity /item /products private function onClick(event):void { var parent = event.currentTarget.selectedItem.parent(); //mx.controls.Alert.show(event.currentTarget.selectedItem.toString()); do { mx.controls.Alert.show(pare...@label.tostring()); parent = parent.parent(); } while (parent); } ]] /mx:Script mx:Tree width=100% click=onClick(event) dataProvider={xml} labelField=@label showRoot=false /mx:Tree /mx:Application DOES ANYONE KNOW WHAT KIND OF VARIABLE parent WOULD BE.. INSTANTIATED AS?
RE: [SPAM] [flexcoders] Flex:how to count online user and record user visits?
Flex runs on the client, in a browser. It cannot count anything on the server. It can display a count by getting the data from a server. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of happyhy2005 Sent: Sunday, January 10, 2010 12:09 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Flex:how to count online user and record user visits? Hey guys, I want to write a module that count online user and record user visits. I'm using Cairngorm,it seems to me when user open the Application,I should dispatch an event,and increase onlineCount stored in ModelLocator,get the visits number from DB and increase 1.When user leave the Application,decrease onlineCount and update the visits number from DB. I know there's a life cycle in ASP.NET and could easily implement this function in Global.asax,using Application_Start,Application_End,Session_start and Session_End event. Is there any similar way to do that in Flex? What's the best routine to implement online count and user visits? Thanks in advance,Shuo
RE: [SPAM] Re: [SPAM] [flexcoders] Properly display html entities in datagrid
IS the data valid html? If so, then htmlText should handle it properly (within the limits of that property. It only parses a small subset of html tags). will indicate the beginning of a tag, and lt; will be rendered as a literal . If it is not valid html, then you will have to manipulate it manually. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of s_grollins Sent: Saturday, January 09, 2010 6:09 PM To: flexcoders@yahoogroups.com Subject: [SPAM] Re: [SPAM] [flexcoders] Properly display html entities in datagrid I'm not sure how proper a solution that would be -- there are a lot more html entities than just those and I don't think writing a replace for each character makes much sense. I was initially under the impression that if I used the htmlText property, a string like something amp; something would auto-magically be converted to something something. If this isn't the case, is there a property or component in Flex which I'm overlooking that would automatically take care of this? I suppose the main problem is with the text example I presented: This is an item This is another item In a breadcrumb trail. I suppose using htmlText would not work because the '' characters would be taken as closing tags? Maybe I can just write a function to replace '' and ''. (?) Do you or any others have other suggestions or comments on what a good approach would be? --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: So I understand that the data is not html, but just has some html encoded entities in it correct? You can manually convert the data yourself. Regular expressions are probably a better way to go, but I do not use them enough to be comfortable with them, and use a function like this: public static function htmlDecode(s:String):String { s=s.split(amp;).join(); s=s.split(quot;).join(\); s=s.split(apos;).join('); s=s.split(/lt;).join(/); s=s.split(lt;).join(); s=s.split(/gt;).join(/); s=s.split(gt;).join(); return s; } The replace() function might be better as well. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of s_grollins Sent: Friday, January 08, 2010 9:42 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [SPAM] [flexcoders] Properly display html entities in datagrid Hello everyone, I've recently come across a problem at work where in much of the data we're getting is showing up in the data-grid as: bThe tags showb and the quot; quotes quot; aren't converted! This is a problem and I'd like to be able to display this correctly: The tags show and the quotes aren't converted! We don't necessarily have too much control over the data, so I'm not entirely sure how/why the items are coming up like this when some items come up with characters like in them. For instance: This is an item This is another item In a breadcrumb trail. This shows up correctly. I'm not sure what exactly should be done. But again since we don't have control/access to the data, it cannot be changed or substituted or converted to other formats. I thought of using htmlText but that doesn't work if I have data like the breadcrumb string above because it interprets the '' characters as opening tags and doesn't render the entire data: [Bindable] private var testString:String = lt;bgt;6lt;bgt; quot;sevenquot;; mx:Text text={testString} / !-- displays testString unchanged -- mx:Text htmlText={testString} / !-- displays: b6/b -- Any suggestions would definitely be appreciated, I'm sure I'm probably not the only person that's come across this :( But basically we just need all characters like: lt; to be converted to '' and amp; to be '' meanwhile data that was encoded properly, data that has '' and '' showing up correctly should be left the same. Thanks in advance for any help :)
RE: [SPAM] [flexcoders] How to get all tree node parents upon select
If your dataProvider is XML, you can use parent() to recursively traverse the ancestors. If it is XMLListCollection, I am not sure, but would expect there to be some kind of parent property. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Lafrance Sent: Saturday, January 09, 2010 8:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to get all tree node parents upon select I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node. So if I have this XML: products item sku1001/sku quantity value=100 / /item item sku2001/sku quantity value=250 / /item item sku3001/sku quantity value=300 / /item /products If user clicks on the 1001 sku, I want to get something like this: productsitemsku Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value=100, I want to get this: productsitemskuquantity I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields. The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say sku elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
RE: [SPAM] [flexcoders] How to get all tree node parents upon select
If your dataProvider is XML, you can use parent() to recursively traverse the ancestors. If it is XMLListCollection, I am not sure, but would expect there to be some kind of parent property. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Lafrance Sent: Saturday, January 09, 2010 8:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to get all tree node parents upon select I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node. So if I have this XML: products item sku1001/sku quantity value=100 / /item item sku2001/sku quantity value=250 / /item item sku3001/sku quantity value=300 / /item /products If user clicks on the 1001 sku, I want to get something like this: productsitemsku Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value=100, I want to get this: productsitemskuquantity I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields. The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say sku elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
RE: [SPAM] [flexcoders] How to get all tree node parents upon select
If your dataProvider is XML, you can use parent() to recursively traverse the ancestors. If it is XMLListCollection, I am not sure, but would expect there to be some kind of parent property. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Lafrance Sent: Saturday, January 09, 2010 8:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to get all tree node parents upon select I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node. So if I have this XML: products item sku1001/sku quantity value=100 / /item item sku2001/sku quantity value=250 / /item item sku3001/sku quantity value=300 / /item /products If user clicks on the 1001 sku, I want to get something like this: productsitemsku Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value=100, I want to get this: productsitemskuquantity I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields. The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say sku elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
RE: [SPAM] [flexcoders] How to get all tree node parents upon select
If your dataProvider is XML, you can use parent() to recursively traverse the ancestors. If it is XMLListCollection, I am not sure, but would expect there to be some kind of parent property. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Lafrance Sent: Saturday, January 09, 2010 8:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to get all tree node parents upon select I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node. So if I have this XML: products item sku1001/sku quantity value=100 / /item item sku2001/sku quantity value=250 / /item item sku3001/sku quantity value=300 / /item /products If user clicks on the 1001 sku, I want to get something like this: productsitemsku Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value=100, I want to get this: productsitemskuquantity I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields. The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say sku elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
RE: [SPAM] [flexcoders] Banner in Flex
What exactly do you mean by banner? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Christophe Sent: Sunday, January 10, 2010 7:56 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Banner in Flex Hello, I am searching examples of Flex source code for doing banners. Thank you, Christophe,
RE: [SPAM] [flexcoders] How to get all tree node parents upon select
If your dataProvider is XML, you can use parent() to recursively traverse the ancestors. If it is XMLListCollection, I am not sure, but would expect there to be some kind of parent property. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Lafrance Sent: Saturday, January 09, 2010 8:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to get all tree node parents upon select I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node. So if I have this XML: products item sku1001/sku quantity value=100 / /item item sku2001/sku quantity value=250 / /item item sku3001/sku quantity value=300 / /item /products If user clicks on the 1001 sku, I want to get something like this: productsitemsku Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value=100, I want to get this: productsitemskuquantity I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields. The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say sku elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
RE: [SPAM] [flexcoders] Single Record Tables
The best way is to set resultFormat=e4x. The default resultFormat (object) causes Flex to convert the xml into a tree of nested objects. In this case, if there are multiple sub nodes, Flex knows to create an array, but if there is only one node, it just has to create a single object. You can test result using, if I recall correctly, if (result is Array). But best practice is to use e4x and then build your ArrayCollection of own strongly typed VOs. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of criptopus Sent: Sunday, January 10, 2010 9:05 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Single Record Tables I have a table with a single record in it and I've been trying to read it with not too much luck. Tried a couple of ideas one was using try and catch which seemed to work but has stopped working for some unknown reason. This is my latest attempt to load an ArrayCollection. Anybody got any suggestions? if (event.result.response.data != null) { if (event.result.response.data.row[0].usrid) { // Deal with many rows memberData=event.result.response.data.row as ArrayCollection; } else { // Deal with a single row. var rcd:Object=new Object(); rcd.usrid=event.result.response.data.row.usrid; rcd.grpid=event.result.response.data.row.grpid; rcd.membstatus=event.result.response.data.row.membstatus; memberData=new ArrayCollection(); memberData.addItem(rcd); } else { // Deal with no rows. memberData=new ArrayCollection(); }
RE: [SPAM] [flexcoders] Banner in Flex
What exactly do you mean by banner? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Christophe Sent: Sunday, January 10, 2010 7:56 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Banner in Flex Hello, I am searching examples of Flex source code for doing banners. Thank you, Christophe,
RE: [SPAM] [flexcoders] Single Record Tables
The best way is to set resultFormat=e4x. The default resultFormat (object) causes Flex to convert the xml into a tree of nested objects. In this case, if there are multiple sub nodes, Flex knows to create an array, but if there is only one node, it just has to create a single object. You can test result using, if I recall correctly, if (result is Array). But best practice is to use e4x and then build your ArrayCollection of own strongly typed VOs. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of criptopus Sent: Sunday, January 10, 2010 9:05 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Single Record Tables I have a table with a single record in it and I've been trying to read it with not too much luck. Tried a couple of ideas one was using try and catch which seemed to work but has stopped working for some unknown reason. This is my latest attempt to load an ArrayCollection. Anybody got any suggestions? if (event.result.response.data != null) { if (event.result.response.data.row[0].usrid) { // Deal with many rows memberData=event.result.response.data.row as ArrayCollection; } else { // Deal with a single row. var rcd:Object=new Object(); rcd.usrid=event.result.response.data.row.usrid; rcd.grpid=event.result.response.data.row.grpid; rcd.membstatus=event.result.response.data.row.membstatus; memberData=new ArrayCollection(); memberData.addItem(rcd); } else { // Deal with no rows. memberData=new ArrayCollection(); }
RE: [SPAM] RE: [SPAM] [flexcoders] How to get all tree node parents upon select - sorry about the duplicates
Sorry about the duplicates, Outlook had a seizure. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Sunday, January 10, 2010 1:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] RE: [SPAM] [flexcoders] How to get all tree node parents upon select If your dataProvider is XML, you can use parent() to recursively traverse the ancestors. If it is XMLListCollection, I am not sure, but would expect there to be some kind of parent property. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Lafrance Sent: Saturday, January 09, 2010 8:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to get all tree node parents upon select I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node. So if I have this XML: products item sku1001/sku quantity value=100 / /item item sku2001/sku quantity value=250 / /item item sku3001/sku quantity value=300 / /item /products If user clicks on the 1001 sku, I want to get something like this: productsitemsku Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value=100, I want to get this: productsitemskuquantity I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields. The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say sku elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
RE: [SPAM] RE: [SPAM] [flexcoders] How to get all tree node parents upon select - sorry about the duplicates
Sorry about the duplicates, Outlook had a seizure. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Sunday, January 10, 2010 1:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] RE: [SPAM] [flexcoders] How to get all tree node parents upon select If your dataProvider is XML, you can use parent() to recursively traverse the ancestors. If it is XMLListCollection, I am not sure, but would expect there to be some kind of parent property. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Greg Lafrance Sent: Saturday, January 09, 2010 8:58 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] How to get all tree node parents upon select I have a tree, and when user clicks an item in the tree, I want to get all the parents of the selectedItem node. So if I have this XML: products item sku1001/sku quantity value=100 / /item item sku2001/sku quantity value=250 / /item item sku3001/sku quantity value=300 / /item /products If user clicks on the 1001 sku, I want to get something like this: productsitemsku Also if I have a custom component, perhaps based on tree or but maybe not, and if this custom component shows the actual XML and used can click on XML elements or XML attributes, how can I use the selected item to get the parent nodes, so if they click on the value=100, I want to get this: productsitemskuquantity I need this because I have a set of fields, and users will drag their XML node elements or attributes to my fields, to define a mapping between their XML and my fields. The selectedItem is just a snippet of XML cut off from its source XMLListCollection, and I might be able to search the XMLListCollection, but what if there were say sku elements at more than one level in the XML? I'm guessing a search might return multiple hits for a selected element, when I want the actual parent nodes for the actual selected node.
RE: [SPAM] [flexcoders] HTTPService Internet Explorer
This is almost certainly a caching issue. If you are using GET as the HTTPService method try POST. Then if that does not work, you can append some random string to the url to prevent client side caching. There will be many code examples if you search for them. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of criptopus Sent: Saturday, January 09, 2010 10:55 AM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] HTTPService Internet Explorer I set up a popup TitleWindow which sets up a HTTPService and do a FindAll, I listen for the data coming in and then populate my datagrid. I then make some changes and post them off to the service and then close the popup. When I open the popup again and the data is re-read in Firefox it is read correctly as I have changed it but when its run under Internet Explorer it has not detected the changes. Checking the database the data has changed. Why would I.E. not read the changes made but Firefox does? - Stephen
RE: [SPAM] [flexcoders] Adaptation of an application to the screen size
By setting all the width and height values in percentage ? Yes. You will find you want particular components to have a minimum size, though. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Christophe Sent: Saturday, January 09, 2010 3:32 PM To: flexcoders@yahoogroups.com Subject: [SPAM] [flexcoders] Adaptation of an application to the screen size Hello, How to adapt a flex application to the screen size ? By setting all the width and height values in percentage ? Do you have a method ? Thank you, Christophe,