[flexcoders] Re: How to optimise SWC to its minimal size?
I need to do little research, I woul like to know if compiller builds app using SWC it will take from there only classes required by the application. --- In flexcoders@yahoogroups.com, Ian Thomas i...@... wrote: You can use the 'externs' command-line option to the Flex compiler to tell Flex to exclude specific classes - as long as you're sure that your code _will_ have access to them at runtime. Documentation here: http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html HTH, Ian On Fri, May 22, 2009 at 4:13 PM, lytvynyuk lytvyn...@... wrote: Any ideas? Hey, Flex gurus I know you are here! :)
[flexcoders] Picasa Flex API - Build your own frontend for Google Picasa backend.
I want to show people what I beed dooing from time to time in moment when I had spare time. I think It can be useful for people who want to make galleries but not to be care about backend anf for anybody who want to intergrate their apps with Google Picasa http://code.google.com/p/picasa-flex-api/ http://code.google.com/p/picasa-flex-api/ There are couple sample applications illustrating how all that works: http://picasafx.com http://picasafx.com and http://riahut.com/files/portfolio/index.html http://riahut.com/files/portfolio/index.html (this is article ho to customize portfolio - http://riahut.com/picasa/picasa-portfolio-freeware-galleryportfolio-anyb\ ody http://riahut.com/picasa/picasa-portfolio-freeware-galleryportfolio-any\ body ) If anybody thinks this is usefull please tell me, if not hm... please tell me as well :)
[flexcoders] Who can explain me this:
?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 mx.collections.ArrayCollection; private var a:Object = {data:String}; private var b:Object = {data:String}; [Bindable] private var testx:Array = [a] private function init():void { b.data = 200; a.data = 100 trace(testx[0].data) // 1st - 100 a.data = 1000 trace(testx[0].data) // 2nd - 1000 a = b; trace(testx[0].data) // 3rd - 1000 } ]] /mx:Script /mx:Application Why third trace(...) outputs 1000 not 200!? :)
[flexcoders] Re: How to optimise SWC to its minimal size?
Any ideas? Hey, Flex gurus I know you are here! :)
[flexcoders] How to optimise SWC to its minimal size?
I've created SWC consisting from a single class but class contains a bunch of methods and when I built SWc i found that it is 87Kb. In same time report.xml stated that my class is only 3kb, everything else is garbage consisting from many Flex frameworks classes used directly or indirectly in my main class. So question how to build my own SWC without all redundant classes? What is the reason to keep all that? As I understand when my SWC will be linked in flex Application Flex builder will add only required classes to the result SWF ?
[flexcoders] E4x. Strange behavior when modifying XML. Help needed.
I have XML instance like that: var xml:XML = data summary type='text'test/summary title type='text'test/title /data I want to edit text in summary and title elements. I do: xml.summary = This is my summary; xml.title = This is new title; but in resulting XML is see something like that: data summary type='text'test/summary title type='text'test/title summaryThis is my summary/summary titleThis is new title/title /data which is a big problem for me! What's wrong here?
[flexcoders] Re: E4x. Strange behavior when modifying XML. Help needed.
Thank you, but it doesn't work!! But!!! I think I forgot to mention one thing, my original XML has defined namespace... and look like that: var xml:XML = data xmlns='http://www.w3.org/2005/Atom' summary type='text'test/summary title type='text'test/title /data I've tried without namespace defined - works. But i need it!! Any ideas?
[flexcoders] Re: crossdomain proxy
You can create simple redirect script that redirects requests from your app to requester resource. Drawback - all traffic goes through your host. --- In flexcoders@yahoogroups.com, Baz thinkl...@... wrote: Hi, Is there a solution out there for proxying public services like amazon's webservices (i.e. SimpleDB) that do not provide a crossdomain.xml? I understand that service providers purposely leave out crossdomain.xml policy files so that developers do not compile their secret keys into their swf's (since they can easily be decompiled and compromised) but is there an easier solution than spinning up an entire server simply to act as a proxy? Perhaps special/cheap proxy hosting, or some other secure solution? Cheers, Baz
[flexcoders] Rotation/Zoom effect applied to the Image looks too aliased! How to fight it?
Is there any library which allow you manipulate images but with better resulting quality then original effects in Flex? If you do 5 rotation to an Image it looks really ugly... same with Zoom and scale.
[flexcoders] How to remove effect applied to image to its original state
Lets say I applied rotation to an image. I kept that Image object reference. Then I want to apply other effect to same image object, but previous effect already altered image. So question is how to restore original state of the image? Reloading not seems to be working, I mean image.load()!!!
[flexcoders] Tracking tab changes in TabNavigator ?!
I need to somehow trace that another tab selected to do some action based on it. Cannot find proper event which can be generated when I click on tabs or switch tabs.
[flexcoders] Re: #2038: File I/O Error
Well, I've picked file by browsing using FileReference's browse() method, and my file is simple *.png --- In flexcoders@yahoogroups.com, Sean Clark Hess [EMAIL PROTECTED] wrote: The other thing is that the file may be corrupted, or doesn't exist... On Wed, Jul 2, 2008 at 1:43 PM, lytvynyuk [EMAIL PROTECTED] wrote: I did. I all cases request can reach server, in my case no. Just an exception, no network activity I'm puzzled. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Sean Clark Hess seanhess@ wrote: You have to do it serverside -- for example, if you're using PHP, you have to change Apache's maximum upload size for that domain. Do a search for error 2038 in these forums though, I thought I saw another couple of threads about it. ~sean
[flexcoders] Re: #2038: File I/O Error
Update: I works under IE7 doesn't work with Rirefox 2.0.0.15! Doesn't work with Opera as well! I suspect this is not browser issue, this is FlashPlayer issue, because Firefox and Opera uses same Flash Player binaries! --- In flexcoders@yahoogroups.com, lytvynyuk [EMAIL PROTECTED] wrote: I getting this error, but when I put breakpoint at my server side code nothing coming through!! When I created little HTML page with file upload filed to same servlet location - IT WORKS! I used Live HTTP headers to see activity on HTTP requests - nothing nothing going through, also I used Wireshark - same effect. So what is going on ? any Ideas? AS code is extremely simple: var request:URLRequest = new URLRequest(); request.url = UPLOAD_URL; fr.upload(request); fileNameLabel.text = fr.name;
[flexcoders] Re: #2038: File I/O Error
Absolutely same code. Looks like there is some issue with flash player version for Firefox/Opera, which doesn't work properly while uploading via HTTPS. Or may be I'm doing something wrong. --- In flexcoders@yahoogroups.com, Sean Clark Hess [EMAIL PROTECTED] wrote: Do you have different versions running in IE and firefox? On Thu, Jul 3, 2008 at 8:56 AM, lytvynyuk [EMAIL PROTECTED] wrote:
[flexcoders] #2038: File I/O Error
I getting this error, but when I put breakpoint at my server side code nothing coming through!! When I created little HTML page with file upload filed to same servlet location - IT WORKS! I used Live HTTP headers to see activity on HTTP requests - nothing nothing going through, also I used Wireshark - same effect. So what is going on ? any Ideas? AS code is extremely simple: var request:URLRequest = new URLRequest(); request.url = UPLOAD_URL; fr.upload(request); fileNameLabel.text = fr.name;
[flexcoders] Re: #2038: File I/O Error
How I can increase upload size? There is no such thing in URLRequest and FileReference... --- In flexcoders@yahoogroups.com, Sean Clark Hess [EMAIL PROTECTED] wrote: We would get that error a lot when the file was too big. Try increasing your upload size. On Wed, Jul 2, 2008 at 1:01 PM, lytvynyuk [EMAIL PROTECTED] wrote: I getting this error, but when I put breakpoint at my server side code nothing coming through!! When I created little HTML page with file upload filed to same servlet location - IT WORKS! I used Live HTTP headers to see activity on HTTP requests - nothing nothing going through, also I used Wireshark - same effect. So what is going on ? any Ideas? AS code is extremely simple: var request:URLRequest = new URLRequest(); request.url = UPLOAD_URL; fr.upload(request); fileNameLabel.text = fr.name;
[flexcoders] Re: #2038: File I/O Error
I did. I all cases request can reach server, in my case no. Just an exception, no network activity I'm puzzled. --- In flexcoders@yahoogroups.com, Sean Clark Hess [EMAIL PROTECTED] wrote: You have to do it serverside -- for example, if you're using PHP, you have to change Apache's maximum upload size for that domain. Do a search for error 2038 in these forums though, I thought I saw another couple of threads about it. ~sean
[flexcoders] Uploading binary file and RemoteObject call
I have situation that in addition to my RemoteObject call, which invokes medthod on my server with object containing some fields, I need to send content of some file as well. I thought I can some how load it to the client the make it like one of the fields of RO. But I don't think I can read local files. What is the possible solution for this scenario? Thank you.
[flexcoders] How to copy or clone Dictionary?
Because var temp:Dictionary = new Dictionary(); // put something in Dictionary var new:Dictionary = ObjectUtil.copy(temp) as Dictionary; doesn't work;
[flexcoders] Re: How to copy or clone Dictionary?
Sorry friend but I think your case will not gonna work ;) what is put methods? Dictionary doesn't have it :) But here is my corrected case, where I do object copy of entries, this case will not gonna work If you entries is Dictionary or Class static public function cloneDictionary(oldDictionary:Dictionary, weakKeys:Boolean = false):Dictionary { var newDictionary:Dictionary = new Dictionary(weakKeys); for(var key:Object in oldDictionary) { newDictionary[key] = ObjectUtil.copy(oldDictionary[key]); } return newDictionary; } http://riahut.com http://riahut.com --- In flexcoders@yahoogroups.com, Scott Melby [EMAIL PROTECTED] wrote: Fixing a couple of typos :) static public funciton cloneDictionary(oldDictionary:Dictionary, weakKeys:Boolean = false):Dictionary { var newDictionary:Dictionary = new Dictionary(weakKeys); for(var key:Object in oldDictionary) { new.put(key, oldDictionary[key]); } return newDictionary; } Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com http://blog.fastlanesw.com
[flexcoders] Re: How to copy or clone Dictionary?
Yes!!! Thank you, actually u helped me a lot! :) --- In flexcoders@yahoogroups.com, Scott Melby [EMAIL PROTECTED] wrote: hey... i was close ;) Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com http://blog.fastlanesw.com lytvynyuk wrote: Sorry friend but I think your case will not gonna work ;) what is put methods? Dictionary doesn't have it :) But here is my corrected case, where I do object copy of entries, this case will not gonna work If you entries is Dictionary or Class static public function cloneDictionary(oldDictionary:Dictionary, weakKeys:Boolean = false):Dictionary { var newDictionary:Dictionary = new Dictionary(weakKeys); for(var key:Object in oldDictionary) { newDictionary[key] = ObjectUtil.copy(oldDictionary[key]); } return newDictionary; } http://riahut.com http://riahut.com --- In flexcoders@yahoogroups.com, Scott Melby smelby@ wrote: Fixing a couple of typos :) static public funciton cloneDictionary(oldDictionary:Dictionary, weakKeys:Boolean = false):Dictionary { var newDictionary:Dictionary = new Dictionary(weakKeys); for(var key:Object in oldDictionary) { new.put(key, oldDictionary[key]); } return newDictionary; } Scott Scott Melby Founder, Fast Lane Software LLC http://www.fastlanesw.com http://blog.fastlanesw.com
[flexcoders] Re: Posted bug in Adobe with description of the problem
Thank you Rick! I appreciate you attention and help. Yes, there are some workarounds I figured, I think it should consider column width always, not only when creating DataGrid component, similar story happening with resizing. --- In flexcoders@yahoogroups.com, Rick Winscot [EMAIL PROTECTED] wrote: Yeah. this is an issue partially related to creation and the fact that column width - well that's another story. Here is a quick fix. add the listener to each of your grids and copy/paste the function. grid.addEventListener( Event.RENDER, handleDataGridRenderEvent ); private function handleDataGridRenderEvent( event:Event ):void { var dg:DataGrid = DataGrid( event.target ); dg.columns[0].width = 100; dg.columns[0].minWidth = 100; dg.columns[1].width = dg.width - 100 - 100; dg.columns[2].width = 100; } There is an initial blink - as the data grid gets its first render event and sets the columns. Hmm. its 4:05 a.m. - and I'm thinking that this probably isn't the best way to do this. Let me get some sleepy and I'll look at this again. Rick Winscot From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lytvynyuk Sent: Tuesday, April 01, 2008 4:22 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Posted bug in Adobe with description of the problem May be I do something wrong, but I will give a change to somebody from Adobe tell me what is going on. http://bugs.adobe.com/jira/browse/SDK-15121
[flexcoders] Re: Announcement: Join us in a Flex-Related Focus Group
Jeff I didn't want to turn this into discussion of your website design, but I think any great idea have nice visual presentation :) I like to participate to anything which gives me as much knowledge as possible, I too new to Flex/RIA sphere to know people who are great here, so cant say anything. and I thing this is great, opinion of somebody who in completely new... I agree with some poster here, that Flex developers so overwhelmed now (at last from my own experience) with work. They go online and here ONLY when they have big need in to it. --- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote: I just wanted to thank Cutter and The Saj for the kind words. ;) For the record, I don't like the design all that much either. Cutter (Flex Related) wrote:
[flexcoders] Posted bug in Adobe with description of the problem
May be I do something wrong, but I will give a change to somebody from Adobe tell me what is going on. http://bugs.adobe.com/jira/browse/SDK-15121
[flexcoders] How to deal with this sort of messages: CSS type selectors....
CSS type selectors are not supported in components: 'Alert' I getting all over the places in my application and modules, I have Alert {} style defined in external main.css files. When Flex compiler build this it always complains (Warnings) but in application actually all styles in place. HM?
[flexcoders] How to manually delete references to objects?
I saw some examples like that: // create a new object, and put a reference to it in a: var a:Object = {foo:bar} // copy the reference to the object into b: var b:Object = a; // delete the reference to the object in a: delete(a); But it definitely wont even compile. Is there any techniques to do so?
[flexcoders] Re: How to manually delete references to objects?
I grabbed that example from the article at adobe website -http://www.adobe.com/devnet/flashplayer/articles/garbage_collection.html --- In flexcoders@yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: You cannot delete declared variables, set them to null instead. a = null; Cheers Ralf. On Mon, Mar 31, 2008 at 5:03 PM, lytvynyuk [EMAIL PROTECTED] wrote: I saw some examples like that: // create a new object, and put a reference to it in a: var a:Object = {foo:bar} // copy the reference to the object into b: var b:Object = a; // delete the reference to the object in a: delete(a); But it definitely wont even compile. Is there any techniques to do so? -- Ralf Bokelberg [EMAIL PROTECTED] Flex Flash Consultant based in Cologne/Germany
[flexcoders] Re: Announcement: Join us in a Flex-Related Focus Group
Hm, sorry, but I don't like design of http://www.dot-com-it.com --- In flexcoders@yahoogroups.com, Jeffry Houser [EMAIL PROTECTED] wrote: Hi Everybody, Some of you may know me, but many probably not. I'm Jeffry Houser, producer of The Flex Show, a flex related podcast. I also run a DotComIt ( http://www.dot-com-it.com ), an Adobe Solutions Partner specializing in Flex Development. DotComIt is working on a line of commercial Flex Components, and we'd like to get some feedback from the developer community. In order to do this, we will be conducting some focus groups over the course of the next few months and want to welcome all Flex developers to participate. * What is a focus group?* A focus group is a group of potential customers who are brought together to get their opinions, perceptions, and ideas that will help to shape the design, strategy, and direction of DotComIt's product development. *Why Participate in a DotComIt Flex Component Focus Group?* 1. Get $50 for your participation (paid via PayPal or iTunes). 2. An opportunity to provide your input, perspective, and opinion(s) about Flex and the use of components within Flex. 3. Hear the opinions and perspectives of other developers like yourself, first hand. 4. Make sure your needs and wants are heard and perhaps help shape DotComIt's component development road map. To be eligible, you'll just have to fill out a short survey at http://www.dot-com-it.com/survey. We want to talk to developer's with all levels of experience, so no matter how much, or how little, you know about Flex we want to hear from you. The survey will close on Friday April 4th, and we will contact selected participants the following week to discuss specific details. ** The focus groups are being conducted by a business development firm on DotComIt's behalf. So, for those that know me, you can participate w/o being fear of conflict of interests or upsetting me. Please feel free to pass this on to anyone who you think may be interested. Now back to your regularly schedule lists posts. -- Jeffry Houser Flex, ColdFusion, AIR AIM: Reboog711 | Phone: 1-203-379-0773 -- Adobe Community Expert http://www.adobe.com/communities/experts/members/JeffryHouser.html My Company: http://www.dot-com-it.com My Podcast: http://www.theflexshow.com My Blog: http://www.jeffryhouser.com
[flexcoders] Re: Dynamically generated DataGrids having troubles with column width
Sorry friend, I didn't quite understand what do you suggesting. Example is extremely simple and it suppose to be simply working, but it is not. I suspect there are some funky things going on with columns when it DG tries to draw them. Question - is it BUG or I'm using it improperly? --- In flexcoders@yahoogroups.com, dougco2000 [EMAIL PROTECTED] wrote: I recall having to play around with this when I did this in the past, just from memory I would suggest you try setting widths after you set grid.columns by doing grid.columns[0].width = 100, etc. I think it also would not work exactly if the total widths did not match the grid, so you could try leaving the last one's width blank so it auto-sets and see if that makes a difference. -doug
[flexcoders] Dynamically generated DataGrids having troubles with column width
When DG created by AS and placed into tab navigator, it completely ignores its width, why? Here is an example: ?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 mx.controls.dataGridClasses.DataGridColumn; import mx.controls.DataGrid; import mx.containers.Canvas; private function init():void { for(var i:int = 0; i 3; i++) { var canvas:Canvas = new Canvas(); var grid:DataGrid = new DataGrid(); grid.selectable = false; canvas.label = Panel2 + i; canvas.percentHeight = 100; canvas.percentWidth = 100; canvas.addChild(grid); grid.percentHeight = 100; grid.percentWidth = 100; grid.variableRowHeight = true; var columns:Array = new Array(new DataGridColumn(), new DataGridColumn(), new DataGridColumn()); var nameColumn:DataGridColumn = DataGridColumn(columns[0]); nameColumn.dataField = name; nameColumn.headerText = Full Name; nameColumn.width = 100; nameColumn.minWidth = 100; var ipColumn:DataGridColumn = DataGridColumn(columns[1]); ipColumn.headerText = Addresses; ipColumn.dataField = addr; ipColumn.editable = false; ipColumn.wordWrap = true; var countColumn:DataGridColumn = DataGridColumn(columns[2]); countColumn.headerText = Data Count; //ipColumn.dataField = devices; countColumn.editable = false; countColumn.width = 100; countColumn.dataField = datac; grid.columns = columns; //grid.dataProvider = context_m.devices; navigator.addChild(canvas); } } ]] /mx:Script mx:TabNavigator right=10 left=10 top=60 bottom=40 id=navigator /mx:TabNavigator /mx:Application I expect tabs to be looking identical, what is going on here? Any other approaches to achieve desirable result?
[flexcoders] Re: Singletone class in Application and Modules !?
Aha, that is the answer for my question! Thank you Manish ;) Thank you all guys for participating, I still have many things to learn, so I will be around for a while :) Is it true if I have singleton class instantiated in main application and in module, instances will be different? [snip] If you don't include the class in the main application, each of the modules will have their own instance of the class. Class Foo in module 1 will be different from class Foo in module 2. This is due to how modules are loaded in child application domains. Read up on application domains in Flash (the ApplicationDomain class). Also: http://mannu.livejournal.com/372662.html Manish
[flexcoders] Singletone class in Application and Modules !?
Is it true if I have singleton class instantiated in main application and in module, instances will be different? public class DataManager { private static const singleton_:DataManager = new DataManager(); public static function get instance():DataManager { return singleton_; } public function DataManager() { if (singleton_ != null) { throw new Error(Cannot instantiate singleton DataManager); } } } in main application: private function init():void { this.dataManager = DataManager.instance; } in module private function init():void { this.dataManager = DataManager.instance; }
[flexcoders] Re: Can a Listener return a value
The following code cannot be even compiled, not work What do u meant there? I thought about something like this too. So, let's say we have the followig code: public function aFunction():XML { public var publicParameter:XML = new XML; addEventListener( Event.SomeEvent, responderEventHandler ); private function responderEventHandler(event:Event):void { event.target.publicParameter = someXml; } return publicParameter; }
[flexcoders] Re: Singletone class in Application and Modules !?
I figured out the case. I, actually, made first instance in another module not in main App. Conclusion is: if you make instance in your main app - everything works fine. If you did it in one of modules, this and all others will get new instances. Very easy to see when put trace(BLAH) in the constructor. PS. do not include your class, which suppose to be singleton in you main application, and then it will fail. test included testSingleton.zip http://riahut.com/files/samples/testSingleton.zip I beg to differ. I had setup my app thinking this to be true. When I did this the module would get it's own, and very different, instance of my singleton. I had to change the way I did things so what I do now is upon loading my module, the main app then sets the singleton into the module. I don't have my example code anymore, but it was quite easy to produce the results. Maybe it has to do with the way I compiled my module I compiled my application with -link-report=c:\app\encoreNG.link.report.xml and my module with -load-externs=c:\app\encoreNG.link.report.xml. Not sure if that has anything to do with it. Also, when I had this coded I was on Flex 3, Beta 3 and have not retested with Flex 3 GA. Dale
[flexcoders] Re: Singletone class in Application and Modules !?
This will not change anything, still will be many times instantiated singleton as in my example. Scope control is just to prevent funny guys doing something like var Vasya = new DataManager(); --- In flexcoders@yahoogroups.com, Rick Winscot [EMAIL PROTECTED] wrote: I just looked at your source. You forgot to control the scope! Your implementation should be: package { public class DataManager { private static var singleton_:DataManager = new DataManager(); public function DataManager( enforcer:SingletonEnforcer ) { } public static function getInstance():DataManager { if ( singleton_ == null ) singleton_ = new DataManager( new SingletonEnforcer ); return singleton_; } } } class SingletonEnforcer{} If you do this... it doesn't/won't matter where you instantiate it. There can be only one - MUWUAHAHAHAA. Rick Winscot
[flexcoders] Re: FIY - WeakMethodClosure - memory leaking example.
Thank you for attention to this problem. I run it for an hour and found memory growth. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Don't have time to run it right now, but I think it doesn't actually leak them in the release player. It will be a pain for running endurance testing, but in general it should be ignorable.
[flexcoders] FIY - WeakMethodClosure - memory leaking example.
Here i s little example which shows constant grows number of instance of WeakMethodClousure... with this rate over night hm ?xml version=1.0? !-- charts/BasicColumn.mxml -- mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var expenses:ArrayCollection = new ArrayCollection([ {Month:High, Profit:2000}, {Month:Low, Profit:1000}, {Month:Med, Profit:1500} ]); private var timer1:Timer = new Timer(1000); private function timerGo() { timer1.addEventListener(TimerEvent.TIMER, generateData); timer1.start(); } private function generateData(event:TimerEvent) { expenses.removeAll(); expenses.addItem({Month:XXX1, Profit:(Math.random()*1)}); expenses.addItem({Month:XXX2, Profit:(Math.random()*1)}); expenses.addItem({Month:XXX3, Profit:(Math.random()*1)}); } ]]/mx:Script mx:Panel title=Column Chart mx:ColumnChart id=myChart dataProvider={expenses} mx:horizontalAxis mx:CategoryAxis dataProvider={expenses} categoryField=Month / /mx:horizontalAxis mx:series mx:ColumnSeries xField=Month yField=Profit displayName=Profit fills=[0xFF,0x00FF00,0xFF] / /mx:series /mx:ColumnChart mx:Legend dataProvider={myChart}/ /mx:Panel mx:Button label=Start Timer click=timerGo();/ /mx:Application --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: If you try to remove a chart and the profiler shows it is still there, it is leaking. If you reset its dataprovider several times and the number of renderers and other objects it creates keeps increasing, there's a leak there. You just have to keep digging through with the profiler to find the root cause. Sometimes, building simple test cases help too.
[flexcoders] WeakMethodClosure - what is this ?
O, thank you! What about array.length = 0;? Returning to WeakMethodClosure - in 1 hour of running application profiller has 5600 instances of this thing, take 90kb of memory. Examinig backreference shhows that many of them is adding events listener inside components like charts. Are this valid things or just something internal what I shoul ignore? Use array.splice to remove items from an array
[flexcoders] Possible problems with construction like - {name:Name, value:23}.... ??
One more things - Is it possible to have any potential problem with constructiuon like: arayColl.addItem({name:Name, value:23}); ? in favor of following piece of code: var myObj = new MyObj(); myObj.name = Name; myObj.value = 23; arayColl.addItem(myObj); ?
[flexcoders] Re: WeakMethodClosure - what is this ?
How typically you detect if Charts are leaking? Coz I having troubles with that, but definitely something going on. The doc says setting length it will work, but I've never tried it. If you have WMC's referencing Charts, you need to make sure the Charts aren't leaking, and that when a chart goes way it takes all or most of its WMCs with it.
[flexcoders] Dynamic ColumnSeries leavine a lot of garbage in memory.... example inside
My gola is to create Column chart with series which can be dynamically modified (number of series may vary) I created this piece of code, i works, but pluut memory alot by ColumnSeries object which are loitering or just hanging. I spent a lot of time to find a way to destroy them, not successfuly. Here is the code: var columnSeriesArr:Array = new Array; // global var // var i:Number = 0; // clean somehow array of series; var ser:ColumnSeriesEx = columnSeriesArr.pop(); while(ser != null) { (ser.dataProvider as ArrayCollection).removeAll(); ser.dataProvider = null; ser.displayName = null; ser = null; //?? ser = columnSeriesArr.pop(); trace('cleaning') }; for each (var item:Object in arrayC) { columnSeries = new ColumnSeriesEx(); columnSeries.dataProvider = item; columnSeries.yField = value; columnSeries.displayName = item.name; columnSeries.setStyle(fill, PublicConstants.FILLS_COLOR[i]); columnSeriesArr.push(columnSeries); i++; } this.columnchart.series = columnSeriesArr; // //Column chart defined somewhere below Any advises?! Thank you.
[flexcoders] WeakMethodClosure - what is this ?
During my research with Flex performance found that instances of WeakMethodClosure constantly increasing. I do not have knowledge what is that and how to avoid it. 1859 instances for example can take only 30k of memory... but still BTW found that Flash player running under Firefox Opera newer free memory. Even when profiler shows clear memory dis-allocation.
[flexcoders] Memory allocations problems when intensively using charts and modules
I having really serious troubles with my application when using charts. My application collects lots of data in pseudo realtime (poll for data every 5 sec) and display charts and graphs. Everything works fine but with time memory allocated by Firefox process getting enormous and Firefox eventually dying. When I used profiler to see memory allocation, I noticed that I have megabytes of UTextField objects allocated, also ChartLabels. Definitely all these object wasn't GCed properly! Another problem loading and unloading modules. After each load Firefox allocates another 4-8M of memory and never comes back, even if I do unload ! But in same time profiles shows 0 instances of modules which was loaded. Whats is going on there? Just to be clear: I always do destroy event listeners, do not use static classes, always cleaning up arrays via ramoveAll(); I assign modules instances ans well as arrays to NULL when they not needed. What else I need to do?
[flexcoders] How to turn off exception messages in release version.
How to turn off exception messages ( e.g. ActionScript errors ) in release version?
[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?
I see, still I have debug version, which popups exceptions when something happened. (BTW, how to distinguish between debug and non debug, size?) But another fun started when I deployed everything under Linux (Red Hat) Application was build and linked using framework_3.0.189825.swz under windows, and I works well there. But when I copied same files under linux right away I got Error #2046. BUT is copied ORIGINAL swz from Adobe SDK folder. In trouble shooting guide it sais: This error indicates that the loaded RSL was not signed properly. In the case of framework RSLs, the framework's SWZ file that the application attempted to load at run time was not a properly signed SWZ file. You must ensure that you deploy an Adobe-signed RSL. I'm pretty sure I copied original file taken from Flex 3B3 distribution. What is wrong?! --- In flexcoders@yahoogroups.com, Gaurav Jain [EMAIL PROTECTED] wrote: My bad. The syntax I sent was incorrect. It was meant to be runtime-shared-library-path path-element=${FLEX_HOME}/frameworks/libs/framework.swc The warning you get is because you have specified the signed version of the framework rsl (.swz) in the arguments. It would go away if you either use the unsigned version (.swf) or also add the target-player=9.0.60 (signed rsl support is only available from 9.0.60 onwards) As to why you don't see difference in size between in FB and ant tasks. I would recommend you to compare all setting once again (look in the .actionScriptProperties file), if you don't find any differences file a bug (with your test case). Thanks, Gaurav
[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?
Did you get 241kb and 149kb only switching debug option in ant task or one of results is after FB another after ANT? --- In flexcoders@yahoogroups.com, Gaurav Jain [EMAIL PROTECTED] wrote: In my simple test I see size changing from 241kb to 149kb. I would suggest you log a bug at http://bugs.adobe.com/flex with your test case Thanks, Gaurav --- In flexcoders@yahoogroups.com, lytvynyuk lytvynyuk@ wrote: Nothing happened, same size. That is mean, It didn't checks that options or I do something wrong. Need to do deeper investigation. All that FlexAntTasks story is so confusing - there is no proper documentation, I figured some options only by analyzing java source files!...g
[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?
In that case no point to report bug, everything works for me too. Problem for me is different actually it is about RSL. I try to build everytinh with RSL which suppose to decrease size of my application. WQhich is not happening. AS you see I included RSL into my flex build task but it doesnt really affect anything, with or without runtime-shared-libraries url=${BUILD_SPACE}framework_3.0.189825.swf/ it produces same size app, but when I compiled it WITH and run it it demands presence of framework_3.0.189825.swf. With ECLIPSE it actually decreases size of application. What is the syntax of correct usage of RSL in ant? --- In flexcoders@yahoogroups.com, Gaurav Jain [EMAIL PROTECTED] wrote: These numbers are after only switching debug (true|false) using flex tasks.
[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?
with runtime-shared-library-path path-element${FLEX_HOME}/frameworks/libs/framework.swc/path-element rsl-url${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf/rsl-url /runtime-shared-library-path in my ant build file I getting: W:\jboss-4.0.5\server\default\deploy\Myapp.war\build.xml:64: Invalid element: path-element But: runtime-shared-library-path path-element=${FLEX_HOME}/frameworks/libs/framework.swc url rsl-url=${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swz/ /runtime-shared-library-path Actually builds OK, but doesn't affect size of code at all. ${FLEX_HOME} = W:/Program Files/Adobe/Flex Builder 3 Plug-in/sdks/3.0.0 I run Flex Builder Plug-in 3, build 3.0.190133 beta 3 Also I'm getting this warning: [mxmlc] Warning: A signed RSL was specified for library W:\Program Files\Adobe\Flex Builder 3 Plug-in\sdks\3.0.0\frameworks\libs\framework.swc without an unsigned RSL as a failover. To avoid runtime errors, either require player version 9.0.60 in your HTML wrapper or add an unsigned RSL as a failover for the signed RSL. Use -target-player=9.0.60 if you choose to require player version 9.0.60. --- In flexcoders@yahoogroups.com, Gaurav Jain [EMAIL PROTECTED] wrote: I think you should modify your ant task to following: mxmlc file=${BUILD_SPACE}ActiveUpdate.mxml output=${DEPLOY_DIR}/ActiveUpdate.swf actionscript-file-encoding=UTF-8 services=${BUILD_SPACE}res/services-config.xml context-root=ISP locale=en_US as3=true optimize=true static-rsls=false headless-server=true !-- runtime-shared-libraries url=framework_3.0.189825.swf/ -- runtime-shared-library-path path-element${FLEX_HOME}/frameworks/libs/framework.swc/path-element rsl-url${FLEX_HOME}/frameworks/rsls/framework_3.0.189825.swf/rsl-url /runtime-shared-library-path source-path path-element=${FLEX_HOME}/frameworks/ compiler.keep-as3-metadatafalse/compiler.keep-as3-metadata compiler.debugfalse/compiler.debug compiler.library-path dir=${FLEX_HOME}/frameworks append=true include name=libs / include name=../bundles/{locale} / /compiler.library-path /mxmlc if you are using FB 3, it would use runtime-shared-library-path and not runtime-shared-libraries. runtime-shared-library-path was introduced in flex 3 to support framework caching. Thanks, Gaurav --- In flexcoders@yahoogroups.com, lytvynyuk lytvynyuk@ wrote: In that case no point to report bug, everything works for me too. Problem for me is different actually it is about RSL. I try to build everytinh with RSL which suppose to decrease size of my application. WQhich is not happening. AS you see I included RSL into my flex build task but it doesnt really affect anything, with or without runtime-shared-libraries url=${BUILD_SPACE}framework_3.0.189825.swf/ it produces same size app, but when I compiled it WITH and run it it demands presence of framework_3.0.189825.swf. With ECLIPSE it actually decreases size of application. What is the syntax of correct usage of RSL in ant? --- In flexcoders@yahoogroups.com, Gaurav Jain gauravj@ wrote: These numbers are after only switching debug (true|false) using flex tasks.
[flexcoders] Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?
Here is piece of my flex ant file: mxmlc file=${BUILD_SPACE}ActiveUpdate.mxml output=${DEPLOY_DIR}/ActiveUpdate.swf actionscript-file-encoding=UTF-8 services=${BUILD_SPACE}res/services-config.xml context-root=ISP locale=en_US as3=true optimize=true static-rsls=false headless-server=true runtime-shared-libraries url=framework_3.0.189825.swf/ source-path path-element=${FLEX_HOME}/frameworks/ compiler.keep-as3-metadatafalse/compiler.keep-as3-metadata compiler.debugfalse/compiler.debug compiler.library-path dir=${FLEX_HOME}/frameworks append=true include name=libs / include name=../bundles/{locale} / /compiler.library-path /mxmlc Whatever options I put in here I getting debug version with size 190kb, but when I do export release via eclipse I getting version sized 140!!! WHY?
[flexcoders] Re: Implementing Office 2007 menus
What is the point to copy?! What about to create something yourself? --- In flexcoders@yahoogroups.com, Fidel Viegas [EMAIL PROTECTED] wrote: Hello folks, I am trying to implement the Office 2007 menus, and I am trying to imagine what sort of Containers to use. So far, I have figured that I am going to use TabNavigator for the headings, but what sort of container would I use for the groups of buttons? Could it be Panels? I found this thing implemented in Mindomo. Does anyone have an idea how he created the menus? Thanks in advance, Fidel.
[flexcoders] Re: Flex Ant Task for F3b3 genereates ALWAYS debug version, how to fix that?
Nothing happened, same size. That is mean, It didn't checks that options or I do something wrong. Need to do deeper investigation. All that FlexAntTasks story is so confusing - there is no proper documentation, I figured some options only by analyzing java source files!...g --- In flexcoders@yahoogroups.com, Gaurav Jain [EMAIL PROTECTED] wrote: What happens when you compile with Ant task using debug=true? If it generates swf of size more than 190 kb, then probably the difference you are seeing is due to some other difference between FB and ant task arguments. Look in the .actionScriptProperties file to see what libraries FB is linking against and see if you have anything additional? Thanks, Gaurav --- In flexcoders@yahoogroups.com, lytvynyuk lytvynyuk@ wrote: Here is piece of my flex ant file: mxmlc file=${BUILD_SPACE}ActiveUpdate.mxml output=${DEPLOY_DIR}/ActiveUpdate.swf actionscript-file-encoding=UTF-8 services=${BUILD_SPACE}res/services-config.xml context-root=ISP locale=en_US as3=true optimize=true static-rsls=false headless-server=true runtime-shared-libraries url=framework_3.0.189825.swf/ source-path path-element=${FLEX_HOME}/frameworks/ compiler.keep-as3-metadatafalse/compiler.keep-as3-metadata compiler.debugfalse/compiler.debug compiler.library-path dir=${FLEX_HOME}/frameworks append=true include name=libs / include name=../bundles/{locale} / /compiler.library-path /mxmlc Whatever options I put in here I getting debug version with size 190kb, but when I do export release via eclipse I getting version sized 140!!! WHY?
[flexcoders] Re: Embedded image and static variable problem.....
Ok,I see I did exactly like that :) --- In flexcoders@yahoogroups.com, Troy Gilbert [EMAIL PROTECTED] wrote: Yeah, you could do arrays, something like this: [Embed('myimage1.png')] private var myimage1:Class; [Embed('myimage2.png')] private var myimage2:Class; public var myimages:Array = [myimage1, myimage2]; In fact, I wrote a PHP script to generate just this kind of stuff once. You'd point the PHP script at a folder and it would create an SWF that contained all of the assets in that folder embedded and retrievable by filename. The PHP script just automated the process above, with the addition of some API that used a dictionary to associate filenames with the asset classes. I discuss it in more detail on my blog, http://troygilbert.com/. Troy.
[flexcoders] Embedded image and static variable problem.....
I have problem to bind image to static var my piece of code is: [EMAIL PROTECTED]('/images/image.png')] [Bindable] public static var image:Class; getting exception: TypeError: Error #1009: Cannot access a property or method of a null object reference. at support::PublicConstants$/get voipguardImage()[W:\jboss-4.0.5\server\default\deploy\ISP.war\isp_flex\s\ upport\PublicConstants.as:117] at support::PublicConstants$cinit() at global$init()[W:\jboss-4.0.5\server\default\deploy\ISP.war\isp_flex\supp\ ort\PublicConstants.as:5] at isp_flex/initApplication()[W:\jboss-4.0.5\server\default\deploy\ISP.war\\ isp_flex\isp_flex.mxml:66] at isp_flex/___isp_flex_Application1_initialize()[W:\jboss-4.0.5\server\def\ ault\deploy\ISP.war\isp_flex\isp_flex.mxml:6] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() Any ideas why? Also how to make something like array of embedded images: var images:Array = [ @Embed('/images/image1.png') , @Embed('/images/image2.png'), @Embed('/images/image3.png')]
[flexcoders] Re: Embedded image and static variable problem.....
Thank you Troy for answer, what about arrays of embedded images, It will be nice to refer via index, what do you think, is it possible? --- In flexcoders@yahoogroups.com, Troy Gilbert [EMAIL PROTECTED] wrote: That piece of code should be giving you a warning... I don't think you can bind to static instances because the binding mechanism uses an object as it's root, and in the case of a static there is no object. This is one situation where a Singleton is a good thing and is the reason (I believe) why Cairngorm and other similar MVC architectures use a singleton for their ModelLocator instead of statics. I got bit with exactly the same issue. Just make your class a singleton and it'll all work out. Troy.
[flexcoders] Re: Embedded image and static variable problem.....
Thank you for suggestion, Sherif, but it is not straight-forward anpproach and looks like work around, no solution. Especially if I will have 10-15 images like that. --- In flexcoders@yahoogroups.com, Sherif Abdou [EMAIL PROTECTED] wrote: /** * The Static Image that we want to use */ [Bindable] [Embed(source='test.jpg')] public static var image:Class; private function initApp():void{ /** * Create the image class since it is a DisplayObject * and add it to wherever u want */ var TempImage:DisplayObject= new image(); rawChildren.addChild(TempImage); } - Original Message From: lytvynyuk [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Tuesday, January 29, 2008 11:24:23 AM Subject: [flexcoders] Embedded image and static variable problem. I have problem to bind image to static var my piece of code is: [EMAIL PROTECTED]('/images/ image.png' )] [Bindable] public static var image:Class; getting exception: TypeError: Error #1009: Cannot access a property or method of a null object reference. at support::PublicCons tants$/get voipguardImage( )[W:\jboss- 4.0.5\server\ default\deploy\ ISP.war\isp_ flex\support\ PublicConstants. as:117] at support::PublicCons tants$cinit( ) at global$init( )[W:\jboss- 4.0.5\server\ default\deploy\ ISP.war\isp_ flex\support\ PublicConstants. as:5] at isp_flex/initApplic ation()[W: \jboss-4. 0.5\server\ default\deploy\ ISP.war\isp_ flex\isp_ flex.mxml: 66] at isp_flex/___ isp_flex_ Application1_ initialize( )[W:\jboss- 4.0.5\server\ default\deploy\ ISP.war\isp_ flex\isp_ flex.mxml: 6] at flash.events: :EventDispatcher /dispatchEventFu nction() at flash.events: :EventDispatcher /dispatchEvent( ) Any ideas why? Also how to make something like array of embedded images: var images:Array = [ @Embed('/images/ image1.png' ) , @Embed('/images/ image2.png' ), @Embed('/images/ image3.png' )] Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
[flexcoders] Re: Handling authorization/Authentication info using remoteObject services
I would like to know about this more too. People please share! --- In flexcoders@yahoogroups.com, bdealy1 [EMAIL PROTECTED] wrote: Hi, I am implementing a system which makes use of RemoteObject services within flex to speak to server side services like database, and other server-side code. What I am wondering is what are the best practices for securing the remoteObject services from being called either directly, or via a client which might have been altered through reverse-engineering, etc. In the past I would have perhaps done this with HttpSession objects... is there a similar mechanism for flex remote objects? or maybe i am just missing the obvious due to inexperience. Any thoughts/advice appreciated. regards, Brian
[flexcoders] Flex 3 Beta 3 Liecnse, was something changed?
I'm owner Flex 2.0.1 License and Charts. Before F2b3 my license for Flex Builder and Flex Charts works well, but now it said - Invalid key!? Are licenses incompatible now?
[flexcoders] Help with ant build file for Flex needed.
Here is a piece of my build file. I want application build it using RSL. I don't have any clear direction what to do. Basically I want to simulate Library path tab option Framework linkage in Eclipse. How can I modify existent build script to achieve desired result? --- target name=build depends=clean mkdir dir=${dist.dir}/ mxmlc file=isp_flex.mxml output=${DEPLOY_DIR}/isp_flex.swf actionscript-file-encoding=UTF-8 services=res/services-config.xml context-root=ISP static-rsls=false locale=en_US as3=true optimize=true load-config filename=${FLEX_HOME}/frameworks/flex-config.xml/ source-path path-element=${FLEX_HOME}/frameworks/ compiler.library-path dir=${FLEX_HOME}/frameworks append=true include name=libs / include name=../bundles/{locale} / /compiler.library-path /mxmlc /target --- static-rsls=false for mxmlc doesn't exist at all
[flexcoders] Re: Flex grid to serve 100K-1mil rows
Personally i think it very bad idea, can you imagine sort/search 1M records at client, how fast it will be ? What if you decided to do full text search by pattern? your client will die! Can you image how much memory it will consume at client side? best way to do is - smart server querying, pagination and dynamic load. --- In flexcoders@yahoogroups.com, letterpigeon [EMAIL PROTECTED] wrote: Hi all, We've built a flex grid that supports mass action on its data right now (column-wise search replace). But it just doesn't scale right now. It can hold up to around 3K+ rows in the grid, but it's taking a good few mins to load that up from the java backend servlet. The requirement is for the grid to be able to support up to 100K+ or even 1 million rows (may be not displaying them all at once, but when the mass action/search is taken, it should be performed on the complete dataset, not just what is being served up on the grid). We're just looking for ideas how this could be achieved, i.e.: if pagination is needed, what is the best way to do? client side pagination v.s. server? Could this be a good use case for Flex Data Service? etc. Any pointers/ideas/experience would be greatly appreicated. Thanks in advance. Regards, Ban
[flexcoders] Re: SQLite help Flex 3 Beta 2
If you are not getting any SQL exceptions, check you OrgId, and actual IDs in table. Then check what do you have in result variable. --- In flexcoders@yahoogroups.com, Nick Collins [EMAIL PROTECTED] wrote: Okay, I'm trying to execute a query on my local SQLite database using the following code, but am not having any luck. When I run the same SQL code in Cristophe's SQL Admin app, it works fine, returning the two records. However, when I run it here with my code, it returns a null as the result value. What am I doing wrong? /** CODE BEGIN**/ public function getContributorsList(orgID:int):void { stmt.sqlConnection = sqlConnection; stmt.text = SELECT * FROM CONTRIBUTORS WHERE ORGID = :orgID ORDER BY LAST_NAME, FIRST_NAME; stmt.parameters[:orgID] = orgID; stmt.addEventListener(SQLEvent.RESULT, resultHandler); stmt.addEventListener(SQLErrorEvent.ERROR, errorHandler); stmt.execute(); } private function resultHandler(event:SQLEvent):void { var result:SQLResult = stmt.getResult(); var numResults:int = result.data.length; for (var i:int = 0; i numResults; i++) { var row:Object = result.data[i]; var output:String = ContribNum: + row.CONTRIBNUM; output += ; First Name: + row.FIRST_NAME; output += ; Last Name: + row.LAST_NAME; trace(output); } }
[flexcoders] Re: Loading Flex Components at runtime
Modules work only with Flex 2.0.1 RSLs mentioned here only with F3B2! What kind of version are you running? Keep in mind you can link SWC anly at compile time, if somebody think I'm wrong, please correct me. SWFs you may load at run time for sure. But can you execute code from them - I doubt. My choice will be modules. BTW RSL it is a bit different story - RSL servers for share COMMON code bettween multiple application(modules) --- In flexcoders@yahoogroups.com, Jehanzeb Musani [EMAIL PROTECTED] wrote: Hello, I want to design a Flex Web Application that would load features (flex components) hosted in different SWF or SWC files at runtime. The prototype of that application can be viewed on the url below. http://80.227.133.21/FlexTestInternal/ApplicationLayoutManager.html The actual application needs to call a webservice that will return an xml. A sample xml is attached herewith. The xml contains the layout description and the names of feature (flex components) to be loaded. The layout and features varies for different users. I am thinking about deploying features in separate SWF/SWC files so that only the required files will be download at runtime. Can you please let me know the following in this regard? 1. How can I package individual features in separate SWF/SWF file using Flex Builder2. 2. How can I load the those separate SWF/SWC files at runtime from the main SWF file? 3. In case of separate SWF/SWC files for features, will the Flex library be included in every SWF/SWC file? I am also attaching the code of the prototype application. Regards, Jehanzeb __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute creationComplete=OnApplicationInitialize() mx:Script ![CDATA[ import mx.containers.VBox; import mx.containers.TabNavigator; import mx.containers.Canvas; import mx.controls.Label; import mx.containers.HDividedBox; import mx.containers.Panel; import mx.containers.VDividedBox; import mx.core.IContainer; import mx.utils.StringUtil; import mx.controls.Alert; import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; private function OnApplicationInitialize() : void { this.ajaxServiceInvokerProxy.addEventListener(FaultEvent.FAULT, this.OnError); this.ajaxServiceInvokerProxy.addEventListener(ResultEvent.RESULT, this.OnResultArrived); this.ajaxServiceInvokerProxy.GetApplicationLayout.send(); } private function OnError(event:FaultEvent) : void { var message:String; message = StringUtil.substitute('Error Type: [0]. Error Message: [1].', A, B); mx.controls.Alert.show(message, WebService Error); } private function OnResultArrived(event:ResultEvent) : void { var applicationLayout:String = event.result.toString(); var applicationLayoutXml:XML = new XML(applicationLayout); this.LayoutPanels(applicationLayoutXml); } private function LayoutPanels(applicationLayoutXml:XML) : void { var panelList:Object = applicationLayoutXml.child(Pages);//.child(Pages).child(Page);//.Panels; //panelList = panelList.child(Pages); panelList = panelList.child(Page).child(Panels); //mx.controls.Alert.show(panelList.toXMLString(), WebService Result); //this.txtPanelList.text = panelList.toXMLString(); var panel:Panel = new Panel(); panel.percentWidth = 100; panel.percentHeight = 100; panel.title = Main Panel; this.addChild(panel); var panelXml:XML = null; for
[flexcoders] Re: Flex grid to serve 100K-1mil rows
BTW, according to my personal experience flash player unable to handle more that 10K records in data grid. Just physically unable - out of memory error! --- In flexcoders@yahoogroups.com, letterpigeon [EMAIL PROTECTED] wrote: Hi all, We've built a flex grid that supports mass action on its data right now (column-wise search replace). But it just doesn't scale right now. It can hold up to around 3K+ rows in the grid, but it's taking a good few mins to load that up from the java backend servlet. The requirement is for the grid to be able to support up to 100K+ or even 1 million rows (may be not displaying them all at once, but when the mass action/search is taken, it should be performed on the complete dataset, not just what is being served up on the grid). We're just looking for ideas how this could be achieved, i.e.: if pagination is needed, what is the best way to do? client side pagination v.s. server? Could this be a good use case for Flex Data Service? etc. Any pointers/ideas/experience would be greatly appreicated. Thanks in advance. Regards, Ban
[flexcoders] Re: Resize DataGrid Row on ItemEditor showEvent with variableRowSize=true?
based on the itemEditors Height not the itemEditors Height. - sound funny, but I understand what do u mean ;) Make your Editor and Renderer height same, that is it. But is they are physically cannot be same height, as I understand your problem, after edit done row height not coming back to Renderer height? Can you bring an example here? --- In flexcoders@yahoogroups.com, danielspirn [EMAIL PROTECTED] wrote: I'm trying to have the Datagrid Row resize based on the itemEditors Height not the itemEditors Height. Thus every time a user selects a cell to edit the selected row will grow in size to accommodate the Editor. With variableRowSize = true, the sizes are set based on the itemRender, but since my render and editor are different, I'm unable to get the DataGrid to recognize a change in the itemRender and resize just the row that has grown. I can set the rowSize if I switch variableRowSize back to false. And se the rowSize at event handler for all the rows at the itemEditBeginning and at itemEditBegin, but what I really want is have variableRowSize=true and have the DataGrid remeasure its rows at time with the Editor dropped In. Because Editors have be created and held in Memory for re-use the only event I can trap-off of might be FlexEvent.DataChanged on the Editor. Anyone tackled this issue. Should I punt and try to solve this with the AdvancedDataGrid? Thanks Daniel
[flexcoders] Help with ant build file for Flex needed.
Here is a piece of my build file. I want application build it using RSL. I don't have any clear direction what to do. Basically I want to simulate Library path tab option Framework linkage in Eclipse. How can I modify existent build script to achieve desired result? --- target name=build depends=clean mkdir dir=${dist.dir}/ mxmlc file=isp_flex.mxml output=${DEPLOY_DIR}/isp_flex.swf actionscript-file-encoding=UTF-8 services=res/services-config.xml context-root=ISP static-rsls=false locale=en_US as3=true optimize=true load-config filename=${FLEX_HOME}/frameworks/flex-config.xml/ source-path path-element=${FLEX_HOME}/frameworks/ compiler.library-path dir=${FLEX_HOME}/frameworks append=true include name=libs / include name=../bundles/{locale} / /compiler.library-path /mxmlc /target ---
[flexcoders] Re: Type coercion error for ToggleButtonBar in very simple example.... possibly
Thank you for the link. It works well with player 9 I have installed. (Can't check exact build, just don't know how ;)) http://blogs.adobe.com/aharui/2007/03/modules.html And yes, that will solve your problem as well, but requires the latest player that isn't officially released yet. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lytvynyuk Sent: Wednesday, October 31, 2007 7:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type coercion error for ToggleButtonBar in very simple example possibly Can you give me a link ? BTW I fixed problem when changed Framework Linkage option to Runtime Shared Library (RSL) BUT I would like to know more about physics of this. Up to you. See my blog on modules in the presentations
[flexcoders] How to send remotely Array of strings and at Java end get String[] array ?
I have difficulties to send array of string over RPC. At server side I always receiving Object[]. Is any special ways to get at Java end array of certain type?
[flexcoders] Re: Type coercion error for ToggleButtonBar in very simple example.... possibly
Can you give me a link ? BTW I fixed problem when changed Framework Linkage option to Runtime Shared Library (RSL) BUT I would like to know more about physics of this. Up to you. See my blog on modules in the presentations From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lytvynyuk Sent: Tuesday, October 30, 2007 6:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Type coercion error for ToggleButtonBar in very simple example possibly --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Shared code problem. Put all shared classes in the main app or a shared code module. Thank you Alex for assistance! But I didn't get what doest it mean! Should I physically include all classes used in modules to main app or recompile application/modules special way?
[flexcoders] Type coercion error for ToggleButtonBar in very simple example.... possibly bug!
Here is example Application: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.controls.Alert; ]] /mx:Script mx:Button x=133 y=10 label=s1 id=button1 click={mod1.url='modules/m1.swf';mod1.loadModule();}/ mx:Button x=181 y=10 label=s2 id=button2 click={mod1.url='modules/m2.swf';mod1.loadModule();}/ mx:Canvas id=c1 mx:ModuleLoader id=mod1 width=100% height=100% x=0 y=100 loading=Alert.show('LOADING') ready=Alert.show('READY')/ /mx:Canvas /mx:Application Module1: ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=400 height=300 backgroundColor=green mx:VBox width=100% height=100% mx:ViewStack x=0 y=0 id=viewstack1 width=100% height=100% mx:Canvas label=View 1 width=100% height=100% mx:Label text=View 1/ /mx:Canvas mx:Canvas label=View 2 width=100% height=100% mx:Label text=View 2/ /mx:Canvas /mx:ViewStack mx:ToggleButtonBar dataProvider=viewstack1 /mx:ToggleButtonBar /mx:VBox /mx:Module Module2: ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=400 height=300 backgroundColor=red mx:VBox width=100% height=100% mx:ViewStack x=0 y=0 id=viewstack1 width=100% height=100% mx:Canvas label=View 1 width=100% height=100% mx:Label text=View 1/ /mx:Canvas mx:Canvas label=View 2 width=100% height=100% mx:Label text=View 2/ /mx:Canvas /mx:ViewStack mx:ToggleButtonBar dataProvider=viewstack1 /mx:ToggleButtonBar /mx:VBox /mx:Module Whel click button S1 - module loaded OK, When Click button S2 - gives error: TypeError: Error #1034: Type Coercion failed: cannot convert mx.controls::[EMAIL PROTECTED] to mx.controls.ButtonBar. at mx.skins.halo::ButtonBarButtonSkin/mx.skins.halo:ButtonBarButtonSkin::up\ dateDisplayList() at mx.skins::ProgrammaticSkin/validateDisplayList() at mx.managers::LayoutManager/::validateDisplayList() at mx.managers::LayoutManager/::doPhasedInstantiation() at Function/http://adobe.com/AS3/2006/builtin::apply() at mx.core::UIComponent/::callLaterDispatcher2() at mx.core::UIComponent/::callLaterDispatcher() at flash.utils::Timer/flash.utils:Timer::_timerDispatch() at flash.utils::Timer/flash.utils:Timer::tick() in Debug mode even more fancy thing going on, when click at S1 gives right away error: VerifyError: Error #1014: Class mx.collections::IList could not be found. at global$init() at ()[E:\!!Project\Flex\PicasaFlex\modules\m2.mxml:0] at Function/http://adobe.com/AS3/2006/builtin::call() at mx.core::ComponentDescriptor/get properties()[E:\dev\flex\sdk\frameworks\projects\framework\src\mx\core\C\ omponentDescriptor.as:239] at mx.core::Container/createComponentFromDescriptor()[E:\dev\flex_3_beta2\s\ dk\frameworks\projects\framework\src\mx\core\Container.as:3586] at mx.core::Container/createComponentsFromDescriptors()[E:\dev\flex_3_beta2\ \sdk\frameworks\projects\framework\src\mx\core\Container.as:3522] at mx.core::Container/mx.core:Container::createChildren()[E:\dev\flex_3_bet\ a2\sdk\frameworks\projects\framework\src\mx\core\Container.as:2624] at mx.core::UIComponent/initialize()[E:\dev\flex_3_beta2\sdk\frameworks\pro\ jects\framework\src\mx\core\UIComponent.as:5144] at mx.core::Container/initialize()[E:\dev\flex_3_beta2\sdk\frameworks\proje\ cts\framework\src\mx\core\Container.as:2561] at modules::m2/initialize()[E:\!!Project\Flex\PicasaFlex\modules\m2.mxml:0] at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::childAd\ ded()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\core\\ UIComponent.as:5041] at mx.core::Container/http://www.adobe.com/2006/flex/mx/internal::childAdde\ d()[E:\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\core\Co\ ntainer.as:3334] at mx.core::Container/addChildAt()[E:\dev\flex_3_beta2\sdk\frameworks\proje\ cts\framework\src\mx\core\Container.as:2258] at mx.core::Container/addChild()[E:\dev\flex_3_beta2\sdk\frameworks\project\ s\framework\src\mx\core\Container.as:2188] at mx.modules::ModuleLoader/mx.modules:ModuleLoader::moduleReadyHandler()[E\ :\dev\flex_3_beta2\sdk\frameworks\projects\framework\src\mx\modules\Modu\ leLoader.as:339] at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven\ tFunction() at flash.events::EventDispatcher/dispatchEvent() at ModuleManager.as$25::ModuleInfoProxy/ModuleManager.as$25:ModuleInfoProxy\ ::moduleEventHandler()[E:\dev\flex_3_beta2\sdk\frameworks\projects\frame\ work\src\mx\modules\ModuleManager.as:1025] at
[flexcoders] Re: Type coercion error for ToggleButtonBar in very simple example.... possibly
--- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Shared code problem. Put all shared classes in the main app or a shared code module. Thank you Alex for assistance! But I didn't get what doest it mean! Should I physically include all classes used in modules to main app or recompile application/modules special way?
[flexcoders] Re: Getting unexpected error while loading Images
Thank you Alex! Exactly that I did and it works well now. Also embedded loader progress into my component as well. --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Subclass SWFLoader and override the regenerateStyleCache and notifyStyleChangeInChildren methods and have them do nothing. They are only needed if you're loading other SWFs
[flexcoders] Re: How to converst an XML to AS Object ?
Thank you Troy, for your suggestions. I cannot understand one thing, using SimpleXMLDecoder i got Object from XML BUT I cannot make this ObjectProxy cast to my Album Object. What is the condition to cast object fields are same, I cant understand how does it works :( --- In flexcoders@yahoogroups.com, Troy Gilbert [EMAIL PROTECTED] wrote: Does anybody have good examples how SimpleXMLDecoder works ? I've never found a good one. Senocular has a library called XMLDefinition (google it). I've not looked at it too much, but it superficially appears to do what you're looking for. I don't like the idea of passing the XML into the object for it to self-populate (or its counterpart spitting out a piece of XML for serialization). In my mind, serialization (which is what this is) is a related but independent class from the model itself. Of course, that's not a weird suggestion... its how Java implements serialization and how AS3 does it generically as well. Though frustratingly these dynamic languages don't provide general purpose API for doing it with strong typing. Come on, Adobe, XML is the lingua franca of the web (if not of business software) and its a native type in AS3. There should be trivial, native serialization of objects with strong types to and from XML (in the same way that there is for the, ahem, proprietary AMF format). Troy.
[flexcoders] Re: How to converst an XML to AS Object ?
Does anybody have good examples how SimpleXMLDecoder works ? --- In flexcoders@yahoogroups.com, lytvynyuk [EMAIL PROTECTED] wrote: Thank you I kinda knew about that way ;) but if my object contains30 fields and also has a bunch of another objects, this procedure will be painful ;) What about this way: public function result(event:ResultEvent):void { var xmlS:XML = XML(event.result); var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true); var xdoc : XMLDocument = new XMLDocument(); xdoc.ignoreWhite = true; xdoc.parseXML(xmlS.toXMLString()); var ob:Object = decoder.decodeXML(XMLNode(xdoc.firstChild)); var feed:Album= Album(ob); // Exception here } But this doesn't work for me too ;)
[flexcoders] How to converst an XML to AS Object ?
Situation I have XML like that album name/name images image/image image/image image/image /images /album using HTTPService I'm getting this XML. I have AS Class: public class Album { public var name:String; public var images:ArrayCollection; } straight cast like: var album:Album = Album (event.result); doesn't work Is any suggestion around this, what I do wrong, may be there are some other way to do that Thank you.
[flexcoders] Re: How to converst an XML to AS Object ?
Thank you I kinda knew about that way ;) but if my object contains30 fields and also has a bunch of another objects, this procedure will be painful ;) What about this way: public function result(event:ResultEvent):void { var xmlS:XML = XML(event.result); var decoder:SimpleXMLDecoder = new SimpleXMLDecoder(true); var xdoc : XMLDocument = new XMLDocument(); xdoc.ignoreWhite = true; xdoc.parseXML(xmlS.toXMLString()); var ob:Object = decoder.decodeXML(XMLNode(xdoc.firstChild)); var feed:Album= Album(ob); // Exception here } But this doesn't work for me too ;) --- In flexcoders@yahoogroups.com, Derrick Grigg [EMAIL PROTECTED] wrote: You can't automatically convert XML to a strong typed object. You should create a method in your Album class that takes an xml variable, and then populate the Album from there. ie var album:Album = new Album(); album.setData(event.result); class Album { public function setData(data:XML):void { //populate the album } } Derrick Derrick Grigg www.dgrigg.com --- In flexcoders@yahoogroups.com, lytvynyuk lytvynyuk@ wrote: Situation I have XML like that album name/name images image/image image/image image/image /images /album using HTTPService I'm getting this XML. I have AS Class: public class Album { public var name:String; public var images:ArrayCollection; } straight cast like: var album:Album = Album (event.result); doesn't work Is any suggestion around this, what I do wrong, may be there are some other way to do that Thank you.