[flexcoders] combobox set selecteditem
I've seen a half dozen solutions to this on the internet but somehow they don't work. Basically I just want to set the selectedItem of a combobox: mx:Combobox id=comboboxID dataprovider={httpserv.lastresult.system.data}/ // actionscript which won't work comboboxID.selectedItem = something; So then I tried to loop through the comboboxID.dataprovider to find the index for something but it won't ever give me the dataprovider strings, instead giving me errors like this: warning: unable to bind to property 'name' on class 'String' (class is not an IEventDispatcher) How can I get this working? Thanks.
[flexcoders] need help in creating states.
I am using caringorm and have two states defined in my main appplication. I am using a currentstate variabe in my model, to define decide which state to make current. The second state has many child componets, and none of these are getting initialised. On debugging found that the code is going through the second state, but returning back without initialising any component. I am following the structure that is being desicussed in anatomy of a enterprise flex RIA. I am using creationPolicy=all in my second state. thanks is advance to anyone who can help me with this issue. thanks, ashok
[flexcoders] Re: dataTipRenderer available for DataGrid?
it compiles when using Label as the component, but it doesn't compile when using DataGridItemRenderer (cannot resolve attribute toolTipCreate. Should I use DGIR, but use a different event since toolTipCreate isn't exposed? mx:DataGridColumn headerText=PNR dataField=pnrLocator mx:itemRenderer mx:Component mx:DataGridItemRenderer text={data.pnrLocator} toolTipCreate=outerDocument.createPNRToolTip(event)/ /mx:Component /mx:itemRenderer /mx:DataGridColumn --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: In the future, please send code that compiles. I'd forgotten that dataTip functionality is in the renderer and not the DG. If you look at DataGridItemRenderer it has its own dataTip code. Label doesn't which is why it isn't set up to get the tooltip events. I'd probably copy code from DGIR to a subclass of Label. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of djbrown_rotonews Sent: Tuesday, May 27, 2008 5:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? bump --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Busy week. I'll try to take a look next week maybe. From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Thursday, May 22, 2008 6:49 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? what am I missing then? My code never gets to the the createPNRToolTip function referenced in the toolTipCreate event handler. I messed around with the showDataTips property on the grid itself, and it didn't change the behavior. mx:DataGrid width=100% height=100% dataProvider={pnrsToProcess} mx:columns mx:DataGridColumn headerText=PNR dataField=pnrLocator mx:itemRenderer mx:Component mx:Label text={data.pnrLocator} toolTipCreate=outerDocument.createPNRToolTip(event)/ /mx:Component /mx:itemRenderer /mx:columns /mx:DataGrid public function createPNRToolTip(event:ToolTipEvent):void { } --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Each renderer should get the event. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Wednesday, May 21, 2008 5:47 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? I see where there's a ToolTipCreate event available, and I've used that in the past for custom tool tips over TextAreas etc.. I see the same event exposed for the DataGrid itself, but it doesn't appear to exist for the individual columns. How would I handle the situation where I wanted to display a custom tool tip depending on what column was being moused over? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: There's a ToolTipEvent that you should be able to pick up and return an instance of a custom class to use as a tooltip From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Monday, May 19, 2008 1:20 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] dataTipRenderer available for DataGrid? How do I need to extend DataGrid to get the dataTipRenderer stuff exposed similiar to the charting classes?
[flexcoders] Flex in Thin client with Window CE version 5
Team- We are currently researching if there any possibility of using flex tehnology in Thin Client hardware with windows CE 5 in it. I want to know if there anyone did this kind of settings and what are the required plugins and tool to run flex generated files(swf/swc...) to run that application in it. I grewatly appriciate for any input from this team. -GS
[flexcoders] Re: Automation libraries kill my app
I added a mouseevent handlers to teh stage and this is what I see when I click on a textarea: The MouseEvent's currentTarget is the application root. The target is a VBox. I'm not really sure where this VBox is comming from. Is it something automation adds in there? The TextArea is inside a FormItem, Form, CustomCanvas, CustomPanel, Canvas, Canvas, Application. Thanks, Geoff --- In flexcoders@yahoogroups.com, Sangavi G [EMAIL PROTECTED] wrote: Hi, This happens if there is an invisible container on the top of these controls. The solution you can try is to add a mouseClick event listener to the application stage and find out the container which is overlapping these controls. (or you can find this out even in the design view) Once you get the container you can try adding the mouseEnabled=false for that container. Regards, Sangavi On Sat, May 24, 2008 at 12:08 AM, Geoffrey [EMAIL PROTECTED] wrote: I'm trying to use FunFX(http://funfx.rubyforge.org/) to do some automated testing of our GUI. I noticed that after I add the automation libraries to the compiler options of my main project, I can no longer interact with various parts of the UI using the mouse. This includes textinput, textarea, buttons, numericstepper, etc. I can tab to these controls, but I can not click on them to bring focus to it. Very odd. I've added the libraries in the main project's Additional Compiler Arguments property under Flex Compiler like so: -include-libraries C:\flex-sdk\frameworks\libs\automation.swc C:\flex-sdk\frameworks\libs\automation_agent.swc Any thought? Geoff
[flexcoders] Re: dataTipRenderer available for DataGrid?
the code, as presented (using a Label), will reach the toolTipEvent (as desired), but only after I put a toolTip= at the end of the mx:Label text={data.pnrLocator} tooolTipCreate=outerDocument.createPNRToolTip(event)/ line. thanks alex! --- In flexcoders@yahoogroups.com, djbrown_rotonews [EMAIL PROTECTED] wrote: it compiles when using Label as the component, but it doesn't compile when using DataGridItemRenderer (cannot resolve attribute toolTipCreate. Should I use DGIR, but use a different event since toolTipCreate isn't exposed? mx:DataGridColumn headerText=PNR dataField=pnrLocator mx:itemRenderer mx:Component mx:DataGridItemRenderer text={data.pnrLocator} toolTipCreate=outerDocument.createPNRToolTip(event)/ /mx:Component /mx:itemRenderer /mx:DataGridColumn --- In flexcoders@yahoogroups.com, Alex Harui aharui@ wrote: In the future, please send code that compiles. I'd forgotten that dataTip functionality is in the renderer and not the DG. If you look at DataGridItemRenderer it has its own dataTip code. Label doesn't which is why it isn't set up to get the tooltip events. I'd probably copy code from DGIR to a subclass of Label. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of djbrown_rotonews Sent: Tuesday, May 27, 2008 5:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? bump --- In flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Busy week. I'll try to take a look next week maybe. From: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Thursday, May 22, 2008 6:49 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? what am I missing then? My code never gets to the the createPNRToolTip function referenced in the toolTipCreate event handler. I messed around with the showDataTips property on the grid itself, and it didn't change the behavior. mx:DataGrid width=100% height=100% dataProvider={pnrsToProcess} mx:columns mx:DataGridColumn headerText=PNR dataField=pnrLocator mx:itemRenderer mx:Component mx:Label text={data.pnrLocator} toolTipCreate=outerDocument.createPNRToolTip(event)/ /mx:Component /mx:itemRenderer /mx:columns /mx:DataGrid public function createPNRToolTip(event:ToolTipEvent):void { } --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Each renderer should get the event. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Wednesday, May 21, 2008 5:47 AM To: flexcoders@yahoogroups.com mailto:flexcoders% 40yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? I see where there's a ToolTipCreate event available, and I've used that in the past for custom tool tips over TextAreas etc.. I see the same event exposed for the DataGrid itself, but it doesn't appear to exist for the individual columns. How would I handle the situation where I wanted to display a custom tool tip depending on what column was being moused over? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: There's a ToolTipEvent that you should be able to pick up and return an instance of a custom class to use as a tooltip From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Monday, May 19, 2008 1:20 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com
[flexcoders] hidden label parentApplication.user_id.text wont reference?
i need to use hidden labels to reference id's and such on multiple modules...but if i choose to make them not visible or visible=false then flex throws an error.. Yes it works when its visible=true very strange how do i fix or do a workaround on this?
[flexcoders] FIXED ....Re: hidden label parentApplication.user_id.text wont reference?
im wrong it does work i was misspelling the name --- In flexcoders@yahoogroups.com, Jason B [EMAIL PROTECTED] wrote: i need to use hidden labels to reference id's and such on multiple modules...but if i choose to make them not visible or visible=false then flex throws an error.. Yes it works when its visible=true very strange how do i fix or do a workaround on this?
[flexcoders] Component Broken
Hi, all; I have a component that was working last week, but on Friday I had a crash that meant my machine would not reboot, so I had to restore from the Windows Home Server backup. I thought my machine was back 100% from where it was, but I tried to run some Flex code that worked last week and it is not working at all today. The intent of the component is to read in an external xml file and make it available as a data source in mxml. package magnoliamultimedia { import flash.events.Event; import flash.net.URLLoader; import flash.net.URLRequest; import mx.collections.XMLListCollection; [Bindable] [DefaultProperty(xmlData)] public class XMLLoader extends URLLoader { private var _request:URLRequest; private var _path:String; private var _xmlData:XMLListCollection; public function XMLLoader(request:URLRequest=null) { super(request); } public function get path():String{ return _path; } public function set path(path:String):void{ _path = path; _request = new URLRequest(_path); this.addEventListener(Event.COMPLETE, getURLResult, false, 0, true); this.load(_request); } public function get xmlData():XMLListCollection{ return _xmlData; } private function getURLResult(e:Event):void{ var resultXML:XML = XML(this.data); if (!_xmlData) { _xmlData = new XMLListCollection (resultXML.children()); } else { _xmlData.source = resultXML.children (); } this.removeEventListener(Event.COMPLETE, getURLResult); } } } Am I totally stoned in my recollection that this worked last week? When the complete event fires, the data property is empty. I've tried passing in a path of data/data.xml and moving the xml file to the root and just using data.xml. If anyone has any ideas, I'd greatly appreciate it. Thanks; Amy
[flexcoders] Flex Builder 3 Security Sandbox Violation
I've just imported a Flex 2 Project into Flex Builder 3 (still using the Flex 2 SDK to compile) and started getting this error when debugging: *** Security Sandbox Violation *** Connection to http://localhost:1631/Improv2Service/improvService.asmx?wsdlhalted - not permitted from file:///C:/Documents and Settings/Daniel/My Documents/Flex Builder 3/Improv/Improv2/bin/Improv2.swf Error: Request for resource at http://localhost:1631/Improv2Service/improvService.asmx?wsdl by requestor from file:///C:/Documents and Settings/Daniel/My Documents/Flex Builder 3/Improv/Improv2/bin/Improv2.swf is denied due to lack of policy file permissions. The important thing to note is that this is not a new install of Flex Builder 3, and this is not new install of a Flash Player. I've successfully debugged Flex 3 projects that call a service on localhost on this machine w/ this version of flash player. So I'm not sure why importing into Flex Builder 3 broke this. Anyone seen this before? - Daniel Freiman
RE: [flexcoders] The High Score Problem
I've ben struggling with this as well. The issue is not with Flex; you'll have this with any client server application. You even have a bigger issue than what you are outlining... The components you have to expose on the server can be directly accessed by a skilled programmer without using your application. And why deal with your code if someone can attach directly to the server and update their score directly? I've started using validation anytime a user touches my server. So all of my components have a validation mechanism. Is it fool-proof? Probably not. So not only will you have to validate your interface; you'll have to validate the data being put into the server through your components. Now for the application side. The best way is to use CRCs on the application to know if something has changed in the code before it attaches to your server. I'm not sure how this would be implemented in action script or if its possible. If not, then you'll need some way to validate the code you provide to the end user. Biggest thing... Never rely on the stupidity of your end users. There's a small percentage of people that have the skills and that small percentage will be the ones that cause the biggest problems. This is even more the case if there are rewards that people can earn. From: flexcoders@yahoogroups.com on behalf of kenny14390 Sent: Tue 5/27/2008 10:26 AM To: flexcoders@yahoogroups.com Subject: {Disarmed} [flexcoders] The High Score Problem I've been doing a lot of research on this topic recently and I'm sort of stuck. For those who don't know about this type of problem, it is the security concern that communication between Flex (a Flash front-end application) and a server through PHP is thinly-veiled and prone to attack. Specifically, when a Flash game tries to tell the server that a user got a high score, an attacker can find a way to fake this high score and achieve the best score (sometimes resulting in a cash prize). The measures that I've been studying seem to only get in the way for attackers, but not thwart them entirely. For example, one could simply encrypt the data that is passed to a PHP file, but the Flash application can be decompiled and the encryption technique is discovered. Alternatively, one could obfuscate the application, making the decompilation produce jargon, but this too can be translated into human-readable text. A server can check data for feasibility by using a timer to detect super-fast computer-generated PHP POSTs, but this too can be overridden by slowing down the auto-POSTs. This is the case for other human feasibility checks. If the server checks the POST headers, they too can be faked by proxies. Is the simple conclusion that Flash applications are inherently transparent? There is no such thing as Flash application security? Does SSL patch any of these risks? How can a high score problem be overcome? -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. winmail.dat
RE: {Disarmed} [flexcoders] Re: code still appearing even after deletion
Interesting... I was also thinking that it may have been the cache so I cleared the cache out and even did a hard refresh. I'll take a closer look at this though... Thanks! From: flexcoders@yahoogroups.com on behalf of twcrone70 Sent: Tue 5/27/2008 10:22 AM To: flexcoders@yahoogroups.com Subject: {Disarmed} [flexcoders] Re: code still appearing even after deletion I have run into problems like this when the browser insisted on caching the swf. Haven't had this problem when accessing the generated HTML wrapper through FB3 at a file location though. If your run option is configured to show the HTML/SWF combo on a web server (Properties - Flex Build Path - Source path - Output folder URL), caching could be a problem with your browser settings. I have also had problem with the web server itself caching in combination with using Liferay (J2EE open source portal solution). In the latter case you have to change configuration on the web/app server itself. Can't remember where we changed it right now however. IE seems more stubborn than Firefox with caching. I use the Web developer plugin to turn off caching in Firefox although there is probably another way to do this also. IE, I just configure the options directly. - Todd --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Scott [EMAIL PROTECTED] wrote: I have a weird problem... I have some layout code that I created a while back that I wanted to merge with the coldfusion wizard generated code. I opened the file then cut and paste it into the coldfusion main.mxml generated code. When I hit play the display I had worked on came up. I then removed the code from the main.mxml code in favor of creating a new mxml file. To my surprise, when I hit play the copy and pasted code still showed. After playing around with FB3 I saw that there was a cleanup option which I ran and still had the same issue. Now, if I click on the main.mxml then hit play the code shows up in a small window. I dug through the code just to verify that it's truly gone and it doesn't exist anywhere; but still it's showing up. Anyone else run into this or know what is going on? -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. winmail.dat
[flexcoders] LineSeries datapoint lookup
Hi all, Currently i have a linechart with a single lineseries, using annotationElements and extending ChartElement, i created a custom chart cursor which draws vertical lines across the chart (using graphics object) at specified intervals. For each vertical line that i am drawing i am also trying to display the datapoint which it intersects, and this is where i run into problems. I use findDataPoints method on the lineseries object but it doesn't always return the value of the point that i intersect but instead return closest datapoint to the x/y coordinates that i pass ( as it should per documentation ). what would be a better way to go about this problem? Basically i know my X coordinate but dont know where the data is on the Y axis so i cant get close to the intersection point. Thanks
RE: [flexcoders] Re: dataTipRenderer available for DataGrid?
My recommendation was to copy the datatip code from DGIR to your subclass of Label. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of djbrown_rotonews Sent: Tuesday, May 27, 2008 10:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? the code, as presented (using a Label), will reach the toolTipEvent (as desired), but only after I put a toolTip= at the end of the mx:Label text={data.pnrLocator} tooolTipCreate=outerDocument.createPNRToolTip(event)/ line. thanks alex! --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , djbrown_rotonews [EMAIL PROTECTED] wrote: it compiles when using Label as the component, but it doesn't compile when using DataGridItemRenderer (cannot resolve attribute toolTipCreate. Should I use DGIR, but use a different event since toolTipCreate isn't exposed? mx:DataGridColumn headerText=PNR dataField=pnrLocator mx:itemRenderer mx:Component mx:DataGridItemRenderer text={data.pnrLocator} toolTipCreate=outerDocument.createPNRToolTip(event)/ /mx:Component /mx:itemRenderer /mx:DataGridColumn --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: In the future, please send code that compiles. I'd forgotten that dataTip functionality is in the renderer and not the DG. If you look at DataGridItemRenderer it has its own dataTip code. Label doesn't which is why it isn't set up to get the tooltip events. I'd probably copy code from DGIR to a subclass of Label. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Tuesday, May 27, 2008 5:44 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? bump --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Busy week. I'll try to take a look next week maybe. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Thursday, May 22, 2008 6:49 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? what am I missing then? My code never gets to the the createPNRToolTip function referenced in the toolTipCreate event handler. I messed around with the showDataTips property on the grid itself, and it didn't change the behavior. mx:DataGrid width=100% height=100% dataProvider={pnrsToProcess} mx:columns mx:DataGridColumn headerText=PNR dataField=pnrLocator mx:itemRenderer mx:Component mx:Label text={data.pnrLocator} toolTipCreate=outerDocument.createPNRToolTip(event)/ /mx:Component /mx:itemRenderer /mx:columns /mx:DataGrid public function createPNRToolTip(event:ToolTipEvent):void { } --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Alex Harui aharui@ wrote: Each renderer should get the event. From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com ] On Behalf Of djbrown_rotonews Sent: Wednesday, May 21, 2008 5:47 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com mailto:flexcoders% 40yahoogroups.com Subject: [flexcoders] Re: dataTipRenderer available for DataGrid? I see where there's a ToolTipCreate event available, and I've used that in the past for custom tool tips over TextAreas etc.. I see the same event exposed for the DataGrid itself, but it doesn't appear to exist for the individual columns. How would I handle the situation where I wanted to display a custom tool tip depending on what column was being moused over? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com
RE: [flexcoders] combobox set selecteditem
Try this: http://blogs.adobe.com/aharui/2008/01/selecteditem_and_combobox.html From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of netdeep Sent: Tuesday, May 27, 2008 9:44 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] combobox set selecteditem I've seen a half dozen solutions to this on the internet but somehow they don't work. Basically I just want to set the selectedItem of a combobox: mx:Combobox id=comboboxID dataprovider={httpserv.lastresult.system.data}/ // actionscript which won't work comboboxID.selectedItem = something; So then I tried to loop through the comboboxID.dataprovider to find the index for something but it won't ever give me the dataprovider strings, instead giving me errors like this: warning: unable to bind to property 'name' on class 'String' (class is not an IEventDispatcher) How can I get this working? Thanks.
RE: [flexcoders] Problems of defining a name space in Flex 3
Don't know for sure, but you may need a manifest From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of flexawesome Sent: Tuesday, May 27, 2008 9:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Problems of defining a name space in Flex 3 hey there, I had a problem of defining a name space in my renderer. In the previous version 2 I can use * to retrieve all subfolders, but in Flex 3 I can't use it and it seems doesn't work. I have more renderers in test2 and test3, how can I use com.test1.test2.* to retrieve more renderers in test3 folder? com.test1.test2.test3 thank you == sample in Flex 3 === ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml xmlns:myNameSpace=com.test1.test2.* /mx:Canvas
RE: [flexcoders] Re: How to extract data from XML
Use logo.text(); That returns only the text between those tags. Note that you can't use text() to SET the text node, only to read it. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of wild.katana Sent: Saturday, May 24, 2008 3:08 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: How to extract data from XML OMFG the namespace was the problem. After I added that line I was able to call Alert.show(myXML.logo.toXMLString()); and it worked like a charm. Thanks now I can finally start doing stuff with my application. This snag has been holding me up for a few days. One last thing, how would I go about extracting just what is between the tags logo and /logo instead of the entire element and attributes? Would I have to convert it to a single XML object first like you said? Or is there some function that can do that? Thanks for all your help Tracy, I'm starting to understand how XML works now because of you. -Leighton --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: Ok, you may have a namespace problem. They can be a PITA. I'm not an expert and you should reveiw the docs/google if this doesn't work but try putting this in the declarations section of your app/component(instance scope level): default xml namespace = http://www.w3.org/2005/Atom http://www.w3.org/2005/Atom ; There is more stuff in the xmlns declaration in your sample xml: feed xmlns=http://www.w3.org/2005/Atom http://www.w3.org/2005/Atom http://www.w3.org/2005/Atom http://www.w3.org/2005/Atom ... I do not understand what that second part of the string is. You might have to include that as well in the default namespace declaration. You can avoid the namespace issue if you use the node index to get a node, but this is a very clunky way to do it. To see, try: Alert.show(myXML.children()[4].toXMLString()) XMLList always has 0-n xml nodes in it. (the result of an e4x expression is never null) If there is only one node, then many of the XML methods will work on it the same as with XML. But for clarity, if I know I want to work with a single XML node then I do: var myXMLList:XMLList = myXML.logo; var xmlLogo:XML = myXMLList[0]; If just you do this below, you will get a datatype error: var xmlLogo:XML = myXML.logo; //even if that expression returns only a single node. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of wild.katana Sent: Thursday, May 22, 2008 7:08 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: How to extract data from XML Okay, first of all, thanks for all of your help, Tracy. I have checked the myXML variable with Alert.show(myXML) and it shows what I pasted in the first post (that's where I got it). So I know that myXML contains that. I tried doing Alert.show(myXML.logo.toXMLString()) but it is still showing nothing. I have read the documentation on using XML and tried many of the things it says, but to no avail. One thing I don't wuite understand... What is the difference between XML and XMLList? If the myXML.logo returns an XMLList, then should I make a variable that contains it first? Like var myXMLList:XMLList = myXML.logo; Alert.show(myXMLList); ? I will try that but let me know if that is what you were meaning or not... Thanks again.. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspratt@ wrote: First, did you trace or alert your XML in yur result handler? If you did not and are assuming you know what your xml looks like exactly, do that now. Second, when attempting to view XML, always use toXMLString() (search the archives for why): Alert.show(myXML.logo.toXMLString()) Third, when writing e4x expressions, unless you are very certain of yourself, it is best to do it one step at a time, using temporary XML or XMLList variables as needed, and tracing the contained value using toXMLString(). Note that all e4x expressions(myXML.logo is one) return XMLList, not XML. The docs will show how to handle this. Fourth, review the XML class in the language Ref and the working with data cha[ter in the developers guide for an explanation on how to work with XML. The link below is for Flex 2, but the XML stuff has not changed. http://livedocs.adobe.com/flex/2/docs/1910.html http://livedocs.adobe.com/flex/2/docs/1910.html http://livedocs.adobe.com/flex/2/docs/1910.html http://livedocs.adobe.com/flex/2/docs/1910.html Tracy From: flexcoders@yahoogroups.com
RE: [flexcoders] Re: Tree node height problem on initial load
Check rowCount and rowHeight. If you explicitly set rowCount, the rowHeight grows From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of burttram Sent: Tuesday, May 27, 2008 8:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Tree node height problem on initial load bump. Anybody have any ideas on how to go about even troubleshooting this? Thanks in advance for any help you guys can provide - I'm kind of stuck in a jam on this one - anybody ever seen a similar problem in their own work? -Brian --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , burttram [EMAIL PROTECTED] wrote: I have a component I'm developing to, among other things, accept an XMLListCollection as a dataProvider (the data is being supplied via a remote object call, which is why I've elected to extend a component to handle the reopening /dragdrop, etc). Best I can tell I've got working great, vice one issue that I just can't seem to resolve. Essentially, the first time the component loads it shows the nodes in the tree at an apparently random height that is significantly taller than what my normal tree node height should be. It would appear that the nodes are being spaced evenly across an arbitrary height of the tree which is greater in height than the 100% I've specified for the tree to take up inside it's container. I've included a screenshot of the behavior here, the left-hand image is the initial, jacked up state, and the right-hand image is the very same component instance after the contents are loaded the second time: http://www.2b-studios.com/xmlTreeView_Problem.png http://www.2b-studios.com/xmlTreeView_Problem.png http://www.2b-studios.com/xmlTreeView_Problem.png http://www.2b-studios.com/xmlTreeView_Problem.png Any help you guys might be able to provide would be so very much appreciated, I've been beating my head against the wall on this for hours now. Thanks in advance, Brian
RE: [flexcoders] Why is this renderer so slow?
An ordinary CheckBox will not retain its state when used as an itemRenderer. Renderers are recycled and will not reliably keep any state. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of leds usop Sent: Saturday, May 24, 2008 2:25 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Why is this renderer so slow? im just wondering why you think an ordinary check box wont retain it's selected state when scrolling? can you provide an example code that does that? maybe it will be more beneficial to approach the problem using that approach. Just a thought. --- On Sun, 5/25/08, dbronk [EMAIL PROTECTED] wrote: From: dbronk [EMAIL PROTECTED] Subject: [flexcoders] Why is this renderer so slow? To: flexcoders@yahoogroups.com Date: Sunday, May 25, 2008, 12:59 AM I have created a checkbox renderer. My datagrid has 5 out of 8 columns that use it. The datagrid has only about 80 rows it it. When using this renderer the performance of the datagrid is horrible. Scrolling is extremely slow, click a checkbox is extremely slow. If I swap out and use a normal mx:CheckBox for the renderer the performance is just fine, but of course that doesn't work as it will not retain the state of the checkbox when scrolling. Here is my code for the renderer. I notice that many of these are re-executed whenever anything happens to the datagrid. That includes just mousing over. Thanks. Dale package renderer { import flash.events. MouseEvent; import mx.controls. CheckBox; import spectrumk12. minerva.util. BaseEvent; import spectrumk12. minerva.util. Utils; [Event(name= selectionSet , type=util.BaseEven t)] public class RendererCheckBoxXML extends CheckBox { private var _xmlItem : XML; //holds the current item xml node private var count:int=0; private var debug:String= ; /** The attribute in the xml to use to store the selected state of this checkbox. */ [Inspectable( default= rendererSelected )] public var selectedAttribute : String = rendererSelected ; /** The default selection state (true/false) to give if the selectedAttribute is not there or null */ [Inspectable( default= false, enumeration= true,false )] public var defaultSelectedStat e : Boolean = false; public function RendererCheckBoxXML () { super(); trace(RendererChec kBoxXML:Construc tor); this.addEventListen er(MouseEvent. CLICK, onClick, false, 0, true); } // Sets the state of the checkbox based on the selectedAttribute attribute. override public function set data(oItem:Object) : void { _xmlItem = XML(oItem); trace(RendererChec kBoxXML:set data: + [EMAIL PROTECTED]) ; var bSelected : Boolean = false; var attrSelected : String = [EMAIL PROTECTED] Attribute] ; this.selected = ( Utils.nullOrBlank( attrSelected) ? defaultSelectedStat e : (attrSelected == true) ); } override public function get data() : Object { trace(RendererChec kBoxXML:get data: + (_xmlItem != null ? [EMAIL PROTECTED] : null)); return _xmlItem; } /** * This overridden function is where the logic is for updating the xml. */ override public function set selected(selectedFl ag:Boolean) : void { trace(RendererChec kBoxXML:set selected: + [EMAIL PROTECTED]) ; super.selected = selectedFlag; // Only update the xml if it needs to be updated. Each time the xml // is updated it will fire any bindings to it so we want to keep these // to a minimum. if ( [EMAIL PROTECTED] Attribute] != selectedFlag ) { // The selected flag is different than the selectedAttribute attribute. // Now we make one last check to see if the selectedFlag is false and // there is no attribute selectedAttribute. If this is the case, then // we do NOT update because having no attribute selectedAttribute will // default to a false. Again, we do this so that we update the xml as // infrequently as possible. if ( selectedFlag || [EMAIL PROTECTED] Attribute] .length() 0 ) { [EMAIL PROTECTED] Attribute] = String(this. selected) ; //set the checkbox state into the dataProvider } } dispatchEvent( new BaseEvent(selectio nSet, selectedFlag) ); } // Called by click of the checkbox private function onClick(mouseEvent: MouseEvent) : void { trace(RendererChec kBoxXML:onClick: + [EMAIL PROTECTED]) ; // Simply need to trigger the set selected function as that is where the logic for updating the xml is. this.selected = this.selected; } } }
[flexcoders] Re: The High Score Problem
There is no such thing as Flash application security? Against what ? How much is the value of the prize ? Who is attacking you ? Why ? The prizes are pretty big, so there is a justified concern for security. The attackers would be facebook users, so they will usually be 18-25. --- In flexcoders@yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Tuesday 27 May 2008, kenny14390 wrote: Is the simple conclusion that Flash applications are inherently transparent? Yes, same as a HTML application, in a sense. This is the bane of client/server computing, and *banks* haven't cracked it yet either. However, there are less people with the skills to decompile a Flex app than a JavaScript one. But maybe all they need to do is sniff the network traffic... Does SSL patch any of these risks? No, because the user can configure an SSL proxy and see the plain text of the session. But, again, less people will be able to do this. There is no such thing as Flash application security? Against what ? How much is the value of the prize ? Who is attacking you ? Why ? Until you answer those questions, how can you evaluate any of the various mitigation's ? For instance, if your attackers are all under 10 (because your app is used in a closed environment, i.e. a school class room, and the login is tied to the attendance list and O/S logged in user) then you probably don't need to do anything else. How can a high score problem be overcome? Some sort of CAPTCHA type test should prove there is a user sat at the computer, but I'm not aware of anyway to verify they're using your client and not another one they built themselves. Given they can intercept your 'calculateChecksumOfYourself()' (or whatever) and just send back the 'right' answer. A lot of the time, raising the bar fairly high (require login, SSL) is probably good enough. In your case, I'd probably want to require unique, verified email address too. Maybe postal too as people tend to have fewer throw away postal address' that actually work :-) -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: Why is this renderer so slow?
Also, it looks like you are doing some work in the set data() method. This method gets called more often than you might expect. Consider, in the set data(), storing the data in a local var then calling invalidateProperties(), then actually do the work in commitProperties(). I think maybe I learned that after I created that example. Tracy --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Updating the dataprovider is costly. Make sure it only happens when required (that is isn't happening during scrolling), and maybe avoid dispatching an event to do it. I'm not sure who's listening and what they will do in response. If you change the dataprovider, the DataGrid will do a lot of work. XML is much slower than objects, so it may pay to convert to object. Button already has logic for handling a selectedField in a dataprovider item. Since CheckBox inherits from button, you might just be able to use selectedField, or modify and piggy-back on its timing. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dbronk Sent: Saturday, May 24, 2008 10:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Why is this renderer so slow? I have created a checkbox renderer. My datagrid has 5 out of 8 columns that use it. The datagrid has only about 80 rows it it. When using this renderer the performance of the datagrid is horrible. Scrolling is extremely slow, click a checkbox is extremely slow. If I swap out and use a normal mx:CheckBox for the renderer the performance is just fine, but of course that doesn't work as it will not retain the state of the checkbox when scrolling. Here is my code for the renderer. I notice that many of these are re-executed whenever anything happens to the datagrid. That includes just mousing over. Thanks. Dale package renderer { import flash.events.MouseEvent; import mx.controls.CheckBox; import spectrumk12.minerva.util.BaseEvent; import spectrumk12.minerva.util.Utils; [Event(name=selectionSet, type=util.BaseEvent)] public class RendererCheckBoxXML extends CheckBox { private var _xmlItem : XML; //holds the current item xml node private var count:int=0; private var debug:String=; /** The attribute in the xml to use to store the selected state of this checkbox. */ [Inspectable(default=rendererSelected)] public var selectedAttribute : String = rendererSelected; /** The default selection state (true/false) to give if the selectedAttribute is not there or null */ [Inspectable(default=false, enumeration=true,false)] public var defaultSelectedState : Boolean = false; public function RendererCheckBoxXML() { super(); trace(RendererCheckBoxXML:Constructor); this.addEventListener(MouseEvent.CLICK, onClick, false, 0, true); } // Sets the state of the checkbox based on the selectedAttribute attribute. override public function set data(oItem:Object) : void { _xmlItem = XML(oItem); trace(RendererCheckBoxXML:set data: + [EMAIL PROTECTED]); var bSelected : Boolean = false; var attrSelected : String = [EMAIL PROTECTED]; this.selected = ( Utils.nullOrBlank(attrSelected) ? defaultSelectedState : (attrSelected == true) ); } override public function get data() : Object { trace(RendererCheckBoxXML:get data: + (_xmlItem != null ? [EMAIL PROTECTED] : null)); return _xmlItem; } /** * This overridden function is where the logic is for updating the xml. */ override public function set selected(selectedFlag:Boolean) : void { trace(RendererCheckBoxXML:set selected: + [EMAIL PROTECTED]); super.selected = selectedFlag; // Only update the xml if it needs to be updated. Each time the xml // is updated it will fire any bindings to it so we want to keep these // to a minimum. if ( [EMAIL PROTECTED] != selectedFlag ) { // The selected flag is different than the selectedAttribute attribute. // Now we make one last check to see if the selectedFlag is false and // there is no attribute selectedAttribute. If this is the case, then // we do NOT update because having no attribute selectedAttribute will // default to a false. Again, we do this so that we update the xml as // infrequently as possible. if ( selectedFlag || [EMAIL PROTECTED]() 0 ) { [EMAIL PROTECTED] = String(this.selected); //set the checkbox state into the dataProvider } } dispatchEvent(new BaseEvent(selectionSet, selectedFlag)); } // Called by click of the checkbox private function onClick(mouseEvent:MouseEvent) : void { trace(RendererCheckBoxXML:onClick: + [EMAIL PROTECTED]); // Simply need to trigger the set selected function as that is where the logic for updating the xml is. this.selected = this.selected; } } }
[flexcoders] How to play an animation when removing a child on a state change
I change my state to X and have a removeChild statement to remove a datagrid (since something else will take its place). My question is how can I have an effect play instead of just having it disappear. It seems like my RemoveChild statement is played before any transition is played. Thanks Bruce
[flexcoders] Re: Button down event
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: On Windows, in FF and IE, you tab to any regular Button, and space will activate it. It is standard MSAA But how many people use that instead of the more ubiquitous Enter to activate the highlighted button? I don't know anyone who regularly uses the space bar like that.
RE: [flexcoders] Re: HTTPService multiple requests not being sent?
Injecting a current client-side timestamp into an outbound request is a good way to avoid Http response caching if you don't control the server. If you do control the server, you should consider configuring it to set HTTP no-cache headers in these responses to suppress caching. Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of valdhor Sent: Tuesday, May 27, 2008 9:15 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: HTTPService multiple requests not being sent? This is pretty close to another qustion that was asked lately. Seth Hodgson summed up what was going on here: http://tech.groups.yahoo.com/group/flexcoders/message/113808 --- In flexcoders@yahoogroups.com, javadmanx [EMAIL PROTECTED] wrote: I have the following service: getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id}); If I make multiple requests on this same service with the same values it seems to cache and not send the request to the server again. The only way I've found to stop it from doing this is to add a time stamp the changes the request values. Below is the code I've used to get it to send the request on every call. So what it does is, if the request values are the same it just gives me the same data, but never calls the server. But if I use this below it calls the server every time. getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id, tt: new Date().getTime()}); What am I doing, and is there a better way to get all requests to call the server even if the request values are the same? Thanks.
[flexcoders] Adobe Weblogs site malfunctioning!
Trying to view page: http://weblogs.macromedia.com/pmartin/archives/2006/06/flexunit_ant.cfm Is serving up the CFM source, rather than parsing!! However, weblogs.macromedia.com redirects to an adobe.feeds site, which has no contact info, that I see... -- : : ) Scott Helping your grandma on the interweb at: http://blog.criticalpile.com
Re: [flexcoders] Adobe Weblogs site malfunctioning!
This is fallout from when the mxna servers went down. I'll mail Peter. Matt On 5/27/08 11:39 AM, sLangeberg [EMAIL PROTECTED] wrote: Trying to view page: http://weblogs.macromedia.com/pmartin/archives/2006/06/flexunit_ant.cfm Is serving up the CFM source, rather than parsing!! However, weblogs.macromedia.com http://weblogs.macromedia.comhttp://weblogs.macromedia.com redirects to an adobe.feeds site, which has no contact info, that I see...
[flexcoders] Re: How to play an animation when removing a child on a state change
--- In flexcoders@yahoogroups.com, boy_trike [EMAIL PROTECTED] wrote: I change my state to X and have a removeChild statement to remove a datagrid (since something else will take its place). My question is how can I have an effect play instead of just having it disappear. It seems like my RemoveChild statement is played before any transition is played. Thanks Bruce this is an example from inside RIA. the transition worked for me. but i could not get the second state to render it's components. you can try this method though the author uses cairngorm, but that does not matter, since this is the view part. hope it helps = mx:states mx:State name={BookieModel.SIGNED_OUT} mx:AddChild view:SignInPanel id=signInPanel horizontalAlign=center verticalAlign=middle / /mx:AddChild /mx:State mx:State name={BookieModel.SIGNED_IN} mx:RemoveChild id=removeSignInPanel target={signInPanel} / mx:AddChild mx:Panel layout=horizontal title=Find a Book width=100% height=100% id=masterPanel status={'Welcome, ' + model.user.firstName + ' ' + model.user.lastName} creationCompleteEffect={wipeIn} mx:HDividedBox width=100% height=100% liveDragging=true view:BookList id=bookList width=100% height=100% / mx:VDividedBox id=searchBox width=100% liveDragging=true height=100% mx:TabNavigator id=searchMethods height=100% width=100% search:TitleSearch id=titleSearch label=Search by Title bookSearch=searchBooks(event) / search:AuthorSearch id=authorSearch label=Search by Author bookSearch=searchBooks(event) / search:SubjectSearch id=subjectSearch label=Search by Subject bookSearch=searchBooks(event) / /mx:TabNavigator /mx:VDividedBox /mx:HDividedBox mx:ControlBar horizontalAlign=right mx:Button id=signOutButton label=Sign Out click=signOut() / /mx:ControlBar /mx:Panel /mx:AddChild /mx:State mx:State name={BookieModel.BOOKS_CHOSEN} basedOn={BookieModel.SIGNED_IN} mx:AddChild relativeTo={searchBox} position=lastChild view:ReserveBooksPanel id=reserveList / /mx:AddChild mx:SetProperty target={searchMethods} name=height value=55%/ mx:SetProperty target={reserveList} name=height value=45%/ /mx:State /mx:states mx:transitions mx:Transition id=fadeSignInOut fromState={BookieModel.SIGNED_OUT} toState={BookieModel.SIGNED_IN} mx:Sequence mx:Move target={signInPanel} xTo=5000 duration=2000 / mx:RemoveChildAction target={signInPanel} / mx:AddChildAction target={masterPanel} / /mx:Sequence /mx:Transition /mx:transitions
RE: [flexcoders] Publish Flex dev application to Production problem!
Have you tried hitting http://myapp.4java.ca/messagebroker/amf (the URL your channel is configured to use) in a browser? You either need to get that working, or if your endpoint is running at a different URL (maybe using a non-empty context root?), update your configuration such that the client is using the correct value. Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of guillaumeracine Sent: Saturday, May 24, 2008 12:56 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Publish Flex dev application to Production problem! Hi, my application in dev mode works fine with blazeDS. But when i put it on my web server i cannot access the blazeDS application (messagebroker) anymore from my flex client. in dev mode i access to my flex app like this http://192.168.1.101:8080/myapp/chidaca.html In production mode i use myapp.4java.ca/chidaca.html Do i have to change the service-config.xml before deploying or change any compiler arguments in flex builder ??? Here is my error : FaultEvent fault=[RPC Fault faultString=Send failed faultCode=Client.Error.MessageSend faultDetail=Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://myapp.4java.ca/messagebroker/amf'] messageId=4DAEE9EF-90D9-499E-977A-1C7FCE4EFFFD type=fault bubbles=false
RE: [flexcoders] Re: HTTPService multiple requests not being sent?
I have heard that POSTed requests do not cache. I use POST exclusively, and have never had any caching issues. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Seth Hodgson Sent: Tuesday, May 27, 2008 2:38 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: HTTPService multiple requests not being sent? Injecting a current client-side timestamp into an outbound request is a good way to avoid Http response caching if you don't control the server. If you do control the server, you should consider configuring it to set HTTP no-cache headers in these responses to suppress caching. Seth From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of valdhor Sent: Tuesday, May 27, 2008 9:15 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: HTTPService multiple requests not being sent? This is pretty close to another qustion that was asked lately. Seth Hodgson summed up what was going on here: http://tech.groups.yahoo.com/group/flexcoders/message/113808 http://tech.groups.yahoo.com/group/flexcoders/message/113808 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , javadmanx [EMAIL PROTECTED] wrote: I have the following service: getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id}); If I make multiple requests on this same service with the same values it seems to cache and not send the request to the server again. The only way I've found to stop it from doing this is to add a time stamp the changes the request values. Below is the code I've used to get it to send the request on every call. So what it does is, if the request values are the same it just gives me the same data, but never calls the server. But if I use this below it calls the server every time. getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id, tt: new Date().getTime()}); What am I doing, and is there a better way to get all requests to call the server even if the request values are the same? Thanks.
RE: [flexcoders] Re: Button down event
I am fortunate to have use of both my hands and all of the fingers on them and my eyes so I use the mouse and cannot answer your question. I assume this behavior is a standard and that folks who need it know it and use it. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Tuesday, May 27, 2008 11:37 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Button down event --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui [EMAIL PROTECTED] wrote: On Windows, in FF and IE, you tab to any regular Button, and space will activate it. It is standard MSAA But how many people use that instead of the more ubiquitous Enter to activate the highlighted button? I don't know anyone who regularly uses the space bar like that.
RE: [flexcoders] ComboBox change event
You probably want the valueCommit event. Be aware that this event fires quite often, and you will need to check for null values and watch out for endless loops. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Alex Harui Sent: Tuesday, May 27, 2008 11:16 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] ComboBox change event Because that isn't a result of user interaction (with the ComboBox directly). From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kilian.schumm Sent: Tuesday, May 27, 2008 4:42 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] ComboBox change event Hi, this little example tries to update the selectedItem property of a ComboBox from somewhere outside the ComboBox. The Flex 3 reference says about the ComboBox change event: Dispatched when the ComboBox contents changes as a result of user interaction, when the selectedIndex or selectedItem property changes, and, if the ComboBox control is editable, each time a keystroke is entered in the box. When I run this application and click on the MasterCard Button, the selectedItem property changes, but the change event is not dispatched - does somebody out there know why ?? Kilian here is the code (taken from adobe`s reference and made some changes): ?xml version=1.0? !-- Simple example to demonstrate the ComboBox control. -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var cards:ArrayCollection = new ArrayCollection( [ {label:Visa, data:1}, {label:MasterCard, data:2}, {label:American Express, data:3} ]); private function changeHandler(event:Event):void { myLabel.text = You selected: + ComboBox(event.target).selectedItem.label; myData.text = Data: + ComboBox(event.target).selectedItem.data; } private function buttonHandler(event:Event):void { box.selectedItem = cards.getItemAt(1); } ]] /mx:Script mx:Panel title=ComboBox Control Example height=75% width=75% layout=horizontal paddingTop=10 paddingBottom=10 paddingLeft=10 paddingRight=10 mx:ComboBox id=box dataProvider={cards} width=150 change=changeHandler(event);/ mx:VBox width=250 mx:Text width=200 color=blue text=Select a type of credit card./ mx:Label id=myLabel text=You selected:/ mx:Label id=myData text=Data:/ /mx:VBox mx:Button label=MasterCard click=buttonHandler(event); /mx:Button /mx:Panel /mx:Application
RE: [flexcoders] Data exchange between flex apps
What is your architecture? Have you lookded at the FlexMDI framework? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of amorphis_gr Sent: Tuesday, May 27, 2008 10:14 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Data exchange between flex apps I am building a multi windowed application, i have a base app that create windows and in each window in this base app a different flex swf RIA runs it works like a virtual desktop. i want to pass values to this new running apps like a string or an integer, does anybody know a good way to archive that ? thank you!!
Re: [flexcoders] Re: Include images in SWC via compc
This was a useful tip. Thanks. It appears that my Flexbuilder-generated SWC contains images in an images directory. The compc-generated SWC has them at the top level (using -include-file). Is there any way compc can be persuaded to create the folder? On Fri, May 16, 2008 at 2:00 AM, EECOLOR [EMAIL PROTECTED] wrote: You can inspect the contents of the SWC with WinRar or a similar tool. It is just a zip-like container. Within it you will find at least 2 files: library.swf - This swf contains all compiled information catalog.xml - This file contains information about the contents of the swf As for information about the swf, this is described pretty well in the catalog.xml. If you want more information, there are a few applications that can inspect the contents of an swf. Some are even written in Adobe AIR. Greetz Erik On 5/15/08, Richard Rodseth [EMAIL PROTECTED] wrote: Are there any good (preferably GUI) tools for inspecting the contents of SWCs and SWFs. My colleague is still having no luck building the SWC that I now have working in FlexBuilder. I have a feeling the key is understanding what Flexbuilder does when you designate a file (eg src in my layout below) as the main source folder. Is there a compc equivalent, or just the -source-path option? On Wed, May 14, 2008 at 2:24 PM, Richard Rodseth [EMAIL PROTECTED] wrote: The good news is I was finally able to build my Resources SWC (containing images, stylesheets, and properties files that embed images) in Flexbuilder. The bad news is for my poor colleague who is gallantly doing the continuous integration work (with MSBuild and mxmlc/compc). In Flexbuilder, I ended up with the following layout: resourcesproj ..locale en_US ..images.properties ..src images ..zoom.png com ..stylesheets myapp.css In Flexbuilder, I had the images checked on the Assets tab, and the following additional compiler options -locale en_US -source-path=../locale/{locale} -include-resource-bundles=images,UIStrings -include-file myapp.css ../stylesheets/myapp.css Is there really no wildcard way to include all the images in the SWC from the command line without listing them explicitly in a config file? I guess Flexbuilder builds a list based on the checkboxes in the Assets tab? The properties files references the images like this zoom=Embed(images/zoom.png) I assume we would have to use images/zoom.png as the name in a -include-file directive? Hoping for better error messages and CI support in Flexbuilder 4...
RE: [flexcoders] Text Question
Use mx:Text for paragraphs of text. But there is no reason to use mx:Form for an Accordion pane if all you're going to put in it is mx:Text. You should just use mx:Canvas instead. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of nihilism machine Sent: Saturday, May 24, 2008 11:18 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Text Question Ok, this will probably sound stupid but ... How can I write a paragraph of text inside of an accordion? My example accordion that I am using uses mxForm for each accordion element. How can I write a paragraph of wrapped text inside of the accordion? Thanks in advance. -e
[flexcoders] Need Advice on browser buttons
Hi all, gotten some user feedback on the app I am working on. big complaints are when a user clicks back by accident or the refresh button. What are you doing to limit how the user works in the browser so they don't kill the app and their work. Thanks Jeff
[flexcoders] Print a ticket
Hello, I must print a ticket on a printer Epson (thermique), and I can send it a rtf file with special font for a quick print. How can I generate and send directely a rtf document with AIR ? Can I just send text, with font and font size, without canvas ? Thanks Jean
[flexcoders] Re: Tree node height problem on initial load
I couldn't find anywhere that I was setting RowCount to a number, however your suggestion of explicitly setting the rowHeight worked like a charm. Thanks a million. -Brian
[flexcoders] Trace output from a flash 9 cs3 component in flex 3 ?
Hi, I am unable to get trace output from a custom flash 9 cs3 component that is made into a SWC. Is there someway to work around this so I can actually debug the component? - Austin
[flexcoders] How do I trigger updateDisplayList() on *every* component in my Application?
I have an application with a bunch of nested containers and components. We are internationalizing this app (with ResourceModules) and when someone switches languages we need invalidateDisplayList() called on every child component of the app. Iterating through the Application's rawChildren doesn't return any components that are nested in a Canvas for example. Do I really have to do some recusive deal to traverse the whole tree to make the whole app redraw? There has to be an easier way to do this that I'm overlooking. Example: rawChildren only returns the Canvas, do I need to check if it's a container and recurse? App Canvas Box title={resourceManger.getString('boxTitle')}/ /Canvas /App Thanks in advance! -Rob
Re: [flexcoders] How do I trigger updateDisplayList() on *every* component in my Application?
That would be the wrong approach. Take a look at Gordon's article: http://labs.adobe.com/wiki/index.php/Flex_3:Feature_Introductions:_Runtime_Localization You'll see that you just need to change the locale chain of the resource manager. You already have a binding expression which invokes the resource manager. On Tue, May 27, 2008 at 2:49 PM, robbarreca [EMAIL PROTECTED] wrote: I have an application with a bunch of nested containers and components. We are internationalizing this app (with ResourceModules) and when someone switches languages we need invalidateDisplayList() called on every child component of the app. Iterating through the Application's rawChildren doesn't return any components that are nested in a Canvas for example. Do I really have to do some recusive deal to traverse the whole tree to make the whole app redraw? There has to be an easier way to do this that I'm overlooking. Example: rawChildren only returns the Canvas, do I need to check if it's a container and recurse? App Canvas Box title={resourceManger.getString('boxTitle')}/ /Canvas /App Thanks in advance! -Rob
Re: [flexcoders] Print a ticket
On Tue, May 27, 2008 at 9:20 PM, Jean Szabo [EMAIL PROTECTED] wrote: Hello, I must print a ticket on a printer Epson (thermique), and I can send it a rtf file with special font for a quick print. How can I generate and send directely a rtf document with AIR ? Can I just send text, with font and font size, without canvas ? Hi Jean, That is not currently possible with Flex or AIR. I have had the same problem in the past. The way I solved it was as follows. I installed the POS printers on each point of sales, and made it shareable. On the server side, I created a servlet that would send the request to the correct printer. I mapped an ip address to a printer address in the database. So, whenever I point of sales requested a print job, the server would read the IP address of the machine making the request, and would retrieve the printer address so that it could send the print data to it. The print data is all ASCII, as I was using Parallel Port printers. The solution would be the same for a USB printer as well. So, my advise is just for you to give it a try. We have modified the application to use the Hessian protocol now, but you can also implement it using BlazeDS. Hope that info was helpful. All the best, Fidel.
[flexcoders] parsing complex xml
I'm trying to parse a complex xml file (a log4j config file) and am running into a number of problems: * Flex seems to remove all the comments from the file. Is there any way to prevent this? I don't need access to them in Flex, but do want them to be untouched. * I have no idea how to iterate over the items or to set xml as a list's data provider. The tag containing everything I need to access is log4j:configuration, and when I try to access xml.log4j::configuration flex complains about not having the property log4j. If anyone knows of good xml tutorials that would help me to grasp this better I'd really appreciate it. Most of the ones I've found are basically the hello world of xml parsing...the few dealing with namespaces do little to explain what they're doing. log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=false category name=org.apache priority value=INFO/ /category !-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -- category name=org.jboss.serial priority value=INFO/ /category !-- Limit the org.jgroups category to WARN as its INFO is verbose -- category name=org.jgroups priority value=WARN/ /category !-- Limit the jacorb category to WARN as its INFO is verbose -- category name=jacorb priority value=WARN/ /category . . . /log4j:configuration Thanks a lot! -dennis
RE: [flexcoders] parsing complex xml
I don't know if I have ever noticed this removal of comments, I'd need to verify. To iterate over nodes, use an e4x expression to return an XMLList, then use a for loop. Or For Each, or For In. The docs have some more detail and examples. A list can also use XMLList as a dataProvider if you do not plan to programmaticlly update the dataprovider. If you do, simply wrap the XMLList in an XMLListCollection. It looks like you will need to declare the default namespace, or use the namespace::node in all e4x expressions. You've not shown any expressions, so I can't say what you're doing wrong. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dfalling Sent: Tuesday, May 27, 2008 6:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] parsing complex xml I'm trying to parse a complex xml file (a log4j config file) and am running into a number of problems: * Flex seems to remove all the comments from the file. Is there any way to prevent this? I don't need access to them in Flex, but do want them to be untouched. * I have no idea how to iterate over the items or to set xml as a list's data provider. The tag containing everything I need to access is log4j:configuration, and when I try to access xml.log4j::configuration flex complains about not having the property log4j. If anyone knows of good xml tutorials that would help me to grasp this better I'd really appreciate it. Most of the ones I've found are basically the hello world of xml parsing...the few dealing with namespaces do little to explain what they're doing. log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/ http://jakarta.apache.org/log4j/ debug=false category name=org.apache priority value=INFO/ /category !-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -- category name=org.jboss.serial priority value=INFO/ /category !-- Limit the org.jgroups category to WARN as its INFO is verbose -- category name=org.jgroups priority value=WARN/ /category !-- Limit the jacorb category to WARN as its INFO is verbose -- category name=jacorb priority value=WARN/ /category . . . /log4j:configuration Thanks a lot! -dennis
[flexcoders] Re: [SOLVED] Trigger an invalidateDisplayList() when properties are changed
--- In flexcoders@yahoogroups.com, Richard Rodseth [EMAIL PROTECTED] wrote: You'll see that you just need to change the locale chain of the resource manager. You already have a binding expression which invokes the resource manager. Thanks for the reply Richard. The problem I'm facing is that not *all* of the bindings are getting honored when I change localeChain. I realize the recursive display invalidation is not the way to go. Your email made me realize now that the it's my custom component MyPanel (which extends Box and adds a bold label on top) that isn't updating until updateDisplayList() is called. This was a deficiency in how this component was written as Flex Text and Label controls update fine. I wasn't accounting for these custom properties to be programatically set since they were just hardcoded before i18n. I changed public var title:String; to protected var _title:String; public function get title():String { return _title; } public function set title(value:String):void { _title = value; invalidateDisplayList(); } and all is well. Thanks a lot!
Re: [flexcoders] parsing complex xml
XML.ignoreComments = false; -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: dfalling [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] parsing complex xml Date: Tue, 27 May 2008 22:09:41 - I'm trying to parse a complex xml file (a log4j config file) and am running into a number of problems: * Flex seems to remove all the comments from the file. Is there any way to prevent this? I don't need access to them in Flex, but do want them to be untouched. * I have no idea how to iterate over the items or to set xml as a list's data provider. The tag containing everything I need to access is log4j:configuration, and when I try to access xml.log4j::configuration flex complains about not having the property log4j. If anyone knows of good xml tutorials that would help me to grasp this better I'd really appreciate it. Most of the ones I've found are basically the hello world of xml parsing...the few dealing with namespaces do little to explain what they're doing. log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=false category name=org.apache priority value=INFO/ /category !-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -- category name=org.jboss.serial priority value=INFO/ /category !-- Limit the org.jgroups category to WARN as its INFO is verbose -- category name=org.jgroups priority value=WARN/ /category !-- Limit the jacorb category to WARN as its INFO is verbose -- category name=jacorb priority value=WARN/ /category . . . /log4j:configuration Thanks a lot! -dennis
[flexcoders] Any folks from WebService Fx SDK team here?
I need to talk with someone from SDK team in part of WebServices. Is that possible? -- Igor Costa www.igorcosta.org
Re: [flexcoders] Dictionary bug
Why do Strings make bad keys in a Dictionary? Is it just because you get no benefits over an Object but it's slower? And If I wanted a map of String (or similar) to a weak reference of an Object, what's the best way to achieve this? Is the only way to put the Object as the key in a weakReference Dictionary, and the key Strings as values in the Dictionary? This would make retrieval pretty slow if the collection gets sizeable, as you'd have to loop through the Dictionary keys looking for the value that's your actual key. -J On Wed, May 28, 2008 at 2:02 AM, Christophe Jolif [EMAIL PROTECTED] wrote: Alex, Alex Harui wrote: Dictionary keys should be objects. That's why I advised him to use Array not Dictionary... I must admit I don't know exactly what Daniel wants to do but his method name (getItem) reminds me a lot of similar things in Adobe Flex SDK such as ListBase.itemToItemRenderer method that are exactly doing what I propose. That's why I suggested him that workaround. But maybe I miss something... -- Christophe http://blogs.ilog.com/elixir/author/cjolif -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Any folks from WebService Fx SDK team here?
Good luck with that, although I've been poking around in their source a lot recently, and I know Web Services can be... frustrating in Flex, so if you post your question I might be able to help :) -J On Wed, May 28, 2008 at 8:40 AM, Igor Costa [EMAIL PROTECTED] wrote: I need to talk with someone from SDK team in part of WebServices. Is that possible? -- Igor Costa www.igorcosta.org -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
RE: [flexcoders] Dictionary bug
Strings are interned so their reference counting can be tricky and defeat the weakreference capabilities of Dictionary. I'd just use an Object if my keys were strings. There is no efficient mapping of strings to weak object references. You can map stirngs to a Dictionary of Dictionaries where each sub-dictionary has one key, but you may still need to collect the empty sub-dictionaries at some point. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Tuesday, May 27, 2008 3:52 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dictionary bug Why do Strings make bad keys in a Dictionary? Is it just because you get no benefits over an Object but it's slower? And If I wanted a map of String (or similar) to a weak reference of an Object, what's the best way to achieve this? Is the only way to put the Object as the key in a weakReference Dictionary, and the key Strings as values in the Dictionary? This would make retrieval pretty slow if the collection gets sizeable, as you'd have to loop through the Dictionary keys looking for the value that's your actual key. -J On Wed, May 28, 2008 at 2:02 AM, Christophe Jolif [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Alex, Alex Harui wrote: Dictionary keys should be objects. That's why I advised him to use Array not Dictionary... I must admit I don't know exactly what Daniel wants to do but his method name (getItem) reminds me a lot of similar things in Adobe Flex SDK such as ListBase.itemToItemRenderer method that are exactly doing what I propose. That's why I suggested him that workaround. But maybe I miss something... -- Christophe http://blogs.ilog.com/elixir/author/cjolif http://blogs.ilog.com/elixir/author/cjolif -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
RE: [flexcoders] Any folks from WebService Fx SDK team here?
If your post contains keywords like WebService, DataSevices, fill(), SOAP, etc, they usually see it and respond. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Tuesday, May 27, 2008 3:58 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Any folks from WebService Fx SDK team here? Good luck with that, although I've been poking around in their source a lot recently, and I know Web Services can be... frustrating in Flex, so if you post your question I might be able to help :) -J On Wed, May 28, 2008 at 8:40 AM, Igor Costa [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I need to talk with someone from SDK team in part of WebServices. Is that possible? -- Igor Costa www.igorcosta.org http://www.igorcosta.org -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
Re: [flexcoders] Re: [SOLVED] Trigger an invalidateDisplayList() when properties are changed
I'd put a if (_title == value) return; In there. You probably won't gain *much* performance but it's only one line, and it might help a lot depending on various bindings :) Also, and I'm not 100% sure on this but depending on what you're actually doing with _title, it might be more in line with the standard flex way of doing things to just call invalidateProperties, and then in commitProperties() check for a change in _title (compare it with titleComponent.text or whatever) and simply change the property on that component instead of calling the entire updateDisplatList() method. But I've only seen 5 lines of your component, so that may be way off for your use case! :D -J On Wed, May 28, 2008 at 8:38 AM, robbarreca [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Richard Rodseth [EMAIL PROTECTED] wrote: You'll see that you just need to change the locale chain of the resource manager. You already have a binding expression which invokes the resource manager. Thanks for the reply Richard. The problem I'm facing is that not *all* of the bindings are getting honored when I change localeChain. I realize the recursive display invalidation is not the way to go. Your email made me realize now that the it's my custom component MyPanel (which extends Box and adds a bold label on top) that isn't updating until updateDisplayList() is called. This was a deficiency in how this component was written as Flex Text and Label controls update fine. I wasn't accounting for these custom properties to be programatically set since they were just hardcoded before i18n. I changed public var title:String; to protected var _title:String; public function get title():String { return _title; } public function set title(value:String):void { _title = value; invalidateDisplayList(); } and all is well. Thanks a lot! -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Re: HTTPService multiple requests not being sent?
If you're GET requesting a URL that points to dynamic content that changes with every request, whoever is in charge of the server really should be setting no-cache, and they'd probably appreciate being notified of what is in effect a bug in the service. Adding a timestamp get parameter just smells like we're back in the 90s doing PHP :D -J On Wed, May 28, 2008 at 5:05 AM, Tracy Spratt [EMAIL PROTECTED] wrote: I have heard that POSTed requests do not cache. I use POST exclusively, and have never had any caching issues. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Seth Hodgson *Sent:* Tuesday, May 27, 2008 2:38 PM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] Re: HTTPService multiple requests not being sent? Injecting a current client-side timestamp into an outbound request is a good way to avoid Http response caching if you don't control the server. If you do control the server, you should consider configuring it to set HTTP no-cache headers in these responses to suppress caching. Seth From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of valdhor Sent: Tuesday, May 27, 2008 9:15 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: HTTPService multiple requests not being sent? This is pretty close to another qustion that was asked lately. Seth Hodgson summed up what was going on here: http://tech.groups.yahoo.com/group/flexcoders/message/113808 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, javadmanx [EMAIL PROTECTED] wrote: I have the following service: getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id}); If I make multiple requests on this same service with the same values it seems to cache and not send the request to the server again. The only way I've found to stop it from doing this is to add a time stamp the changes the request values. Below is the code I've used to get it to send the request on every call. So what it does is, if the request values are the same it just gives me the same data, but never calls the server. But if I use this below it calls the server every time. getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id, tt: new Date().getTime()}); What am I doing, and is there a better way to get all requests to call the server even if the request values are the same? Thanks. -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Dictionary bug
Dammit, why didn't I think of strings to one-entry dictionaries? Genius! Alex, that's why you're the judge, and I'm the law.. talking.. guy :) Collecting the empty dictionaries would be a pretty simple job to do on a timer using something similar to your background thread code too. -J On Wed, May 28, 2008 at 9:01 AM, Alex Harui [EMAIL PROTECTED] wrote: Strings are interned so their reference counting can be tricky and defeat the weakreference capabilities of Dictionary. I'd just use an Object if my keys were strings. There is no efficient mapping of strings to weak object references. You can map stirngs to a Dictionary of Dictionaries where each sub-dictionary has one key, but you may still need to collect the empty sub-dictionaries at some point. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Josh McDonald *Sent:* Tuesday, May 27, 2008 3:52 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Dictionary bug Why do Strings make bad keys in a Dictionary? Is it just because you get no benefits over an Object but it's slower? And If I wanted a map of String (or similar) to a weak reference of an Object, what's the best way to achieve this? Is the only way to put the Object as the key in a weakReference Dictionary, and the key Strings as values in the Dictionary? This would make retrieval pretty slow if the collection gets sizeable, as you'd have to loop through the Dictionary keys looking for the value that's your actual key. -J On Wed, May 28, 2008 at 2:02 AM, Christophe Jolif [EMAIL PROTECTED] wrote: Alex, Alex Harui wrote: Dictionary keys should be objects. That's why I advised him to use Array not Dictionary... I must admit I don't know exactly what Daniel wants to do but his method name (getItem) reminds me a lot of similar things in Adobe Flex SDK such as ListBase.itemToItemRenderer method that are exactly doing what I propose. That's why I suggested him that workaround. But maybe I miss something... -- Christophe http://blogs.ilog.com/elixir/author/cjolif -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Any folks from WebService Fx SDK team here?
Maybe they just don't like me :) Either way, if we have the actual question in the group, it's definitely more likely to get answered! On Wed, May 28, 2008 at 9:03 AM, Alex Harui [EMAIL PROTECTED] wrote: If your post contains keywords like WebService, DataSevices, fill(), SOAP, etc, they usually see it and respond. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Josh McDonald *Sent:* Tuesday, May 27, 2008 3:58 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Any folks from WebService Fx SDK team here? Good luck with that, although I've been poking around in their source a lot recently, and I know Web Services can be... frustrating in Flex, so if you post your question I might be able to help :) -J On Wed, May 28, 2008 at 8:40 AM, Igor Costa [EMAIL PROTECTED] wrote: I need to talk with someone from SDK team in part of WebServices. Is that possible? -- Igor Costa www.igorcosta.org -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] parsing complex xml
Off the top of my head, If the root of your XML doc is configuration, you want xmlObject.category as a list of category elements, not xmlObject.configuration.category -J On Wed, May 28, 2008 at 8:09 AM, dfalling [EMAIL PROTECTED] wrote: I'm trying to parse a complex xml file (a log4j config file) and am running into a number of problems: * Flex seems to remove all the comments from the file. Is there any way to prevent this? I don't need access to them in Flex, but do want them to be untouched. * I have no idea how to iterate over the items or to set xml as a list's data provider. The tag containing everything I need to access is log4j:configuration, and when I try to access xml.log4j::configuration flex complains about not having the property log4j. If anyone knows of good xml tutorials that would help me to grasp this better I'd really appreciate it. Most of the ones I've found are basically the hello world of xml parsing...the few dealing with namespaces do little to explain what they're doing. log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=false category name=org.apache priority value=INFO/ /category !-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -- category name=org.jboss.serial priority value=INFO/ /category !-- Limit the org.jgroups category to WARN as its INFO is verbose -- category name=org.jgroups priority value=WARN/ /category !-- Limit the jacorb category to WARN as its INFO is verbose -- category name=jacorb priority value=WARN/ /category . . . /log4j:configuration Thanks a lot! -dennis -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Any folks from WebService Fx SDK team here?
So. Anyway. Is there any plan on fixing bugs on WebService code generator for support Weblogic webservice generator? I did a test with .Net ws and works smooth but with Weblogic isn't working properly. I have the real situation. On server I have Weblogic 9.2.2 publising DataServices and using a translated version of their soap 1.1, But with so many tests I can't get working. Why? I believe is related to schema that WebServices of Their implementation works. For example I did extended the AbstractWebservice to try a way to work. Just a CRUD example and for somehow works only for list and filter, Operations like delete, create or edit doesnt work and Flex give's me a #2032 that's to me doesn't mean anything. That's why I would like any folks from Adobe to expose all source code and could help to implement a way to support the WebLogic Webservice SOAP format. Regards Igor On Tue, May 27, 2008 at 8:03 PM, Alex Harui [EMAIL PROTECTED] wrote: If your post contains keywords like WebService, DataSevices, fill(), SOAP, etc, they usually see it and respond. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Josh McDonald *Sent:* Tuesday, May 27, 2008 3:58 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Any folks from WebService Fx SDK team here? Good luck with that, although I've been poking around in their source a lot recently, and I know Web Services can be... frustrating in Flex, so if you post your question I might be able to help :) -J On Wed, May 28, 2008 at 8:40 AM, Igor Costa [EMAIL PROTECTED] wrote: I need to talk with someone from SDK team in part of WebServices. Is that possible? -- Igor Costa www.igorcosta.org -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Igor Costa www.igorcosta.com www.igorcosta.org
Re: [flexcoders] Any folks from WebService Fx SDK team here?
With Flex 3, the source code is all included, and it's pretty nice and clean too. It takes some debugging single-stepping to get a handle on what's going on in the XML and SOAP codec classes, but I managed to diagnose and fix a bug in the encoder in about 6 hours work and I'm no flex ninja yet, so you should be able to figure out where it's going wrong with a little patience. BTW, 2032 often means your service is returning a SOAP fault. By default (and probably the standard) this is a http/500 response, which the browser discards before telling the Flash plug-in about it so your app will never get the result. Sucks, but that's the way it is. If you put a filter on the web server to change 500 to 200 when coming from a SOAP request you may get more useful information in the FaultEvent. Also, I can't recommend the Charles web debugging proxy highly enough. It's saved me countless hours debugging weird bugs in our XSDs, as well as in Flex's encoder. You'll be able to see exactly how Flex thinks the request should be formed, and also exactly what it is your server is sending back. If you can create a (small) soapUI project that exhibits your problem (ie .net can connect but Flex cannot) and post a link to it here (as opposed to an attachment which is poor form on lists), you'll also improve the chances of somebody at least telling you what the problem is. -J On Wed, May 28, 2008 at 9:38 AM, Igor Costa [EMAIL PROTECTED] wrote: So. Anyway. Is there any plan on fixing bugs on WebService code generator for support Weblogic webservice generator? I did a test with .Net ws and works smooth but with Weblogic isn't working properly. I have the real situation. On server I have Weblogic 9.2.2 publising DataServices and using a translated version of their soap 1.1, But with so many tests I can't get working. Why? I believe is related to schema that WebServices of Their implementation works. For example I did extended the AbstractWebservice to try a way to work. Just a CRUD example and for somehow works only for list and filter, Operations like delete, create or edit doesnt work and Flex give's me a #2032 that's to me doesn't mean anything. That's why I would like any folks from Adobe to expose all source code and could help to implement a way to support the WebLogic Webservice SOAP format. Regards Igor On Tue, May 27, 2008 at 8:03 PM, Alex Harui [EMAIL PROTECTED] wrote: If your post contains keywords like WebService, DataSevices, fill(), SOAP, etc, they usually see it and respond. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Josh McDonald *Sent:* Tuesday, May 27, 2008 3:58 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Any folks from WebService Fx SDK team here? Good luck with that, although I've been poking around in their source a lot recently, and I know Web Services can be... frustrating in Flex, so if you post your question I might be able to help :) -J On Wed, May 28, 2008 at 8:40 AM, Igor Costa [EMAIL PROTECTED] wrote: I need to talk with someone from SDK team in part of WebServices. Is that possible? -- Igor Costa www.igorcosta.org -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] -- Igor Costa www.igorcosta.com www.igorcosta.org -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] parsing complex xml
Yeah, I should have mentioned that the server sending this file to me is wrapping it in con, making that the root and configuration the only element. On Tue, May 27, 2008 at 6:34 PM, Josh McDonald [EMAIL PROTECTED] wrote: Off the top of my head, If the root of your XML doc is configuration, you want xmlObject.category as a list of category elements, not xmlObject.configuration.category -J On Wed, May 28, 2008 at 8:09 AM, dfalling [EMAIL PROTECTED] wrote: I'm trying to parse a complex xml file (a log4j config file) and am running into a number of problems: * Flex seems to remove all the comments from the file. Is there any way to prevent this? I don't need access to them in Flex, but do want them to be untouched. * I have no idea how to iterate over the items or to set xml as a list's data provider. The tag containing everything I need to access is log4j:configuration, and when I try to access xml.log4j::configuration flex complains about not having the property log4j. If anyone knows of good xml tutorials that would help me to grasp this better I'd really appreciate it. Most of the ones I've found are basically the hello world of xml parsing...the few dealing with namespaces do little to explain what they're doing. log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=false category name=org.apache priority value=INFO/ /category !-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -- category name=org.jboss.serial priority value=INFO/ /category !-- Limit the org.jgroups category to WARN as its INFO is verbose -- category name=org.jgroups priority value=WARN/ /category !-- Limit the jacorb category to WARN as its INFO is verbose -- category name=jacorb priority value=WARN/ /category . . . /log4j:configuration Thanks a lot! -dennis -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Re: adobe_flex_interface_guide.zip damaged?
thanks for reply, i renamed files in winrar, then successfully unzipped. -- lwz7512 Ultrapower Flex Team Leader OpenRIA -- A Window You Exploring RIA World http://www.openria.cn - Original Message From: valdhor [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, May 28, 2008 12:02:25 AM Subject: [flexcoders] Re: adobe_flex_interface_guide.zip damaged? Just downloaded it, unzipped all the files and opened them in Acrobat. What's the problem you are seeing? --- In [EMAIL PROTECTED] ups.com, li wenzhi [EMAIL PROTECTED] wrote: hi, what's wrong with the file? has anyone unzipped the file successfully? - - - - -- lwz7512 Ultrapower Flex Team Leader OpenRIA -- A Window You Exploring RIA World http://www.openria. cn
[flexcoders] Sandbox Exception Error code #2048
Hi, We have Microsoft Analysis Services installed and run on a server. We have the msmdpump.dll run on the IIS. Then, we use HTTPService from Flex to access the dll. It is running fine on the local machine. But when we are trying to access the html wrapper or swf file of the application outside of the domain/subnet, we get an Sandbox Exception Error code #2048. We have the crossdomain file already in the root and project folder. It seems like all of the security settings of the IIS are setting up probably. Can any one help me out? Regards, Mark
[flexcoders] Re: webtier flexbuilder license
Anyone found a solution or a workaround for this issue? looks like adobe has a bug open for this but no solution yet. Very annoying. http://bugs.adobe.com/jira/browse/SDK-15489 --- In flexcoders@yahoogroups.com, Ronen Naor [EMAIL PROTECTED] wrote: Hi, I'm using the webtier compiler environment under Tomcat and everything works fine except the license issue. When I uncomment this section in flex-config.xml file: *!-- licenses: specifies a list of product and serial number pairs. -- !-- not set -- !-- licenses license productstring/product serial-numbernumber/serial-number /license /licenses --* I get : INFO Loading configuration file ..WEB-INF\flex\flex-webtier- config.xml *INFO Loading configuration file ..WEB-INF\flex\flex-config.xml ..\WEB-INF\flex\flex-config.xml(342): Error: unknown configuration variable 'licenses' WARN: failed FlexMxmlServlet javax.servlet.ServletException: javax.servlet.ServletException: .WEB-INF\flex\flex-config.xml(342): Error: unknown configuration variable 'licenses' *And when I changed the file license.properties with the entry flexbuilder3=[My license] I get: *flex.webtier.services.license.InvalidLicenseException: An invalid flexbuilder3 license key was entered. To enable a trial, which does not required a license, please remove the invalid flexbuilder3 license key from license.properties. *Anyone can help? * *Thanks, Ronen.* *
Re: [flexcoders] SCEENCAP
The only thing close I have seen is WebKut (although it allows you to load a webpage and capture certain parts, entire page, etc.)... http://toki-woki.net/p/WebKut/ Other AIR Apps here... http://freshairapps.com/ On Tue, May 27, 2008 at 1:57 PM, aphexyuri [EMAIL PROTECTED] wrote: i'm looking into a desktop sceen capturing app on AIR. does anybody have any links / info?
[flexcoders] Re: Need Advice on browser buttons
I would probably start with onunload javascript function for the html that loads your movie. this snippet should do the trick : http://www.javascript-page.com/onunload.html --- In flexcoders@yahoogroups.com, Body Works Studio [EMAIL PROTECTED] wrote: Hi all, gotten some user feedback on the app I am working on. big complaints are when a user clicks back by accident or the refresh button. What are you doing to limit how the user works in the browser so they don't kill the app and their work. Thanks Jeff
Re: [flexcoders] parsing complex xml
I was trying both routes- dataprovider and and iterating. dataProvider: function dataReceived(data:XML):void { list.dataProvider = data.configuration.category; } With the above, nothing showed up in the list. The xml sample I provided in my original email was all wrapped by a con tag by the server. Iterating over it I tried: function dataReceived(data:XML):void { for (var category:XML in data.configuration.category) { trace(category.toXMLString(); } } The flex page that needs to render this will allow the user to configure each item, so I need a way to read and write to those items while still leaving the comments in tact. Thanks! On Tue, May 27, 2008 at 5:39 PM, Tracy Spratt [EMAIL PROTECTED] wrote: I don't know if I have ever noticed this removal of comments, I'd need to verify. To iterate over nodes, use an e4x expression to return an XMLList, then use a for loop. Or For Each, or For In. The docs have some more detail and examples. A list can also use XMLList as a dataProvider if you do not plan to programmaticlly update the dataprovider. If you do, simply wrap the XMLList in an XMLListCollection. It looks like you will need to declare the default namespace, or use the namespace::node in all e4x expressions. You've not shown any expressions, so I can't say what you're doing wrong. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *dfalling *Sent:* Tuesday, May 27, 2008 6:10 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] parsing complex xml I'm trying to parse a complex xml file (a log4j config file) and am running into a number of problems: * Flex seems to remove all the comments from the file. Is there any way to prevent this? I don't need access to them in Flex, but do want them to be untouched. * I have no idea how to iterate over the items or to set xml as a list's data provider. The tag containing everything I need to access is log4j:configuration, and when I try to access xml.log4j::configuration flex complains about not having the property log4j. If anyone knows of good xml tutorials that would help me to grasp this better I'd really appreciate it. Most of the ones I've found are basically the hello world of xml parsing...the few dealing with namespaces do little to explain what they're doing. log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=false category name=org.apache priority value=INFO/ /category !-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -- category name=org.jboss.serial priority value=INFO/ /category !-- Limit the org.jgroups category to WARN as its INFO is verbose -- category name=org.jgroups priority value=WARN/ /category !-- Limit the jacorb category to WARN as its INFO is verbose -- category name=jacorb priority value=WARN/ /category . . . /log4j:configuration Thanks a lot! -dennis
Re: [flexcoders] Re: webtier flexbuilder license
We do have the bug open for investigation, but in the meantime... Can you guys share your use-case for using the webtier compiler? I'm trying to evaluate how many folks are using these features and for what purpose to check whether our investment in them is correct. Matt On 5/27/08 3:00 PM, switchthreed [EMAIL PROTECTED] wrote: Anyone found a solution or a workaround for this issue? looks like adobe has a bug open for this but no solution yet. Very annoying. http://bugs.adobe.com/jira/browse/SDK-15489 --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com , Ronen Naor [EMAIL PROTECTED] wrote: Hi, I'm using the webtier compiler environment under Tomcat and everything works fine except the license issue. When I uncomment this section in flex-config.xml file: *!-- licenses: specifies a list of product and serial number pairs. -- !-- not set -- !-- licenses license productstring/product serial-numbernumber/serial-number /license /licenses --* I get : INFO Loading configuration file ..WEB-INF\flex\flex-webtier- config.xml *INFO Loading configuration file ..WEB-INF\flex\flex-config.xml ..\WEB-INF\flex\flex-config.xml(342): Error: unknown configuration variable 'licenses' WARN: failed FlexMxmlServlet javax.servlet.ServletException: javax.servlet.ServletException: .WEB-INF\flex\flex-config.xml(342): Error: unknown configuration variable 'licenses' *And when I changed the file license.properties with the entry flexbuilder3=[My license] I get: *flex.webtier.services.license.InvalidLicenseException: An invalid flexbuilder3 license key was entered. To enable a trial, which does not required a license, please remove the invalid flexbuilder3 license key from license.properties. *Anyone can help? * *Thanks, Ronen.* *
[flexcoders] add item to the top of a sorted datagrid
Is there any way to add new items to the top of a sorted datagrid? I know how to add stuff to a datagrid/provider, but am unsure about how to keep the new item at the top of the datagrid and not have the underlying sort kick-in. TIA - superabe
Re: [flexcoders] Re: [SOLVED] Trigger an invalidateDisplayList() when properties are changed
Cool, thanks for the tips Josh! -R Josh McDonald wrote: I'd put a if (_title == value) return; In there. You probably won't gain *much* performance but it's only one line, and it might help a lot depending on various bindings :) Also, and I'm not 100% sure on this but depending on what you're actually doing with _title, it might be more in line with the standard flex way of doing things to just call invalidateProperties, and then in commitProperties() check for a change in _title (compare it with titleComponent.text or whatever) and simply change the property on that component instead of calling the entire updateDisplatList() method. But I've only seen 5 lines of your component, so that may be way off for your use case! :D -J On Wed, May 28, 2008 at 8:38 AM, robbarreca [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com, Richard Rodseth [EMAIL PROTECTED] wrote: You'll see that you just need to change the locale chain of the resource manager. You already have a binding expression which invokes the resource manager. Thanks for the reply Richard. The problem I'm facing is that not *all* of the bindings are getting honored when I change localeChain. I realize the recursive display invalidation is not the way to go. Your email made me realize now that the it's my custom component MyPanel (which extends Box and adds a bold label on top) that isn't updating until updateDisplayList() is called. This was a deficiency in how this component was written as Flex Text and Label controls update fine. I wasn't accounting for these custom properties to be programatically set since they were just hardcoded before i18n. I changed public var title:String; to protected var _title:String; public function get title():String { return _title; } public function set title(value:String):void { _title = value; invalidateDisplayList(); } and all is well. Thanks a lot! -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
[flexcoders] How to scale my Application?
Hi there, I have an application contents some components, all children are contain inside of Canvas. I would like to change the Width and Height of Canvas to set all children size accordingly ( keep porprotion ) Shall I add listener to each of children? any easy way to get this done? Thanks
Re: [flexcoders] parsing complex xml
You should really be copying from your XML object into a flatter AS object first - for binding and inline editing and whatnot as the XML objects contain *much* voodoo that can bite you. But here's a quick example using a datagrid rather than a list. As for updating and persisting the XML object, that exercise is left to the reader ;-) ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:XMLList id=myXML log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=false category name=org.apache priority value=INFO/ /category !-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -- category name=org.jboss.serial priority value=INFO/ /category !-- Limit the org.jgroups category to WARN as its INFO is verbose -- category name=org.jgroups priority value=WARN/ /category !-- Limit the jacorb category to WARN as its INFO is verbose -- category name=jacorb priority value=WARN/ /category /log4j:configuration /mx:XMLList mx:Script ![CDATA[ protected function labelFunc(item:Object, column:DataGridColumn):String { return [EMAIL PROTECTED]; } ]] /mx:Script mx:DataGrid dataProvider={ myXML.category } mx:columns mx:DataGridColumn headerText=Name dataField=@name/ mx:DataGridColumn headerText=Priority labelFunction={ labelFunc }/ /mx:columns /mx:DataGrid /mx:Application On Wed, May 28, 2008 at 9:58 AM, Dennis Falling [EMAIL PROTECTED] wrote: I was trying both routes- dataprovider and and iterating. dataProvider: function dataReceived(data:XML):void { list.dataProvider = data.configuration.category; } With the above, nothing showed up in the list. The xml sample I provided in my original email was all wrapped by a con tag by the server. Iterating over it I tried: function dataReceived(data:XML):void { for (var category:XML in data.configuration.category) { trace(category.toXMLString(); } } The flex page that needs to render this will allow the user to configure each item, so I need a way to read and write to those items while still leaving the comments in tact. Thanks! On Tue, May 27, 2008 at 5:39 PM, Tracy Spratt [EMAIL PROTECTED] wrote: I don't know if I have ever noticed this removal of comments, I'd need to verify. To iterate over nodes, use an e4x expression to return an XMLList, then use a for loop. Or For Each, or For In. The docs have some more detail and examples. A list can also use XMLList as a dataProvider if you do not plan to programmaticlly update the dataprovider. If you do, simply wrap the XMLList in an XMLListCollection. It looks like you will need to declare the default namespace, or use the namespace::node in all e4x expressions. You've not shown any expressions, so I can't say what you're doing wrong. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *dfalling *Sent:* Tuesday, May 27, 2008 6:10 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] parsing complex xml I'm trying to parse a complex xml file (a log4j config file) and am running into a number of problems: * Flex seems to remove all the comments from the file. Is there any way to prevent this? I don't need access to them in Flex, but do want them to be untouched. * I have no idea how to iterate over the items or to set xml as a list's data provider. The tag containing everything I need to access is log4j:configuration, and when I try to access xml.log4j::configuration flex complains about not having the property log4j. If anyone knows of good xml tutorials that would help me to grasp this better I'd really appreciate it. Most of the ones I've found are basically the hello world of xml parsing...the few dealing with namespaces do little to explain what they're doing. log4j:configuration xmlns:log4j=http://jakarta.apache.org/log4j/; debug=false category name=org.apache priority value=INFO/ /category !-- Limit the org.jboss.serial (jboss-serialization) to INFO as its DEBUG is verbose -- category name=org.jboss.serial priority value=INFO/ /category !-- Limit the org.jgroups category to WARN as its INFO is verbose -- category name=org.jgroups priority value=WARN/ /category !-- Limit the jacorb category to WARN as its INFO is verbose -- category name=jacorb priority value=WARN/ /category . . . /log4j:configuration Thanks a lot! -dennis -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Re: HTTPService multiple requests not being sent?
I had caching issues with IE using POST. PS You can always do a POST using dynamic URL, which will stop caching. It does not really matter what is in the request body. Cheers, Dmitri. --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: I have heard that POSTed requests do not cache. I use POST exclusively, and have never had any caching issues. Tracy
[flexcoders] Re: NativeWindow Error
--- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: wtf, meant to say import statement. -TH --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote: Hi Mike, You're going to have to add an insert statement for the class: import flash.display.NativeWindow; -TH --- In flexcoders@yahoogroups.com, ibdwalrus mike.rood@ wrote: I'm working through Rich Tretola's Beginning Adobe AIR book and I'm stuck on the first NativeWindow example. The first variable declaration in the script block private var nw1:NativeWindow; is throwing the error 1046: Type was not found or was not a compile- time constant: NativeWindow. The code so far is this: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var nw1:NativeWindow; ]] /mx:Script /mx:WindowedApplication What am I missing? Thanks, Mike Thanks so much, Tim. That worked like a champ. It looks like the publisher just failed to include that line in the example code. What's funny is that I misread the typo in your original post as import and corrected the problem before reading your second post correcting it. :) I appreciate your taking the time to help me. Regards, Mike
Re: [flexcoders] Re: NativeWindow Error
Mike, in builder if you get an error like that , move the cursor to the end of the offending keyword, like so: private var nw1:NativeWindowcursor; Ant hit ctrl-space, and usually the auto-complete will help you out with your import. -J On Wed, May 28, 2008 at 11:50 AM, ibdwalrus [EMAIL PROTECTED] wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: wtf, meant to say import statement. -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tim Hoff TimHoff@ wrote: Hi Mike, You're going to have to add an insert statement for the class: import flash.display.NativeWindow; -TH --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, ibdwalrus mike.rood@ wrote: I'm working through Rich Tretola's Beginning Adobe AIR book and I'm stuck on the first NativeWindow example. The first variable declaration in the script block private var nw1:NativeWindow; is throwing the error 1046: Type was not found or was not a compile- time constant: NativeWindow. The code so far is this: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var nw1:NativeWindow; ]] /mx:Script /mx:WindowedApplication What am I missing? Thanks, Mike Thanks so much, Tim. That worked like a champ. It looks like the publisher just failed to include that line in the example code. What's funny is that I misread the typo in your original post as import and corrected the problem before reading your second post correcting it. :) I appreciate your taking the time to help me. Regards, Mike -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Re: HTTPService multiple requests not being sent?
Reasons why your POST request could be cached: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html Responses to this method [POST] are not cacheable, unless the response includes appropriate Cache-Control or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent to retrieve a cacheable resource. --- In flexcoders@yahoogroups.com, Dmitri Girski [EMAIL PROTECTED] wrote: I had caching issues with IE using POST. PS You can always do a POST using dynamic URL, which will stop caching. It does not really matter what is in the request body. Cheers, Dmitri. --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: I have heard that POSTed requests do not cache. I use POST exclusively, and have never had any caching issues. Tracy
Re: [flexcoders] What next after getting FLEX ?
Like what some other people have said, use what you need or if your needs don't limit your choices, then use what you want...with one caveat. Get rid of Access. Access has very limited usefulness compared to a real server, and if you're looking to learn, every single potential upside of Access would be outweighed by the value of learning one of the servers. As someone who works in primarily Microsoft shop but also uses MySQL, I would say this: If you want to stay Microsoft, you have 3 options on the database server: 1. Pick up SQL Server if you need enterprise capabilities (expensive). 2. Download SQL Server Express if you're working on a small project or just looking to learn and can work within the licensing restrictions which are mostly geared towards limiting commercial projects (otherwise free). 3. Or go with MySQL which is very minimally more difficult to pick up if you're used to dealing with Microsoft instead of OSS (yes this is a generalization, and also free). My two cents, - Daniel Freiman On Tue, May 27, 2008 at 11:26 AM, itdanny2002 [EMAIL PROTECTED] wrote: Hi All, I'm new FLEXer. I wanna to buy an application with database in server as well as locally. What should I get for Web Server and Database ? 1. IIS + MS-Access ? 2. JBoss (Window) + MySQL ? 3. JBoss (Linus) + MySQL ? 4. Tomcat + MySQL ? 5 Indeed, I prefer to use in IIS + MS-Access as I'm familiar with it. If not What do you suggest ? Many Thanks
Re: [flexcoders] Re: HTTPService multiple requests not being sent?
I do have control of the server and I'm using GET requests. I've also done the setting headers. None of that did any thing. I am sending requests to a single Servlet. I've setup a message to print in the log if any request comes in and it shows the client never made a request. I think this is truely the client caching. I'll try the post method, but I think I did that, not sure. However like I said I created the Servlet and it's not getting any hit from the client at all. It's like the client just looks at the request params and sends the last requests data, if the params match. I'm not sure the Seth Hodgson thing would apply as my requests are several seconds apart. On Tue, May 27, 2008 at 2:38 PM, Seth Hodgson [EMAIL PROTECTED] wrote: Injecting a current client-side timestamp into an outbound request is a good way to avoid Http response caching if you don't control the server. If you do control the server, you should consider configuring it to set HTTP no-cache headers in these responses to suppress caching. Seth From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of valdhor Sent: Tuesday, May 27, 2008 9:15 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: HTTPService multiple requests not being sent? This is pretty close to another qustion that was asked lately. Seth Hodgson summed up what was going on here: http://tech.groups.yahoo.com/group/flexcoders/message/113808 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, javadmanx [EMAIL PROTECTED] wrote: I have the following service: getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id}); If I make multiple requests on this same service with the same values it seems to cache and not send the request to the server again. The only way I've found to stop it from doing this is to add a time stamp the changes the request values. Below is the code I've used to get it to send the request on every call. So what it does is, if the request values are the same it just gives me the same data, but never calls the server. But if I use this below it calls the server every time. getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id, tt: new Date().getTime()}); What am I doing, and is there a better way to get all requests to call the server even if the request values are the same? Thanks. -- All that is necessary for the triumph of evil is that good men do nothing. - Edmund Burke
Re: [flexcoders] What next after getting FLEX ?
I throw in my vote for Tomcat, and Java Berkley DB. I'm trying to use Blaze DS, but still not there yet, so I can't point to it yet. I've been using Flex Builder as well. On Tue, May 27, 2008 at 11:26 AM, itdanny2002 [EMAIL PROTECTED] wrote: Hi All, I'm new FLEXer. I wanna to buy an application with database in server as well as locally. What should I get for Web Server and Database ? 1. IIS + MS-Access ? 2. JBoss (Window) + MySQL ? 3. JBoss (Linus) + MySQL ? 4. Tomcat + MySQL ? 5 Indeed, I prefer to use in IIS + MS-Access as I'm familiar with it. If not What do you suggest ? Many Thanks -- All that is necessary for the triumph of evil is that good men do nothing. - Edmund Burke
[flexcoders] Loading ResourceModule and CSS with one HTTP call
When loading a ResourceModule for the Japanese language, we also want to apply a set of styles to change the default font to something Japanese. I have a solution now that loads a ja_JP_Styles.swf through StyleManager as well as loading a ja_JP_ResourceModule.swf with ResourceManager but would like to combine the calls. 1. I know I could forget about loading external style SWFs and put something like StyleManager.getStyleDeclaration(global).setStyle(fontFamily, resourceManager.getString(FooBar, globalFont)); after setting localeChain, but I'm thinking we'll want to change other styles and would like to keep a generic solution like I have now, but cut down on the extra HTTP request. Maybe this is my only option? 2. I thought one could somehow Embed(style.css) in my Foo.properties ResourceBundle but it doesn't seem like that is the right path. 3. Also, I read in the proposed spec (http://opensource.adobe.com/wiki/display/flexsdk/Runtime+Localization+Specification#RuntimeLocalizationSpecification-Problem:AstylevalueinaCSSselectorcan'tcomefromaresource.) that one might be able to do something like the following, but it barfs so this feature probably didn't make it in. global { fontFamily: Resource(bundle=FooBar, key=globalFont); } What is the best way to do this, am I stuck with option #1 if I want to just do one HTTP call when switching locales? Thanks, -R
Re: [flexcoders] How to scale my Application?
Can't you just use bindings? Like width={canvas.width} On Tue, May 27, 2008 at 8:29 PM, flexawesome [EMAIL PROTECTED] wrote: Hi there, I have an application contents some components, all children are contain inside of Canvas. I would like to change the Width and Height of Canvas to set all children size accordingly ( keep porprotion ) Shall I add listener to each of children? any easy way to get this done? Thanks -- All that is necessary for the triumph of evil is that good men do nothing. - Edmund Burke
Re: [flexcoders] Re: How to extract data from XML
Technically, text() returns an XMLList where all of the objects are of kind text. And you can set the value of those individual nodes in that list. So for example text()[0] = value; should work. - Daniel Freiman On Tue, May 27, 2008 at 2:31 PM, Tracy Spratt [EMAIL PROTECTED] wrote: Use logo.text(); That returns only the text between those tags. Note that you can't use text() to SET the text node, only to read it. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *wild.katana *Sent:* Saturday, May 24, 2008 3:08 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: How to extract data from XML OMFG the namespace was the problem. After I added that line I was able to call Alert.show(myXML.logo.toXMLString()); and it worked like a charm. Thanks now I can finally start doing stuff with my application. This snag has been holding me up for a few days. One last thing, how would I go about extracting just what is between the tags logo and /logo instead of the entire element and attributes? Would I have to convert it to a single XML object first like you said? Or is there some function that can do that? Thanks for all your help Tracy, I'm starting to understand how XML works now because of you. -Leighton --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Ok, you may have a namespace problem. They can be a PITA. I'm not an expert and you should reveiw the docs/google if this doesn't work but try putting this in the declarations section of your app/component(instance scope level): default xml namespace = http://www.w3.org/2005/Atom;; There is more stuff in the xmlns declaration in your sample xml: feed xmlns=http://www.w3.org/2005/Atom http://www.w3.org/2005/Atom ... I do not understand what that second part of the string is. You might have to include that as well in the default namespace declaration. You can avoid the namespace issue if you use the node index to get a node, but this is a very clunky way to do it. To see, try: Alert.show(myXML.children()[4].toXMLString()) XMLList always has 0-n xml nodes in it. (the result of an e4x expression is never null) If there is only one node, then many of the XML methods will work on it the same as with XML. But for clarity, if I know I want to work with a single XML node then I do: var myXMLList:XMLList = myXML.logo; var xmlLogo:XML = myXMLList[0]; If just you do this below, you will get a datatype error: var xmlLogo:XML = myXML.logo; //even if that expression returns only a single node. Tracy From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of wild.katana Sent: Thursday, May 22, 2008 7:08 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: How to extract data from XML Okay, first of all, thanks for all of your help, Tracy. I have checked the myXML variable with Alert.show(myXML) and it shows what I pasted in the first post (that's where I got it). So I know that myXML contains that. I tried doing Alert.show(myXML.logo.toXMLString()) but it is still showing nothing. I have read the documentation on using XML and tried many of the things it says, but to no avail. One thing I don't wuite understand... What is the difference between XML and XMLList? If the myXML.logo returns an XMLList, then should I make a variable that contains it first? Like var myXMLList:XMLList = myXML.logo; Alert.show(myXMLList); ? I will try that but let me know if that is what you were meaning or not... Thanks again.. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.commailto: flexcoders%40yahoogroups.com flexcoders%2540yahoogroups.com , Tracy Spratt tspratt@ wrote: First, did you trace or alert your XML in yur result handler? If you did not and are assuming you know what your xml looks like exactly, do that now. Second, when attempting to view XML, always use toXMLString() (search the archives for why): Alert.show(myXML.logo.toXMLString()) Third, when writing e4x expressions, unless you are very certain of yourself, it is best to do it one step at a time, using temporary XML or XMLList variables as needed, and tracing the contained value using toXMLString(). Note that all e4x expressions(myXML.logo is one) return XMLList, not XML. The docs will show how to handle this. Fourth, review the XML class in the language Ref and the working with data cha[ter in the developers guide for an explanation on how to work with XML. The link below is for Flex 2, but the XML stuff has not changed.
Re: [flexcoders] How to scale my Application?
I am not sure, if I could understand your problem correctly. What I understood is you want to resize your components accordingly, when your application is being resized. To achieve this, you just define the top, bottom, left, right to every child container. like mx:Panel xmlns:mx=http://www.adobe.com/2006/mxml; left=10 right=10 top=10 bottom=10 cheers!! Manu. flexawesome wrote: Hi there, I have an application contents some components, all children are contain inside of Canvas. I would like to change the Width and Height of Canvas to set all children size accordingly ( keep porprotion ) Shall I add listener to each of children? any easy way to get this done? Thanks -- View this message in context: http://www.nabble.com/How-to-scale-my-Application--tp17502977p17504386.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Re: HTTPService multiple requests not being sent?
You won't get the information in the servlet if your server is caching a text response. The browser may only be doing a head request, or it may be as you suspect doing nothing. Download a debugging proxy like Charles ( http://www.charlesproxy.com/ ) to be sure. It'll tell you exactly what's going on. -J On Wed, May 28, 2008 at 1:24 PM, Justin Stanczak [EMAIL PROTECTED] wrote: I do have control of the server and I'm using GET requests. I've also done the setting headers. None of that did any thing. I am sending requests to a single Servlet. I've setup a message to print in the log if any request comes in and it shows the client never made a request. I think this is truely the client caching. I'll try the post method, but I think I did that, not sure. However like I said I created the Servlet and it's not getting any hit from the client at all. It's like the client just looks at the request params and sends the last requests data, if the params match. I'm not sure the Seth Hodgson thing would apply as my requests are several seconds apart. On Tue, May 27, 2008 at 2:38 PM, Seth Hodgson [EMAIL PROTECTED] wrote: Injecting a current client-side timestamp into an outbound request is a good way to avoid Http response caching if you don't control the server. If you do control the server, you should consider configuring it to set HTTP no-cache headers in these responses to suppress caching. Seth From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of valdhor Sent: Tuesday, May 27, 2008 9:15 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: HTTPService multiple requests not being sent? This is pretty close to another qustion that was asked lately. Seth Hodgson summed up what was going on here: http://tech.groups.yahoo.com/group/flexcoders/message/113808 --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, javadmanx [EMAIL PROTECTED] wrote: I have the following service: getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id}); If I make multiple requests on this same service with the same values it seems to cache and not send the request to the server again. The only way I've found to stop it from doing this is to add a time stamp the changes the request values. Below is the code I've used to get it to send the request on every call. So what it does is, if the request values are the same it just gives me the same data, but never calls the server. But if I use this below it calls the server every time. getStudentById.send({action: 'student_by_id', id: event.currentTarget.selectedItem.id, tt: new Date().getTime()}); What am I doing, and is there a better way to get all requests to call the server even if the request values are the same? Thanks. -- All that is necessary for the triumph of evil is that good men do nothing. - Edmund Burke -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
[flexcoders] Adg with change event in as
If I want to have an advanceddatagrid listen to the change event with actionscript how do I do that? So do the actionscript equiv. of ADG change=change(event)/ I have var aGrid:AdvancedDataGrid = new AdvancedDataGrid; aGrid.width = 850; aGrid.height = 580; aGrid.columnWidth = 100; aGrid.horizontalScrollPolicy = auto; aGrid.addEventListener(AdvancedDataGridEvent.ITEM_EDIT_BEGIN, pushForPlaySave); aGrid.editable = true; but it is not using the same event type as above -- [EMAIL PROTECTED] 785-832-9154
Re: [flexcoders] Re: NativeWindow Error
Actually, it's fairly common to leave out import statements in programming book examples to save space. Just FYI, since you'll probably run into this again. -Maciek On Wed, 2008-05-28 at 01:50 +, ibdwalrus wrote: --- In flexcoders@yahoogroups.com, Tim Hoff [EMAIL PROTECTED] wrote: wtf, meant to say import statement. -TH --- In flexcoders@yahoogroups.com, Tim Hoff TimHoff@ wrote: Hi Mike, You're going to have to add an insert statement for the class: import flash.display.NativeWindow; -TH --- In flexcoders@yahoogroups.com, ibdwalrus mike.rood@ wrote: I'm working through Rich Tretola's Beginning Adobe AIR book and I'm stuck on the first NativeWindow example. The first variable declaration in the script block private var nw1:NativeWindow; is throwing the error 1046: Type was not found or was not a compile- time constant: NativeWindow. The code so far is this: ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ private var nw1:NativeWindow; ]] /mx:Script /mx:WindowedApplication What am I missing? Thanks, Mike Thanks so much, Tim. That worked like a champ. It looks like the publisher just failed to include that line in the example code. What's funny is that I misread the typo in your original post as import and corrected the problem before reading your second post correcting it. :) I appreciate your taking the time to help me. Regards, Mike
Re: [flexcoders] Re: The High Score Problem
In that case, as the prizes are large and the audience will include hackers, I'd go with a combination. Here's a few ideas off the top of my head, some of them may be stupid, others too expensive to implement depending on your prize money / risk of actual damages to your company if it gets hacked (ie if you get sued or look like douchebags, as well as paying some hacker the prize). Start with SSH Turn off crossdomain.xml :) Perhaps include something along the lines of an embedded signed java Applet to verify an MD5 of the .swf file Only bother with the encryption if it's within a certain distance of high score, to cut down on server load Have the SWF download the decryption module (perhaps using a unique url it gets from the signed java applet, just to make it slightly harder to simulate the Flash environment) when needed and timeout - as mentioned already Maybe generate a new encryption algorithm SWF every time - could be server expensive, as well as a programmatic challenge Maintain a pool of encryptor-decrypter pairs (cryptdecs?), choose one at random instead of a new one every time. But still have either people or software coming up with new ones and retiring old ones. Depending on the game, include in your high score packet some information that would be able to let a server-side simulation give you some sort of chances of actually getting this score from these starting conditions and log of commands score Statistical analysis of the score history of the userbase as a whole, users in the top 80-90ish percentile, and compare it to the winner Anybody else have any ideas to throw in? Or better yet find a flaw in mine? This is definitely an interesting topic! -J Before you do anything funky, download the current high score - if the app doesn't think the user has beaten it On Wed, May 28, 2008 at 4:26 AM, kenny14390 [EMAIL PROTECTED] wrote: There is no such thing as Flash application security? Against what ? How much is the value of the prize ? Who is attacking you ? Why ? The prizes are pretty big, so there is a justified concern for security. The attackers would be facebook users, so they will usually be 18-25. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tom Chiverton [EMAIL PROTECTED] wrote: On Tuesday 27 May 2008, kenny14390 wrote: Is the simple conclusion that Flash applications are inherently transparent? Yes, same as a HTML application, in a sense. This is the bane of client/server computing, and *banks* haven't cracked it yet either. However, there are less people with the skills to decompile a Flex app than a JavaScript one. But maybe all they need to do is sniff the network traffic... Does SSL patch any of these risks? No, because the user can configure an SSL proxy and see the plain text of the session. But, again, less people will be able to do this. There is no such thing as Flash application security? Against what ? How much is the value of the prize ? Who is attacking you ? Why ? Until you answer those questions, how can you evaluate any of the various mitigation's ? For instance, if your attackers are all under 10 (because your app is used in a closed environment, i.e. a school class room, and the login is tied to the attendance list and O/S logged in user) then you probably don't need to do anything else. How can a high score problem be overcome? Some sort of CAPTCHA type test should prove there is a user sat at the computer, but I'm not aware of anyway to verify they're using your client and not another one they built themselves. Given they can intercept your 'calculateChecksumOfYourself()' (or whatever) and just send back the 'right' answer. A lot of the time, raising the bar fairly high (require login, SSL) is probably good enough. In your case, I'd probably want to require unique, verified email address too. Maybe postal too as people tend to have fewer throw away postal address' that actually work :-) -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have
Re: [flexcoders] Dictionary bug
The short version is that I have a Directed Acyclic Graph class. The example code was retrieving a node from the graph. I don't need weakKeys because the node set is controlled. Anything in the Dictionary that would be eligible for collection would have necessarily already been removed from the Dictionary. So in the case of XML I'm now assigning a UID to an attribute of the XML and using the value of that attribute as the key. It didn't give me the performance increase I was hoping for, but it is better. If an Object were faster than a Dictionary I would switch over, but if they're equivalent I'll keep the Dictionary to key the Class more generalized. - Daniel Freiman On Tue, May 27, 2008 at 12:02 PM, Christophe Jolif [EMAIL PROTECTED] wrote: Alex, Alex Harui wrote: Dictionary keys should be objects. That's why I advised him to use Array not Dictionary... I must admit I don't know exactly what Daniel wants to do but his method name (getItem) reminds me a lot of similar things in Adobe Flex SDK such as ListBase.itemToItemRenderer method that are exactly doing what I propose. That's why I suggested him that workaround. But maybe I miss something... -- Christophe http://blogs.ilog.com/elixir/author/cjolif
RE: [flexcoders] Re: Flash USB-API :)
Before we go too much further with this - it would be beneficial to recognize that there is no such thing as a Generic USB Protocol that will give everyone blanket communications with usb devices. every device has a specific implementation that would have to be 'handled' in Flex/AIR similar to what Adobe has done with web-cams. They could use HID (Human Interface Device) I suppose but that is what the mouse/keyboard is for! If you need something very specific like joystick control in your app - you have more than enough (a wealth of) tools at your disposal to make it happen. Have you considered joystick emulation? NTPAD http://www.ntpad.com.ar/index.php?page=downloadseng.php http://www.ntpad.com.ar/index.php?page=downloadseng.phplang=eng lang=eng JoyEmu (personal fav) http://members.tripod.com/~szanella/joyemueng.htm JoyToKey http://www.electracode.com/4/joy2key/JoyToKey%20English%20Version.htm Rick Winscot From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Cosma Sent: Tuesday, May 27, 2008 3:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Flash USB-API :) Why don't you use a signed java applet? You could simply load it in the wrapper html file (with size set to 0, if you don't want that java swing stuff in your UI), and then interact with it using the flex ExternalInterface and applet's NSObject. I use this solution to allow direct TWAIN image scanning in my Flex application. The only problem with it is that the ExternalInterface doesn't seem very reliable for exchanging more than small simple variables - very long strings and binary data seems to cause troubles. Here is an interesting blog post on this topic: http://tobiaspatton.wordpress.com/2007/08/29/using-a-signed-java-applet-as-a -flex-helper-part-1/ Bye Cosma --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Cato Paus [EMAIL PROTECTED] wrote: Hi I know abouth the MerApi http://www.merapiproject.net/index.php, but My use-case is: I'm developing a TV-FlexApplication for a cutsomer that wants to use a tv remote controller to change the channels that I'm stremaing form satelitte or cabel. The point of using Flex/flash is that I have all under my controll (The app) and the customer will allvays have the last build of the app. To day flash player have connection to several USB devises, USB Camare and microphone!! Why not extend this a litle more :) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Rick Winscot rick.winscot@ wrote: There is an obvious solution: Flex/AIR - Web Services (or similar) - USB ... but _direct_ communication with USB? I'm stumped as to why you would even need something like this. What is your use case? Rick Winscot From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Cato Paus Sent: Friday, May 23, 2008 9:35 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Flash USB-API :) Hehe Totaly Agree with you on Joe Random, but I put my trust on Adobe to find a solution :) --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders% 40yahoogroups.com , Tom Chiverton tom.chiverton@ wrote: On Thursday 22 May 2008, Cato Paus wrote: I realy hope we can have USB communication in AIR and Flash Player :) USB communication from a web site ? I think not... unless you want Joe Random reading all your data. For AIR this makes more sense. -- Tom Chiverton This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] Dictionary bug
As object and dictionary use the same syntax, it shouldn't be too hard to do some quick testing to determine which is faster when using strings as keys. -J On Wed, May 28, 2008 at 2:28 PM, Daniel Freiman [EMAIL PROTECTED] wrote: The short version is that I have a Directed Acyclic Graph class. The example code was retrieving a node from the graph. I don't need weakKeys because the node set is controlled. Anything in the Dictionary that would be eligible for collection would have necessarily already been removed from the Dictionary. So in the case of XML I'm now assigning a UID to an attribute of the XML and using the value of that attribute as the key. It didn't give me the performance increase I was hoping for, but it is better. If an Object were faster than a Dictionary I would switch over, but if they're equivalent I'll keep the Dictionary to key the Class more generalized. - Daniel Freiman On Tue, May 27, 2008 at 12:02 PM, Christophe Jolif [EMAIL PROTECTED] wrote: Alex, Alex Harui wrote: Dictionary keys should be objects. That's why I advised him to use Array not Dictionary... I must admit I don't know exactly what Daniel wants to do but his method name (getItem) reminds me a lot of similar things in Adobe Flex SDK such as ListBase.itemToItemRenderer method that are exactly doing what I propose. That's why I suggested him that workaround. But maybe I miss something... -- Christophe http://blogs.ilog.com/elixir/author/cjolif -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED]
Re: [flexcoders] Adg with change event in as
Hi, Try: import mx.events.ListEvent; aGrid.addEventListener(ListEvent.CHANGE, changeHandler) Cheers, -- Anirudh Sasikumar http://anirudhs.chaosnet.org/
RE: [flexcoders] Dictionary bug
XML read/write is much slower than access of other class instances. If you're going to do lots of reading and writing, I would consider converting the XML data to object data. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Josh McDonald Sent: Tuesday, May 27, 2008 9:42 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Dictionary bug As object and dictionary use the same syntax, it shouldn't be too hard to do some quick testing to determine which is faster when using strings as keys. -J On Wed, May 28, 2008 at 2:28 PM, Daniel Freiman [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: The short version is that I have a Directed Acyclic Graph class. The example code was retrieving a node from the graph. I don't need weakKeys because the node set is controlled. Anything in the Dictionary that would be eligible for collection would have necessarily already been removed from the Dictionary. So in the case of XML I'm now assigning a UID to an attribute of the XML and using the value of that attribute as the key. It didn't give me the performance increase I was hoping for, but it is better. If an Object were faster than a Dictionary I would switch over, but if they're equivalent I'll keep the Dictionary to key the Class more generalized. - Daniel Freiman On Tue, May 27, 2008 at 12:02 PM, Christophe Jolif [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Alex, Alex Harui wrote: Dictionary keys should be objects. That's why I advised him to use Array not Dictionary... I must admit I don't know exactly what Daniel wants to do but his method name (getItem) reminds me a lot of similar things in Adobe Flex SDK such as ListBase.itemToItemRenderer method that are exactly doing what I propose. That's why I suggested him that workaround. But maybe I miss something... -- Christophe http://blogs.ilog.com/elixir/author/cjolif http://blogs.ilog.com/elixir/author/cjolif -- Therefore, send not to know For whom the bell tolls. It tolls for thee. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED]
RE: [flexcoders] Loading ResourceModule and CSS with one HTTP call
The Resource and Styles subsystems use Modules to load at runtime, and Modules sort of imply a single main class. In the end, the single main class registers various resources and styles with the appropriate manager, so if you create your own main class and copy enough code, you can pack all of the styles and resources into a single module and have it register the right things with the right managers. You probably can't use the compiler to generate the single SWF so you may have to use the generated code and create a custom SWF. It won't tax your brain, but will be tedious. I'd say it would have a difficulty rating of 7 out of 10. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Rob Barreca Sent: Tuesday, May 27, 2008 8:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Loading ResourceModule and CSS with one HTTP call When loading a ResourceModule for the Japanese language, we also want to apply a set of styles to change the default font to something Japanese. I have a solution now that loads a ja_JP_Styles.swf through StyleManager as well as loading a ja_JP_ResourceModule.swf with ResourceManager but would like to combine the calls. 1. I know I could forget about loading external style SWFs and put something like StyleManager.getStyleDeclaration(global).setStyle(fontFamily, resourceManager.getString(FooBar, globalFont)); after setting localeChain, but I'm thinking we'll want to change other styles and would like to keep a generic solution like I have now, but cut down on the extra HTTP request. Maybe this is my only option? 2. I thought one could somehow Embed(style.css) in my Foo.properties ResourceBundle but it doesn't seem like that is the right path. 3. Also, I read in the proposed spec (http://opensource.adobe.com/wiki/display/flexsdk/Runtime+Localization+S pecification#RuntimeLocalizationSpecification-Problem:AstylevalueinaCSSs electorcan http://opensource.adobe.com/wiki/display/flexsdk/Runtime+Localization+S pecification#RuntimeLocalizationSpecification-Problem:AstylevalueinaCSSs electorcan 'tcomefromaresource.) that one might be able to do something like the following, but it barfs so this feature probably didn't make it in. global { fontFamily: Resource(bundle=FooBar, key=globalFont); } What is the best way to do this, am I stuck with option #1 if I want to just do one HTTP call when switching locales? Thanks, -R
[flexcoders] Re: How to sorting the results of an OLAPQuery?
Have you tried calling OLAPSet.hierarchize()? It returns a new OLAPSet in which the members are sorted. --- In flexcoders@yahoogroups.com, Cosma [EMAIL PROTECTED] wrote: Hi, I'm trying to sort the results of my OLAPQuery, anyone has tried to do that? I can't find any info in the documentation. I verified that the order of the elements is based on the OLAPSet contents for that axis. That is, if you manually build the OLAPSet that you assign to the query axis, you will control the order. However, it is common to build the OLAPSet querying the cube about its dimensions and hierarchies. The cube will return the elements without any special order, probably it creates its internal sets adding elements as these are read. Is there an easy way to sort an OLAPSet built this way? I mean, probably it is possible to get the tuples array from the OLAPSet, wrap it into an arraycollection, sort it providing a custom compare function and then build a new OLAPSet with the new tuples array, but this is a little tricky - there should be an easier way.. any ideas? Thank you Cosma
RE: [flexcoders] add item to the top of a sorted datagrid
If the things you are adding are not in sort order, then you no longer really want the collection to be sorted. You could use a concatenated collection to join the new items while the others remain sorted like I did in this post: http://blogs.adobe.com/aharui/2008/03/custom_ilists_combobox_prompts.htm l Or you can simply grab the old dataprovider via toArray() into a new collection without a sort and add your new items at the beginning. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of superabe superabe Sent: Tuesday, May 27, 2008 5:08 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] add item to the top of a sorted datagrid Is there any way to add new items to the top of a sorted datagrid? I know how to add stuff to a datagrid/provider, but am unsure about how to keep the new item at the top of the datagrid and not have the underlying sort kick-in. TIA - superabe
Re: [flexcoders] JAXB for actionscript
I'm not aware of anything, but you could try JAXB for XSD - Java, and then something like Granite Data Services' gas3 to go from Java - ActionScript. We've recently done someting similar (although, granted, we actually wanted the Java code as well), and it worked reasonably well... -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com On Mon, 2008-05-26 at 11:51 +, gianlucavatinno wrote: hello to all, I'm searching for program like JAXB (for java) that compiles xsd into actionscript 3 class. is there anything like that?