[flexcoders] Actionscript SAX Parser ?
Hi Flex Folks, Is there a purpose-built incremental SAX Parser component available for ActionScript? Some background (please excuse the novella): In a Flex project I shipped about 4 months ago, I needed to accommodate a web-service that can sometimes return a large amount of data. I saw that many people recommend modification of the service (or creation of an intermediate proxy) such that results are paged. For that specific project, it turned out that I could actually modify the service to produce paged output (as I had written the web-service earlier)... but I was left feeling very uncomfortable about that as a solution for a number of reasons. In most cases, I would not have the ability to alter the web-service, so I'd be forced to create a proxy service... but this has many disadvantages, the worst being that I'd have to make (a lot of) bandwidth available for the proxy to run from my own servers, despite all the data being available from third-party web-services; this has ongoing cost implications for similar projects. I found that with server-side paging, the user experience was degraded unless I also created a paged DataGrid in my Flex UI. This was a clumsy exercise as I could find no pre-built data-bound paging component independent of any existing UIComponent. My users also reported that client-side paging is very inconvenient for large datasets (I tried various page-set sizes). I did not ship a useful feature (drag and drop re-ordering of rows) as there was no way (without getting insanely complicated during drag) to drop a bound row to three pages ago near the bottom. What I *really* wanted was something I've come to rely on in past years: an incremental SAX parser. This is really standard fare in Perl/Python/Java/.Net/C++, so I'd have thought something similar was available for ActionScript. A SAX parser in combination with a WebService object and a Socket object could form a very flexible event-based WebService-like component. Alas I found nothing. The closest I came was the SAX parser included in a href=http://xmljs.sourceforge.net/;XML4Script/a; while it was ECMAScript, it looked quite tedious to port/integrate. I didn't have the time before, but I can see that it will be immensely useful in the future. An event-based parser: * offers much more flexibility in Flex UI development, * allows me to provide almost instant results/feedback to the user, * uses constant memory (a requirement for large result-sets). The SAXWebService could be a subclass of WebService, exposing another result-like event matchRow, but would return a fragment/object for each matched row in the returned XML data and would do so as soon as enough data has been received from the SOAP endpoint. All the other pieces are there; here's how a SAXWebService would work: 1. Create a WebService object internally to fetch, validate and instantiate WSDL, and to obtain an endpoint. 2. Take some user supplied matchRow query (XPath) to match a row. 3. During the send method, open a seperate Socket connection. 4. Get the URLRequest from the WebService object, serialise and send to the endpoint over the socket. 5. Set up an event FSM such that when data is received from the socket it is buffered. 6. A SAX event handler is written to match the available data against the match query. 7. The SAX parser is fed the buffer (or perhaps an offset portion of the buffer), which it parses as data becomes available. 8. The SAX parser will raise an event each time the query matches. The buffer can be optionally truncated (instead of using an offset) to enable constant-memory operation. Am I missing some wonderful existing prior art? Has no other developer requested this before? If not, I guess I'll have to find time to write it. -David.
Re: [flexcoders] render values from datagrid
Hi, just copy and paste this code in flex builder mxml file it will create a data grid with some data i need to click on any element of that grid and need to reach to some specific state. i don't know how to do cell presssing in datagrid??? / the same thing i did in flash like this: sheetGrid.dataProvider = myArr; var editGridListener:Object = new Object(); editGridListener.cellPress = function(evt_obj:Object) { colDetails = sheetGrid.getItemAt(evt_obj.itemIndex); // FOR ROWS: evt_obj.itemIndex // FOR COLUMNS: evt_obj.columnIndex for (var i in colDetails) { if (i == Project) { Proj = colDetails[i]; } if (i == Description) { Desc = colDetails[i]; } if (i == HoursSpent) { Hr = colDetails[i]; } } how to do this in FLEX // ?xml version=1.0? mx:Application xmlns:mx= http://www.adobe. com/2006/ mxml backgroundColor=#FF creationComplete=start() mx:DataGrid x=10 y=64 width=853 height=661 id=leadList_dg /mx:DataGrid mx:Script ![CDATA[ import mx.collections. ArrayCollection; private function get(str:String) :void{ trace(str) } private function start():void{ var leadListArr: ArrayCollection= new ArrayCollection( ); var taskArr:Array = [{label:Overdue, data:1}, {label:Today, data:2}, {label:Tomorrow, data:3} ]; var numArr:Array = [{label:1, data:1}, {label:2, data:2}, {label:3, data:3} ]; var nameArr:Array = [{label:kanu, data:1}, {label:manav, data:2}, {label:varun, data:3} ]; for (var j:Number = 0; jtaskArr.length; j++) { leadListArr. addItem({ Subject:taskArr[ j].label, Time:numArr[ j].label, Duration: nameArr[j] .label}); } leadList_dg. dataProvider= leadListArr; } ]] /mx:Script /mx:Application Harish Sivaramakrishnan [EMAIL PROTECTED] wrote: Hi Kanu Please make your query a little more specific, it will make it easier to understand and solve your problem. As you know, this is a high traffic forum and most of the guys who solve issues are doing it by sneaking time from their regular work . Please elaborate a little more on what you want to do, it will be easier for folks to suggest a solution. Thanks Harish On 5/28/07, kanu kukreja [EMAIL PROTECTED] wrote: Hello everyone, i don't 9ow y but nobody replies to my queries. :( I hope this time u all help me out. i want to click on any particular data of datagrid and need to render its value and open a different state for every column item click. My code: ?xml version=1.0? mx:Application xmlns:mx= http://www.adobe.com/2006/mxml; backgroundColor=#FF creationComplete=start() mx:DataGrid x=10 y=64 width=853 height=661 id=leadList_dg /mx:DataGrid mx:Script ![CDATA[ import mx.collections.ArrayCollection; private function get(str:String):void{ trace(str) } private function start():void{ var leadListArr:ArrayCollection=new ArrayCollection(); var taskArr:Array = [{label:Overdue, data:1}, {label:Today, data:2}, {label:Tomorrow, data:3} ]; var numArr:Array = [{label:1, data:1}, {label:2, data:2}, {label:3, data:3} ]; var nameArr:Array = [{label:kanu, data:1}, {label:manav, data:2}, {label:varun, data:3} ]; for (var j:Number = 0; jtaskArr.length; j++) { leadListArr.addItem({Subject:taskArr[j].label,Time:numArr[j].label,Duration:nameArr[j].label}); } leadList_dg.dataProvider=leadListArr; } ]] /mx:Script /mx:Application Best Regards Kanu Kukreja - Get the Yahoo! toolbar and be alerted to new email wherever you're surfing. Best Regards Kanu Kukreja - Don't get soaked. Take a quick peak at the forecast with theYahoo! Search weather shortcut.
[flexcoders] Anyone doing the XULRunner + Flex thang ?
Hi Folks, I have some experience deploying XULrunner applications (standalone not .xulapp type). I've found XULrunner to be preferable to Apollo (as it stands) for various kinds of non-Flash interaction with the host system and the user. I noticed some interest in a SWFRunner project at http://osflash.org/pipermail/osflash_osflash.org/2006-February/007659.html but it looks like this has not really developed any further. Is anyone else doing this? Care to share your experiences? One of the major concerns in that thread was that one can't distribute the Flash plug-in without a license from Adobe (fair enough). My *ugly* *hack* work-around was to also ship the useIEforThisFrame FireFox extension and have the Flex application run in the IE frame. That way, in the unlikely event that the user does not have the Flash ActiveX component installed on their system (or has version 8 or below), the standard install plugin page appears and the user can continue by installing it then moving on (didn't need to restart XULrunner). I feel sick re-living this tale of woe. Is is legal/ethical to detect flash (presence/version) in XULRunner and - if not found - download and install the NSplugin version of the Flash plug-in? Perhaps if a normal browser window was launched to take the user to the appropriate page on the Adobe's website automatically (where they can accept the license terms)? -David.
Re: [flexcoders] Re: Container refresh
Thanks for reply but thats not the case. My problem is not resizing but fact that content added from updateDisplay doesn't appear unless I change size of component. 2007/5/28, simonjpalmer [EMAIL PROTECTED]: can't answer your question myself, but take a look at this... http://www.flex-flex.net/blog/article.asp?id=9 which has a resizing titlewindow in it if you download the source you may get some clues. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Janis Radins [EMAIL PROTECTED] wrote: Hey people! I have here problem with refreshing contents of Panel instance. In order to have exact functionality I need, i have extended my panel class with some simple things like dataProvider variable which is managed inside updateDisplayList. In that method I am creating some bunch of child objects which are added to container by addChild. The problem is that newly added children doesn't appear on screen until I modify panel size. First thought was to issue invalidateDisplayList/size/properties but no luck, they all do nothing. Anyone have any thoughts what exactly is happening when size changes thats stronger than those 3 updaters? To be precise that is not exact Panel or TitleWindow from components folder, but my own class that extends them to implements drag resize and minimization, though to make sure this is not my mistake I tried to do very same thing with default Panel component and everything stays the same. Any ideas are appreciated! Yanis
Re: [flexcoders] sandbox error
Hello, Such as, mysql server I am using is localhost:3066 in my server. And my server has address www.abc.com. The swf file runs as www.abc.com/abc/abc.swf. Does it count in same domain? Regards, Joe - Original Message - From: John Robinson To: flexcoders@yahoogroups.com Sent: Monday, May 28, 2007 2:00 AM Subject: Re: [flexcoders] sandbox error I'm not quite sure what it is you're doing, but it sounds like you're talking directly to mysql over a socket connection. I'd be very careful in doing so in that all of your mysql authentication info is included in the swf file. The swf can be easily decompiled and your database compromised. I'd look into using server-side technology to handle the mysql interaction CF/PHP/etc. Aside from that, you're swf once uploaded is running in whatever domain you uploaded it to. If you want to disregard the above, and just get it working, make sure mysql and the swf are running on the EXACT same domain. John Robinson - Flash/Flex Developer at large Blog: http://jrobinsonmedia.wordpress.com On May 27, 2007, at 5:03 AM, li.wen wrote: Hello all, I am using flash.net.Socket class to connect mysql database. And I always meet sandbox violation error. I have some questions regarding this problem. 1) When I develop the flex application and mysql database (localhost:3066 is used) in same machine, there is no sandbox violation box error, since they are considered as in the same domain. Am I correct? 2) After I upload the flex application the server which is equipped with mysql, I access the flex application from client machine. Firstly the flex application will be downloaded to the client machine's cache, then start to execute. Now flex application and mysql database are considered as in different domain, and the sandbox violation may happen? 3) In order to solve it, I need to enable mysql remote access? Set mysql server address to digital format (xxx.xxx.xxx.xxx) to instead of localhost? 4) Or alternative way to solve it is to set crossdomain.xml file? Thank you. Regards, Joe
Re: [flexcoders] Re: Container refresh
Found the problem and it was my own foult. 2007/5/28, Janis Radins [EMAIL PROTECTED]: Thanks for reply but thats not the case. My problem is not resizing but fact that content added from updateDisplay doesn't appear unless I change size of component. 2007/5/28, simonjpalmer [EMAIL PROTECTED]: can't answer your question myself, but take a look at this... http://www.flex-flex.net/blog/article.asp?id=9 which has a resizing titlewindow in it if you download the source you may get some clues. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Janis Radins [EMAIL PROTECTED] wrote: Hey people! I have here problem with refreshing contents of Panel instance. In order to have exact functionality I need, i have extended my panel class with some simple things like dataProvider variable which is managed inside updateDisplayList. In that method I am creating some bunch of child objects which are added to container by addChild. The problem is that newly added children doesn't appear on screen until I modify panel size. First thought was to issue invalidateDisplayList/size/properties but no luck, they all do nothing. Anyone have any thoughts what exactly is happening when size changes thats stronger than those 3 updaters? To be precise that is not exact Panel or TitleWindow from components folder, but my own class that extends them to implements drag resize and minimization, though to make sure this is not my mistake I tried to do very same thing with default Panel component and everything stays the same. Any ideas are appreciated! Yanis
Re: [flexcoders] sandbox error
A swf www.abc.com cannot dl data from localhost without a policyFile on localhost. If you place a policyFile on the server hosting mysql and allow the server where your swf resides you 'should' be alright. regards, Bjorn On 28/05/2007, at 6:23 PM, li.wen wrote: Hello, Such as, mysql server I am using is localhost:3066 in my server. And my server has address www.abc.com. The swf file runs as www.abc.com/abc/abc.swf. Does it count in same domain? Regards, Joe - Original Message - From: John Robinson To: flexcoders@yahoogroups.com Sent: Monday, May 28, 2007 2:00 AM Subject: Re: [flexcoders] sandbox error I'm not quite sure what it is you're doing, but it sounds like you're talking directly to mysql over a socket connection. I'd be very careful in doing so in that all of your mysql authentication info is included in the swf file. The swf can be easily decompiled and your database compromised. I'd look into using server-side technology to handle the mysql interaction CF/PHP/etc. Aside from that, you're swf once uploaded is running in whatever domain you uploaded it to. If you want to disregard the above, and just get it working, make sure mysql and the swf are running on the EXACT same domain. John Robinson - Flash/Flex Developer at large Blog: http://jrobinsonmedia.wordpress.com On May 27, 2007, at 5:03 AM, li.wen wrote: Hello all, I am using flash.net.Socket class to connect mysql database. And I always meet sandbox violation error. I have some questions regarding this problem. 1) When I develop the flex application and mysql database (localhost:3066 is used) in same machine, there is no sandbox violation box error, since they are considered as in the same domain. Am I correct? 2) After I upload the flex application the server which is equipped with mysql, I access the flex application from client machine. Firstly the flex application will be downloaded to the client machine's cache, then start to execute. Now flex application and mysql database are considered as in different domain, and the sandbox violation may happen? 3) In order to solve it, I need to enable mysql remote access? Set mysql server address to digital format (xxx.xxx.xxx.xxx) to instead of localhost? 4) Or alternative way to solve it is to set crossdomain.xml file? Thank you. Regards, Joe Regards, Bjorn Schultheiss Senior Developer Personalised Communication Power Level 2, 31 Coventry St. South Melbourne 3205, VIC Australia T: +61 3 9674 7400 F: +61 3 9645 9160 W: http://www.qdc.net.au ((This transmission is confidential and intended solely for the person or organization to whom it is addressed. It may contain privileged and confidential information. If you are not the intended recipient, you should not copy, distribute or take any action in reliance on it. If you believe you received this transmission in error, please notify the sender.---))
Re: [flexcoders] render values from datagrid
Hi Kanu Please go thru the following example ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=start() mx:Script ![CDATA[ import mx.events.ListEvent; import mx.collections.ArrayCollection; private function get(str:String) :void{ } private function start():void{ leadList_dg.addEventListener(itemClick,myListener); var leadListArr: ArrayCollection= new ArrayCollection( ); var taskArr:Array = [{label:Overdue, data:1}, {label:Today, data:2}, {label:Tomorrow, data:3} ]; var numArr:Array = [{label:1, data:1}, {label:2, data:2}, {label:3, data:3} ]; var nameArr:Array = [{label:kanu, data:1}, {label:manav, data:2}, {label:varun, data:3} ]; for (var j:Number = 0; jtaskArr.length; j++) { leadListArr. addItem({ Subject:taskArr[ j].label, Time:numArr[ j].label, Duration: nameArr[j] .label}); } leadList_dg. dataProvider= leadListArr; } private function myListener(event:ListEvent):void { if(event.target.dataProvider.getItemAt(event.target.selectedIndex ).Subject==Overdue) { mx.controls.Alert.show(Overdue) } else { mx.controls.Alert.show(Something else) } } ]] /mx:Script mx:DataGrid x=10 y=64 width=853 height=661 id=leadList_dg /mx:DataGrid /mx:Application It is strongly recommended that you look up the AS3 / Flex documentation on the adobe website. Many of your questions will have solutions right there. Happy Flexing! Thanks Harish
[flexcoders] Re: LineSeries interpolateValues=false
For information, just setting the missing date values did the trick (i.e. the data provider now has ALL the x-axis values, but some missing y-axis values) , the graph now correctly breaks lines for missing dates. Thanks, Neil.
Re: [flexcoders] Re: Container refresh
fyi, content added from updateDisplay You may know this or you may not but, you do not addChild() in updateDisplayList(). You would do that in commitProperties(), then update displayList() will be called to size you new children. Peace, Mike On 5/28/07, Janis Radins [EMAIL PROTECTED] wrote: Found the problem and it was my own foult. 2007/5/28, Janis Radins [EMAIL PROTECTED]: Thanks for reply but thats not the case. My problem is not resizing but fact that content added from updateDisplay doesn't appear unless I change size of component. 2007/5/28, simonjpalmer [EMAIL PROTECTED]: can't answer your question myself, but take a look at this... http://www.flex-flex.net/blog/article.asp?id=9 which has a resizing titlewindow in it if you download the source you may get some clues. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Janis Radins [EMAIL PROTECTED] wrote: Hey people! I have here problem with refreshing contents of Panel instance. In order to have exact functionality I need, i have extended my panel class with some simple things like dataProvider variable which is managed inside updateDisplayList. In that method I am creating some bunch of child objects which are added to container by addChild. The problem is that newly added children doesn't appear on screen until I modify panel size. First thought was to issue invalidateDisplayList/size/properties but no luck, they all do nothing. Anyone have any thoughts what exactly is happening when size changes thats stronger than those 3 updaters? To be precise that is not exact Panel or TitleWindow from components folder, but my own class that extends them to implements drag resize and minimization, though to make sure this is not my mistake I tried to do very same thing with default Panel component and everything stays the same. Any ideas are appreciated! Yanis -- Teoti Graphix http://www.teotigraphix.com Blog - Flex2Components http://www.flex2components.com You can find more by solving the problem then by 'asking the question'.
Re: [flexcoders] DataGrid and complex types
On 27/05/2007, at 21:57, André Rodrigues Pena wrote: Although when I try to populate de DataGrid, I can't set a DataGridColumn to display the property name within the property product from the data provider. The code is the following: mx:DataGrid id=datagrid dataProvider={sales} width=100% height=100% mx:columns mx:DataGridColumn dataField=id headerText=Id/ mx:DataGridColumn dataField=product.name headerText=Product/ mx:DataGridColumn dataField=customer.name headerText=Customer/ /mx:columns /mx:DataGrid Only the simple attribute id is properly displayed in the DataGrid Why? What can I do? . The way I solved it was by using a custom label function for each column. Instead of specifying a dataField, you define the following function inside a script tag: function myCustomDataLabelFunction(item:Object, column:DataGridColumn):String { return item.product.name; } Then you declare the column like this: mx:DataGridColumn labelFunction=myCustomDataLabelFunction headerText=Product/ Basically, your label function gets invoked on each item, when the column needs to know what to display on that row. And you have to return the value you want to be displayed. I hope this helped, Andrea.
Re: [flexcoders] Re: DataGrid and complex types
Palmer, Thanks, that really solves the problem! :) On 5/27/07, simonjpalmer [EMAIL PROTECTED] wrote: write a method on your Customer and Product classes as follows: public function toString():String { return this.insertyourinterestingStringpropertyhere; } If you want more than that you can write a custom renderer for your classes and associate it with the datagrid columns. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, André Rodrigues Pena [EMAIL PROTECTED] wrote: Hi all, I'm using a DataGrid to the result of a RemoteObject. Each record is an Object of type Sale that has this simplified definition: package beans { [Managed] [RemoteClass(alias=com.beans.Sale)] public class Sale { public var id:int; public var customer:Customer; public var product:Product; } } Notice that customer and product are complex types, that also have correspondent back-end classes. I manage to retrieve data successfully from the server. For instance, if I handle the RO result like this: public function handleResult(event:Object):void { sales = ICollectionView(event.result); var a:Sale = sales[0]; Alert.show(String(a.product.name)); } the product name is displayed properly, what proves that the data was retrieved. Although when I try to populate de DataGrid, I can't set a DataGridColumn to display the property name within the property product from the data provider. The code is the following: mx:DataGrid id=datagrid dataProvider={sales} width=100% height=100% mx:columns mx:DataGridColumn dataField=id headerText=Id/ mx:DataGridColumn dataField=product.name headerText=Product/ mx:DataGridColumn dataField=customer.name headerText=Customer/ /mx:columns /mx:DataGrid Only the simple attribute id is properly displayed in the DataGrid Why? What can I do? Thanks! -- André Rodrigues Pena LOCUS www.locus.com.br -- André Rodrigues Pena LOCUS www.locus.com.br Blog www.techbreak.org
[flexcoders] Re: problems with storing XML in SharedObject
Barry, thank you so very much for your willingness to help and for providing some code. I tried loading this into a test project and ran into a number of problems/questions. 1) I don't see in the code where you construct, write out and .flush any xml into your local SharedObject. Would that be questionaire?? 2) I don't understand the getNewSession method...don't know what the xmlLocation is, and don't see the xmlRequest instantiated anywhere, don't know where the .send is sending to and what I should set up for my test. Again I VERY much appreciate your patience and willingness to help a newbie. Hope I'm not being too dim a bulb here. Anne --- In flexcoders@yahoogroups.com, barry.beattie [EMAIL PROTECTED] wrote: I've just (well, 3:00 am this morning) got XML saving and re- reading back in. I played it safe and .toString()'d it before save but it'll probably work without it. here's the whole of my fetching of data, inc the getting and saving of the XML as an LocalSO. I hope it helps you. cheers b (PS: if you see any dodgy coding and can offer advice pls do.) mx:Script ![CDATA[ public var localSO:SharedObject = SharedObject.getLocal(lsoQuestionaire); public function init():void { //localSO.data.saveDate = new Date(); // testing only ExternalInterface.addCallback (onBrowserClose, onBrowserClose); trace(init called); if (localSO.size) { Alert.yesLabel = Use Previous Session; Alert.noLabel = Replace With New Session; Alert.buttonWidth = 150; Alert.show(You have a previous session. Would you like to load it?,Questionaire Session Selection,Alert.YES|Alert.NO,this, onChoseSession); } else { getNewSession() } // that gets the data, now lets set up the persist } public function onChoseSession(event:CloseEvent):void { if (event.detail == Alert.YES) { loadPreviousSession(); } else { getNewSession(); } } public function getNewSession():void { xmlRequest.url = xmlLocation; xmlRequest.method = GET; xmlRequest.resultFormat = e4x; xmlRequest.addEventListener (ResultEvent.RESULT,onResultReturn); xmlRequest.addEventListener (FaultEvent.FAULT, onResultFault); trace(5. requesting XML now from + xmlLocation); xmlRequest.send(); } public function loadPreviousSession():void { // get XML from Local Shared Object trace(1. loadPreviousSession called); try { questionaire = new XML (localSO.data.questionaire); trace(2. got data); trace(questionaire.toXMLString()); } catch(e:Error) { trace(3. error on loadPreviousSession); trace(e.message.toString()); trace(4. go to getNewSession()); getNewSession(); } } public function onResultReturn (event:ResultEvent):void { trace(6. onResultReturn called); questionaire = new XML(event.result); trace(questionaire.toXMLString()); lastIndex = questionaire.section.subsection.children().length()-1; // zero-based index/arrays! first(); // move to the first question to start } public function onResultFault(event:FaultEvent):void { trace(7. onResultFault called: + event.toString()) mx.controls.Alert(ERROR: Could not load XML questions); } private function onBrowserClose():void { Alert.show(browser is closing); localSO.data.questionaire = questionaire.toXMLString(); } ]] /mx:Script
[flexcoders] Re: problems with storing XML in SharedObject
H, still baffled. I tried as you suggested and still can't seem to save the xml. Also, you said they do save the data type of a complext Did you mean they do NOT save the type and when you read it back you just get type Object? I thought that's what I read in the user guide and that you need to use something called registerClassAlias if you want to store a type. I tried looking into this also and don't understand how to use this correctly. I'm starting to get frustrated. Anne --- In flexcoders@yahoogroups.com, Dimitrios Gianninas [EMAIL PROTECTED] wrote: In your save and get methods, always init the mySO by doing mySO = SharedObject.getLocal(testSO)... I think you have to do this everytime. Also I use SO as well and they do save the data type of a complex object when saving the object, so when u read it back, it is just of type Object. So careful with the XML. Dimitrios Gianninas Optimal Payments Inc. -Original Message- From: flexcoders@yahoogroups.com on behalf of annespg Sent: Thu 5/24/2007 12:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] problems with storing XML in SharedObject I just joined this forum hoping I might get an answer since traffic on the Adobe Flex Forum seems pretty darn sparse. I'm surprised since the Flash Forum is so active one can get several answers within hours and on the Flex Forum one can go months and never get an answer. At any rate... I am trying to store some XML in the SharedObject, but it doesn't seem to work. I think I'm getting it in there, but if I close the app and then try to retrieve it, it is null. I have the following test code. What the heck am I doing wrong?!?!? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=init() mx:Script ![CDATA[ import valueObjects.CustomVO; import flash.net.registerClassAlias; private var mySO:SharedObject; private function init():void{ mySO = SharedObject.getLocal(testSO); } private function saveSO():void{ var obj:CustomVO = new CustomVO(test string,12345); var tagname:String = mytag; var x:XML = {tagname} name={obj.name} id={obj.id}/; var test:CustomVO = CustomVO.buildCustomVOFromXML(x); trace (test); //this works fine, so my x:XML variable seems fine mySO.data.testString = obj.name; mySO.data.testXMLData = x; // the debugger shows the data is in mySO fine at this point mySO.flush(); } private function getSO():void{ //if I close the application and then launch again and invoke this //function the testString is there OK, but the testXMLData is null var theData:Object = mySO.data; var theXML:XML = mySO.data.testXMLData; //this comes back null trace(theData); // shows [object Object] trace(mySO.data.testString);// shows 'test string' trace(test xml data: +theXML.toXMLString()); // shows no data } private function removeSO():void{ mySO.clear(); } ]] /mx:Script mx:Button x=175 y=101 label=Save SharedObject click=saveSO ()/ mx:Button x=175 y=165 label=Retrieve SharedObject click=getSO ()/ mx:Button x=175 y=235 label=Remove SharedObject click=removeSO()/ /mx:Application package valueObjects{ [Bindable] public class CustomVO{ public var name:String; public var id:Number; public var timeStamp:Number; public function CustomVO(name:String,id:Number){ this.name = name; this.id = id; this.timeStamp = new Date().milliseconds; } public function toString():String{ return ([CustomVO] +name+,+id+,+timeStamp); } public static function buildCustomVOFromXML(item:XML):CustomVO{ var v:CustomVO = new CustomVO([EMAIL PROTECTED], [EMAIL PROTECTED]); return v; } } } -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et
[flexcoders] Re: Converting the output of ObjectUtil.copy() to custom type
Hi. Right now I'm having the same problem. I even found this: public function cloneObject(o:Object):Object { var bytes:ByteArray = new ByteArray(); bytes.writeObject(o); bytes.position = 0; return bytes.readObject(); } but ended up always in the casting problem :( Had you find an answer? Thanks Best regards --- In flexcoders@yahoogroups.com, ben.clinkinbeard [EMAIL PROTECTED] wrote: Does anyone know how to do this? Neither casting nor the as operator are working. var foo:FooObject = new FooObject(); // this doesn't work var fooCopy:FooObject = FooObject(ObjectUtil.copy(foo)); // neither does this var fooCopy:FooObject = ObjectUtil.copy(foo) as FooObject; Thanks in advance for any pointers, Ben
[flexcoders] Re: DeepCopy Built In?
Hi. The ObjectUtils.copy(obj:someobject) proves to be very usefull, but i ended up in a new problem. when doing the copy if i want to cast the resulting Object to a custom object it doesn't work. For instance. If i have the objetc Person that implements IValueObject and want to cast the resulting object from the ObjectUtils.copy(..) to Person nothing happens. I've seen in some adobe forum the same question but with no reply. There it says that ObjectUtil.copy(..) doesn't deep copy custom objects... Any solutions on this? any help would be very welcome. Best regards Lucas --- In flexcoders@yahoogroups.com, Kevin [EMAIL PROTECTED] wrote: take a look at the ObjectUtils. newObject = ObjectUtils.copy( someObject ); - Kevin On Apr 25, 2007, at 8:43 PM, Persaud, Anthony wrote: Is there a built-in function to deep-copy an object?
[flexcoders] Help with my first Flex App...
This has got to be a simple one. I am writing the tiny app given in a video tutorial by Sho Kuwamoto. The tutorial is on displaying flickr pictures in a basic tilelist control and is located here: http://labs.adobe.com/technologies/flexbuilder2/tutorials/sho_kuwamoto / I have identified these KEY points: 1. An HTTPService call, of which mine looks like this: mx:HTTPService id=service url=http://api.flickr.com/services/rest/? method=flickr.photos.searchamp;api_key=f09abdbe2fada94609244a5de3f4b8 deamp;per_page=9amp;tags={input.text}/ 2. I call the web request with a button click like so: mx:Button x=262 y=18 label=Find id=button1 click=currentState='Results'; service.send()/ 3. Finally, the data provider for the TileList control in the tutorial is: dataProvider={service.result.rsp.photos.photo} However, while watching the video, as he types services. he gets two options, result and resultFormat, however, I am only getting an option for resultFormat? This is leading me to believe that maybe the .result property has been removed??? And that is why my application fails? The end result is that I have this thing setup identical to the tutorial but it just won't do anything on the results display. The only thing that is different is that I went to Flickr and created my own account and search feed at http://www.flickr.com/services/api/explore/. (This is exactly the method used to create a feed in the tutorial) I have uploaded the project bin folder here: http://brad.melendy.com/code/flex/flickr/Flickr.html I'd love to see this work and it looks so easy in the video (15 minutes!) but I've spent several hours on this now to no avail. Thanks for any help out there
[flexcoders] RangeError: Error #2006: The supplied index is out of bounds.
I. var numChildren:Number = canvas.numChildren - 1; for (var i:int = 0; i numChildren; i++) { if (canvas.getChildAt(i).visible == true) { canvas.getChildAt(i).visible = false; } } II. var numChildren:Number = canvas.numChildren - 1; for (var i:int = 0; i numChildren; i++) { if (canvas.getChildAt(i).visible == true) { canvas.removeChildAt(i); } } The first block of codes works fine... However, with the second block it returns this error: 'RangeError: Error #2006: The supplied index is out of bounds.' Can somebody tell me what's wrong? Thanks flexcoders!
[flexcoders] crossdomain.xml security issues
I'd like to create a simple Flex application that can be distributed to any (ie. untrusted) source that reads data from my web server using AMFPHP. I understand that this requires a crossdomain.xml file. I'm trying to get my head around the security implications of open (ie. allow all) crossdomain.xml files. Basically I understand that issues arise when there is an open crossdomain.xml file on a domain that uses cookie/session-based authentication as the SWF can read/forge the cookie info that is sent in the HTTP header. This allows cross-site forgeries and other unintended consequences. My main concern is with server security though. What are the implications as far as compromising the security of the server aside from cross-site forgeries? The Adobe article linked below suggests that crossdomain.xml files may allow access to other private severs on a network which is obviously quite serious. If I understand correctly, a lot of the risk can be mitigated by hosting the crossdomain.xml file on a separate sub-domain from the domain with the user authentication mechanism. Is this as straightforward as setting up an Apache virtual host for a sub-domain which hosts a simple PHP script/gateway that forwards/returns requests to the domain which contains the data source? How have others got around this problem? Can you provide me with a brief explanation of your solution. Cheers, Darren. If you don't understand what I mean by the security implications, these refs might help: http://shiflett.org/blog/2006/sep/the-dangers-of-cross-domain-ajax-with-flash http://renaun.com/blog/2006/12/13/167/ http://www.hardened-php.net/library/poking_new_holes_with_flash_crossdomain_policy_files.html http://www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html
[flexcoders] Re: sandbox error
Hi Joe, You might want to look into using AMFPHP rather than opening up your MySQL installation for remote access: http://www.adobe.com/devnet/flex/articles/flex2_amfphp.html Or if you don't mind sending and receiving XML, you don't need AMFPHP: http://www.adobe.com/devnet/flex/articles/flex2_php.html You can also do similar things using WebORB with other server-side languages. If the Flex app is on a separate machine to the database, you will still have to worry about the crossdomain.xml issue though. Cheers, Darren. --- In flexcoders@yahoogroups.com, li.wen [EMAIL PROTECTED] wrote: Hello all, I am using flash.net.Socket class to connect mysql database. And I always meet sandbox violation error. I have some questions regarding this problem. 1) When I develop the flex application and mysql database (localhost:3066 is used) in same machine, there is no sandbox violation box error, since they are considered as in the same domain. Am I correct? 2) After I upload the flex application the server which is equipped with mysql, I access the flex application from client machine. Firstly the flex application will be downloaded to the client machine's cache, then start to execute. Now flex application and mysql database are considered as in different domain, and the sandbox violation may happen? 3) In order to solve it, I need to enable mysql remote access? Set mysql server address to digital format (xxx.xxx.xxx.xxx) to instead of localhost? 4) Or alternative way to solve it is to set crossdomain.xml file? Thank you. Regards, Joe
[flexcoders] Re: sandbox error
Sorry, the last part of my post was incorrect - I didn't read your post carefully enough regarding the cross-domain issue. If the Flex app is published on the same server where your database resides, you don't have to worry about a crossdomain.xml file. Cheers, Darren. --- In flexcoders@yahoogroups.com, li.wen [EMAIL PROTECTED] wrote: Hello all, I am using flash.net.Socket class to connect mysql database. And I always meet sandbox violation error. I have some questions regarding this problem. 1) When I develop the flex application and mysql database (localhost:3066 is used) in same machine, there is no sandbox violation box error, since they are considered as in the same domain. Am I correct? 2) After I upload the flex application the server which is equipped with mysql, I access the flex application from client machine. Firstly the flex application will be downloaded to the client machine's cache, then start to execute. Now flex application and mysql database are considered as in different domain, and the sandbox violation may happen? 3) In order to solve it, I need to enable mysql remote access? Set mysql server address to digital format (xxx.xxx.xxx.xxx) to instead of localhost? 4) Or alternative way to solve it is to set crossdomain.xml file? Thank you. Regards, Joe
[flexcoders] What are the risks of allow-all crossdomain.xml files?
What I'd like to do is create a simple Flex application that can be distributed to any (ie. untrusted) source that reads data from my web server using AMFPHP. I understand that this requires a crossdomain.xml file. I'm trying to get my head around the security implications of open (ie. allow all) crossdomain.xml files. Basically I understand that issues arise when there is an open crossdomain.xml file on a domain that uses cookie/session-based authentication as the SWF can read/forge the cookie info that is sent in the HTTP header. This allows cross-site forgeries and other unintended consequences. My main concern is with server security though. What are the implications as far as compromising the security of the server aside from forgeries and spoofing? The Adobe article linked below suggests that crossdomain.xml files may allow access to other private severs on a network which is obviously quite serious. If I understand correctly, a lot of the risk can be mitigated by hosting the crossdomain.xml file on a separate sub-domain from the domain with the user authentication mechanism. Is this as straightforward as setting up an Apache virtual host for a sub-domain which hosts a simple PHP script/gateway that forwards/returns requests to the domain which contains the data source? How have others got around this problem? Can you provide me with a brief explanation of your solution. Cheers, Darren. If you don't understand what I mean by the security implications, these refs might help: http://shiflett.org/blog/2006/sep/the-dangers-of-cross-domain-ajax-with-flas h http://renaun.com/blog/2006/12/13/167/ http://www.hardened-php.net/library/poking_new_holes_with_flash_crossdomain_ policy_files.html http://www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.htm
[flexcoders] Tree can't render properly XML data containing two similar text nodes
Hi there, There must be something terribly wrong with the Tree component. Here is a very basic Flex app sample in which I try to have a Tree component render some very basic XML data. The trick is that in this XML, two text nodes have the same value (a in my exemple). I can't see why this would be any problem. However, when you fully expand the Tree, you'll notice that you just can't rollOver and select one the nodes. You may rollOver and select a first node, but when trying to roll over the other one, the Tree highlights the other node, and you cannot select it at all! It looks like for the Tree, there was only one XML instance for this text node, and that both itemRenders rendered this same object. I understand this might have to do with the fact that XML objects are compared by value, not by reference (unlike as2 XMLNodes if I remember correctly): var n1:XML=new XML(item/); var n2:XML=new XML(item/); trace(n1==n2);// output:true Note that this is just one of the numerous bugs I encountered when dealing with the Tree component and XML. But I chose to post on this one because it's pretty basic. Any help or comment would be much appreciated! Please tell me that I got something wrong and that the Tree component isn't actually broken... :) Here's the MXML (bug found when compiled with Flex Builder 2.0.1, Mac OSX and Win XP. Hotfix2 didn't fix anything): ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.utils.UIDUtil; [Bindable] public var xmlData:XML = rootitem1a/item1item2a/item2/root; // this is just to display something public function labelFunc(item:Object):String { return node; } ]] /mx:Script mx:Tree dataProvider={xmlData} labelFunction=labelFunc x=10 y=10 width=245 height=204/mx:Tree /mx:Application
[flexcoders] crossdomain.xml security implications for Flex/Flash
I'm trying to get my head around the security implications of open (ie. allow all) crossdomain.xml files. Basically I understand that issues arise when there is an open crossdomain.xml file on a domain that uses cookie or password based authentication as the SWF can read/forge the cookie info that is sent in the HTTP header. This allows cross-site forgeries and other unintended consequences. My main concern is with server security though. What are the implications as far as compromising the security of the server aside from forgeries and spoofing? If I understand correctly, a lot of the risk can be mitigated by hosting the crossdomain.xml file on a separate sub-domain from the domain with the user authentication mechanism. Is this as simple as setting up an Apache virtual host for a sub-domain which hosts a simple PHP script that forwards requests to the the domain which contains the data source? What I'd like to do is create a simple Flex application that can be distributed to any (ie. untrusted) source that reads data from my web server through AMF or an XML Socket, most likely using AMFPHP. How have others got around this problem? Can you provide me with a brief explanation of your solution. Cheers, Darren. If you don't understand what I mean by the security implications, these refs might help: http://shiflett.org/blog/2006/sep/the-dangers-of-cross-domain-ajax-with-flash http://renaun.com/blog/2006/12/13/167/ http://www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html
[flexcoders] Re: Problem with RichTextEditor and states
Uhmmm... What a curious feature side effect. It is not the kind of effect yo would expect I ahev to say. Using the Flex Builder somehow drives you to use states and remove add components with them. I tried this hack before and it works but it makes the code uglier :( I dont like this behaviour... Thanks in any case for the help. Javier. --- In flexcoders@yahoogroups.com, Daniel Freiman [EMAIL PROTECTED] wrote: This is a feature. When a UIComponent is added flex executes the styles to make sure it look correct. The specific code is validateNow() in the UITextField. You could fix this using subclassing but this is probably a pain and more trouble than it's worth in your situation. I think you want to create a variable in your app and then set the RTE.htmlText property to it before the RTE is removed, and then when the RTE is added set the RTE.htmlText property to that variable. I'm not an expert on States, but my guess is it looks something like this: mx:states mx:State name=state1 mx:RemoveChild target={button1}/ mx:SetProperty target={richTextEditorExample} name=htmlText value={htmlCache} / /mx:State mx:State name=state2 mx:SetProperty name=htmlCache value={ richTextEditorExample.htmlText} / mx:RemoveChild target={richTextEditorExample}/ mx:RemoveChild target={button2}/ /mx:State /mx:states mx:Script ![CDATA[ public var htmlCache:String = exampleModel.exampleText; ]] /mx:Script Dan Freiman nondocs http://nondocs.blogspot.com On 5/25/07, Javier de la Torre [EMAIL PROTECTED] wrote: You are right, if I set it to fontWeight bold then the formatting starts getting change to bold... Is this a bug or a feature? Is there any way to avoid this behaviour? Thanks. Javier. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Daniel Freiman FreimanCQ@ wrote: My guess is that when you add RTE as a child it is reseting the text based on the styles. As a quick check, set the fontWeight of the RTE equal to bold and see if the formating starts getting changed to bold instead of the default font style. Daniel Freiman nondocs http://nondocs.blogspot.com On 5/24/07, Javier de la Torre jatorre@ wrote: Hi all, I am facing a problem when using the RichTextEditor in an application with several states. I have a richTextEditor bound to a model in a state and when I change to another state and get back all the changes in the formatting inside the richtexteditor are gone, it just suddenly changes the formatting back. It just change back the formatting, the text remains intact. Maybe it is easier just to show a simple code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute currentState=state1 mx:Model id=exampleModel exampleModel ExampleText{richTextEditorExample.htmlText}/ExampleText /exampleModel /mx:Model mx:states mx:State name=state1 mx:RemoveChild target={button1}/ /mx:State mx:State name=state2 mx:RemoveChild target={richTextEditorExample}/ mx:RemoveChild target={button2}/ /mx:State /mx:states mx:RichTextEditor id=richTextEditorExample htmlText={ exampleModel.ExampleText} x=10 y=38 /mx:RichTextEditor mx:Button x=10 y=10 label=Go to State 2 click={currentState= 'state2'} id=button2/ mx:Button x=120 y=10 label=Go to State 1 click={currentState= 'state1'} id=button1/ /mx:Application When you enter the app go and add some text on the RichTextEditor, make a word bold, go to state 2 and the get back to state 1. The text in the editor is fine but the bold is gone. I have place this little code on a server for you to try: http://www.imastedev.com/RichTextEditorExample/testRichTextEditor.html Any idea of what could be going wrong? Thanks in advance. Javier.
[flexcoders] Re: Am I using the right technology?
I am curious to know what then talks XML with null byte terminators means and how it is relevant here. --- In flexcoders@yahoogroups.com, Daniel Grace [EMAIL PROTECTED] wrote: FDS and polling are not your only options. Write a back-end server that answers socket connections above 1024, responds to the permissions query (or alternately, write your flash to first request a crossdomain.xml file, so that it never asks the socket for permissions) and then talks XML with null byte terminators. Then XMLSocket gives you your push-supporting interface. We've had the backend server since before we started using Flex, and we needed it to support a variety of languages (C#, C, C++, PHP, and AS3 so far all talk to it). It works quite well. Daniel On 5/21/07, Mark Ingram [EMAIL PROTECTED] wrote: I should also state that the reason I want to use ASP.NET Web Services or .NET Components is because I want to access a database (the result of all collaborative work will be stored there). Thanks, Mark -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Mark Ingram *Sent:* 21 May 2007 16:24 *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] Re: Am I using the right technology? Hi Barrie, thanks for the response. In terms of collaboration, anything will do. I tried a great example using Flash Media Server 2, which was a chat client. Each client was informed when a new client joined or typed a message. That's exactly what I was looking for, as we created one the other week that was based around polling. It worked, but it wasn't elegant. The price tag on FMS seems steep too (not compared to FDS!). $4000 for 150 concurrent users? Or more users if you throttle their bandwidth. The ideal solution for me would allow data-push and be able to communicate with ASP.NET. I have looked at WebOrb, but again, $10,000 per CPU is a little high. So here are the options as I see it: Flex Data Services (LiveCycle Data Services): $20,000 per CPU Midnight Coders Data Services: $10,000 per CPU Flash Media Server: $4,000 per 150 users (unthrottled) Polling WebServices: Free (plenty of development required though) Another down side of FMS is that you can't develop in Flex Builder? And from what I've seen it doesn't use ActionScript 3? I feel awfully confused about all these similar products! Based on my requirements, what would be the best option (see above)? Thanks, -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *barry.beattie *Sent:* 21 May 2007 15:22 *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Am I using the right technology? Hang on a sec... in giving Mark an answer, he's been landed with more jargon. Mark, I'm nowhere near the expert that Tom or others here are on this subject ... ... and there are some good blog posts around (and the Adobe site itself) with decent detail on all of it ... but... I work at a university and they're forever going on about collaboration, whether it's research partners, academics or student teams. I'm hunting for a project to put this into practice... (in a nutshell) both remoting and webservices follow the typical request/response. so any sync'ing of data needs polling so the clients can find out if server has new changes. but FlexDataServices (or LiveCycle DS now-a-days) has a handle back to each client from the server so it can push events/notifications telling the clients that the server's data has changed. this gives a pretty powerful hub-type configuration where one client commits updates on the server which can be sent back to all the other clients in a heartbeat. however, this is NOT peer-to-peer collaboration. the server is definitely in the middle of it all, receiving and broadcasting to subscribers. Which is OK if the data/documents/whatever is to be persisted and managed on the server. Keep in mind, that sort of technology isn't cheap - not compared to webservices... I'm no expert on all of this and I've got my own issues trying to work out how flex can do true peer-to-peer collaboration (no FDS). I'm also unsure what the upgrade path will be with our FlashMediaServers (FMS) while I wait for ColdFusion8 (and it's reported LCDS and FMS integration). but I do hope that's helped somewhat. Others can chime in with much better replies. this is just something quick to help lift the fog. what sort of collaboration do you need to do?
[flexcoders] Re: Treat a string as a reference to an object?
Thanks Gordon, Following your example, can you create the name of the root object dynamically and have it be treated as a valid property reference at runtime? example: If i wanted obj1.foo, obj2.foo, or objsome_string.foo thanks, Ted --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: I was wondering if Flex/Actionscript allows you to create references to object properties on the fly with a dynamically created string. Yes. If obj is an object and s is the String foo, then obj[s] is obj.foo. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of tedgies Sent: Friday, May 25, 2007 10:43 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Treat a string as a reference to an object? Hi, I was wondering if Flex/Actionscript allows you to create references to object properties on the fly with a dynamically created string. For example i would like to add a new series to a chart series at runtime and dynamically create the reference to dataprovider (an httpservice) with a string. var numJournals:String = new String; numJournals = 3; var series = chartC.series; var dataXMLStr:String = new String; var newSeries:LineSeries = new LineSeries; dataXMLStr = series + numJournals + .lastResult.item; newSeries.dataProvider = dataXMLStr series.push(newSeries) chartC.series = series; The problem is that on the 7th line above newSeries does not recognize dataXMLStr as a reference to my httpservice dataprovider. So is there a function i can use to make dataXMLStr appear as a reference to my dataprovider, e.g. so flex will read: newSeries.dataProvider = series3.lastResult.item thanks, Ted
[flexcoders] adding an arraycollection VO as a property in another VO
I'm trying to add an arrayCollection of VOs to another VO as a property in the following way: [ArrayElementType(com.ics.vo.ChoiceVO)] public var CHOICES:ArrayCollection; But when I run my flex project, I get the following error: ReferenceError: Error #1056: Cannot create property CHOICES on com.ics.vo.DecisionVO Does anyone have any suggestions on how to resolve this problem? Thanks, Adrian
Re: [flexcoders] Re: compiling java classes for flex data services
Thanks for replying, but for compiling java class why would i need swc? though I have one in my class library path. Regards PS ε On 5/28/07, simonjpalmer [EMAIL PROTECTED] wrote: I think you are probably missing fds.swc from your library path. If you are using the Eclipse IDE, search for it on your computer and then add it to the Flex Build Path / Library Path in your Flex project. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, learner [EMAIL PROTECTED] wrote: I have trying the sample examples for the flex data service and following the CRM samples . I could write good value object class in both AS and JAVA , and also the class to communicate with database(my-sql in my case). but while looking at the EmployeeAssembler.java in the sample and tried to modify to suit my needs I am getting following error samples\crm\EmployeeAssembler.java:21package flex.data does not exist import flex.data.ChangeObject; samples\crm\EmployeeAssembler.java:22package flex.data does not exist import flex.data.DataSyncException; samples\crm\EmployeeAssembler.java:23package flex.data does not exist import flex.data.DataServiceTransaction; samples\crm\EmployeeAssembler.java:23 package flex.data does not exist import flex.data.assemblers.AbstractAssembler; Can any body put light on this? Regards http://www.google.com/reader/shared/01613629439254822020 PS å
[flexcoders] How to access last node atributes with e4x?
This is my xml: list month month=3 year=2007 day date=01 impressions=407/ etc... /month month month=4 year=2007 etc... day date=30 impressions=657/ /month /list More months will be added with time so I need to set a variable always with the values of the lastest month: endDate = new Date(2007,5,30) Accessing the beginning of the month is easy enough: startDate = new Date([EMAIL PROTECTED],[EMAIL PROTECTED],[EMAIL PROTECTED]); But how to get to the last node attributes if the last mode is constantly changing? Thanks for any help, Moca
[flexcoders] Flex and Flex Data Services Hosting .... Silverlight is coming ...
OK. Adobe... If you will not allow others to host Flex Data Services, for a fee, then do it yourself. Silverlight is coming. Yes, .Net overhead. Yes. XP, OSX, and Vista only ... leaving out millions on 98 (of course), ME(ppaaaeee), Win2k, Linux, etc. but really is that an excuse not to foster a healthy hosted Flex Data Services Ecosystem. I need to create a powerful, scalable RIA that can serve thousands of users ... probably only a few hundred simultaneously. And I don't have a lot of money ... And I don't have a staff or a computer rooom ... I need a host and I want to use FDS ??? Please. 5/27/2007 Joet
[flexcoders] Showing item roll over color in a data grid manually
Guys, We are having a data grid and a pie chart which show the same data. What we want is when user does a mouse over (or item roll over) over a wedge in pie chart, then the corresponding row in data grid should also show a itemRollOver color and vice versa. Any suggestions will be appreciated. Regards, Sandeep
[flexcoders] Tree and XML data containing two similar text nodes
Hi there, There must be something terribly wrong with the Tree component. Here is a very basic Flex app sample in which I try to have a Tree component render some very basic XML data. The thing is that in this XML, two text nodes have the same value (a in my exemple). I can't see why this would be any problem. However, when you fully expand the Tree, you'll notice that you just can't rollOver and select one of the nodes. You may rollOver and select a first node, but when trying to roll over the other one, the Tree highlights the other node, and you cannot select it at all! It looks like for the Tree, there was only one XML instance for this text node, and that both itemRenders rendered this same object. I understand this might have to do with the fact that XML objects are compared by value, not by reference (unlike as2 XMLNodes if I remember correctly): var n1:XML=new XML(item/); var n2:XML=new XML(item/); trace(n1==n2);// output:true Note that this is just one of the numerous bugs I encountered when dealing with the Tree component and XML. But I chose to post on this one because it's pretty basic. Any help or comment would be much appreciated! Please tell me that I got something wrong and that the Tree component isn't actually broken... :) Here's the MXML (bug found when compiled with Flex Builder 2.0.1, Mac OSX and Win XP. Hotfix2 didn't fix anything): ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.utils.UIDUtil; [Bindable] public var xmlData:XML = rootitem1a/item1item2a/item2/root; // this is just to display something public function labelFunc(item:Object):String { return node; } ]] /mx:Script mx:Tree dataProvider={xmlData} labelFunction=labelFunc x=10 y=10 width=245 height=204/mx:Tree /mx:Application
[flexcoders] Object to XML
Hi folks... Anyone knows if is possible to do something like the XStream on flex? That means convert an object directly into a XML, without manual work. Class: package test { public class TestObject { public var a: String = a paramater; public var b: String = b parameter; } } When I convert to XML result me something like: test.TestObject aa paramater/a bb parameter/b /test.TestObject The problem is this XStream lib is for Java, not for flex. Any light? VELO
[flexcoders] Re: Dispatch event in itemClickHandler
I doubt that this is the best solution. However, it seems to work. private function itemClickHandler(e:MenuEvent) : void { var event : PageEvent = new PageEvent(PageVO.GET, [EMAIL PROTECTED]) this.callLater(eve, [event]) } private function eve(event: PageEvent): void { event.dispatch() }
[flexcoders] My problems with Events
Hi, I'm doing a little application example while learning different topics. I'm in the Events topic now ,which I'm still struggling to understand (Capture, bubble phases). The application is very simple having a display list as follows. MainSprite ChildSprite TextField The Child Sprite has a certain dimension width, height. It contains the Text Field, width also dimension set smaller than Child Sprite. I've added an EventListener to the Child Sprite, the Event type is CLICK. The event handler will change the backgroung of the Child Sprite. The problem is that the event is triggered only if the mouse pointer enters the TextFiled area, which is a non expected behaviour. The Event should be dispatched as soon as the mouse pointer enters the Child Sprite area. Can please someone explain brievely if this is the correct behaviour and what should I do to trigger the handler event as soon as the mouse pointer enters the Child Sprite are, not until it goes the the text field area. Thanks
[flexcoders] null reference...? why? ( FDS - Spring - Hibernate)
Hi people... im new in the flex world. im trying to create some components (images) that get their data from two sources, httpservice (xml file) and dataservice (spring bean). when the results from the dataservice arrive i want to provide the repeater with the data from the xml so when it is creating the images it can get the additional info from the data service needed by the giveColor function. The only problem is, when the results from the dataservice arrive i can't set the dataprovider for the repeater, i get a null reference! why is that??? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init() mx:Script ![CDATA[ [Bindable] public var filename:Object; private var xmlpmrs:ArrayCollection; private var dspmrs:ArrayCollection; private function init():void { dspmrs = new ArrayCollection(); xmldata.send(); ds.fill(dspmrs); } private function arrivedDs(evt:Event):void { // rep is NULL rep.dataProvider = xmlpmrs; } ... giveColor function that uses dspmrs ... ]] /mx:Script mx:HTTPService id=xmldata url=assets/{filename} fault=faultHandler(event) result=xmlpmrs = xmldata.lastResult.linhas.linha as ArrayCollection/ mx:DataService id=ds destination=pmrecord fault=faultHandler(event) result=arrivedDs(event)/ mx:Repeater id=rep mx:Image source=assets/{rep.currentItem.imgfile} toolTip=Linha: {rep.currentItem.id} x={rep.currentItem.x} y={rep.currentItem.y} creationCompleteEffect={giveColor(rep.currentItem.id)}/ /mx:Repeater /mx:Canvas
Re: [flexcoders] Flex and Flex Data Services Hosting .... Silverlight is coming ...
I haven't read the FDS license agreement. That said, you can get a dedicated box for relatively cheap and many such plans allow you to install whatever you want on the box. In such a case, I would expect you to be able to install FDS w/o any problems. If you only need a single Flex app on the server, you can use the free version of it. This approach is not the same as a $3 a month shared PHP / MySQL hosting, but I suspect that FDS is not geared towards that market. Joseph S. Terry, Jr. wrote: OK. Adobe... If you will not allow others to host Flex Data Services, for a fee, then do it yourself. Silverlight is coming. Yes, .Net overhead. Yes. XP, OSX, and Vista only ... leaving out millions on 98 (of course), ME(ppaaaeee), Win2k, Linux, etc. but really is that an excuse not to foster a healthy hosted Flex Data Services Ecosystem. I need to create a powerful, scalable RIA that can serve thousands of users ... probably only a few hundred simultaneously. And I don't have a lot of money ... And I don't have a staff or a computer rooom ... I need a host and I want to use FDS ??? Please. 5/27/2007 Joet -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] Re: How to access last node atributes with e4x?
I found a very ugly way of doing this but there is probably a better way... var temp = xml.month[(xml.month.length()-1)].day.length()-1; endDate = new Date(xml.month[(xml.month.length()-1)[EMAIL PROTECTED], xml.month[(xml.month.length()-1)[EMAIL PROTECTED] - 1, xml.month[(xml.month.length()-1)[EMAIL PROTECTED]);
[flexcoders] Please help!! Reduce alpha value of a color in a bitmap image?
Hi all, I am facing a lot of problem with bitmap image. Can anyone tell me a filter with which i can reduce the alpha value of a particular color. e.g. suppse i have a flag of Japan in which there is a white rectangle with a red circle in between and I want to reduce the alpha value of only white color not the red one. how can I do that? Shape Yahoo! in your own image. Join our Network Research Panel today! http://surveylink.yahoo.com/gmrs/yahoo_panel_invite.asp?a=7
[flexcoders] still missing flashlog.txt on OS-X
another article on how to get the trace output in firefox (or console.app): http://www.visible-form.com/blog/view-trace-statements-in-the-terminal-on-os-x/ BUT... I don't get it. I'm *sure* I installed the debug player when I installed Flexbuilder a couple of months ago and sure enough, when I write crap Flex code, the flash player tells me (more or less) what I did wrong on runtime errors. AND I've just re-installed it again, based on the articles. but I'll be blowed if I can find flashlog.txt anywhere. The /Library path is correct up to (just before) /Logs and then it's all wrong. but /Users/username/Library/Preferences/Macromedia/Flash\ Player/ must be correct `cos that's where my LocalSO's are. where's my flashlog.txt? it's not where it should be but I can't work out why not... frustrating.
[flexcoders] Re: Flex and Flex Data Services Hosting .... Silverlight is coming ...
If you only need a single Flex app on the server, you can use the free version of it. the criteria: probably only a few hundred simultaneously. so the free version will do that? honestly?
[flexcoders] Re: null reference...? why? ( FDS - Spring - Hibernate)
--- In flexcoders@yahoogroups.com, peuga [EMAIL PROTECTED] wrote: Hi people... im new in the flex world. im trying to create some components (images) that get their data from two sources, httpservice (xml file) and dataservice (spring bean). when the results from the dataservice arrive i want to provide the repeater with the data from the xml so when it is creating the images it can get the additional info from the data service needed by the giveColor function. The only problem is, when the results from the dataservice arrive i can't set the dataprovider for the repeater, i get a null reference! why is that??? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; creationComplete=init() mx:Script ![CDATA[ [Bindable] public var filename:Object; private var xmlpmrs:ArrayCollection; private var dspmrs:ArrayCollection; private function init():void { dspmrs = new ArrayCollection(); xmldata.send(); ds.fill(dspmrs); } private function arrivedDs(evt:Event):void { // rep is NULL rep.dataProvider = xmlpmrs; } ... giveColor function that uses dspmrs ... ]] /mx:Script mx:HTTPService id=xmldata url=assets/{filename} fault=faultHandler(event) result=xmlpmrs = xmldata.lastResult.linhas.linha as ArrayCollection/ mx:DataService id=ds destination=pmrecord fault=faultHandler(event) result=arrivedDs(event)/ mx:Repeater id=rep mx:Image source=assets/{rep.currentItem.imgfile} toolTip=Linha: {rep.currentItem.id} x={rep.currentItem.x} y={rep.currentItem.y} creationCompleteEffect={giveColor(rep.currentItem.id)}/ /mx:Repeater /mx:Canvas I think i found the answer... This code forms a component used in an accordion has as it child, there are two of these in the accordion. whats happening is when the accordion is created the child hidden gives me this error, while visible one works fine ... i think that until this second child is visible, the repeater (rep) never gets a valid instance and the 'arrivedDS' function can't do its thing. any ideia about how to solve this??? some help would be excellent thanks a lot cheers
[flexcoders] Struggle with TileList refresh
I have a tileList that does not update its itemRenderer when the dataProvider is changed. In one scenario I have a drag and drop to the TileList that always updates the dataProvider (XMLList) but will not reflect the change in the display. I can force a refresh by iterating over the XMLList like so after a drag/drop event **workaround*** var n = screensList.length() for(var i:int=0; i n; i++){ IList(navScreens.dataProvider)[i].displaySeq = i } Okay that works, the TileList gets refreshed, although I would expect there is something I am missing that would do this automatically. Scenario 2 I created a new state that presents a small editing window to change the data for items in the same TileList - this works fine for changing the data directly in the dataProvider(XMLList). When the state is returned to baseState the TileList once again does not refresh - If I click on the item just edited and reopen the editor all the changes appear in the editor window !. Trying the workaround used in Scenario 1 does not refresh the list. Is there not a fool-proof method to force TileList to always reflect a change in its dataProvider ?
Re: [flexcoders] Re: y nobody replies to my mails :(
It looks to me like people are responding to your questions. Maybe they're not going through. Otherwise, a few bits of advice (some of which you're already doing). 1. Make sure emails only have one question or all questions in the email are related to each other. This just makes it easier for someone to organize their response. (If the questions are really simple then this one probably doesn't matter as much.) 2. Posting code examples is good. Posting long code examples are bad. No one's going to read through hundreds of lines of code for you. Try and cut down example code to a simple case. 3. Make it obvious through the subject and/or the first few lines what part of the framework the problem deals with. People on this list have specialties and you want to make sure that the people who know how to help actually read the email. Dan Freiman nondocs http://nondocs.blogspot.com On 5/28/07, flashcrow2000 [EMAIL PROTECTED] wrote: maybe give us the URL to your question, or ask againor reply yourself to your question so it will show up in the latest questions ;) Cosmin --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, kanu kukreja [EMAIL PROTECTED] wrote: Hello, I don't know why nobody replies to my mails. Am i asking such a difficult questions that nobody can answer :( pls reply to my mails also. i'm also a part of this group. Best Regards Kanu Kukreja - Pinpoint customers who are looking for what you sell.
RE: [flexcoders] Help with my first Flex App...
You need to post the classes you've included as I'm almost positive you're missing a reference. !k _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bmelendy Sent: Friday, May 25, 2007 4:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Help with my first Flex App... This has got to be a simple one. I am writing the tiny app given in a video tutorial by Sho Kuwamoto. The tutorial is on displaying flickr pictures in a basic tilelist control and is located here: http://labs. http://labs.adobe.com/technologies/flexbuilder2/tutorials/sho_kuwamoto adobe.com/technologies/flexbuilder2/tutorials/sho_kuwamoto / I have identified these KEY points: 1. An HTTPService call, of which mine looks like this: mx:HTTPService id=service url=http://api.flickr. http://api.flickr.com/services/rest/? com/services/rest/? method=flickr.photos.searchamp;api_key=f09abdbe2fada94609244a5de3f4b8 deamp;per_page=9amp;tags={input.text}/ 2. I call the web request with a button click like so: mx:Button x=262 y=18 label=Find id=button1 click=currentState='Results'; service.send()/ 3. Finally, the data provider for the TileList control in the tutorial is: dataProvider={service.result.rsp.photos.photo} However, while watching the video, as he types services. he gets two options, result and resultFormat, however, I am only getting an option for resultFormat? This is leading me to believe that maybe the .result property has been removed??? And that is why my application fails? The end result is that I have this thing setup identical to the tutorial but it just won't do anything on the results display. The only thing that is different is that I went to Flickr and created my own account and search feed at http://www.flickr. http://www.flickr.com/services/api/explore/ com/services/api/explore/. (This is exactly the method used to create a feed in the tutorial) I have uploaded the project bin folder here: http://brad. http://brad.melendy.com/code/flex/flickr/Flickr.html melendy.com/code/flex/flickr/Flickr.html I'd love to see this work and it looks so easy in the video (15 minutes!) but I've spent several hours on this now to no avail. Thanks for any help out there
Re: [flexcoders] Re: Flex and Flex Data Services Hosting .... Silverlight is coming ...
I'm not sure specifically what you are asking. but if you Google I suspect you can find your answer. http://www.adobe.com/products/flex/productinfo/faq/ [quote] You can also use a free, limited-production version of Flex Data Services Express 2. This version is production-use software that can be deployed only on a single, non clustered CPU. The Express license does not allow (1) the installation, use, or access of Adobe Flex Data Services Express software on more than one CPU; (2) the clustering of any CPUs or the use of load-balancing software or hardware; and (3) deployment of any unique application on multiple disconnected single CPUs, including kiosks and other such devices. [/quote] barry.beattie wrote: If you only need a single Flex app on the server, you can use the free version of it. the criteria: probably only a few hundred simultaneously. so the free version will do that? honestly? -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
Re: [flexcoders] My problems with Events
This could be a lot of things. If you could post code, that might be helpful. But before you do that, take a look at my post on MouseEvents http://nondocs.blogspot.com/2007/04/flexfaqmouseevents.html The cause of your problem may be in there. Dan Freiman nondocs http://nondocs.blogspot.com On 5/27/07, jairokan [EMAIL PROTECTED] wrote: Hi, I'm doing a little application example while learning different topics. I'm in the Events topic now ,which I'm still struggling to understand (Capture, bubble phases). The application is very simple having a display list as follows. MainSprite ChildSprite TextField The Child Sprite has a certain dimension width, height. It contains the Text Field, width also dimension set smaller than Child Sprite. I've added an EventListener to the Child Sprite, the Event type is CLICK. The event handler will change the backgroung of the Child Sprite. The problem is that the event is triggered only if the mouse pointer enters the TextFiled area, which is a non expected behaviour. The Event should be dispatched as soon as the mouse pointer enters the Child Sprite area. Can please someone explain brievely if this is the correct behaviour and what should I do to trigger the handler event as soon as the mouse pointer enters the Child Sprite are, not until it goes the the text field area. Thanks
Re: [flexcoders] RangeError: Error #2006: The supplied index is out of bounds.
try this: var numChildren:Number = canvas.numChildren -1; for (var i:int = numChildren; i = 0; i--) { if (canvas.getChildAt(i).visible == true) { canvas.removeChildAt(i); } } You were having 2 problems. First, let's say that you have 7 children and remove 5. By the end of the loop, the child with the highest index will have an index of 1 (0 indexed), yet the loop will be trying to access the child at 6. Since the child indexes only go up to 1 this will throw a range error. If you go from the highest index down, you will always be inside the legal range because you can't remove faster than you decrement the counter. The second problem is this: Let's say you had children A, B, C at indexes 0, 1, 2. You remove child and index 0 and then increment your counter. During the next loop the children will be B, C and the child at index 1 is C. You've missed checking B. If you go from the highest index down, you don't have this problem. I don't think I explained this very well. Every once in a while the verbal part of my brain stops working well with code. Hopefully it was good enough. Dan Freiman nondocs http://nondocs.blogspot.com On 5/25/07, tw1l1ghtsh0ck [EMAIL PROTECTED] wrote: I. var numChildren:Number = canvas.numChildren - 1; for (var i:int = 0; i numChildren; i++) { if (canvas.getChildAt(i).visible == true) { canvas.getChildAt(i).visible = false; } } II. var numChildren:Number = canvas.numChildren - 1; for (var i:int = 0; i numChildren; i++) { if (canvas.getChildAt(i).visible == true) { canvas.removeChildAt(i); } } The first block of codes works fine... However, with the second block it returns this error: 'RangeError: Error #2006: The supplied index is out of bounds.' Can somebody tell me what's wrong? Thanks flexcoders!
[flexcoders] Linux Flash Player 9 buggy ?
Hello folks, I finally made my switch to GNU/Linux. It has been an awesome experience so far (both in terms of fun and learning). I'm using Ubuntu 7.04 (Feisty Fawn). However, I found out that the Linux version of Flash Player 9 appears to be somewhat buggy. It starts with the context menu, though not a bug in itself, its appearance is kind of ugly and out of context. Then, in the official adobe website, the dhtml drop-down menus appear below the flash header. This is more another one of the please, support gnu/linux at once! messages. Please, provide native Linux support for the Adobe family of software - PS, FB, FL and so on. The FUD that Linux users don't pay for software is certainly not a fact. The Linux world has changed and is constantly changing. Many Windows users are making the switch to GNU/Linux for various reasons. It is currently a very good alternative to Windows and I'm sure many flash developers are currently using it. I just feel that Adobe currently only fills some gaps and don't treat the problem from the root. The lack of Linux Flash Player releases for quite some time is an example of it. Marcelo.
Re: [flexcoders] Linux Flash Player 9 buggy ?
I sympathize but I think that the popularity of Mac OS as a Linux replacement has made it even less likely On 5/28/07, Marcelo de Moraes Serpa [EMAIL PROTECTED] wrote: Hello folks, I finally made my switch to GNU/Linux. It has been an awesome experience so far (both in terms of fun and learning). I'm using Ubuntu 7.04 (Feisty Fawn). However, I found out that the Linux version of Flash Player 9 appears to be somewhat buggy. It starts with the context menu, though not a bug in itself, its appearance is kind of ugly and out of context. Then, in the official adobe website, the dhtml drop-down menus appear below the flash header. This is more another one of the please, support gnu/linux at once! messages. Please, provide native Linux support for the Adobe family of software - PS, FB, FL and so on. The FUD that Linux users don't pay for software is certainly not a fact. The Linux world has changed and is constantly changing. Many Windows users are making the switch to GNU/Linux for various reasons. It is currently a very good alternative to Windows and I'm sure many flash developers are currently using it. I just feel that Adobe currently only fills some gaps and don't treat the problem from the root. The lack of Linux Flash Player releases for quite some time is an example of it. Marcelo.
[flexcoders] Creating live streaming video player in flex ,something like youtube
Hello guys, i just got a task at faculty to create flash player in Adobe Flex Builder, something like youtube. The professor told me that all i need is to put code for the controls and connect it to html page. All of this is very new to me as i am beginner, i would appreciate if someone has the complete code in flex or some tutorial step by step so i can finish this task. Thank you in advance
Re: [flexcoders] Best way to convert PNG to for usable in Flex
As of Flash Player 8 you can display PNG files just like JPG files in previous versions. That includes transparent PNGs. On 5/28/07, David Lewis [EMAIL PROTECTED] wrote: Hello, We are working on a project where we need to be able to work with large size PNG files using transparency. What is the best way to convert these transparent PNG files so that they can be properly displayed and worked with in Flash? Thanks David Lewis -- Derek Vadneau
RE: [flexcoders] need property name
Are you looking for the selectedItem property? From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kanu kukreja Sent: Monday, May 28, 2007 6:22 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] need property name there are some properties in a combo box like: cell meeting others i got meeting from the server side through webservices which i need to show at the time of editing evtRelType_cb.(PROPERTY NAME)=evtRelToArr[idx].label can anybody tell me the property name pls Best Regards Kanu Kukreja Finding fabulous fares is fun. Let Yahoo! FareChase search your favorite travel sites http://farechase.yahoo.com/promo-generic-14795097;_ylc=X3oDMTFtNW45amVp BF9TAzk3NDA3NTg5BF9zAzI3MTk0ODEEcG9zAzEEc2VjA21haWx0YWdsaW5lBHNsawNxMS0w Nw-- to find flight and hotel bargains.
[flexcoders] How to easly setup a php proxy that requests and receives data from wsdl service
Hi! I found many ways on internet to setup a php proxy that retrivers data from wsdl service but what about requesting data? My problems is that the API service i'm trying to access isn't that happy about setting up a crossdomain.xml file on the server and i have to find a way around it all. Maybe use Flex Data Services 2 or is it easier with PHP?
[flexcoders] Re: Browser Nightmares ..
Anyone got any thoughts ? Workarounds ? :) .. --- In flexcoders@yahoogroups.com, iilsley [EMAIL PROTECTED] wrote: Hi Tom , For simplicity.. They are not need to show the problem.. :) The problem seems to come from the DOCTYPE which I have to use .. I've noticed that the .html files generated by flex do not have a DOCTYPE declared .. --- In flexcoders@yahoogroups.com, Tom Chiverton tom.chiverton@ wrote: On Thursday 05 Apr 2007, iilsley wrote: Trying to embed a SWF into an html file .. You don't seem to be using either SWFObject or Adobe's recommended 'detection kit'. Any reason ? -- Tom Chiverton Helping to vitalistically industrialize performance-oriented e-tailers on: http://thefalken.livejournal.com 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 St James's Court Brown Street Manchester M2 2JF. 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 Law Society. 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 8008. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] Creating live streaming video player in flex ,something like youtube
Hi u4zoran2002, Regarding live streaming video in flex you might want to look at an article that Renaun authored last November. It is entitled Video Conference with Flex FMS. Renaun blogged about the article including a link to the article http://mxdj.sys-con.com/read/295379.htm here: http://renaun.com/blog/2006/11/08/147/ Renaun also provides links for a Live Demo and full downloadable Source Code here: http://renaun.com/blog/2006/10/28/139/ Regarding something like youtube ... there is no live video on youtube. YouTube is prerecorded video only. There are links for sample applications that duplicate YouTube's functionality for hosting prerecorded video. Please post back if you need code to create a YouTube knockoff. hth, g On 5/28/07, u4zoran2002 [EMAIL PROTECTED] wrote: Hello guys, i just got a task at faculty to create flash player in Adobe Flex Builder, something like youtube. The professor told me that all i need is to put code for the controls and connect it to html page. All of this is very new to me as i am beginner, i would appreciate if someone has the complete code in flex or some tutorial step by step so i can finish this task. Thank you in advance
Re: [flexcoders] Best way to convert PNG to for usable in Flex
How large are we talking in terms of the size of the PNG files? On 5/28/07, David Lewis [EMAIL PROTECTED] wrote: Hello, We are working on a project where we need to be able to work with large size PNG files using transparency. What is the best way to convert these transparent PNG files so that they can be properly displayed and worked with in Flash? Thanks David Lewis
RE: [flexcoders] Help with my first Flex App...
When referenceing in AS, use result, when binding, use lastResult: dataProvider={service.lastResult.rsp.photos.photo} But I strongly advise using a result handler instead of directly binding. It is much easier to debug with a handler. I also advise using resultFormat=e4x Default is mx:Object. Tracy Sample code using HTTPService, e4x, handler function to populate a list item The DataGrid tag: mx:DataGrid id=dg dataProvider={_xlcMyListData} .../ The HTTPService tag: mx:HTTPService id=service resultFormat=e4x result=onResult(event) fault=/ Script block declaration: import mx.rpc.Events.ResultEvent; [Bindable]private var _xlcMyListData:XMLListCollection; Invoke send: var oRequest:Object = new Object(); oRequest.Arg1 = value1; var token:AsyncToken = service.send(oRequest); token.myProperty1 = myString or whatever; Result Handler function: private function onResult(oEvent:ResultEvent):void { var xmlResult:XML = XML(event.result);//converts result Object to XML. can also use as operator var xlMyListData:XMLList = xmlResult.myListData; //depends on xml format, is row data _xlcMyListData = new XMLListCollection(xlMyListData); //wrap the XMLList in a collection trace(_xlcMyListData.toXMLString()); //so you can see exactly how to specify dataField or build labelFunction }//onResult From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of bmelendy Sent: Friday, May 25, 2007 6:16 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Help with my first Flex App... This has got to be a simple one. I am writing the tiny app given in a video tutorial by Sho Kuwamoto. The tutorial is on displaying flickr pictures in a basic tilelist control and is located here: http://labs.adobe.com/technologies/flexbuilder2/tutorials/sho_kuwamoto http://labs.adobe.com/technologies/flexbuilder2/tutorials/sho_kuwamoto / I have identified these KEY points: 1. An HTTPService call, of which mine looks like this: mx:HTTPService id=service url=http://api.flickr.com/services/rest/? http://api.flickr.com/services/rest/? method=flickr.photos.searchamp;api_key=f09abdbe2fada94609244a5de3f4b8 deamp;per_page=9amp;tags={input.text}/ 2. I call the web request with a button click like so: mx:Button x=262 y=18 label=Find id=button1 click=currentState='Results'; service.send()/ 3. Finally, the data provider for the TileList control in the tutorial is: dataProvider={service.result.rsp.photos.photo} However, while watching the video, as he types services. he gets two options, result and resultFormat, however, I am only getting an option for resultFormat? This is leading me to believe that maybe the .result property has been removed??? And that is why my application fails? The end result is that I have this thing setup identical to the tutorial but it just won't do anything on the results display. The only thing that is different is that I went to Flickr and created my own account and search feed at http://www.flickr.com/services/api/explore/. http://www.flickr.com/services/api/explore/ (This is exactly the method used to create a feed in the tutorial) I have uploaded the project bin folder here: http://brad.melendy.com/code/flex/flickr/Flickr.html http://brad.melendy.com/code/flex/flickr/Flickr.html I'd love to see this work and it looks so easy in the video (15 minutes!) but I've spent several hours on this now to no avail. Thanks for any help out there
RE: [flexcoders] Struggle with TileList refresh
For dynamically changing data, avoid XMLList since, like Array, its methods do not dispatch the events necessary to update the ui. Instead, use XML, or XMLListCollection. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pdflibpilot Sent: Monday, May 28, 2007 10:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Struggle with TileList refresh I have a tileList that does not update its itemRenderer when the dataProvider is changed. In one scenario I have a drag and drop to the TileList that always updates the dataProvider (XMLList) but will not reflect the change in the display. I can force a refresh by iterating over the XMLList like so after a drag/drop event **workaround*** var n = screensList.length() for(var i:int=0; i n; i++){ IList(navScreens.dataProvider)[i].displaySeq = i } Okay that works, the TileList gets refreshed, although I would expect there is something I am missing that would do this automatically. Scenario 2 I created a new state that presents a small editing window to change the data for items in the same TileList - this works fine for changing the data directly in the dataProvider(XMLList). When the state is returned to baseState the TileList once again does not refresh - If I click on the item just edited and reopen the editor all the changes appear in the editor window !. Trying the workaround used in Scenario 1 does not refresh the list. Is there not a fool-proof method to force TileList to always reflect a change in its dataProvider ?
Re: [flexcoders] Object to XML
Use the introspection API to loop over the variables in an instance of your TestObject. http://livedocs.adobe.com/flex/201/html/usingas_053_9.html#225061 On 5/27/07, Marvin Froeder [EMAIL PROTECTED] wrote: Hi folks... Anyone knows if is possible to do something like the XStream on flex? That means convert an object directly into a XML, without manual work. Class: package test { public class TestObject { public var a: String = a paramater; public var b: String = b parameter; } } When I convert to XML result me something like: test.TestObject aa paramater/a bb parameter/b /test.TestObject The problem is this XStream lib is for Java, not for flex. Any light? VELO
Re: [flexcoders] Charting dataTransform.invertTransform() on DateTimeAxis
Thanks Sunil/Ely. That's what I ended up doing... Brendan On 5/24/07, Ely Greenfield [EMAIL PROTECTED] wrote: Nope. invertTransform converts a position along the axis to a numeric data value. For DTAxis, data values are dates For that matter, DTAxes don't have a dataProvider, so there's no concept of a dataprovider for them to compare against. It's up to you to use the value returned to search through whatever collection/array you're interested in to find a relevant item. Ely. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Brendan Meutzner *Sent:* Thursday, May 24, 2007 12:22 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Charting dataTransform.invertTransform() on DateTimeAxis Hi, When implementing the dataTransform.invertTransform() method on a DateTimeAxis instance, it seems the return value is the date value represented... is there anyway to return the index value of the dataProvider like a CategoryAxis would? Brendan -- Brendan Meutzner Stretch Media - RIA Adobe Flex Development [EMAIL PROTECTED] http://www.stretchmedia.ca -- Brendan Meutzner Stretch Media - RIA Adobe Flex Development [EMAIL PROTECTED] http://www.stretchmedia.ca
[flexcoders] changing focus between textinput fields?
I have an application which is an upgrade for previous DOS users (remember DOS? :) ). As textinput fields have an 'Enter' event, I wondered how I could change focus to the next textfield in the tabindex group when the enter key is pressed please?
[flexcoders] Re: Best way to convert PNG to for usable in Flex
Hi David, Flex supports using png images directly; with no conversion necessary. To reduce the size of the png files, you can save them as flattened png's. This will strip out a lot of the bloat that accompanies layers. Props to my friend and coworker Karl Johnson; for giving me this tip. -TH __ Tim Hoff Technical Lead Cynergy Systems, Inc. http://www.CynergySystems.com http://www.cynergysystems.com/ Email: [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] --- In flexcoders@yahoogroups.com, cisnky [EMAIL PROTECTED] wrote: How large are we talking in terms of the size of the PNG files? On 5/28/07, David Lewis [EMAIL PROTECTED] wrote: Hello, We are working on a project where we need to be able to work with large size PNG files using transparency. What is the best way to convert these transparent PNG files so that they can be properly displayed and worked with in Flash? Thanks David Lewis
[flexcoders] Re: Flex and Flex Data Services Hosting .... Silverlight is coming ...
Yeah, In thinking about it further, I simply need J2ee hosting with JTA support. For instance, Godaddy's version of Tomcat 5.1 or so, is NOT adequate for FDS. Another company, EAPPS ... http://eapps.com/ is perfectly compatible, but their cheapest plan is US$30 that is compatible. Does anyone know of a host that is FDS, that is JTA compatible and cheaper than US$30 per month. Joet --- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote: I haven't read the FDS license agreement. That said, you can get a dedicated box for relatively cheap and many such plans allow you to install whatever you want on the box. In such a case, I would expect you to be able to install FDS w/o any problems. If you only need a single Flex app on the server, you can use the free version of it. This approach is not the same as a $3 a month shared PHP / MySQL hosting, but I suspect that FDS is not geared towards that market. Joseph S. Terry, Jr. wrote: OK. Adobe... If you will not allow others to host Flex Data Services, for a fee, then do it yourself. Silverlight is coming. Yes, .Net overhead. Yes. XP, OSX, and Vista only ... leaving out millions on 98 (of course), ME(ppaaaeee), Win2k, Linux, etc. but really is that an excuse not to foster a healthy hosted Flex Data Services Ecosystem. I need to create a powerful, scalable RIA that can serve thousands of users ... probably only a few hundred simultaneously. And I don't have a lot of money ... And I don't have a staff or a computer rooom ... I need a host and I want to use FDS ??? Please. 5/27/2007 Joet -- Jeffry Houser, Technical Entrepreneur, Software Developer, Author, Recording Engineer AIM: Reboog711 | Phone: 1-203-379-0773 -- My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] show value in combobox
there is a combobox with 3 values: kanu manav varun through webservices i'm getting varun which i need to show in a combobox after clicking a button how to do this? Best Regards Kanu Kukreja - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase.
RE: [flexcoders] show value in combobox
You need to loop over the dataProvider, comparing the appropriate property value to the match value, then set the comboBox selectedIndex when you match. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kanu kukreja Sent: Monday, May 28, 2007 3:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] show value in combobox there is a combobox with 3 values: kanu manav varun through webservices i'm getting varun which i need to show in a combobox after clicking a button how to do this? Best Regards Kanu Kukreja Looking for a deal? Find great prices on flights and hotels http://us.rd.yahoo.com/evt=47094/*http:/farechase.yahoo.com/;_ylc=X3oDM TFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20- with Yahoo! FareChase.
[flexcoders] Re: Bindings, E4X, and bindProperty()
On 5/25/07, Justin Patrin [EMAIL PROTECTED] wrote: I'm just getting to the point in my flex application where I'm trying to implement binding between my model and view. I've set up bidirectional binding in the model and UI by setting a binding in each. The model uses normal object syntax to bind to the value of a UI element and the UI element uses E4X to bind to a node in the XML model. This works great when I'm using curly braces to define the bindings directly in the MXML. I get changes in the UI to propagate instantly to the model and changes in the model to propagate instantly to the UI. Great, I can now both save a load my data. The UI element looks like this: mx:TextInput id=firstName required=true text={model.personal_stuff.question.(@page_id == 'personal_page_1').ApplicantFName}/ The problem comes when I need to define my bindings in a different way. Currently many of my UI elements are defined in generic components which will be used in multiple applications with different models. I need to be able to set the bindings differently for different uses of the component. I though, no problem, I'll use a Binding tag. mx:Binding source=model.personal_stuff.question.(@page_id == 'personal_page_1').ApplicantFName.toString() destination=firstName.text/ This works fine if it's set up in the component that holds this element, but if I put it in an extended component, Flex fails with a runtime error about multiple child sets. Now, I can put this binding tag in the MXML where I'm including this component but I'd rather not so that I can make my code more modular and maintainable. The last option is to do this through ActionScript so I've tried to use BindingUtil to set up the binding. The obvious methods didn't work as E4X doesn't seem to be supported in the string syntax of the binding chain but it does seem to be possible to use the getter methods to get the value as well. The following will vause the correct value to be loaded into the UI element but only initially: public function getTT(personal_stuff : XMLList) : XML { var node : XML = personal_stuff[0].question.(@page_id == 'personal_page_1')[0]; return node; } public function getName(h : XML) : String { var n : XML = h.ApplicantFName[0]; var s : String = n.toString(); return s; } BindingUtils.bindProperty(firstName, text, model, [personal_stuff, {name: question, getter: getTT}, {name: ApplicantFName, getter: getName}]); However, further changes to the model's value don't cause the UI element to be updated. I'd love some help with this as the bindProperty's complex methods (through the chain and with the getter functions) don't have too many examples. For now I'm likely going to go with setting the Binding tags in my main Application where these pages are defined but I would like to know ow to make the AS version work as well, for future reference. *Bump*, anyone else doing binding with E4X or XML structures? -- Justin Patrin
[flexcoders] VideoDisplay volume problem
I am having an issue with a VideoDisplay. It seems to ignore any volume setting I set. I have tried to set it to 0 at many different places and times in my code and every single time I can still hear the audio when the video starts. Has anyone else had this issue? Does anyone have a workaround? Thanks, Paul
Re: [flexcoders] Object to XML
To simple objects this is great... but to more complex object can be a problem... Well, if no alternative shows up... VELO On 5/28/07, Clint Modien [EMAIL PROTECTED] wrote: Use the introspection API to loop over the variables in an instance of your TestObject. http://livedocs.adobe.com/flex/201/html/usingas_053_9.html#225061 On 5/27/07, Marvin Froeder [EMAIL PROTECTED] wrote: Hi folks... Anyone knows if is possible to do something like the XStream on flex? That means convert an object directly into a XML, without manual work. Class: package test { public class TestObject { public var a: String = a paramater; public var b: String = b parameter; } } When I convert to XML result me something like: test.TestObject aa paramater/a bb parameter/b /test.TestObject The problem is this XStream lib is for Java, not for flex. Any light? VELO
[flexcoders] Re: Flex 2 - Using removeChild/addChild to move children with removeEffect/addEf
http://www.mail-archive.com/flexcoders@yahoogroups.com/msg64694.html
RE: [flexcoders] compiling java classes for flex data services
You need to add the flex-messaging.jar to your IDE's classpath. The jar is located in the WEB-INF/lib folder I believe. Dimitrios Gianninas Optimal Payments Inc. -Original Message- From: flexcoders@yahoogroups.com on behalf of learner Sent: Sun 5/27/2007 4:29 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] compiling java classes for flex data services I have trying the sample examples for the flex data service and following the CRM samples . I could write good value object class in both AS and JAVA , and also the class to communicate with database(my-sql in my case). but while looking at the EmployeeAssembler.java in the sample and tried to modify to suit my needs I am getting following error samples\crm\EmployeeAssembler.java:21package flex.data does not exist import flex.data.ChangeObject; samples\crm\EmployeeAssembler.java:22package flex.data does not exist import flex.data.DataSyncException; samples\crm\EmployeeAssembler.java:23package flex.data does not exist import flex.data.DataServiceTransaction; samples\crm\EmployeeAssembler.java:23 package flex.data does not exist import flex.data.assemblers.AbstractAssembler; Can any body put light on this? Regards http://www.google.com/reader/shared/01613629439254822020 PS ? -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur. winmail.dat
[flexcoders] Re: Actionscript SAX Parser ?
Nobody on this high-volume list wants/needs a SAX parser? Thats just crazy. I'm going back to .NET ;)
[flexcoders] Re: crossdomain.xml security issues
Sincere apologies for the triple posting - I sent the first on Saturday. Then when it hadn't appeared on Sunday, I doubted that I had posted correctly so I sent another. Then when neither had appeared on Monday, I began to think that my posts through the web interface weren't working so I tried an email posting. So on Tuesday (Australia time), four days later, all three posts arrived... Cheers, Darren. --- In flexcoders@yahoogroups.com, dazweeja [EMAIL PROTECTED] wrote: I'd like to create a simple Flex application that can be distributed to any (ie. untrusted) source that reads data from my web server using AMFPHP. I understand that this requires a crossdomain.xml file. I'm trying to get my head around the security implications of open (ie. allow all) crossdomain.xml files. Basically I understand that issues arise when there is an open crossdomain.xml file on a domain that uses cookie/session-based authentication as the SWF can read/forge the cookie info that is sent in the HTTP header. This allows cross-site forgeries and other unintended consequences. My main concern is with server security though. What are the implications as far as compromising the security of the server aside from cross-site forgeries? The Adobe article linked below suggests that crossdomain.xml files may allow access to other private severs on a network which is obviously quite serious. If I understand correctly, a lot of the risk can be mitigated by hosting the crossdomain.xml file on a separate sub-domain from the domain with the user authentication mechanism. Is this as straightforward as setting up an Apache virtual host for a sub-domain which hosts a simple PHP script/gateway that forwards/returns requests to the domain which contains the data source? How have others got around this problem? Can you provide me with a brief explanation of your solution. Cheers, Darren. If you don't understand what I mean by the security implications, these refs might help: http://shiflett.org/blog/2006/sep/the-dangers-of-cross-domain-ajax-with-flash http://renaun.com/blog/2006/12/13/167/ http://www.hardened-php.net/library/poking_new_holes_with_flash_crossdomain_policy_files.html http://www.adobe.com/devnet/flashplayer/articles/cross_domain_policy.html
[flexcoders] dragSource in dragOver Handler changes during drag?
In a dragOver handler function I want to access the data being dragged: var ds:DragSource = event.dragSource; var items:Array = ds.dataForFormat(treeItems) as Array; var xmlItemSource:XML = XML(items[0]); trace(xmlItemSource.toXMLString()); The trace displays different nodes depending on what I am dragging over. I expected the dragSource data to always be the data currrently being dragged. Am I misunderstanding dragSource, or do I maybe have some other problem that is messing things up? Tracy
RE: [flexcoders] dragSource in dragOver Handler changes during drag?
Maybe I figured this out. The code example I am using sets the selectedIndex of the tree in the dragOver handler to the node being dragged over. This apparently is corrupting the dragSource. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Monday, May 28, 2007 7:29 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] dragSource in dragOver Handler changes during drag? In a dragOver handler function I want to access the data being dragged: var ds:DragSource = event.dragSource; var items:Array = ds.dataForFormat(treeItems) as Array; var xmlItemSource:XML = XML(items[0]); trace(xmlItemSource.toXMLString()); The trace displays different nodes depending on what I am dragging over. I expected the dragSource data to always be the data currrently being dragged. Am I misunderstanding dragSource, or do I maybe have some other problem that is messing things up? Tracy
Re: [flexcoders] still missing flashlog.txt on OS-X
barry.beattie wrote: another article on how to get the trace output in firefox (or console.app): http://www.visible-form.com/blog/view-trace-statements-in-the-terminal-on-os-x/ BUT... I don't get it. I'm *sure* I installed the debug player when I installed Flexbuilder a couple of months ago and sure enough, when I write crap Flex code, the flash player tells me (more or less) what I did wrong on runtime errors. AND … I've just re-installed it again, based on the articles. but I'll be blowed if I can find flashlog.txt anywhere. The /Library path is correct up to (just before) /Logs and then it's all wrong. but /Users/username/Library/Preferences/Macromedia/Flash\ Player/ must be correct `cos that's where my LocalSO's are. where's my flashlog.txt? it's not where it should be but I can't work out why not... Just create the file yourself and make sure your dirs and file have the correct permissions. cheers, - shaun -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Struggle with TileList refresh
H after rewriting the process to use XML the result is the same. itemRenderer just will not refresh its display while the underlying XML dataProvider is actually modified. I'm about to abandon the TileList in favor of a AS created display array after spending 2 days on what should be a simple implementation. I still believe there's a simple solution - something I am missing. Tracy Spratt wrote: For dynamically changing data, avoid XMLList since, like Array, its methods do not dispatch the events necessary to update the ui. Instead, use XML, or XMLListCollection. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pdflibpilot Sent: Monday, May 28, 2007 10:59 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Struggle with TileList refresh I have a tileList that does not update its itemRenderer when the dataProvider is changed. In one scenario I have a drag and drop to the TileList that always updates the dataProvider (XMLList) but will not reflect the change in the display. I can force a refresh by iterating over the XMLList like so after a drag/drop event **workaround*** var n = screensList.length() for(var i:int=0; i n; i++){ IList(navScreens.dataProvider)[i].displaySeq = i } Okay that works, the TileList gets refreshed, although I would expect there is something I am missing that would do this automatically. Scenario 2 I created a new state that presents a small editing window to change the data for items in the same TileList - this works fine for changing the data directly in the dataProvider(XMLList). When the state is returned to baseState the TileList once again does not refresh - If I click on the item just edited and reopen the editor all the changes appear in the editor window !. Trying the workaround used in Scenario 1 does not refresh the list. Is there not a fool-proof method to force TileList to always reflect a change in its dataProvider ? -- Ben Marchbanks ::: alQemy ::: transforming information into intelligence http://www.alQemy.com ::: magazooms ::: digital magazines http://www.magazooms.com Greenville, SC 864.284.9918
RE: [flexcoders] Struggle with TileList refresh
Is the overrides set data() function in the renderer being called when you expect? And you are using the XML api (appendChild, etc.) Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben Marchbanks Sent: Monday, May 28, 2007 9:21 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Struggle with TileList refresh H after rewriting the process to use XML the result is the same. itemRenderer just will not refresh its display while the underlying XML dataProvider is actually modified. I'm about to abandon the TileList in favor of a AS created display array after spending 2 days on what should be a simple implementation. I still believe there's a simple solution - something I am missing. Tracy Spratt wrote: For dynamically changing data, avoid XMLList since, like Array, its methods do not dispatch the events necessary to update the ui. Instead, use XML, or XMLListCollection. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of pdflibpilot Sent: Monday, May 28, 2007 10:59 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Struggle with TileList refresh I have a tileList that does not update its itemRenderer when the dataProvider is changed. In one scenario I have a drag and drop to the TileList that always updates the dataProvider (XMLList) but will not reflect the change in the display. I can force a refresh by iterating over the XMLList like so after a drag/drop event **workaround*** var n = screensList.length() for(var i:int=0; i n; i++){ IList(navScreens.dataProvider)[i].displaySeq = i } Okay that works, the TileList gets refreshed, although I would expect there is something I am missing that would do this automatically. Scenario 2 I created a new state that presents a small editing window to change the data for items in the same TileList - this works fine for changing the data directly in the dataProvider(XMLList). When the state is returned to baseState the TileList once again does not refresh - If I click on the item just edited and reopen the editor all the changes appear in the editor window !. Trying the workaround used in Scenario 1 does not refresh the list. Is there not a fool-proof method to force TileList to always reflect a change in its dataProvider ? -- Ben Marchbanks ::: alQemy ::: transforming information into intelligence http://www.alQemy.com http://www.alQemy.com ::: magazooms ::: digital magazines http://www.magazooms.com http://www.magazooms.com Greenville, SC 864.284.9918
[flexcoders] How to get the target node in dragEnter()
I need a reference to the tree/xml node that is the current target of a drag/drop operation from within dragEnter. All of the examples I see use calculateDropIndex and set the selectedItem, but I do not want to select the tree item on dragOver. How can I tell what the drop target node is? Tracy
Re: [flexcoders] Struggle with TileList refresh
Yes I think my XML is well formed - not sure how to trace the overrides set data() Interestingly I did find that if I change the TileList display dimensions to be very small then restore to original size this obviously forces the itemRenderer to refresh - there's gotta be a better way to force it without using a resize effect. Tracy Spratt wrote: Is the overrides set data() function in the renderer being called when you expect? And you are using the XML api (appendChild, etc.) Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ben Marchbanks Sent: Monday, May 28, 2007 9:21 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Struggle with TileList refresh H after rewriting the process to use XML the result is the same. itemRenderer just will not refresh its display while the underlying XML dataProvider is actually modified. I'm about to abandon the TileList in favor of a AS created display array after spending 2 days on what should be a simple implementation. I still believe there's a simple solution - something I am missing. Tracy Spratt wrote: For dynamically changing data, avoid XMLList since, like Array, its methods do not dispatch the events necessary to update the ui. Instead, use XML, or XMLListCollection. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of pdflibpilot Sent: Monday, May 28, 2007 10:59 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Struggle with TileList refresh I have a tileList that does not update its itemRenderer when the dataProvider is changed. In one scenario I have a drag and drop to the TileList that always updates the dataProvider (XMLList) but will not reflect the change in the display. I can force a refresh by iterating over the XMLList like so after a drag/drop event **workaround*** var n = screensList.length() for(var i:int=0; i n; i++){ IList(navScreens.dataProvider)[i].displaySeq = i } Okay that works, the TileList gets refreshed, although I would expect there is something I am missing that would do this automatically. Scenario 2 I created a new state that presents a small editing window to change the data for items in the same TileList - this works fine for changing the data directly in the dataProvider(XMLList). When the state is returned to baseState the TileList once again does not refresh - If I click on the item just edited and reopen the editor all the changes appear in the editor window !. Trying the workaround used in Scenario 1 does not refresh the list. Is there not a fool-proof method to force TileList to always reflect a change in its dataProvider ? -- Ben Marchbanks ::: alQemy ::: transforming information into intelligence http://www.alQemy.com ::: magazooms ::: digital magazines http://www.magazooms.com Greenville, SC 864.284.9918
[flexcoders] Re: Actionscript SAX Parser ?
--- In flexcoders@yahoogroups.com, powertool786 [EMAIL PROTECTED] wrote: Nobody on this high-volume list wants/needs a SAX parser? Thats just crazy. I'm going back to .NET ;) Actually, this is something that I have been interested in. I did see someone had one written for AS2, I don't recall the link. The code did not translate well to AS3 and was far from complete. I have yet to find it totally necessary to start working on my own solution. Most of the time pagination and xslt on th server has been enough. I could see this being more valuable for Apollo. I think that you will find most people either don't understand the benefits of SAX, especially since most casual developers rarely access it directly, or the apps the are working on are tightly coupled with a server technology that makes it unnecessary to have in flex.
[flexcoders] Restricting number of lines in a multiline textarea
Hello All, Is there any way to restrict the number of lines entered in a multiline textarea? Something similar to maxRows/maxLines in html. Regards, Paromita
Re: [flexcoders] Re: Actionscript SAX Parser ?
Paul DeCoursey wrote: Nobody on this high-volume list wants/needs a SAX parser? Thats just crazy. I'm going back to .NET ;) Actually, this is something that I have been interested in. I did see someone had one written for AS2, I don't recall the link. The code did not translate well to AS3 and was far from complete. I have yet to find it totally necessary to start working on my own solution. Most of the time pagination and xslt on th server has been enough. I could see this being more valuable for Apollo. You're probably refering to the AS2 SAX implementation by Jim Cheng: http://tinyurl.com/yqo87x I myself have been working on porting Xerces-J to AS3 for a while now, although i plan to use the built in parsers of Flash Player with it (i'm primarily interested in a stable and compliant DOM 3 implementation). This doesn't mean having a compliant SAX parser with it would hurt - to the contrary. If anyone would like to help me on this (greatly apprechiated), please feel free to contact me directly. Thanks, Claus.
[flexcoders] Superimposing chart.
Hi everyone, Is it possible to have two area series, stacked on top of each other, superimposed (overlaid) to a line series? The idea is to have the area chart stacked and the line series appear in front of the stacked area chart. Thanks, Ivan.
RE: [flexcoders] show value in combobox
Tx for the quick reply Tracy But i was expecting some property for this insted of applying this logic. Is there is any property? Tracy Spratt [EMAIL PROTECTED] wrote: You need to loop over the dataProvider, comparing the appropriate property value to the match value, then set the comboBox selectedIndex when you match. Tracy - From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kanu kukreja Sent: Monday, May 28, 2007 3:43 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] show value in combobox there is a combobox with 3 values: kanu manav varun through webservices i'm getting varun which i need to show in a combobox after clicking a button how to do this? Best Regards Kanu Kukreja - Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. Best Regards Kanu Kukreja - Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search.
Re: [flexcoders] compiling java classes for flex data services
Yes ! you are correct! I got that working after some brainstorming. Thanks ! Regards PS ε On 5/29/07, Dimitrios Gianninas [EMAIL PROTECTED] wrote: You need to add the flex-messaging.jar to your IDE's classpath. The jar is located in the WEB-INF/lib folder I believe. Dimitrios Gianninas Optimal Payments Inc. -Original Message- From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com on behalf of learner Sent: Sun 5/27/2007 4:29 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] compiling java classes for flex data services I have trying the sample examples for the flex data service and following the CRM samples . I could write good value object class in both AS and JAVA , and also the class to communicate with database(my-sql in my case). but while looking at the EmployeeAssembler.java in the sample and tried to modify to suit my needs I am getting following error samples\crm\EmployeeAssembler.java:21package flex.data does not exist import flex.data.ChangeObject; samples\crm\EmployeeAssembler.java:22package flex.data does not exist import flex.data.DataSyncException; samples\crm\EmployeeAssembler.java:23package flex.data does not exist import flex.data.DataServiceTransaction; samples\crm\EmployeeAssembler.java:23 package flex.data does not exist import flex.data.assemblers.AbstractAssembler; Can any body put light on this? Regards http://www.google.com/reader/shared/01613629439254822020 PS ? -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
Re: [flexcoders] show value in combobox
Kanu, It is not recommended to use scalar values into your dataProvider, instead use the format {label:varun},{label:manav} instead of using varun, manav ... etc. For solving your issue, use the selectedItem property on the combbox. thanks Harish On 5/29/07, kanu kukreja [EMAIL PROTECTED] wrote: Tx for the quick reply Tracy But i was expecting some property for this insted of applying this logic. Is there is any property? *Tracy Spratt [EMAIL PROTECTED]* wrote: You need to loop over the dataProvider, comparing the appropriate property value to the match value, then set the comboBox selectedIndex when you match. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *kanu kukreja *Sent:* Monday, May 28, 2007 3:43 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] show value in combobox there is a combobox with 3 values: kanu manav varun through webservices i'm getting varun which i need to show in a combobox after clicking a button how to do this? *Best Regards* *Kanu Kukreja* -- Looking for a deal? Find great prices on flights and hotelshttp://us.rd.yahoo.com/evt=47094/*http:/farechase.yahoo.com/;_ylc=X3oDMTFicDJoNDllBF9TAzk3NDA3NTg5BHBvcwMxMwRzZWMDZ3JvdXBzBHNsawNlbWFpbC1uY20-with Yahoo! FareChase. *Best Regards* *Kanu Kukreja* -- Luggage? GPS? Comic books? Check out fitting gifts for gradshttp://us.rd.yahoo.com/evt=48249/*http://search.yahoo.com/search?fr=oni_on_mailp=graduation+giftscs=bzat Yahoo! Search.