RE: [flexcoders] [Design Mode] FlexBuilder 3 Design Mode not working
Hi, it is just not working. This is what I get, just an empty design view. There are buttons in my mxml, and compiling works. So there are no errors. ... Very strange. Version is FlexBuilder 3 Beta 2. Lieven Cardoen application developer indiegroup interactive digital experience engelse wandeling 2 k18 b8500 kortrijk // communicatie bij voorkeur via E-mail -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Chiverton Sent: vrijdag 9 november 2007 16:03 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] [Design Mode] FlexBuilder 3 Design Mode not working On Friday 09 Nov 2007, Lieven Cardoen wrote: Does anybody know why my flexBuilder 3 Design Mode is not working. In what way ? I have the Eclipse Plugin from Adobe and I'm working on a windows machine... On what versions ? -- Tom Chiverton Helping to confidentially enhance industry-wide m-commerce 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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 http://groups.yahoo.com/group/flexcoders/ Individual Email | Traditional http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] [EMAIL PROTECTED] http://docs.yahoo.com/info/terms/ image001.png
Re: [flexcoders] Problem with events, how event dispatched when state change?
Hi Daniel If you use a binding between a value of you model and the selectedIndex of your combobox, the control updates automatically whenever you change the model property. //in MyModel [Bindable] public var selectedIndex : int //in MyForm mx:ComboBox selectedIndex={ myModel.selectedIndex } .../ Now whenever you change myModel.selectedIndex, the combobox will update automatically. You can find some more examples of binding in the docs. Cheers Ralf.
RE: [flexcoders] Vista, Eclipse 3.2.2 and a Microsoft Mouse
Hi, I have the same problem with FB 2.01 - but I've noticed that if you scroll the wheel a lot, quite quickly, it will scroll all the way down the page. Very odd. Keep the group posted if you find a solution! From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Samuel R. Neff Sent: 08 November 2007 22:32 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Vista, Eclipse 3.2.2 and a Microsoft Mouse You could try Eclipse 3.3.. I don't know of any changes why it would work in one or the other, but I have a MS Wireless Natural Laser Mouse 7000 and don't have problems with Eclipse scrolling (and I previously had a MS Wireless Laser 6000 and similarly no problems). I the past I had problems with a Logitech mouse not scrolling in MS Visual Studio and in that situation the driver provided a basic and advanced scrolling with an option to turn off advanced scrolling in some applications. However, I don't see anything like that in the Intellipoint 6.2 software. I would recommend calling MS support--they may not help since problem is only with Eclipse but in the past I've been pleasantly surprised with the quality of MS hardware support (stress: hardware). Good luck. Sam --- We're Hiring! Seeking a passionate developer to join our team building Flex based products. Position is in the Washington D.C. metro area. If interested contact [EMAIL PROTECTED] mailto:careers%40blinemedical.com -Original Message- From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Paul Whitelock Sent: Thursday, November 08, 2007 3:25 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Vista, Eclipse 3.2.2 and a Microsoft Mouse My old mouse went to the big cheese factory in the sky and I replaced it with a Microsoft Wireless Laser Mouse 8000. The problem is that the scroll wheel does not scroll source code in Eclipse 3.2 (the scroll wheel works in every application other than Eclipse). I tried uninstalling the Microsoft IntelliPoint 6.2 driver reverting to the generic mouse driver and scrolling began to work in Eclipse, but the next time I booted my machine I was back to a having a disfunctional scroll wheel. I did some Googling and apparently there are other people with the same problem (scroll wheel does not function with a Microsoft mouse in Eclipse), but I haven't seen any solutions. Has anyone here had the problem and found a workaround? It's a real pain not to be able to scroll through my Flex code with the scroll wheel Thanks! Paul
Re: [flexcoders] Loading Flex Components at runtime
On Friday 09 Nov 2007, Jehanzeb Musani wrote: Can you tell me how to design RSL using Flex Builder 2 or provide me the links regading that? If there is nothing on DevNet, the list archives are full of it. -- Tom Chiverton Helping to challengingly morph robust markets 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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] [Design Mode] FlexBuilder 3 Design Mode not working
On Monday 12 Nov 2007, Lieven Cardoen wrote: ... Very strange. Version is FlexBuilder 3 Beta 2. Post your code. Check the log. -- Tom Chiverton Helping to elementarily integrate open-source materials 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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] Flex grid to serve 100K-1mil rows
On Friday 09 Nov 2007, letterpigeon wrote: Hi all, requirement is for the grid to be able to support up to 100K+ or even 1 million rows Why ? It's utterly impossible for a user to cope with this much data at once, so what's the point ? -- Tom Chiverton Helping to dynamically incubate essential CEOs 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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] Flex grid to serve 100K-1mil rows
On Nov 12, 2007 4:35 AM, Tom Chiverton [EMAIL PROTECTED] wrote: On Friday 09 Nov 2007, letterpigeon wrote: Hi all, requirement is for the grid to be able to support up to 100K+ or even 1 million rows Why ? It's utterly impossible for a user to cope with this much data at once, so what's the point ? In general, the question of where to process data is totally legit. If you read carefully, he did not say he wanted to *show* 100k rows at once. He said he wanted to be able to do mass operations on it on the client side. Without understanding his application and architecture I cannot opine on whether it is better to do this on the client or server. But the idea, in applications that may need to scale, of doing more work on the client, is a good one. If you have lots of clients you can indeed save money on server costs by having the clients help with the work. Hank
Re: [flexcoders] Flex grid to serve 100K-1mil rows
On Monday 12 Nov 2007, hank williams wrote: applications that may need to scale, of doing more work on the client, is a good one. If you have lots of clients you can indeed save money on server costs by having the clients help with the work. I'd still want to plumb for sending an operation, parameters and list/range of ids to the server though, as others have mentioned depending on what the operations are it might take minutes on the client, and the user experience here could be bad. -- Tom Chiverton Helping to apprehensively unleash B2C CEOs 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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] Any chrome managers available?
On Friday 09 Nov 2007, Ivo wrote: Is there a library available that will help manage moving, resizing, close, maximize, minimize of an application window whose chrome is set to none ? Flex MDI ? http://code.google.com/p/flexmdi/ http://www.returnundefined.com/flexmdi/explorer/ -- Tom Chiverton Helping to dramatically deliver value-added design-patterns 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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] Drag and drop question
Thank you very much for your help, i'll try that and let you know how did it go. best regards Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED] wrote: Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var dragProxy:UIComponent = new UIComponent; dragProxy = event.currentTarget as UIComponent; / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } then the original UIComponent (which is a drag source) is used as dragProxy while dragging it but that same component dissapears from its original position as soon as dragging starts. How can i accomplish that drag source UIComponent's image is used as dragProxy but the same source drag UIComponent is intact while dragging? thanks in advance -- Best regards, Mirko mailto:msabljic[at]gmail.com -- View this message in context: http://www.nabble.com/Drag-and-drop-question-tf4786816.html#a13702904 Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?)
On Sunday 11 Nov 2007, Richard Rodseth wrote: been a priority. It wouldn't make sense to build one VM on top of another (relatively heavy) one. I've no idea how the poster got this idea. Maybe he confused the SDK/compiler with the player. -- Tom Chiverton Helping to enormously disintermediate innovative paradigms 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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] Visual modelling program - which direction should I take? Z-ord
Why not use Visual Graph? http://code.google.com/p/flexvizgraphlib/ From: Josh McDonald [EMAIL PROTECTED] Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: [flexcoders] Visual modelling program - which direction should I take? Z-order info? Date: Mon, 12 Nov 2007 09:32:55 +1000 Hi Guys, I'm about to start working on a program to display some XML data as a visual model. It requires various boxes-within-boxes and connecting lines. Before I go and do it all wrong, I have a few concerns and questions for anybody who's done this sort of thing before. Should I be creating custom nested components, or just drawing on a big canvas? If I'm using components, how will I layer the connecting lines above the other components? Is there an easily accessible universal x/y/z position system to access those details, or will I be going up various trees adding top/left offsets until I get to the Application object? Are there any examples or articles on doing this sort of thing I should look at? Any suggestions or pointers to similar projects would definitely be appreciated! Cheers, -Josh -- This is crazy! Why are we talking about going to bed with Wilma Flintstone... She'll never leave Fred and we know it. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] _ You IM, we give. Make every IM count for the cause of your choice. Join Now. http://im.live.com/messenger/im/home/?source=TAGHM -- 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] Flex grid to serve 100K-1mil rows
On Nov 12, 2007 4:56 AM, Tom Chiverton [EMAIL PROTECTED] wrote: On Monday 12 Nov 2007, hank williams wrote: applications that may need to scale, of doing more work on the client, is a good one. If you have lots of clients you can indeed save money on server costs by having the clients help with the work. I'd still want to plumb for sending an operation, parameters and list/range of ids to the server though, as others have mentioned depending on what the operations are it might take minutes on the client, and the user experience here could be bad. There are lots of depending ons here, but in general, there is nothing about flash or AS3 that makes processing data slow. In fact it can be quite fast. The issue is how to architect it on the client side. For example it probably doesnt make sense to load all this data into a datagrid. But it can still be on the client in stoage focused data structures. Really flash is entirely capable of loading and handling large datasets. Adobe has announced their desire to move all their apps to flex, and in general, I view flex as just as capable as a regular desktop development environment for which one would never say oh you cant load all that data into excel for example. Flex isnt as fast as C++ but it really is getting there and for most applications the speed difference doesnt matter. Just like today we do not hesitate to do stuff in java vs C++. The point is you can build highly performant client side apps in flex, and with things like AIR being introduced, we need to get comfortable with that idea. Hank -- Tom Chiverton Helping to apprehensively unleash B2C CEOs 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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
Re: [flexcoders] There has been an I/O Error: Error #2038
On Sunday 11 Nov 2007, FlexCoders wrote: There has been an http error: status code 500 Well, has there been ? What does the upload accepting application's log file say ? -- Tom Chiverton Helping to elementarily negotiate dynamic ROI 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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/
[flexcoders] Custom Text Area in Air
Hi, When we right click on the text area in adobe air applications , we gets context menu with copy , paste , delete etc . How can i add more options to the context menu like Bold ,Italic so that when these menu items are selected , the text selection is formatted. Thanks in advance Subeesh Now you can chat without downloading messenger. Go to http://in.messenger.yahoo.com/webmessengerpromo.php
Re: [flexcoders] There has been an I/O Error: Error #2038
FileUpload is probably one of the hardest functions to troubleshoot in Flex owing to the lack of detail. My personal wishlist is for Adobe to enhance upload function with robust error details. Even if only returning the literal error as output by the server. Meanwhile the method I use is to first develop the upload using an HTML form which can reveal error details. Then migrate to Flex implementation once all the kinks have been worked out. FlexCoders wrote: FLEX 2 I have a Flex upload project that gets this error at the end. It actually uploads the file but at the end it tosses out this error. I am not sure why this is happening. I will upload a file and it will complete. Then it will toss out the error: There has been an I/O Error: Error #2038 I click Okay and then the error: There has been an http error: status code 500 I am running this application on Windows server 2003 enterprise. IIS 6 Anyone know why this is happening? -- 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] Visual modelling program - which direction should I take? Z-order info?
You might take a look at www.mindomo.com for ideas.. Josh McDonald wrote: Hi Guys, I'm about to start working on a program to display some XML data as a visual model. It requires various boxes-within-boxes and connecting lines. Before I go and do it all wrong, I have a few concerns and questions for anybody who's done this sort of thing before. Should I be creating custom nested components, or just drawing on a big canvas? If I'm using components, how will I layer the connecting lines above the other components? Is there an easily accessible universal x/y/z position system to access those details, or will I be going up various trees adding top/left offsets until I get to the Application object? Are there any examples or articles on doing this sort of thing I should look at? Any suggestions or pointers to similar projects would definitely be appreciated! Cheers, -Josh -- This is crazy! Why are we talking about going to bed with Wilma Flintstone... She'll never leave Fred and we know it. :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] mailto:josh%40gfunk007.com -- 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] Drag and drop question
I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } But now i get the following error: 1067: Implicit coercion of a value of type flash.display:Bitmap to an unrelated type mx.core:IFlexDisplayObject. on line: DragManager.doDrag(dragInitiator, event, dragProxy); Do you maybe know how can i solve this? thank you Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED] wrote: Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var dragProxy:UIComponent = new UIComponent; dragProxy = event.currentTarget as UIComponent; / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } then the original UIComponent (which is a drag source) is used as dragProxy while dragging it but that same component dissapears from its original position as soon as dragging starts. How can i accomplish that drag source UIComponent's image is used as dragProxy but the same source drag UIComponent is intact while dragging? thanks in advance -- Best regards, Mirko mailto:msabljic[at]gmail.com -- View this message in context: http://www.nabble.com/Drag-and-drop-question-tf4786816.html#a13704547 Sent from the FlexCoders mailing list archive at Nabble.com.
RE: [flexcoders] [Design Mode] FlexBuilder 3 Design Mode not working
It has nothing to do with code. If I just create a new flex project, put one Button in the code, switch to design view, I get nothing... In design view, if I drag a Button to the stage, I get the sign saying that it's impossible to drag the item there... In Design Mode, the Flex Properties Panel says : 'This panel is only available in Design Mode'. I'll try reinstalling FlexBuilder 3 Plugin. Is there a Plugin needed for the design view? Maybe the installer didn't install all of the plugins properly. Thx. Lieven Cardoen application developer indiegroup interactive digital experience engelse wandeling 2 k18 b8500 kortrijk // communicatie bij voorkeur via E-mail -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tom Chiverton Sent: maandag 12 november 2007 10:33 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] [Design Mode] FlexBuilder 3 Design Mode not working On Monday 12 Nov 2007, Lieven Cardoen wrote: ... Very strange. Version is FlexBuilder 3 Beta 2. Post your code. Check the log. -- Tom Chiverton Helping to elementarily integrate open-source materials 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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
[flexcoders] Progress Bar Item Renderer
I'm trying to create a progress bar item renderer, but I can't get the value of progress bar to bind: mx:AdvancedDataGridColumn headerText=% Complete width=100 mx:itemRenderer mx:Component mx:VBox mx:Label id=lbl text={data.percentageComplete}/ mx:ProgressBar label=%3%% maximum=100 width=100% mode=manual source={data.percentageComplete}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:AdvancedDataGridColumn You don't appear to be able to bind the value using source. What am I doing wrong?
[flexcoders] Re: Progress Bar Item Renderer
The source-property is bindable, though as stated in the docs: Refers to the control that the ProgressBar is measuring the progress of. Use this property only in event and polled mode. A typical usage is to set this property to a Loader control. Since you set your mode to manual, the source-property will be ignored and as a consequence, the binding won't be executed. When using 'manual' you could try using the setter method, again from the docs: public function setProgress(value:Number, total:Number):void Sets the state of the bar to reflect the amount of progress made when using manual mode. The value argument is assigned to the value property and the maximum argument is assigned to the maximum property. The minimum property is not altered. When needed for binding, take a look at BindingUtils.bindSetter --jeetee --- In flexcoders@yahoogroups.com, triggersoftware [EMAIL PROTECTED] wrote: I'm trying to create a progress bar item renderer, but I can't get the value of progress bar to bind: mx:AdvancedDataGridColumn headerText=% Complete width=100 mx:itemRenderer mx:Component mx:VBox mx:Label id=lbl text={data.percentageComplete}/ mx:ProgressBar label=%3%% maximum=100 width=100% mode=manual source={data.percentageComplete}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:AdvancedDataGridColumn You don't appear to be able to bind the value using source. What am I doing wrong?
[flexcoders] DateTimeAxis: binding to different field name
Hi all, I'm trying to find a way to bind DateTimeAxis to a different field (other than date). but to no avail. this is a piece of the XML I'm getting from the server: cht f1=2007-11-11 r1=677.0 c1=3229.0 c2=447.79000 i1=2850345.0 /cht I would like to bind DateTimeAxis to the f1 attribute. Thanks, Yoni
[flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?)
Maybe he confused the SDK/compiler with the player. especially since I think I saw a call for talented assembly programmers to work on the Flash player. I doubt you could squeeze *that* much performance at such a small size with anything else (actually, two players in one now-a-days) but this isn't solving the initial problem that sparked this thread (if you pardon the pun - and irony). Sadly I can't think of a solution to get that smooth transition, except a possible rethink of what's happening (gut feeling only)
[flexcoders] SandBox, crossdomain.xml
hey people, got some questions about crossdomain.xml i got a swf file that loads up under https//www.test.com and the swf file also load in https. now I had to make my crossdomain calls http so i can call http://sub1.test.com. We only have a SSL cert for www.test.com. So if I try to make a crossdomain call to https://sub1.test.com it will not load the crossdomain.xml. Is this because the https://sub1.test.com doesn't have a SSL cert? If I got a wild-card SSL cert for *.test.com would my sub1.test.com calls over https work? Can I even make corssdomain https calls? any help would be good.
[flexcoders] Re: HttpService gets wrong handler
The various urls have function that call a specific responder but all the function go like this. I didn't set these up just trying to fix the problem. But seems like you'd want to keep a handle on something, service, responder, AsyncToken. How does flash manage these connections? Thanks, Joe public function loadURL( url : String ) : void { var service : HTTPService = new HTTPService(); service.url = url; service.resultFormat = e4x; var responder : GenericResponder = new GenericResponder( URLResult, genericFault ); var call : AsyncToken = service.send(); call.addResponder( responder ); } Handler: protected function URLResults(event : ResultEvent):void { ModelLocator.getInstance().Manager.Data = event.result as XML; } --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: We'll need to see some code. By the way, you can use a single HTTPService instance for multiple urls/calls by using the AsyncToken Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kuroiryu42 Sent: Thursday, November 08, 2007 11:31 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] HttpService gets wrong handler Here is the set up. App calls foo( url1 ); foobar( url2); Both foo and foo bar set up call new HttpService and make thier respective requests. foo has fooResultHandler and fooFaultHandler foobar has foobarResultHandler and foobarFaultHandler For some reason foobarResultHandler is getting foo's result! help. Thanks
[flexcoders] reference a class instance from another mxml
HI, I can't find a way to access from an mxml B to a class C that was instanciated in a mxml A In my sample. a login component (mxml A) instanciates a user:User As soon as login is done, the second component (mxml B) should retrieve the user instance I referenced this user instance starting from component that composes it (mxml A) but I always get a 1119 error:Access of possibly undefined property user through a reference with static Class... Thx for your help Eric
[flexcoders] Re: Progress Bar Item Renderer
When using 'manual' you could try using the setter method, again from the docs... I've tried doing this but Flex doesn't like having script blocks in the item renderer. When needed for binding, take a look at BindingUtils.bindSetter I don't know what to do with this as I can't get into a SCRIPT block. A small example would really help. Cheers, David. --- In flexcoders@yahoogroups.com, johantrax [EMAIL PROTECTED] wrote: The source-property is bindable, though as stated in the docs: Refers to the control that the ProgressBar is measuring the progress of. Use this property only in event and polled mode. A typical usage is to set this property to a Loader control. Since you set your mode to manual, the source-property will be ignored and as a consequence, the binding won't be executed. When using 'manual' you could try using the setter method, again from the docs: public function setProgress(value:Number, total:Number):void Sets the state of the bar to reflect the amount of progress made when using manual mode. The value argument is assigned to the value property and the maximum argument is assigned to the maximum property. The minimum property is not altered. When needed for binding, take a look at BindingUtils.bindSetter --jeetee --- In flexcoders@yahoogroups.com, triggersoftware david.bates@ wrote: I'm trying to create a progress bar item renderer, but I can't get the value of progress bar to bind: mx:AdvancedDataGridColumn headerText=% Complete width=100 mx:itemRenderer mx:Component mx:VBox mx:Label id=lbl text={data.percentageComplete}/ mx:ProgressBar label=%3%% maximum=100 width=100% mode=manual source={data.percentageComplete}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:AdvancedDataGridColumn You don't appear to be able to bind the value using source. What am I doing wrong?
[flexcoders] rollOverEffect versus play?
I have been attempting to replace the basic rollOverEffect with my own custom version that allows some extra validations but it doesn't seem to want to work the same. When I play a glow effect it works but if I continue to leave the mouse over it the effect disapears soon after it completes the effect. What property do I need to set to replicate the rollOverEffect?
[flexcoders] Re: Progress Bar Item Renderer
Seems to me that Flex doesn't like scripts anywhere but in the root of a document. I do not have any experience with item-renderers, nor do I have with loaders, but this is my guess: If you create the ItemRenderer as a custom mxml-component, then you should be able to set a script-block in this file. Again this is just my wild thinking, but I hope that with it, you, or others in here, might get to a working example. Good luck, --jeetee --- In flexcoders@yahoogroups.com, triggersoftware [EMAIL PROTECTED] wrote: When using 'manual' you could try using the setter method, again from the docs... I've tried doing this but Flex doesn't like having script blocks in the item renderer. When needed for binding, take a look at BindingUtils.bindSetter I don't know what to do with this as I can't get into a SCRIPT block. A small example would really help. Cheers, David. ... [cut out response] ... --- In flexcoders@yahoogroups.com, triggersoftware david.bates@ wrote: I'm trying to create a progress bar item renderer, but I can't get the value of progress bar to bind: mx:AdvancedDataGridColumn headerText=% Complete width=100 mx:itemRenderer mx:Component mx:VBox mx:Label id=lbl text={data.percentageComplete}/ mx:ProgressBar label=%3%% maximum=100 width=100% mode=manual source={data.percentageComplete}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:AdvancedDataGridColumn You don't appear to be able to bind the value using source. What am I doing wrong?
Re: [flexcoders] Re: Progress Bar Item Renderer
Its certainly possible to do this. Try the following mx:itemRenderer mx:Component mx:HBox mx:Script . Cheers! DK On Nov 12, 2007 8:59 AM, johantrax [EMAIL PROTECTED] wrote: Seems to me that Flex doesn't like scripts anywhere but in the root of a document. I do not have any experience with item-renderers, nor do I have with loaders, but this is my guess: If you create the ItemRenderer as a custom mxml-component, then you should be able to set a script-block in this file. Again this is just my wild thinking, but I hope that with it, you, or others in here, might get to a working example. Good luck, --jeetee --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, triggersoftware [EMAIL PROTECTED] wrote: When using 'manual' you could try using the setter method, again from the docs... I've tried doing this but Flex doesn't like having script blocks in the item renderer. When needed for binding, take a look at BindingUtils.bindSetter I don't know what to do with this as I can't get into a SCRIPT block. A small example would really help. Cheers, David. ... [cut out response] ... --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, triggersoftware david.bates@ wrote: I'm trying to create a progress bar item renderer, but I can't get the value of progress bar to bind: mx:AdvancedDataGridColumn headerText=% Complete width=100 mx:itemRenderer mx:Component mx:VBox mx:Label id=lbl text={data.percentageComplete}/ mx:ProgressBar label=%3%% maximum=100 width=100% mode=manual source={data.percentageComplete}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:AdvancedDataGridColumn You don't appear to be able to bind the value using source. What am I doing wrong? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] [LinkButton height problem]
Hi Guys, I have a problem with the LinkButton in Flex 3 Beta 2. It isn't showing the character 'q' entirely. The bottom of such characters is not shown. If I adjust the height of a label, it just disappears... Strange... If I add labelPlacement=bottom the q appears... But there's no Icon in my LinkButton... So this is a workaround. Lieven Cardoen Lieven Cardoen application developer indiegroup interactive digital experience engelse wandeling 2 k18 b8500 kortrijk http://www.indiegroup.be/ // communicatie bij voorkeur via E-mail image001.gif
[flexcoders] Counting lines of code.....
Anyone have a way to count the lines of mxml or as in one's project? thanks Ralph
[flexcoders] Date(String) vs 'String as Date' | DateField
Hi all, Currently I'm working with a custom DateField, being a canvas with 2 states: text and insert, and a public bindable property value:Date the component: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; currentState=text creationComplete=init() mx:Style .vet { font-weight: bold; } /mx:Style mx:Script ![CDATA[ import mx.binding.utils.BindingUtils; //possible states public static var STATE_VIEW:String = text; public static var STATE_INSERT:String = insert; [Bindable] public var value:Date = new Date(); private function init():void { BindingUtils.bindSetter(function(arg:*):void{ value = Date(arg as String); }, this, [df, text]); } ]] /mx:Script mx:states !-- display the plain text //-- mx:State name=text mx:AddChild mx:target mx:HBox mx:Text text={this.label} styleName=vet / mx:Text text={this.value} / /mx:HBox /mx:target /mx:AddChild /mx:State !-- display the DateField as formitem //-- mx:State name=insert mx:AddChild mx:target mx:FormItem label={this.label} mx:DateField id=df text={this.value} editable=true formatString=DD/MM/ firstDayOfWeek=1 / /mx:FormItem /mx:target /mx:AddChild /mx:State /mx:states /mx:Canvas Now in my app (simplified for this example) I have 2 instances of this component, one in inputState (id = in) and one in textState (id = view). Next to them is a button which click-function is as follows: public function setFilterText():void { if (in.value as String == ) in.value = (none); view.value = in.value; //empty input in.value = null; } } Somehow this doesn't work, at all. Neither the value is passed on, nor the inputDateField is set blank again. Any thoughts? --jeetee
Re: [flexcoders] Counting lines of code.....
On Monday 12 Nov 2007, essuark wrote: Anyone have a way to count the lines of mxml or as in one's project? wc -l -- Tom Chiverton Helping to professionally architect high-end systems 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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/
[flexcoders] Re: Date(String) vs 'String as Date' | DateField
--- In flexcoders@yahoogroups.com, johantrax [EMAIL PROTECTED] wrote: Hi all, Currently I'm working with a custom DateField, being a canvas with 2 states: text and insert, and a public bindable property value:Date the component: ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; currentState=text creationComplete=init() mx:Style .vet { font-weight: bold; } /mx:Style mx:Script ![CDATA[ import mx.binding.utils.BindingUtils; //possible states public static var STATE_VIEW:String = text; public static var STATE_INSERT:String = insert; [Bindable] public var value:Date = new Date(); private function init():void { BindingUtils.bindSetter(function(arg:*):void{ value = Date(arg as String); }, this, [df, text]); } ]] /mx:Script mx:states !-- display the plain text //-- mx:State name=text mx:AddChild mx:target mx:HBox mx:Text text={this.label} styleName=vet / mx:Text text={this.value} / /mx:HBox /mx:target /mx:AddChild /mx:State !-- display the DateField as formitem //-- mx:State name=insert mx:AddChild mx:target mx:FormItem label={this.label} mx:DateField id=df text={this.value} editable=true formatString=DD/MM/ firstDayOfWeek=1 / /mx:FormItem /mx:target /mx:AddChild /mx:State /mx:states /mx:Canvas Now in my app (simplified for this example) I have 2 instances of this component, one in inputState (id = in) and one in textState (id = view). Next to them is a button which click-function is as follows: public function setFilterText():void { if (in.value as String == ) in.value = (none); view.value = in.value; //empty input in.value = null; } } Somehow this doesn't work, at all. Neither the value is passed on, nor the inputDateField is set blank again. Any thoughts? --jeetee posted too soon: Above gives following warning: Date(x) behaves the same as new Date().toString(). To cast a value to type Date use x as Date instead of Date(x). However I do get the dateString of todays date upon loading (after spamming errors about the failed conversion) But when changing the bindsetter to us (arg as Date), as suggested by the warning, both errors and result are gone :( --Johan
[flexcoders] Pre-launch review
Hello there, The url is www.KickPlay.com and is a site where you can play casual games like solitaire and some other simple ones. The cool thing is that you can personalize the games with your own face or any other image you want. You can get pretty creative with the games and make them political, funny, holiday, etc... You can send them to a friend, post them on your website or Facebook page too, if you have one. It would be great if you have 10 minutes or so to play a couple games then try to personalize one or two and give us your honest feedback on everything. Thanks!
[flexcoders] Custom itemRenderer using Label Question
Hi, I'm using the following code to set the data of an extended Label being used as an itemRenderer in a datagrid. The editor for the cell is a combobox. What I'm doing is taking the data value sent down for that cell (a number), looking it up in the dataprovider of the combobox and displaying the corresponding label in my custom Label widget. What I'm wondering is if this is the best way to do it. In particular, the part that concerns me is that I'm creating an instance of the combobox editor to get the dataprovider collection to search. Any thoughts would be greatly appreciated. Thanks, John override public function set data(value:Object):void { super.data = value; var cbr:ComboBoxRenderer; // will contain renderer for this cell var dg:DataGrid;// reference to grid containing this cell var dp:ArrayCollection; // dataProvider of selected cell's comboBox if (listData != null) { dg = DataGrid(listData.owner); cbr = dg.columns[listData.columnIndex].itemEditor.newInstance(); dp = cbr.dataProvider as ArrayCollection; // now iterate through dp to find a matching data value, when found put its label in the Label widget var dpLen:int = dp.length; for (var j:int=0; jdpLen; j++) { if (dp.getItemAt(j).data == data[DataGridListData(listData).dataField]) { // found match this.text = dp.getItemAt(j).label; // + + dp.getItemAt(j).data; trace('found LabelWithDownArrow'); return; } } // not found, so show comboBox prompt this.text = cbr.prompt; } }
[flexcoders] Re: SandBox, crossdomain.xml
--- In flexcoders@yahoogroups.com, [EMAIL PROTECTED] wrote: hey people, got some questions about crossdomain.xml i got a swf file that loads up under https//www.test.com and the swf file also load in https. now I had to make my crossdomain calls http so i can call http://sub1.test.com. We only have a SSL cert for www.test.com. So if I try to make a crossdomain call to https://sub1.test.com it will not load the crossdomain.xml. Is this because the https://sub1.test.com doesn't have a SSL cert? If I got a wild-card SSL cert for *.test.com would my sub1.test.com calls over https work? Can I even make corssdomain https calls? any help would be good. I do believe if your crossdomain xml did *.domain.com you could access any of the sub domains. Or you can add each one by name in it.
[flexcoders] Re: Flex grid to serve 100K-1mil rows
Hi all, Thanks for all your responses. Maybe it'll be better if I described our use case in bit more in details. Our users send us trade file (sometimes has ~50K trades in it currently). And let say all of the trades have an invalid broker code, and all got kicked out, the user will have to go in and change the broker code 1 by 1 that could take them hours. Therefore, the ability for our users to perform mass actions on the dataset (either client side or server side) would be a huge win for us. Once again, thanks all. Ban --- In flexcoders@yahoogroups.com, hank williams [EMAIL PROTECTED] wrote: On Nov 12, 2007 4:35 AM, Tom Chiverton [EMAIL PROTECTED] wrote: On Friday 09 Nov 2007, letterpigeon wrote: Hi all, requirement is for the grid to be able to support up to 100K+ or even 1 million rows Why ? It's utterly impossible for a user to cope with this much data at once, so what's the point ? In general, the question of where to process data is totally legit. If you read carefully, he did not say he wanted to *show* 100k rows at once. He said he wanted to be able to do mass operations on it on the client side. Without understanding his application and architecture I cannot opine on whether it is better to do this on the client or server. But the idea, in applications that may need to scale, of doing more work on the client, is a good one. If you have lots of clients you can indeed save money on server costs by having the clients help with the work. Hank
RE: [flexcoders] Problem with dispatching custom event from pop up window
Also, and altrnative to a custom event is to have the data available via a public property on the component, and access that property value in the handler with currentTarget. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of j301c Sent: Sunday, November 11, 2007 5:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Problem with dispatching custom event from pop up window I have a custom event that holds an array element. When I dispatch an event from a pop up window - by dispatching it from the mx.core.Application.application object - with data assigned to the array the event fires correctly, however, the data array element is no longer assigned any data. Also the event object still has the data:Array property, so the program recognizes it as my custom event, it just does not have any data anymore. Why is this?
[flexcoders] Re: Reference variables / pointers / hex heap addresses
Exactly as Gordon says. I was not expecting ac = event.result.products.rug; to change the value of ac to point to another object. Thanks for clearing pointers up for me. Gordon, you also mention datatype casting: To parse an XML file of rugs into an ArrayCollection of rug objects, is your suggestion to write an AS3 Rug Class that mirrors XML rug element fields and then cast ac = Rug(event.result).products.rug to end up with an ArrayCollection of Rug Objects? Sounds like a good idea - but I can already access all of the fields of each object without casting. What does casting buy me in this situation? Cheers, Rich --- In flexcoders@yahoogroups.com, Gordon Smith [EMAIL PROTECTED] wrote: His description indicated that he expected a var like ac to behave like a C reference. But that's not how AS works; a var like ac behaves like a C pointer. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Jerome Clarke Sent: Friday, November 09, 2007 9:34 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Reference variables / pointers / hex heap addresses I think what he's asking is why is it when he points to ac = new ArrayCollection(); say to for example address 1... but then later tells ActionScript ac = event.result.products.rug; and the address changes to 2 I think he was expecting ac to still point to address 1... but with the value of address 2 ( copied basically ) I might be wrong but as far as I know... unlike C/C++... AS3 isn't fully native like C/C++ so... allocating/deallocating memory is going to be slower... it's faster for the Flash player to allocate new memory, change the address to the new memory, dump the old address in garbage ( for to be garbage collected later ) rather than reallocating the memory... also AS3 doesn't exactly work like C/C++ anyways just like some other languages like PHP On Nov 9, 2007 10:02 PM, Gordon Smith [EMAIL PROTECTED] mailto:gosmith%40adobe.com wrote: Object references in ActionScript are like C pointers, not like C references. The statement ac = event.result.products.rug; changes the pointer ac so that instead of pointing to the ArrayCollection that you new'd, it now points to the rug. By the way, this makes no sense since ac is typed as an ArrayCollection, while products.rug is presumably NOT an ArrayCollection. The compiler can't report this error because it doesn't know what type event.result is. If the result object has some type, you should cast it: ac = SomeResultClass(event.result).products.rug why can I not directly manipulate my original object from within the function? You can access and change the state of that object within the function.. For example, within the function you can do things like ac.addItem() trace(ac.length) to manipulate your ArrayCollection. But if you want your function to make collectionAC point to a different object, you must write collectionAC = ... inside that function. Does that help? - Gordon From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of quiet.mountain Sent: Friday, November 09, 2007 10:19 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Reference variables / pointers / hex heap addresses Hi, Thanks for the reply, and yes I am coming from a c background. Even though the address itself is passed by value (passing a pointer by copy) the result is still a locally scoped function variable that points to the original object (see debug comments below). so you cannot change it [the address] I don't think I want to change it (the value of the class reference variable that points to the original object). I want to make changes to the original object itself (which I now have an address for via the pointer passed by copy). My question is why does the value of this locally scoped function variable automatically change to point to a newly created object of the same type when I attempt to make changes to it (see debug comments below). Or to put it another way. If my locally scoped function variable is now actually pointing to my original object why can I not directly manipulate my original object from within the function? Thanks, Rich --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Ralf Bokelberg ralf.bokelberg@ wrote: Hi Rich Are you coming from a c background? Logically a object parameter is passed by reference, which means, the address is passed to the method instead of a copy of the object's values. Technically the address itself is passed by value though, so you cannot change it. Cheers
[flexcoders] Re: RightClick Event
Did anyone see this post? Is there really no trigger to use? --- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote: Is there an event that I can use to know that the ContextMenu is about to pop up when the user Right Clicks? I would like to run some code to enable/disable some of my custom context menu items. Thanks! Gary
[flexcoders] Unicode/Foreign Character Entry
Here is a control for allowing users to easily select special characters for entry in Flex text controls. Demo with Code http://www.capitalhcoder.com/ The basic idea is that by adding this control to your app and associating it with a text control, you can then use it to select unicode/foreign characters and add them to the text of the control. I asked about this here on flexcoders a while back and didn't get much response and I couldn't find much at all on the web, so I'm posting it in the hopes that someone might get a jump start from it in the future. Shaun
[flexcoders] Re: RightClick Event
Well, if I recall correctly, the right-click-event doesn't exist in Flash. However you can alter the contextMenu.customItems (Array) of a component at any time, being even when it's not visible. And you can even use data-binding on it's items. Good luck, --jeetee --- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote: Did anyone see this post? Is there really no trigger to use? --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote: Is there an event that I can use to know that the ContextMenu is about to pop up when the user Right Clicks? I would like to run some code to enable/disable some of my custom context menu items. Thanks! Gary
[flexcoders] Casting Objects at Runtime (possible evolution of eval()?)
Hello everyone, Kevin here from San Francisco building an application that is populated at runtime (i.e., no MXML) and whose Classes are not known at authoring time. Here is what I am trying to do: var VM:ViewManager=new ViewManager(); VM.addDisplayObject( myCanv, new Canvas(), {x:70, y:70, width:200, height:50}) VM.addDisplayObject( myLabel, new Label(), {x:70, y:70, width:200, height:50}) In my ViewManager, which I am extending from Sprite, but could be as primitive as an EventDispatcher for my uses with it, I'm trying to abstract whatever Components may be rendered at runtime. Thanks for any pointers, Oiled up in San Francisco
[flexcoders] Re: RightClick Event
Thanks for the response! The trouble is that I need to do a lookup that can't really be databound in order to determine whether or not to enable the menu item. I really need to update it just before the context menu comes up. --- In flexcoders@yahoogroups.com, johantrax [EMAIL PROTECTED] wrote: Well, if I recall correctly, the right-click-event doesn't exist in Flash. However you can alter the contextMenu.customItems (Array) of a component at any time, being even when it's not visible. And you can even use data-binding on it's items. Good luck, --jeetee --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote: Did anyone see this post? Is there really no trigger to use? --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote: Is there an event that I can use to know that the ContextMenu is about to pop up when the user Right Clicks? I would like to run some code to enable/disable some of my custom context menu items. Thanks! Gary
[flexcoders] Re: RightClick Event
I just found my answer: http://livedocs.adobe.com/flex/15/flex_docs_en/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Flex_Documentationfile=1276.htm The ContextMenu has an event: ContextMenuEvent.MENU_SELECT --- In flexcoders@yahoogroups.com, toofah_gm [EMAIL PROTECTED] wrote: Thanks for the response! The trouble is that I need to do a lookup that can't really be databound in order to determine whether or not to enable the menu item. I really need to update it just before the context menu comes up. --- In flexcoders@yahoogroups.com, johantrax johan.temmerman@ wrote: Well, if I recall correctly, the right-click-event doesn't exist in Flash. However you can alter the contextMenu.customItems (Array) of a component at any time, being even when it's not visible. And you can even use data-binding on it's items. Good luck, --jeetee --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote: Did anyone see this post? Is there really no trigger to use? --- In flexcoders@yahoogroups.com, toofah_gm garym@ wrote: Is there an event that I can use to know that the ContextMenu is about to pop up when the user Right Clicks? I would like to run some code to enable/disable some of my custom context menu items. Thanks! Gary
[flexcoders] Re: Problem with dispatching custom event from pop up window
DataArrayEvent.as - //Custom event that holds an array import flash.events.Event; public class DataArrayEvent extends Event { public var data:Array; public function DataArrayEvent(_data:Array, type:String, _bubbles:Boolean = false, _cancelable:Boolean = false) { super(type, _bubbles, _cancelable); this.data = _data; } } InfomrationWindow.mxml -- ... //extends titlewindow, is displayed by popupmanager public function init():void {// called on initialize var e:DataArrayEvent = new DataArrayEvent ([test],somethingDone,true,false); mx.core.Application.application.dispatchEvent(e); } ... Main.mxml - public function init():void {// called on initialize addEventListener(somethingDone,hndlSomethingDone); } public function hndlSomethingDone(e:DataArrayEvent):void { Alert.show(Event Fired); //this message fires Alert.show(e.data[0]); //this message does not } --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: Usually some silly programming mistake. Post some code. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of j301c Sent: Sunday, November 11, 2007 2:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Problem with dispatching custom event from pop up window I have a custom event that holds an array element. When I dispatch an event from a pop up window - by dispatching it from the mx.core.Application.application object - with data assigned to the array the event fires correctly, however, the data array element is no longer assigned any data. Also the event object still has the data:Array property, so the program recognizes it as my custom event, it just does not have any data anymore. Why is this?
Re: [flexcoders] Drag and drop question
Sorry, try BitmapAsset instead of Bitmap, which extends Bitmap and implements IFlexDisplayObject. If that doesn't work, I have code to draw the bitmap data onto a UIComponent. - Dan Freiman On Nov 12, 2007 7:13 AM, Mirko Sabljić [EMAIL PROTECTED] wrote: I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } But now i get the following error: 1067: Implicit coercion of a value of type flash.display:Bitmap to an unrelated type mx.core:IFlexDisplayObject. on line: DragManager.doDrag(dragInitiator, event, dragProxy); Do you maybe know how can i solve this? thank you Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height ); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED] msabljic%40gmail.com wrote: Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var dragProxy:UIComponent = new UIComponent; dragProxy = event.currentTarget as UIComponent; / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } then the original UIComponent (which is a drag source) is used as dragProxy while dragging it but that same component dissapears from its original position as soon as dragging starts. How can i accomplish that drag source UIComponent's image is used as dragProxy but the same source drag UIComponent is intact while dragging? thanks in advance -- Best regards, Mirko mailto:msabljic[at]gmail.com -- View this message in context: http://www.nabble.com/Drag-and-drop-question-tf4786816.html#a13704547 Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: DataGrid not populating from WebService, error: Unknown Property
OK I've changed the resultFormat to e4x and added a result handler. With trace I'm able to see the result coming back. I tried using a namespace variable also after further searching here, but I'm still confused about how that works. The error is gone, but I'm still not getting any results in the datagrid. I'm assuming I'm missing something with the dataProvider expression and/or handling of the XMLList and Collection. Here's my current mxml: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.collections.XMLListCollection; import mx.controls.Alert; import mx.rpc.events.ResultEvent; private namespace ovServices = http://services.project.company.com;; use namespace ovServices; [Bindable] public var ordMedList:XMLListCollection; public var ordMedXMLList:XMLList; public function handleOrdMedSearch(event:ResultEvent):void { trace(handling OrdMedSearchResult); var resultXML:XML = XML(event.result); ordMedXMLList = resultXML.child(OrdMedList); //trace(ordMedList : + ordMedList); ordMedList = new XMLListCollection(); ordMedList.source = ordMedXMLList; } ]] /mx:Script mx:WebService id=ordMedSearchWS wsdl=http://localhost:8080/OrderViewWeb/services/OrderableMed?wsdl; showBusyCursor=true mx:operation name=searchStartsWith resultFormat=e4x result=handleOrdMedSearch(event) mx:request searchText{ordMedSearchText.text}/searchText /mx:request /mx:operation /mx:WebService mx:HBox x=10 y=70 mx:Label text=Orderable Med Search / mx:TextInput id=ordMedSearchText width=100/ mx:Button label=Search click=ordMedSearchWS.searchStartsWith.send()/ mx:Label / /mx:HBox mx:DataGrid x=10 y=100 id=ordMeds width=400 dataProvider={ordMedList} mx:columns mx:DataGridColumn headerText=Id dataField=id width=100/ mx:DataGridColumn headerText=Desc dataField=desc / /mx:columns /mx:DataGrid /mx:Application --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Use trace() to display the xml content you are getting back from the WebService, so you can see exactly how to build the dataProvider expression... oops, you can't, because you are binding to lastResult. Consider using a result handler instead.. Also, specify resultFormat=e4x. The default converts your xml to a nested object structure of some sort. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Brian Sent: Friday, November 09, 2007 3:40 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid not populating from WebService, error: Unknown Property OK I'm back with my next WebService question. I got one working when there was only one object coming back. Now I'm trying to populate a DataGrid with the lastResult from a WebService and I'm getting an Unknown Property error. I've searched for this here and am wondering if I either need a [] somewhere in the dataProvider or I need to put the result into an ArrayCollection first and then set the dataProvider to that. Or could it be that the OrdMedList element doesn't have a namespace like all the other elements? That's due to a weird issue with CXF and JAX-WS. Here's the error: Error: Unknown Property: 'OrdMedList'. at mx.collections::ListCollectionView/http://www.adobe.com/2006/actionscrip t/flash/proxy::getProperty http://www.adobe.com/2006/actionscript/flash/proxy::getProperty () Here's my mxml: mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute mx:WebService id=ordMedSearchWS wsdl=http://localhost:8080/OrderWeb/services/OrdMed?wsdl http://localhost:8080/OrderWeb/services/OrdMed?wsdl showBusyCursor=true mx:operation name=searchStartsWith mx:request searchText{ordMedSearchText.text}/searchText /mx:request /mx:operation /mx:WebService mx:HBox x=10 y=70 mx:Label text=OrdMed Search / mx:TextInput id=ordMedSearchText width=100 / mx:Button label=Search
Re: [flexcoders] Using CSS to style LineChart
On Friday 09 Nov 2007, superabe superabe wrote: as it stands now seems you cannot set the stroke prop in CSS as the property expects a Stroke object. hence you have to do series.setStyle(stroke, new Stroke()); The attached subclass of LineChart is called StyledLineChart, and understands style sheets like: StyledLineChart{ chartSeriesStyles: AreaSeriesStyle1,AreaSeriesStyle2; } .AreaSeriesStyle1{ strokeColor:#AF003D; } .AreaSeriesStyle2{ strokeColor:#009EAF; } public class StyledLineChart extends LineChart { /** * @private */ private static var stylesInited:Boolean = initStyles(); /** * @private */ private static function initStyles():Boolean{ var lineChartStyle:CSSStyleDeclaration=StyleManager.getStyleDeclaration('StyledLineChart'); var lineChartSeriesStyles:Array=lineChartStyle.getStyle('chartSeriesStyles'); lineChartStyle.defaultFactory = function():void { this.chartSeriesStyles = lineChartSeriesStyles; } for (var i:int=0;ilineChartSeriesStyles.length;i++){ var o:CSSStyleDeclaration=StyleManager.getStyleDeclaration(.+lineChartSeriesStyles[i]); var f:Function = function(o:CSSStyleDeclaration, stroke:Stroke):void { o.defaultFactory = function():void { this.lineStroke = stroke; this.stroke = stroke; this.lineSegmentRenderer = new ClassFactory(LineRenderer); } } f(o, new Stroke(o.getStyle(strokeColor), 3, 1)); } return true; } } -- Tom Chiverton Helping to continually incentivize web-enabled niches 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 Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders 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/
[flexcoders] Re: AIR: HTML components not redraw?
Anyone have any ideas on this one?
Re: [flexcoders] Drag and drop question
Still doesn't work, would it be too much to ask you to post that code to draw bitmap data onto UIComponent? I tried to implment that idea with following code: public function dragItMain(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; // Create a DragSource object. var dragSource:DragSource = new DragSource(); dragSource.addData(dragInitiator, main); var target:UIComponent = event.curentTarget as UIComponent; var bitmapData:BitmapData = new BitmapData( Math.round(target.width / target.scaleX), Math.round(target.height / target.scaleY), false); bitmapData.draw(target); var bitmap:Bitmap = new Bitmap(bitmapData); var bitmapHolder:UIComponent = new UIComponent(); bitmapHolder.addChild(bitmap); // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, dragSource, event, bitmapHolder); } But all i got is the following error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() Daniel Freiman wrote: Sorry, try BitmapAsset instead of Bitmap, which extends Bitmap and implements IFlexDisplayObject. If that doesn't work, I have code to draw the bitmap data onto a UIComponent. - Dan Freiman On Nov 12, 2007 7:13 AM, Mirko Sabljić [EMAIL PROTECTED] wrote: I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } But now i get the following error: 1067: Implicit coercion of a value of type flash.display:Bitmap to an unrelated type mx.core:IFlexDisplayObject. on line: DragManager.doDrag(dragInitiator, event, dragProxy); Do you maybe know how can i solve this? thank you Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height ); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED] msabljic%40gmail.com wrote: Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var dragProxy:UIComponent = new UIComponent; dragProxy = event.currentTarget as UIComponent; / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } then the original UIComponent (which is a drag source) is used as dragProxy while dragging it but that same component dissapears from its original position as soon as dragging starts. How can i accomplish that drag source UIComponent's image is used as dragProxy but the same source drag UIComponent is intact while dragging? thanks in advance -- Best regards, Mirko mailto:msabljic[at]gmail.com -- View this message in context: http://www.nabble.com/Drag-and-drop-question-tf4786816.html#a13704547 Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/Drag-and-drop-question-tf4786816.html#a13709369 Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: Progress Bar Item Renderer
hmmm... the code completion in Eclipse builder says it isn't valid, but the compiler says it is Anyway, I solved the problem by creating a new class: ?xml version=1.0 encoding=utf-8? mx:HBox xmlns:mx=http://www.adobe.com/2006/mxml; mx:Script ![CDATA[ import mx.controls.ProgressBarLabelPlacement; import mx.controls.ProgressBarMode; import mx.controls.ProgressBar; private var _data:Object; override public function set data(value:Object):void { _data = value; var percentageComplete:Number = Number(value.percentageComplete) * 100; var colour:Number if (percentageComplete == 0) { colour = 0xda0707; } else if (percentageComplete == 100) { colour = 0x04ae30; } else { colour = 0x005efb; } removeAllChildren(); var pb:ProgressBar = new ProgressBar(); pb.mode = ProgressBarMode.MANUAL; pb.label = %3%% pb.setStyle(barColor, colour); pb.labelPlacement = ProgressBarLabelPlacement.CENTER; pb.setProgress(percentageComplete, 100); pb.percentWidth = 100; addChild(pb); } override public function get data():Object { return _data; } ]] /mx:Script /mx:HBox --- In flexcoders@yahoogroups.com, Douglas Knudsen [EMAIL PROTECTED] wrote: Its certainly possible to do this. Try the following mx:itemRenderer mx:Component mx:HBox mx:Script . Cheers! DK On Nov 12, 2007 8:59 AM, johantrax [EMAIL PROTECTED] wrote: Seems to me that Flex doesn't like scripts anywhere but in the root of a document. I do not have any experience with item-renderers, nor do I have with loaders, but this is my guess: If you create the ItemRenderer as a custom mxml-component, then you should be able to set a script-block in this file. Again this is just my wild thinking, but I hope that with it, you, or others in here, might get to a working example. Good luck, --jeetee --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, triggersoftware david.bates@ wrote: When using 'manual' you could try using the setter method, again from the docs... I've tried doing this but Flex doesn't like having script blocks in the item renderer. When needed for binding, take a look at BindingUtils.bindSetter I don't know what to do with this as I can't get into a SCRIPT block. A small example would really help. Cheers, David. ... [cut out response] ... --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, triggersoftware david.bates@ wrote: I'm trying to create a progress bar item renderer, but I can't get the value of progress bar to bind: mx:AdvancedDataGridColumn headerText=% Complete width=100 mx:itemRenderer mx:Component mx:VBox mx:Label id=lbl text={data.percentageComplete}/ mx:ProgressBar label=%3%% maximum=100 width=100% mode=manual source={data.percentageComplete}/ /mx:VBox /mx:Component /mx:itemRenderer /mx:AdvancedDataGridColumn You don't appear to be able to bind the value using source. What am I doing wrong? -- Douglas Knudsen http://www.cubicleman.com this is my signature, like it?
[flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?)
Looks like quite a few people are tackling the same problems, or have at least had it in the back of their minds. I understand the history of the flash player, what kinds of applications it's been used for, and I also understand how large an undertaking it would be to make the current Flex components thread-safe, etc. The big problem I have, and I think others have already touched on it, Flex and AIR are being marketed as the evolution of RIAs, and I honestly believe they are. But there are some pretty big hurdles to overcome to make the user experience as rich as possible, the development as painless as possible, and the RIA as powerful as possible. In my case the server is doing a TON of the work, so offload it to the server is already pretty much the case. That being said you can't fine tune ALL your data for a particular view. The Flex UI I'm working on is just one of the consumers of the XML data available on the server. I get a large chunk of XML, I process it, and then I need to make intelligent decisions about updating various data models and the view reacts to those changes. The problem is when all of this happens serially in event listeners, the UI is blocked. I hear a lot of suggestions to split the work up and do it in the next frame. Most of my work prior to Flex has been Java and similar languages, so I'm still getting used to the idea of thinking in frames. Can someone give me a good example of how to split this work across frames? Most of the work is being done in the result of Cairngorm commands, which aren't DisplayObjects so callLater() isn't available. Do I need to have these commands somehow listen for a frame change on the application? That seems like a very un-clean way of handling this. I've been considering some of the suggestions of using a Timer. I may create a WorkQueue where I can pass function references and parameters. Start a timer and have the WorkQueue listen for the timerEvent and process the next action. I think it'd be great to hear from more Adobe employees such as Alex about how they are currently handling problems such as this, and any possible plans for the future of Flex and AIR to handle more client-side processing. Maybe a series of blog posts are in order. Thanks again for the great responses.
[flexcoders] FlexBuilder 3 Beta 2 charting and license
Hi, I realize there were several messages about this before, but I'd just like to clarify: Currently, with the FlexBuilder 3 Beta 2 trial, when I try to use the AdvancedDataGrid, for instance, the running Flex application displays a watermark to the effect that it's the Flex data visualization trial. I have a FlexBuilder 2 license, but not a charting license. If I purchased a license for Flex Charting for the Flex 2 SDK, would that license key make the watermark disappear in the AdvancedDataGrid in FlexBuilder 3, also? Thanks, -- Frank
Re: [flexcoders] Drag and drop question
var target:UIComponent = event.curentTarget as UIComponent; var dragProxy:UIComponent = new UIComponent(); var w:Number = Math.round(target.width / target.scaleX); // will throw error if greater than 2880 var h:Number = Math.round(target.height / target.scaleY) // will throw error if greater than 2880 var bitmapData:BitmapData = new BitmapData(w,h); bitmapData.draw(target); // draw target into bitmap dragProxy.setActualSize(w,h); dragProxy.graphics.beginBitmapFill(bitmapData) dragProxy.graphics.drawRect(0, 0 ,w, h); // draw bitmap onto proxy component. Sorry this is taking so much back and forth. - Dan Freiman On Nov 12, 2007 11:57 AM, Mirko Sabljić [EMAIL PROTECTED] wrote: Still doesn't work, would it be too much to ask you to post that code to draw bitmap data onto UIComponent? I tried to implment that idea with following code: public function dragItMain(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; // Create a DragSource object. var dragSource:DragSource = new DragSource(); dragSource.addData(dragInitiator, main); var target:UIComponent = event.curentTarget as UIComponent; var bitmapData:BitmapData = new BitmapData( Math.round(target.width / target.scaleX), Math.round(target.height / target.scaleY), false); bitmapData.draw(target); var bitmap:Bitmap = new Bitmap(bitmapData); var bitmapHolder:UIComponent = new UIComponent(); bitmapHolder.addChild(bitmap); // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, dragSource, event, bitmapHolder); } But all i got is the following error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() Daniel Freiman wrote: Sorry, try BitmapAsset instead of Bitmap, which extends Bitmap and implements IFlexDisplayObject. If that doesn't work, I have code to draw the bitmap data onto a UIComponent. - Dan Freiman On Nov 12, 2007 7:13 AM, Mirko Sabljić [EMAIL PROTECTED]msabljic%40gmail.com wrote: I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } But now i get the following error: 1067: Implicit coercion of a value of type flash.display:Bitmap to an unrelated type mx.core:IFlexDisplayObject. on line: DragManager.doDrag(dragInitiator, event, dragProxy); Do you maybe know how can i solve this? thank you Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height ); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED] msabljic%40gmail.commsabljic%40gmail.com wrote: Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var dragProxy:UIComponent = new UIComponent; dragProxy = event.currentTarget as UIComponent; / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } then the original UIComponent (which is a drag source) is used as dragProxy while dragging it but that same component dissapears from its original position as soon as dragging starts. How can i accomplish that drag source UIComponent's image is used as dragProxy but the same source drag UIComponent is intact while dragging? thanks in advance -- Best regards, Mirko mailto:msabljic[at]gmail.com
[flexcoders] Need some help with my barchart, vertical axis, and placement
my vertical axis are names, and the way it is now they are justified right, along the side of the chart. Can I have that justified left? And if so, how is it done? Thanks, Mark
RE: [flexcoders] FlexBuilder 3 Beta 2 charting and license
Yes it would. Matt From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of frank_sommers Sent: Monday, November 12, 2007 9:32 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] FlexBuilder 3 Beta 2 charting and license Hi, I realize there were several messages about this before, but I'd just like to clarify: Currently, with the FlexBuilder 3 Beta 2 trial, when I try to use the AdvancedDataGrid, for instance, the running Flex application displays a watermark to the effect that it's the Flex data visualization trial. I have a FlexBuilder 2 license, but not a charting license. If I purchased a license for Flex Charting for the Flex 2 SDK, would that license key make the watermark disappear in the AdvancedDataGrid in FlexBuilder 3, also? Thanks, -- Frank
RE: [flexcoders] Custom itemRenderer using Label Question
I would store the CB's DP somewhere so you can get at it w/o creating an editor. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of j_lentzz Sent: Monday, November 12, 2007 6:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Custom itemRenderer using Label Question Hi, I'm using the following code to set the data of an extended Label being used as an itemRenderer in a datagrid. The editor for the cell is a combobox. What I'm doing is taking the data value sent down for that cell (a number), looking it up in the dataprovider of the combobox and displaying the corresponding label in my custom Label widget. What I'm wondering is if this is the best way to do it. In particular, the part that concerns me is that I'm creating an instance of the combobox editor to get the dataprovider collection to search. Any thoughts would be greatly appreciated. Thanks, John override public function set data(value:Object):void { super.data = value; var cbr:ComboBoxRenderer; // will contain renderer for this cell var dg:DataGrid; // reference to grid containing this cell var dp:ArrayCollection; // dataProvider of selected cell's comboBox if (listData != null) { dg = DataGrid(listData.owner); cbr = dg.columns[listData.columnIndex].itemEditor.newInstance(); dp = cbr.dataProvider as ArrayCollection; // now iterate through dp to find a matching data value, when found put its label in the Label widget var dpLen:int = dp.length; for (var j:int=0; jdpLen; j++) { if (dp.getItemAt(j).data == data[DataGridListData(listData).dataField]) { // found match this.text = dp.getItemAt(j).label; // + + dp.getItemAt(j).data; trace('found LabelWithDownArrow'); return; } } // not found, so show comboBox prompt this.text = cbr.prompt; } }
Re: [flexcoders] Drag and drop question
I just tried your code and i keep getting the same error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() so i am really confused now :-/ thank you very much for your time and help Daniel Freiman wrote: var target:UIComponent = event.curentTarget as UIComponent; var dragProxy:UIComponent = new UIComponent(); var w:Number = Math.round(target.width / target.scaleX); // will throw error if greater than 2880 var h:Number = Math.round(target.height / target.scaleY) // will throw error if greater than 2880 var bitmapData:BitmapData = new BitmapData(w,h); bitmapData.draw(target); // draw target into bitmap dragProxy.setActualSize(w,h); dragProxy.graphics.beginBitmapFill(bitmapData) dragProxy.graphics.drawRect(0, 0 ,w, h); // draw bitmap onto proxy component. Sorry this is taking so much back and forth. - Dan Freiman On Nov 12, 2007 11:57 AM, Mirko Sabljić [EMAIL PROTECTED] wrote: Still doesn't work, would it be too much to ask you to post that code to draw bitmap data onto UIComponent? I tried to implment that idea with following code: public function dragItMain(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; // Create a DragSource object. var dragSource:DragSource = new DragSource(); dragSource.addData(dragInitiator, main); var target:UIComponent = event.curentTarget as UIComponent; var bitmapData:BitmapData = new BitmapData( Math.round(target.width / target.scaleX), Math.round(target.height / target.scaleY), false); bitmapData.draw(target); var bitmap:Bitmap = new Bitmap(bitmapData); var bitmapHolder:UIComponent = new UIComponent(); bitmapHolder.addChild(bitmap); // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, dragSource, event, bitmapHolder); } But all i got is the following error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() Daniel Freiman wrote: Sorry, try BitmapAsset instead of Bitmap, which extends Bitmap and implements IFlexDisplayObject. If that doesn't work, I have code to draw the bitmap data onto a UIComponent. - Dan Freiman On Nov 12, 2007 7:13 AM, Mirko Sabljić [EMAIL PROTECTED]msabljic%40gmail.com wrote: I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } But now i get the following error: 1067: Implicit coercion of a value of type flash.display:Bitmap to an unrelated type mx.core:IFlexDisplayObject. on line: DragManager.doDrag(dragInitiator, event, dragProxy); Do you maybe know how can i solve this? thank you Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height ); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED] msabljic%40gmail.commsabljic%40gmail.com wrote: Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var dragProxy:UIComponent = new UIComponent; dragProxy = event.currentTarget as UIComponent; / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } then the original UIComponent (which is a drag source) is used as dragProxy while dragging it but that same component dissapears from its original position as soon as
[flexcoders] Re: Problem with events, how event dispatched when state change?
Hello Ralf, i'm using a binding but the problem is my combo had array collection and labelfield of combo is nome, for that reason i must loop over my dataprovider of combobox to find the nome saved in database and select that nome in combo... i had 5 combobox and i not sure create 5 public var for selected index is the best way... I use a custom component for each page in my viewstack, and now i call function on show of this custom component and now work. Thanks. --- In flexcoders@yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: Hi Daniel If you use a binding between a value of you model and the selectedIndex of your combobox, the control updates automatically whenever you change the model property. //in MyModel [Bindable] public var selectedIndex : int //in MyForm mx:ComboBox selectedIndex={ myModel.selectedIndex } .../ Now whenever you change myModel.selectedIndex, the combobox will update automatically. You can find some more examples of binding in the docs. Cheers Ralf.
[flexcoders]SWFLoader Security Sandbox issue
I'm trying to load in a swf from another domain (chatopica chat room) and cant work around the security sandbox. This works fine locally but when I put it on the server I get the security domain errors. What am I missing? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize={init()} backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FF, #FF] xmlns:ns1=* mx:Script ![CDATA[ private function init():void { Security.allowDomain('static.chatopica.com') Security.allowDomain('static.chatopica.com/chat.swf') Security.allowDomain('http://static.chatopica.com/chat.swf') Security.allowDomain(' static.chatopica.com/chat.swf?room=flash') Security.allowDomain(' http://static.chatopica.com/chat.swf?room=flash') Security.allowDomain('http://static.chatopica.com') } private function initLoader(event:Event):void { // errors out here. this is a hack to fix the width and height of the chat room to match the swfloader event.target.application.width = swfLoader1.width; event.target.application.height = swfLoader1.height; } ]] /mx:Script mx:SWFLoader id=swfLoader1 scaleContent=true x=30 y=30 width=500 height=500 source=http://static.chatopica.com/chat.swf?room=flash; init={event.target.content.addEventListener ('applicationComplete',initLoader)}/ mx:Label x=30 y=4 text=Example embedding Chatopica/ /mx:Application
Re: [flexcoders] Re: Problem with events, how event dispatched when state change?
and i not sure create 5 public var for selected index is the best way... It is actually - especially because you can unit test it without the ui I'm using a model class for all my comboboxes, which contains the dataProvider and a selectedIndex property. However, if you don't want to go down that route, you can either use a binding function, if the whole dataProvider is replaced you add CollectionChange handling to your dataProvider if it is changed. You can use myArrayCollection.itemUpdated(..) to trigger this event. Cheers Ralf. On Nov 12, 2007 7:44 PM, danielvlopes [EMAIL PROTECTED] wrote: Hello Ralf, i'm using a binding but the problem is my combo had array collection and labelfield of combo is nome, for that reason i must loop over my dataprovider of combobox to find the nome saved in database and select that nome in combo... i had 5 combobox and i not sure create 5 public var for selected index is the best way... I use a custom component for each page in my viewstack, and now i call function on show of this custom component and now work. Thanks. --- In flexcoders@yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: Hi Daniel If you use a binding between a value of you model and the selectedIndex of your combobox, the control updates automatically whenever you change the model property. //in MyModel [Bindable] public var selectedIndex : int //in MyForm mx:ComboBox selectedIndex={ myModel.selectedIndex } .../ Now whenever you change myModel.selectedIndex, the combobox will update automatically. You can find some more examples of binding in the docs. Cheers Ralf.
Re: [flexcoders] Re: Problem with events, how event dispatched when state change?
sorry, that message got garbled a bit However, if you don't want to go down that route, you can either use a binding function, if the whole dataProvider is replaced or you add CollectionChange handling to your dataProvider, if it is changed. You can use myArrayCollection.itemUpdated(..) to trigger this event. r. On Nov 12, 2007 8:15 PM, Ralf Bokelberg [EMAIL PROTECTED] wrote: and i not sure create 5 public var for selected index is the best way... It is actually - especially because you can unit test it without the ui I'm using a model class for all my comboboxes, which contains the dataProvider and a selectedIndex property. However, if you don't want to go down that route, you can either use a binding function, if the whole dataProvider is replaced you add CollectionChange handling to your dataProvider if it is changed. You can use myArrayCollection.itemUpdated(..) to trigger this event. Cheers Ralf. On Nov 12, 2007 7:44 PM, danielvlopes [EMAIL PROTECTED] wrote: Hello Ralf, i'm using a binding but the problem is my combo had array collection and labelfield of combo is nome, for that reason i must loop over my dataprovider of combobox to find the nome saved in database and select that nome in combo... i had 5 combobox and i not sure create 5 public var for selected index is the best way... I use a custom component for each page in my viewstack, and now i call function on show of this custom component and now work. Thanks. --- In flexcoders@yahoogroups.com, Ralf Bokelberg [EMAIL PROTECTED] wrote: Hi Daniel If you use a binding between a value of you model and the selectedIndex of your combobox, the control updates automatically whenever you change the model property. //in MyModel [Bindable] public var selectedIndex : int //in MyForm mx:ComboBox selectedIndex={ myModel.selectedIndex } .../ Now whenever you change myModel.selectedIndex, the combobox will update automatically. You can find some more examples of binding in the docs. Cheers Ralf.
Re: [flexcoders] Drag and drop question
Are you trying to instantiate a bitmap that has a width or hight greater than 2880? - Dan Freiman On Nov 12, 2007 1:23 PM, Mirko Sabljić [EMAIL PROTECTED] wrote: I just tried your code and i keep getting the same error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() so i am really confused now :-/ thank you very much for your time and help Daniel Freiman wrote: var target:UIComponent = event.curentTarget as UIComponent; var dragProxy:UIComponent = new UIComponent(); var w:Number = Math.round(target.width / target.scaleX); // will throw error if greater than 2880 var h:Number = Math.round(target.height / target.scaleY) // will throw error if greater than 2880 var bitmapData:BitmapData = new BitmapData(w,h); bitmapData.draw(target); // draw target into bitmap dragProxy.setActualSize(w,h); dragProxy.graphics.beginBitmapFill(bitmapData) dragProxy.graphics.drawRect(0, 0 ,w, h); // draw bitmap onto proxy component. Sorry this is taking so much back and forth. - Dan Freiman On Nov 12, 2007 11:57 AM, Mirko Sabljić [EMAIL PROTECTED]msabljic%40gmail.com wrote: Still doesn't work, would it be too much to ask you to post that code to draw bitmap data onto UIComponent? I tried to implment that idea with following code: public function dragItMain(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; // Create a DragSource object. var dragSource:DragSource = new DragSource(); dragSource.addData(dragInitiator, main); var target:UIComponent = event.curentTarget as UIComponent; var bitmapData:BitmapData = new BitmapData( Math.round(target.width / target.scaleX), Math.round(target.height / target.scaleY), false); bitmapData.draw(target); var bitmap:Bitmap = new Bitmap(bitmapData); var bitmapHolder:UIComponent = new UIComponent(); bitmapHolder.addChild(bitmap); // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, dragSource, event, bitmapHolder); } But all i got is the following error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() Daniel Freiman wrote: Sorry, try BitmapAsset instead of Bitmap, which extends Bitmap and implements IFlexDisplayObject. If that doesn't work, I have code to draw the bitmap data onto a UIComponent. - Dan Freiman On Nov 12, 2007 7:13 AM, Mirko Sabljić [EMAIL PROTECTED] msabljic%40gmail.commsabljic%40gmail.com wrote: I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } But now i get the following error: 1067: Implicit coercion of a value of type flash.display:Bitmap to an unrelated type mx.core:IFlexDisplayObject. on line: DragManager.doDrag(dragInitiator, event, dragProxy); Do you maybe know how can i solve this? thank you Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height ); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED]msabljic%40gmail.com msabljic%40gmail.commsabljic%40gmail.com wrote: Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var dragProxy:UIComponent = new UIComponent; dragProxy = event.currentTarget
Re: [flexcoders]SWFLoader Security Sandbox issue
I'm going to say try loading the crossdomain.xml explicitly and see if that fixes it. Security.loadPolicyFile(http://static.chatopica.com/crossdomain.xml;); Paul On Nov 12, 2007, at 12:45 PM, dorkie dork from dorktown wrote: I'm trying to load in a swf from another domain (chatopica chat room) and cant work around the security sandbox. This works fine locally but when I put it on the server I get the security domain errors. What am I missing? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize={init()} backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FF, #FF] xmlns:ns1=* mx:Script ![CDATA[ private function init():void { Security.allowDomain('static.chatopica.com') Security.allowDomain(' static.chatopica.com/chat.swf') Security.allowDomain('http://static.chatopica.com/chat.swf') Security.allowDomain ('static.chatopica.com/chat.swf? room=flash') Security.allowDomain(' http://static.chatopica.com/chat.swf?room=flash') Security.allowDomain('http://static.chatopica.com') } private function initLoader(event:Event):void { // errors out here. this is a hack to fix the width and height of the chat room to match the swfloader event.target.application.width = swfLoader1.width; event.target.application.height = swfLoader1.height; } ]] /mx:Script mx:SWFLoader id=swfLoader1 scaleContent=true x=30 y=30 width=500 height=500 source=http://static.chatopica.com/chat.swf?room=flash; init = {event .target.content.addEventListener('applicationComplete',initLoader)}/ mx:Label x=30 y=4 text=Example embedding Chatopica/ /mx:Application
[flexcoders] making tree node bold
Hi All, how to make a tree node bold in tree in Actionscript / mxml thanks
[flexcoders] Custom List component Height Issue
Hi all, I created a custom item renderer and in it I have: Canvas HBox Text /HBox /Canvas The text inside Text includes spaces like /r, so most items take up at least two lines. However my problem is that it only seems to be rendering the first line of text and is not displaying the rest. If I set the height strictly it'll display the full text, but this would seem odd for items that are only one line of text. Anyone have issues/solutions with variable heights in list items?
[flexcoders] Code for preventing browser caching of SWF
I'm trying to stop the client's browser from caching my flex app swf so that each time they call the html wrapper they get the latest swf. I've found some suggestions out there for accomplishing this, and I think adding the myapp.swf?build=12341234 (some timestamp) solution looks cleanest, but I was wondering... Has anyone modified their index.template.html wrapper so that each time you compile your app it auto-generates and appends that random (or time based) number like this? Anyone know if there's an example out there I can look at? It would be nice if this was automatic and I didn't have to implant a new number in the wrapper each time by hand. Thanks Darren
[flexcoders]What version of FP will the OLPC include?
I was reading on the OLPC and I am trying to figure out what the specifics are for the Flash Player. It looks like the Flash Player will be available as a separate download. What version would this be? http://wiki.laptop.org/go/Software_components#Applications_.28and_ports.29_under_development_for_B2 http://www.laptop.org/
Re: [flexcoders]SWFLoader Security Sandbox issue
Still getting this error: SecurityError: Error #2121: Security sandbox violation: Loader.content: http://www.flexcapacitor.com/flashusers/chatTest.swf cannot access http://static.chatopica.com/chat.swf?room=flash. This may be worked around by calling Security.allowDomain. at flash.display::Loader/get content() at mx.controls::SWFLoader/get content() at chatTest/__swfLoader1_init() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent() at mx.controls::SWFLoader/contentLoaderInfo_initEventHandler() On Nov 12, 2007 1:43 PM, Paul Decoursey [EMAIL PROTECTED] wrote: I'm going to say try loading the crossdomain.xml explicitly and see if that fixes it. Security.loadPolicyFile(http://static.chatopica.com/crossdomain.xml;); Paul On Nov 12, 2007, at 12:45 PM, dorkie dork from dorktown wrote: I'm trying to load in a swf from another domain (chatopica chat room) and cant work around the security sandbox. This works fine locally but when I put it on the server I get the security domain errors. What am I missing? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize={init()} backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FF, #FF] xmlns:ns1=* mx:Script ![CDATA[ private function init():void { Security.allowDomain('static.chatopica.com') Security.allowDomain(' static.chatopica.com/chat.swf'http://static.chatopica.com/chat.swf%27 ) Security.allowDomain(' http://static.chatopica.com/chat.swf'http://static.chatopica.com/chat.swf%27 ) Security.allowDomain (' static.chatopica.com/chat.swf?room=flash'http://static.chatopica.com/chat.swf?room=flash%27 ) Security.allowDomain(' http://static.chatopica.com/chat.swf?room=flash'http://static.chatopica.com/chat.swf?room=flash%27 ) Security.allowDomain('http://static.chatopica.com'http://static.chatopica.com%27 ) } private function initLoader(event:Event):void { // errors out here. this is a hack to fix the width and height of the chat room to match the swfloader event.target.application.width = swfLoader1.width; event.target.application.height = swfLoader1.height; } ]] /mx:Script mx:SWFLoader id=swfLoader1 scaleContent=true x=30 y=30 width=500 height=500 source=http://static.chatopica.com/chat.swf?room=flash; init={event.target.content.addEventListener ('applicationComplete',initLoader)}/ mx:Label x=30 y=4 text=Example embedding Chatopica/ /mx:Application
Re: [flexcoders]SWFLoader Security Sandbox issue
Ok here is my other idea.. change this: initialize={init()} to this: preinitialize=this.init(); My thinking is that the load is failing before you allow the domain. On Nov 12, 2007, at 2:15 PM, dorkie dork from dorktown wrote: Still getting this error: SecurityError: Error #2121: Security sandbox violation: Loader.content: http://www.flexcapacitor.com/flashusers/chatTest.swf cannot access http://static.chatopica.com/chat.swf?room=flash. This may be worked around by calling Security.allowDomain. at flash.display::Loader/get content() at mx.controls::SWFLoader/get content() at chatTest/__swfLoader1_init() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent () at mx.controls::SWFLoader/contentLoaderInfo_initEventHandler() On Nov 12, 2007 1:43 PM, Paul Decoursey [EMAIL PROTECTED] wrote: I'm going to say try loading the crossdomain.xml explicitly and see if that fixes it. Security.loadPolicyFile( http://static.chatopica.com/ crossdomain.xml); Paul On Nov 12, 2007, at 12:45 PM, dorkie dork from dorktown wrote: I'm trying to load in a swf from another domain (chatopica chat room) and cant work around the security sandbox. This works fine locally but when I put it on the server I get the security domain errors. What am I missing? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize={init()} backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FF, #FF] xmlns:ns1=* mx:Script ![CDATA[ private function init():void { Security.allowDomain('static.chatopica.com ') Security.allowDomain(' static.chatopica.com/ chat.swf') Security.allowDomain(' http://static.chatopica.com/chat.swf') Security.allowDomain (' static.chatopica.com/ chat.swf?room=flash') Security.allowDomain(' http://static.chatopica.com/chat.swf?room=flash' ) Security.allowDomain('http://static.chatopica.com') } private function initLoader(event:Event):void { // errors out here. this is a hack to fix the width and height of the chat room to match the swfloader event.target.application.width = swfLoader1.width; event.target.application.height = swfLoader1.height; } ]] /mx:Script mx:SWFLoader id=swfLoader1 scaleContent=true x=30 y=30 width=500 height=500 source=http://static.chatopica.com/chat.swf?room=flash; init={event.target.content.addEventListener ('applicationComplete',initLoader)}/ mx:Label x=30 y=4 text=Example embedding Chatopica/ /mx:Application
[flexcoders] HorizontalList drop indicator weirdness
Hello! I have a HorizontalList with drag drop enabled, so you can re-arrange stuff in it. For some reason in HorizontalList, the drop indicator line appears on top of an item instead of on the side of the item like in TileList. I was wondering if there's a way to change this. I was trying to reason why this is happening and my guess is HorizontalList is probably a TileList with direction=vertical and max row set to 1. Thus, it is working as if it is a tall 1-column list and that's why the drop indicator is on top of the item. I appreciate the advice!
[flexcoders] Custom skin on HScrollBar appearing differently than VScrollBar
Hi flexcoders! I have a VScrollBar and HScrollBar that both loads identical skins (it's simply some PNGs). The VScrollBar looks great, but HScrollBar ends up having slightly cropped up/down arrow (at the tip of the arrow) and the thumb is lower than where it's supposed to be. Why is this so? Anyone has an idea? Thanks!
RE: [flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?)
Rats, I've been singled out again. I was sort of hoping not to get too involved in this topic, but, since you asked... First, a little about me: I'm an old DOS/Windows app developer turned AS developer. I wrote code that had to fit in 640K, and later in Windows 2 which were both single threaded environments. I've done some multi-threaded Windows 3 code in the past, but know almost nothing about servers, and you can print out all of the Java code I've written and still not cover your dining room table. My background probably makes me more willing to jump through hoops to make things work in the environment I've been given. I'm all about leveraging what's there and will sacrifice some maintainability in order to deliver a great user experience. I've written tons of assembly code, designed and implemented a custom overlay infrastructure to get MBs of code to run in 640K and lots of other 'crazy' things. To me, the Flash Player is a new paradigm/platform. I don't even consider it to be single-threaded, but rather, completely event-driven. We can wish it was Java, Windows XP, Linux, etc, but it isn't. It was designed to optimize animation in a browser plug-in environment, in the smallest possible download so as to encourage ubiquity. Plenty of studies show that proper use of animation in a presentation can significantly improve the chances your application will achieve its goals of learnabiity, reduced errors, task completion time, retention, etc. To me, that is the promise of ria. It is not an opportunity to offload servers. In fact, the whole principle of web-hosted apps is the notion of zero-install, i.e, not having to visit every desktop. The more work you push into your client, the greater the chances are that you'll have to visit them to upgrade their box. So, if I were in your shoes, I'd be trying to design apps that leverage these advantages, while working around the limitations via things like pseudo-threading, paging data, etc. However, I'm not in your shoes. I've never built and delivered a RIA. I'm stuck in a cubicle, improving the framework, but I never really have the time and opportunity to use it from your perspective; We rely on feedback from those of you who are in the trenches. I can only offer unproven ideas. Will there be threading in some future Flash Player? Probably. Do you need threading now? Probably. Can pseudo-threading solve it for now? Probably. Maybe I'll try to put together a general pseudo-threading engine. Keep in mind one thing about threading: While it will help you show progress or spin a busy cursor while cranking lots of data, if the user is waiting for its completion as part of the workflow, it will still seem painful to the user. It will always be better to try to design the app to avoid any serious cranking in the workflow. That's why paging of data is useful. If your DataGrid can only show 8 rows of data, go get 8 rows and get the rest later. Show a low-res thumbnail and get the high-res later. Use your imagination, learn how to think in this new platform, and design for the user, and forget for a moment that their computer is a fast as the server. After all, they may be running their virus scan at the same time as your app, or watching some video, so you cannot always factor that CPU into your load-balancing equation, and it in theory, it is the user's experience that matters most. Of course, I could be wrong... -Alex From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of danielggold Sent: Monday, November 12, 2007 9:11 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?) Looks like quite a few people are tackling the same problems, or have at least had it in the back of their minds. I understand the history of the flash player, what kinds of applications it's been used for, and I also understand how large an undertaking it would be to make the current Flex components thread-safe, etc. The big problem I have, and I think others have already touched on it, Flex and AIR are being marketed as the evolution of RIAs, and I honestly believe they are. But there are some pretty big hurdles to overcome to make the user experience as rich as possible, the development as painless as possible, and the RIA as powerful as possible. In my case the server is doing a TON of the work, so offload it to the server is already pretty much the case. That being said you can't fine tune ALL your data for a particular view. The Flex UI I'm working on is just one of the consumers of the XML data available on the server. I get a large chunk of XML, I process it, and then I need to make intelligent decisions about updating various data models and the view reacts to those changes. The problem is when all of this happens serially in event listeners, the UI is blocked. I hear a lot of suggestions to split the work up and
[flexcoders] Drag-scroll in a List not working on Mac (?)
I have a List that has drag drop enabled so you can rearrange the items. On Windows, while you are dragging an item, you can go near the bottom of the list and it'll scroll if there are more content and it's scrollable. I can't seem to get this behavior on Mac. Is this a known bug? Thanks!
Re: [flexcoders] Drag and drop question
Definitely not, width and height of the image is under 1000px so i guess that's not the problem? Daniel Freiman wrote: Are you trying to instantiate a bitmap that has a width or hight greater than 2880? - Dan Freiman On Nov 12, 2007 1:23 PM, Mirko Sabljić [EMAIL PROTECTED] wrote: I just tried your code and i keep getting the same error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() so i am really confused now :-/ thank you very much for your time and help Daniel Freiman wrote: var target:UIComponent = event.curentTarget as UIComponent; var dragProxy:UIComponent = new UIComponent(); var w:Number = Math.round(target.width / target.scaleX); // will throw error if greater than 2880 var h:Number = Math.round(target.height / target.scaleY) // will throw error if greater than 2880 var bitmapData:BitmapData = new BitmapData(w,h); bitmapData.draw(target); // draw target into bitmap dragProxy.setActualSize(w,h); dragProxy.graphics.beginBitmapFill(bitmapData) dragProxy.graphics.drawRect(0, 0 ,w, h); // draw bitmap onto proxy component. Sorry this is taking so much back and forth. - Dan Freiman On Nov 12, 2007 11:57 AM, Mirko Sabljić [EMAIL PROTECTED]msabljic%40gmail.com wrote: Still doesn't work, would it be too much to ask you to post that code to draw bitmap data onto UIComponent? I tried to implment that idea with following code: public function dragItMain(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; // Create a DragSource object. var dragSource:DragSource = new DragSource(); dragSource.addData(dragInitiator, main); var target:UIComponent = event.curentTarget as UIComponent; var bitmapData:BitmapData = new BitmapData( Math.round(target.width / target.scaleX), Math.round(target.height / target.scaleY), false); bitmapData.draw(target); var bitmap:Bitmap = new Bitmap(bitmapData); var bitmapHolder:UIComponent = new UIComponent(); bitmapHolder.addChild(bitmap); // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, dragSource, event, bitmapHolder); } But all i got is the following error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() Daniel Freiman wrote: Sorry, try BitmapAsset instead of Bitmap, which extends Bitmap and implements IFlexDisplayObject. If that doesn't work, I have code to draw the bitmap data onto a UIComponent. - Dan Freiman On Nov 12, 2007 7:13 AM, Mirko Sabljić [EMAIL PROTECTED] msabljic%40gmail.commsabljic%40gmail.com wrote: I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } But now i get the following error: 1067: Implicit coercion of a value of type flash.display:Bitmap to an unrelated type mx.core:IFlexDisplayObject. on line: DragManager.doDrag(dragInitiator, event, dragProxy); Do you maybe know how can i solve this? thank you Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height ); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED]msabljic%40gmail.com msabljic%40gmail.commsabljic%40gmail.com wrote: Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent;
[flexcoders] ComputeSpectrum to generate image of mp3 file
Would anyone know how to use computespectrum to generate an image that represents the whole waveform of the mp3, like what you see if you open up a music file in an audio editor? I've seen articles on making visualizers, but those are for realtime display, whereas I need a representation of the whole waveform. Thanks!
[flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?)
With the help and suggestions in this thread I'm currently looking through the app I'm working on and trying to decide what I need to gut. This is where examples from others can really help out, and a Pseudo-Threading-Engine example would probably be golden. I think any documentation about the Event-Driven model in Flex/Flash should have *** all over it to remind those of use who came from multi-threaded event driven applications that any listeners will be processed serially when an event is dispatched. I think that's where my mind took off with the event driven model and ran, thinking those listeners would be processed in some background Event thread. I have to be very careful how I structure this application because I am working in a team of ten developers. The performance problem I've been seeing has been exacerbated by the fact that other developers have registered their components as event listeners for many of the events I'm dispatching. With each new listener, my function becomes slower and slower as each listener action is basically added in-line. Going back to the drawing board on this application architecture.
[flexcoders] Grid lines in TileList
Am I correct that there is no style property to enable grid lines in a TileList?
[flexcoders] Re: Flex grid to serve 100K-1mil rows
Have you considered paging the dataset in the ActionScript, but applying the operations to the original ArrayCollection/Dataset? What I mean is, although the grid may only show say 15 records at a time, the dataset is still stored as an AS object and could be adjusted client side, and the current page reloaded. I'm imagining the bottleneck isn't the data structure, but rather the DataGrid rendering time. The other option which has already been mentioned would be to do it server side. You could also roll this into AIR and use the built in SQL Lite implementation for added ease and speed. -- William --- In flexcoders@yahoogroups.com, letterpigeon [EMAIL PROTECTED] wrote: Hi all, Thanks for all your responses. Maybe it'll be better if I described our use case in bit more in details. Our users send us trade file (sometimes has ~50K trades in it currently). And let say all of the trades have an invalid broker code, and all got kicked out, the user will have to go in and change the broker code 1 by 1 that could take them hours. Therefore, the ability for our users to perform mass actions on the dataset (either client side or server side) would be a huge win for us. Once again, thanks all. Ban --- In flexcoders@yahoogroups.com, hank williams hank777@ wrote: On Nov 12, 2007 4:35 AM, Tom Chiverton tom.chiverton@ wrote: On Friday 09 Nov 2007, letterpigeon wrote: Hi all, requirement is for the grid to be able to support up to 100K+ or even 1 million rows Why ? It's utterly impossible for a user to cope with this much data at once, so what's the point ? In general, the question of where to process data is totally legit. If you read carefully, he did not say he wanted to *show* 100k rows at once. He said he wanted to be able to do mass operations on it on the client side. Without understanding his application and architecture I cannot opine on whether it is better to do this on the client or server. But the idea, in applications that may need to scale, of doing more work on the client, is a good one. If you have lots of clients you can indeed save money on server costs by having the clients help with the work. Hank
Re: [flexcoders]SWFLoader Security Sandbox issue
I'm still getting the error. I created a button that creates the swf dynamically so I can make sure to wait long enough to load the crossdomain file. I think maybe its that I am trying to script (change the values of) the chat.swf application. http://www.flexcapacitor.com/flashusers/chatTest.html reading the manual again... On Nov 12, 2007 2:23 PM, Paul Decoursey [EMAIL PROTECTED] wrote: Ok here is my other idea.. change this: initialize={init()} to this: preinitialize=this.init(); My thinking is that the load is failing before you allow the domain. On Nov 12, 2007, at 2:15 PM, dorkie dork from dorktown wrote: Still getting this error: SecurityError: Error #2121: Security sandbox violation: Loader.content: http://www.flexcapacitor.com/flashusers/chatTest.swf cannot access http://static.chatopica.com/chat.swf?room=flash. This may be worked around by calling Security.allowDomain. at flash.display::Loader/get content() at mx.controls::SWFLoader/get content() at chatTest/__swfLoader1_init() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent () at mx.controls::SWFLoader/contentLoaderInfo_initEventHandler() On Nov 12, 2007 1:43 PM, Paul Decoursey [EMAIL PROTECTED] wrote: I'm going to say try loading the crossdomain.xml explicitly and see if that fixes it. Security.loadPolicyFile( http://static.chatopica.com/crossdomain.xmlhttp://static.chatopica.com/crossdomain.xml ); Paul On Nov 12, 2007, at 12:45 PM, dorkie dork from dorktown wrote: I'm trying to load in a swf from another domain (chatopica chat room) and cant work around the security sandbox. This works fine locally but when I put it on the server I get the security domain errors. What am I missing? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute initialize={init()} backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FF, #FF] xmlns:ns1=* mx:Script ![CDATA[ private function init():void { Security.allowDomain('static.chatopica.com http://static.chatopica.com ') Security.allowDomain(' static.chatopica.com/chat.swf'http://static.chatopica.com/chat.swf%27 ) Security.allowDomain(' http://static.chatopica.com/chat.swf'http://static.chatopica.com/chat.swf%27 ) Security.allowDomain (' static.chatopica.com/chat.swf?room=flash'http://static.chatopica.com/chat.swf?room=flash%27 ) Security.allowDomain(' http://static.chatopica.com/chat.swf?room=flash' http://static.chatopica.com/chat.swf?room=flash%27 ) Security.allowDomain('http://static.chatopica.com'http://static.chatopica.com%27 ) } private function initLoader(event:Event):void { // errors out here. this is a hack to fix the width and height of the chat room to match the swfloader event.target.application.width = swfLoader1.width; event.target.application.height = swfLoader1.height; } ]] /mx:Script mx:SWFLoader id=swfLoader1 scaleContent=true x=30 y=30 width=500 height=500 source=http://static.chatopica.com/chat.swf?room=flash; init={event.target.content.addEventListener('applicationComplete',initLoader)}/ mx:Label x=30 y=4 text=Example embedding Chatopica/ /mx:Application
RE: [flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?)
Both the browser Player and AIR are written in C++. There are Java implementations of earlier versions of the Player for mobile devices. The ActionScript and MXML compilers are written in Java. FlexBuilder is written in Java. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Richard Rodseth Sent: Sunday, November 11, 2007 8:10 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?) I don't know how the Flash Player is implemented, but I would expect C/C++. See also: http://developer.mozilla.org/en/docs/Tamarin http://developer.mozilla.org/en/docs/Tamarin Remember the player has a long history and download size has always been a priority. It wouldn't make sense to build one VM on top of another (relatively heavy) one. I've no idea how the poster got this idea. On 11/10/07, Sheriff [EMAIL PROTECTED] mailto:sherif626%40yahoo.com wrote: how would you know if flash is written in Java unless you have the source code or is that a guess? - Original Message From: Richard Rodseth [EMAIL PROTECTED] mailto:rrodseth%40gmail.com To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Sent: Saturday, November 10, 2007 9:15:50 PM Subject: Re: [flexcoders] Re: Where to do heavy lifting in a Flex app? (no threading?) That's news to me. On 11/10/07, John M. Resler johnmresler@ sbcglobal. net wrote: The Flash player is written in Java (big shock there) ... __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com http://mail.yahoo.com
RE: [flexcoders]SWFLoader Security Sandbox issue
Set up a custom LoaderContext with checkPolicyFile=true From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of dorkie dork from dorktown Sent: Monday, November 12, 2007 1:03 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders]SWFLoader Security Sandbox issue I'm still getting the error. I created a button that creates the swf dynamically so I can make sure to wait long enough to load the crossdomain file. I think maybe its that I am trying to script (change the values of) the chat.swf application. http://www.flexcapacitor.com/flashusers/chatTest.html http://www.flexcapacitor.com/flashusers/chatTest.html reading the manual again... On Nov 12, 2007 2:23 PM, Paul Decoursey [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Ok here is my other idea.. change this: initialize={init()} to this: preinitialize=this.init(); My thinking is that the load is failing before you allow the domain. On Nov 12, 2007, at 2:15 PM, dorkie dork from dorktown wrote: Still getting this error: SecurityError: Error #2121: Security sandbox violation: Loader.content: http://www.flexcapacitor.com/flashusers/chatTest.swf http://www.flexcapacitor.com/flashusers/chatTest.swf cannot access http://static.chatopica.com/chat.swf?room=flash http://static.chatopica.com/chat.swf?room=flash . This may be worked around by calling Security.allowDomain . at flash.display::Loader/get content() at mx.controls::SWFLoader/get content() at chatTest/__swfLoader1_init() at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.core::UIComponent/dispatchEvent () at mx.controls::SWFLoader/contentLoaderInfo_initEventHandler() On Nov 12, 2007 1:43 PM, Paul Decoursey [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: I'm going to say try loading the crossdomain.xml explicitly and see if that fixes it. Security.loadPolicyFile( http://static.chatopica.com/crossdomain.xml http://static.chatopica.com/crossdomain.xml ); Paul On Nov 12, 2007, at 12:45 PM, dorkie dork from dorktown wrote: I'm trying to load in a swf from another domain (chatopica chat room) and cant work around the security sandbox. This works fine locally but when I put it on the server I get the security domain errors. What am I missing? ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute initialize={init()} backgroundGradientAlphas=[1.0, 1.0] backgroundGradientColors=[#FF, #FF] xmlns:ns1=* mx:Script ![CDATA[ private function init():void { Security.allowDomain(' static.chatopica.com http://static.chatopica.com ') Security.allowDomain(' static.chatopica.com/chat.swf' http://static.chatopica.com/chat.swf%27 ) Security.allowDomain(' http://static.chatopica.com/chat.swf' http://static.chatopica.com/chat.swf%27 ) Security.allowDomain (' static.chatopica.com/chat.swf?room=flash' http://static.chatopica.com/chat.swf?room=flash%27 ) Security.allowDomain(' http://static.chatopica.com/chat.swf?room=flash' http://static.chatopica.com/chat.swf?room=flash%27 ) Security.allowDomain('http://static.chatopica.com' http://static.chatopica.com%27 ) } private function initLoader(event:Event):void { // errors out here. this is a hack to fix the width and height of the chat room to match the swfloader event.target.application.width = swfLoader1.width; event.target.application.height = swfLoader1.height; } ]] /mx:Script mx:SWFLoader id=swfLoader1 scaleContent=true x=30 y=30 width=500 height=500 source=http://static.chatopica.com/chat.swf?room=flash http://static.chatopica.com/chat.swf?room=flash init={event.target.content.addEventListener ('applicationComplete',initLoader)}/ mx:Label x=30 y=4 text=Example embedding Chatopica/ /mx:Application
RE: [flexcoders] Custom List component Height Issue
That renderer should not be necessary. Set wordWrap and variableRowHeight=true on the list From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of davidch204 Sent: Monday, November 12, 2007 11:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Custom List component Height Issue Hi all, I created a custom item renderer and in it I have: Canvas HBox Text /HBox /Canvas The text inside Text includes spaces like /r, so most items take up at least two lines. However my problem is that it only seems to be rendering the first line of text and is not displaying the rest. If I set the height strictly it'll display the full text, but this would seem odd for items that are only one line of text. Anyone have issues/solutions with variable heights in list items?
[flexcoders] Re: mx:List name/value pair
Alex, thanks your hint was good. Since the id was attribute of province xml part= province id=3 selected=falseUtrecht/province i could use [EMAIL PROTECTED] which i think is a little odd, or a bit 'hidden' for me, how can i see that i can use all the attributes off a listitem. But thanks, you pointed out the right direction. and i see Flex undelaying nature a little bit more clear. By the way i started with a commodore 16, which also asked for compact programming.( i saw your windows remark) Gerard --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I would use selectedItem.id From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gdruiven Sent: Sunday, November 11, 2007 1:41 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] mx:List name/value pair Hi , i'm new with flex an dthis list, not with actionscript and flash. my problem is, i have a mx:List and it's data comes out of a xml which i get from the server. it's a list of provinces, and they have a name and an id. I want to send the id back to the server when someone selects a province. i fill the list with dataProvider. But when i show the name of province, the listId.value is also the name of the province, but i want the value to be the id. Is there a way to show Province name in the list, and let the province id be the value? that is without writing to much as3. without using mx:dataProvidermx:Object label= data= //mx:dataProvider (also because i do not see how to fill this dynamicly. Gerard Druiven
[flexcoders] ComboBox that opens by default
I'm trying to create a simple ComboBox subclass that defaults to the open position, automatically displaying it's dropdown list. I'm trying to implement this as an itemRenderer for a DataGrid. Each time I call the open() function on the ComboBox subclass, it refuses to open. The dropdown list returns null at these key initialization events, so perhaps the open() call is rejected as the dropdown list hasn't been instantiated yet. I thought that was the point of the open() call? Setup: Mac OS X 10.4.10, Flex Builder 3. Anyhow, here's my hacky attempt at this subclass. Any input would be appreciated: package com.plasticbrain.controls { import flash.events.Event; import mx.controls.ComboBox; import mx.events.FlexEvent; public class ComboBoxOpen extends ComboBox { // Constructor. public function ComboBoxOpen() { super(); this.addEventListener(Event.ADDED_TO_STAGE, this.onAddedToStage); } private function onAddedToStage(evt:Event):void { // Try to open the ComboBox (doesn't work). this.open(); this.removeEventListener(Event.ADDED_TO_STAGE, this.onAddedToStage); this.addEventListener(FlexEvent.DATA_CHANGE, this.onDataChange);} private function onDataChange(evt:FlexEvent):void { // Try again to open the ComboBox (still doesn't work). this.open(); this.removeEventListener(FlexEvent.DATA_CHANGE, this.onDataChange); } } }
RE: [flexcoders] Casting Objects at Runtime (possible evolution of eval()?)
What is you want to know? BTW, take a look at the UIComponentDescriptor class. Are you planning to link into your SWF all possible components that your app might want to instantiate? Or are you going to put them into modules and load them as needed? - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of kevininnewyork Sent: Monday, November 12, 2007 7:50 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Casting Objects at Runtime (possible evolution of eval()?) Hello everyone, Kevin here from San Francisco building an application that is populated at runtime (i.e., no MXML) and whose Classes are not known at authoring time. Here is what I am trying to do: var VM:ViewManager=new ViewManager(); VM.addDisplayObject( myCanv, new Canvas(), {x:70, y:70, width:200, height:50}) VM.addDisplayObject( myLabel, new Label(), {x:70, y:70, width:200, height:50}) In my ViewManager, which I am extending from Sprite, but could be as primitive as an EventDispatcher for my uses with it, I'm trying to abstract whatever Components may be rendered at runtime. Thanks for any pointers, Oiled up in San Francisco
Re: [flexcoders] ComboBox that opens by default
OK, I was using the wrong event! I'm such a Flex novice. Here's the new class that works: package com.plasticbrain.controls { import mx.controls.ComboBox; import mx.events.FlexEvent; public class ComboBoxOpen extends ComboBox { // Constructor. public function ComboBoxOpen() { super(); this.addEventListener(FlexEvent.CREATION_COMPLETE, onComboBoxOpenCreationComplete); } private function onComboBoxOpenCreationComplete(evt:FlexEvent):void { trace(ComboBoxOpen CREATION_COMPLETE +evt.currentTarget); this.open(); this.removeEventListener(FlexEvent.CREATION_COMPLETE, onComboBoxOpenCreationComplete); } } } On 2007-11-12, at 1:49 PM, Stephen Downs wrote: I'm trying to create a simple ComboBox subclass that defaults to the open position, automatically displaying it's dropdown list. I'm trying to implement this as an itemRenderer for a DataGrid. Each time I call the open() function on the ComboBox subclass, it refuses to open. The dropdown list returns null at these key initialization events, so perhaps the open() call is rejected as the dropdown list hasn't been instantiated yet. I thought that was the point of the open() call? Setup: Mac OS X 10.4.10, Flex Builder 3. Anyhow, here's my hacky attempt at this subclass. Any input would be appreciated: pa ckage com.plasticbrain.controls { import flash.events.Event; import mx.controls.ComboBox; import mx.events.FlexEvent; public class ComboBoxOpen extends ComboBox { // Constructor. public function ComboBoxOpen() { super(); this.addEventListener(Event.ADDED_TO_STAGE, this.onAddedToStage); } private function onAddedToStage(evt:Event):void { // Try to open the ComboBox (doesn't work). this.open(); this.removeEventListener(Event.ADDED_TO_STAGE, this.onAddedToStage); this.addEventListener(FlexEvent.DATA_CHANGE, this.onDataChange);} private function onDataChange(evt:FlexEvent):void { // Try again to open the ComboBox (still doesn't work). this.open(); this.removeEventListener(FlexEvent.DATA_CHANGE, this.onDataChange); } } }
[flexcoders] Re: Custom itemRenderer using Label Question
Thanks. That's a good idea. Anything else seem funny? John --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I would store the CB's DP somewhere so you can get at it w/o creating an editor. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of j_lentzz Sent: Monday, November 12, 2007 6:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Custom itemRenderer using Label Question Hi, I'm using the following code to set the data of an extended Label being used as an itemRenderer in a datagrid. The editor for the cell is a combobox. What I'm doing is taking the data value sent down for that cell (a number), looking it up in the dataprovider of the combobox and displaying the corresponding label in my custom Label widget. What I'm wondering is if this is the best way to do it. In particular, the part that concerns me is that I'm creating an instance of the combobox editor to get the dataprovider collection to search. Any thoughts would be greatly appreciated. Thanks, John override public function set data(value:Object):void { super.data = value; var cbr:ComboBoxRenderer; // will contain renderer for this cell var dg:DataGrid; // reference to grid containing this cell var dp:ArrayCollection; // dataProvider of selected cell's comboBox if (listData != null) { dg = DataGrid(listData.owner); cbr = dg.columns[listData.columnIndex].itemEditor.newInstance(); dp = cbr.dataProvider as ArrayCollection; // now iterate through dp to find a matching data value, when found put its label in the Label widget var dpLen:int = dp.length; for (var j:int=0; jdpLen; j++) { if (dp.getItemAt(j).data == data[DataGridListData(listData).dataField]) { // found match this.text = dp.getItemAt(j).label; // + + dp.getItemAt(j).data; trace('found LabelWithDownArrow'); return; } } // not found, so show comboBox prompt this.text = cbr.prompt; } }
RE: [flexcoders] Re: Reference variables / pointers / hex heap addresses
I think your XML is getting autoconverted into untyped ActionScript objects (because you haven't specified format=e4x). So you're not getting the benefits of strong typing, which are faster access and better compile-time error checking. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of quiet.mountain Sent: Monday, November 12, 2007 7:17 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Reference variables / pointers / hex heap addresses Exactly as Gordon says. I was not expecting ac = event.result.products.rug; to change the value of ac to point to another object. Thanks for clearing pointers up for me. Gordon, you also mention datatype casting: To parse an XML file of rugs into an ArrayCollection of rug objects, is your suggestion to write an AS3 Rug Class that mirrors XML rug element fields and then cast ac = Rug(event.result).products.rug to end up with an ArrayCollection of Rug Objects? Sounds like a good idea - but I can already access all of the fields of each object without casting. What does casting buy me in this situation? Cheers, Rich --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Gordon Smith [EMAIL PROTECTED] wrote: His description indicated that he expected a var like ac to behave like a C reference. But that's not how AS works; a var like ac behaves like a C pointer. - Gordon From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Jerome Clarke Sent: Friday, November 09, 2007 9:34 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: Re: [flexcoders] Re: Reference variables / pointers / hex heap addresses I think what he's asking is why is it when he points to ac = new ArrayCollection(); say to for example address 1... but then later tells ActionScript ac = event.result.products.rug; and the address changes to 2 I think he was expecting ac to still point to address 1... but with the value of address 2 ( copied basically ) I might be wrong but as far as I know... unlike C/C++... AS3 isn't fully native like C/C++ so... allocating/deallocating memory is going to be slower... it's faster for the Flash player to allocate new memory, change the address to the new memory, dump the old address in garbage ( for to be garbage collected later ) rather than reallocating the memory... also AS3 doesn't exactly work like C/C++ anyways just like some other languages like PHP On Nov 9, 2007 10:02 PM, Gordon Smith [EMAIL PROTECTED] mailto:gosmith%40adobe.com wrote: Object references in ActionScript are like C pointers, not like C references. The statement ac = event.result.products.rug; changes the pointer ac so that instead of pointing to the ArrayCollection that you new'd, it now points to the rug. By the way, this makes no sense since ac is typed as an ArrayCollection, while products.rug is presumably NOT an ArrayCollection. The compiler can't report this error because it doesn't know what type event.result is. If the result object has some type, you should cast it: ac = SomeResultClass(event.result).products.rug why can I not directly manipulate my original object from within the function? You can access and change the state of that object within the function.. For example, within the function you can do things like ac.addItem() trace(ac.length) to manipulate your ArrayCollection. But if you want your function to make collectionAC point to a different object, you must write collectionAC = ... inside that function. Does that help? - Gordon From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of quiet.mountain Sent: Friday, November 09, 2007 10:19 AM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Reference variables / pointers / hex heap addresses Hi, Thanks for the reply, and yes I am coming from a c background. Even though the address itself is passed by value (passing a pointer by copy) the result is still a locally scoped function variable that points to the original object (see debug comments below). so you cannot change it [the address] I don't think I want to change it (the value of the class reference variable that points to the original object). I want to make changes to the original object itself (which I now have an address for via the pointer passed by copy). My question is why does the value of this locally scoped function variable
RE: [flexcoders] reference a class instance from another mxml
When your login component created a User instance, did it store it in a public instance variable (say, 'user') of the login component? If so, it should be accessible as myLoginComponent.user. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of elr Sent: Sunday, November 11, 2007 5:03 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] reference a class instance from another mxml HI, I can't find a way to access from an mxml B to a class C that was instanciated in a mxml A In my sample. a login component (mxml A) instanciates a user:User As soon as login is done, the second component (mxml B) should retrieve the user instance I referenced this user instance starting from component that composes it (mxml A) but I always get a 1119 error:Access of possibly undefined property user through a reference with static Class... Thx for your help Eric
[flexcoders] DataGrid not populating from XMLListCollection - namespace issue?
I've been trying to get a DataGrid populated from a WebService and having much trouble. I'm wondering if the issue might be namespace issues, but I'm confused by the usage and syntax of namespace from the posts I've found here on that. There is no data in the DataGrid, but it does appear to flicker and slightly resize it self when I call the service so it looks like _something_ is going on. I've bound the service response to an XMLListCollection so I can trace() it and I can see the XML tree that should be displayed in the DataGrid. Any ideas why it's not working? Would appreciate any help, been banging my head on this for days now. Thanks. Here is the mxml : ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.collections.XMLListCollection; import mx.controls.Alert; import mx.rpc.events.ResultEvent; private namespace ovServices = http://services.company.com;; use namespace ovServices; [Bindable] public var ordMedList:XMLListCollection; public var ordMedXMLList:XMLList; public function handleOrdMedSearch(event:ResultEvent):void { trace(handling OrdMedSearchResult); var resultXML:XML = XML(event.result); ordMedXMLList = resultXML.child(OrdMedList); //trace(ordMedList : + ordMedList); ordMedList = new XMLListCollection(ordMedXMLList); } ]] /mx:Script mx:WebService id=ordMedSearchWS wsdl=http://localhost:8080/OrderViewWeb/services/OrderableMed?wsdl; showBusyCursor=true mx:operation name=searchStartsWith resultFormat=e4x result=handleOrdMedSearch(event) mx:request searchText{ordMedSearchText.text}/searchText /mx:request /mx:operation /mx:WebService mx:HBox x=10 y=70 mx:Label text=Orderable Med Search / mx:TextInput id=ordMedSearchText width=100/ mx:Button label=Search click=ordMedSearchWS.searchStartsWith.send()/ mx:Label / /mx:HBox mx:DataGrid x=10 y=100 id=ordMeds width=400 dataProvider={ordMedList} mx:columns mx:DataGridColumn headerText=Id dataField=id width=100/ mx:DataGridColumn headerText=Desc dataField=desc / /mx:columns /mx:DataGrid /mx:Application Here is the xml from the trace : OrdMedList xmlns:ns1=http://services.company.com/; xmlns:soap=http://schemas.xmlsoap.org/soap/envelope/; ns2:OrdMed xmlns:ns2=http://services.company.com; ns2:desc xmlns=http://services.company.com;tylenol/ns2:desc ns2:id xmlns=http://services.company.com;7607/ns2:id /ns2:OrdMed ns2:OrdMed xmlns:ns2=http://services.company.com; ns2:desc xmlns=http://services.company.com;aspirin/ns2:desc ns2:id xmlns=http://services.company.com;7608/ns2:id /ns2:OrdMed ns2:OrdMed xmlns:ns2=http://services.company.com; ns2:desc xmlns=http://services.company.com;ibuprofen/ns2:desc ns2:id xmlns=http://services.company.com;7609/ns2:id /ns2:OrdMed /OrdMedList
RE: [flexcoders] classes
The compiler will not let me add Bla3 and Bla4 without throwing an error. In AS3, an overriding method must have exactly the same method signature as the method being overidden. The signature includes the number and type of the parameters, the return type, and the accessibility modifier (such as public, protected, private, etc.) If you need to add parameters, define a getBla2(). it also expects you to data type the methods The type of a method specifies the data type of the value that it returns. If it doesn't return a value, declare it to have type :void. - Gordon From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Donovan Sent: Sunday, November 11, 2007 10:58 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] classes I am not a Flex user, I don't know how to do that yet. But here is my problem anyways. I have been working on my final project for school. I set up all my classes. I was having difficulty with getting them to work. My base class contains all the data that is necessary to set up the all the class that follow. For example. package packageName{ //the base class public class A{ //the base class method public function getBla(bla1, bla2){ bla1 defined... bla2 defined... } } package packageName{ //on of the subclass's public class B extends A{ //subclass method override public function getBla(bla1, bla2, bla3, bla4 ){ bla1 and bla2 are inherited automatically bla3 and bla4 are defined } } package{ import flash.display.Sprite; import packageName.*; //the main class public class mainClassName extends Sprite{ private var theBla:B; public function mainClassName(){ theBla.getBla(); } } } Anyhow it didn't work. It seems that overriding does just that and only that, overide. The compiler will not let me add Bla3 and Bla4 without throwing an error. Also I can't remove the keyword override because the compiler thinks I am trying to override the Method when all I am really trying to do is update the method. Another problem I am trying to work out is data types. Not only does flash expect you to data type your parameters, but it also expects you to data type the methods. I am sure that I have some sort of misunderstanding about this, but here is my flawed interpretation anyways. public function getBla(bla1:String, bla2:String):String{ bla1 = 'bla bla bla'; bla2 = 'bla bla bla'; } But what if I want to add a string and a numeric type in the same method? Then what what datatype do I declare my method to be? public function getBla(bla1:String, bla2:int):???{ bla1 = 'bla bla bla'; bla2 = 123; } And if I am actually successful overiding or updating or whatever a method in a subclass, then how do I data type the subclass or base class for that matter? //base class public function getBla(bla1:String, bla2:String):?String?{ bla1 = 'bla bla bla'; bla2 = 123; } //subclass public function getBla(bla1:String, bla2:String, bla3:int, bla4:int):???{ bla3 = 456; bla4 = 123; } Also, if you notice that some of my terminology is off, then please feel free to correct me. I am still a learning the basics. Thanks, Donovan
[flexcoders] Re: Custom itemRenderer using Label Question
Thanks. That's a good idea. Anything else seem funny? John --- In flexcoders@yahoogroups.com, Alex Harui [EMAIL PROTECTED] wrote: I would store the CB's DP somewhere so you can get at it w/o creating an editor. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of j_lentzz Sent: Monday, November 12, 2007 6:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Custom itemRenderer using Label Question Hi, I'm using the following code to set the data of an extended Label being used as an itemRenderer in a datagrid. The editor for the cell is a combobox. What I'm doing is taking the data value sent down for that cell (a number), looking it up in the dataprovider of the combobox and displaying the corresponding label in my custom Label widget. What I'm wondering is if this is the best way to do it. In particular, the part that concerns me is that I'm creating an instance of the combobox editor to get the dataprovider collection to search. Any thoughts would be greatly appreciated. Thanks, John override public function set data(value:Object):void { super.data = value; var cbr:ComboBoxRenderer; // will contain renderer for this cell var dg:DataGrid; // reference to grid containing this cell var dp:ArrayCollection; // dataProvider of selected cell's comboBox if (listData != null) { dg = DataGrid(listData.owner); cbr = dg.columns[listData.columnIndex].itemEditor.newInstance(); dp = cbr.dataProvider as ArrayCollection; // now iterate through dp to find a matching data value, when found put its label in the Label widget var dpLen:int = dp.length; for (var j:int=0; jdpLen; j++) { if (dp.getItemAt(j).data == data[DataGridListData(listData).dataField]) { // found match this.text = dp.getItemAt(j).label; // + + dp.getItemAt(j).data; trace('found LabelWithDownArrow'); return; } } // not found, so show comboBox prompt this.text = cbr.prompt; } }
[flexcoders] ADOBE CEO Steps Down, COO to Replace Him
http://www.nytimes.com/aponline/technology/AP-Adobe-CEO-Personnel.html
Re: [flexcoders] Drag and drop question
Which line is is breaking on? What's the stack trace look like? - Dan Freiman On Nov 12, 2007 3:48 PM, Mirko Sabljić [EMAIL PROTECTED] wrote: Definitely not, width and height of the image is under 1000px so i guess that's not the problem? Daniel Freiman wrote: Are you trying to instantiate a bitmap that has a width or hight greater than 2880? - Dan Freiman On Nov 12, 2007 1:23 PM, Mirko Sabljić [EMAIL PROTECTED]msabljic%40gmail.com wrote: I just tried your code and i keep getting the same error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() so i am really confused now :-/ thank you very much for your time and help Daniel Freiman wrote: var target:UIComponent = event.curentTarget as UIComponent; var dragProxy:UIComponent = new UIComponent(); var w:Number = Math.round(target.width / target.scaleX); // will throw error if greater than 2880 var h:Number = Math.round(target.height / target.scaleY) // will throw error if greater than 2880 var bitmapData:BitmapData = new BitmapData(w,h); bitmapData.draw(target); // draw target into bitmap dragProxy.setActualSize(w,h); dragProxy.graphics.beginBitmapFill(bitmapData) dragProxy.graphics.drawRect(0, 0 ,w, h); // draw bitmap onto proxy component. Sorry this is taking so much back and forth. - Dan Freiman On Nov 12, 2007 11:57 AM, Mirko Sabljić [EMAIL PROTECTED] msabljic%40gmail.commsabljic%40gmail.com wrote: Still doesn't work, would it be too much to ask you to post that code to draw bitmap data onto UIComponent? I tried to implment that idea with following code: public function dragItMain(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; // Create a DragSource object. var dragSource:DragSource = new DragSource(); dragSource.addData(dragInitiator, main); var target:UIComponent = event.curentTarget as UIComponent; var bitmapData:BitmapData = new BitmapData( Math.round(target.width / target.scaleX), Math.round(target.height / target.scaleY), false); bitmapData.draw(target); var bitmap:Bitmap = new Bitmap(bitmapData); var bitmapHolder:UIComponent = new UIComponent(); bitmapHolder.addChild(bitmap); // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, dragSource, event, bitmapHolder); } But all i got is the following error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() Daniel Freiman wrote: Sorry, try BitmapAsset instead of Bitmap, which extends Bitmap and implements IFlexDisplayObject. If that doesn't work, I have code to draw the bitmap data onto a UIComponent. - Dan Freiman On Nov 12, 2007 7:13 AM, Mirko Sabljić [EMAIL PROTECTED] msabljic%40gmail.commsabljic%40gmail.commsabljic%40gmail.com wrote: I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); / // Call the DragManager doDrag() method to start the drag. DragManager.doDrag(dragInitiator, event, dragProxy); } But now i get the following error: 1067: Implicit coercion of a value of type flash.display:Bitmapto an unrelated type mx.core:IFlexDisplayObject. on line: DragManager.doDrag(dragInitiator, event, dragProxy); Do you maybe know how can i solve this? thank you Daniel Freiman wrote: Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height ); myBitmapData.draw(target); // draw target onto bitmap dragProxy = new Bitmap(myBitmapData); // - Dan Freiman On Nov 11, 2007 12:57 PM, [EMAIL PROTECTED] msabljic%40gmail.commsabljic%40gmail.com msabljic%40gmail.commsabljic%40gmail.com wrote: Hi, I am trying to drag an UIComponent instance over an Image object
Re: [flexcoders] Grid lines in TileList
Darn. Any suggestions for the 2-d dashboard-style grid I'm doing? I've played around with PlotChart, but it wants numeric axes, which I suppose I could fudge now that I'm building an adapted model. The TileList is working OK, but I tried alternating colours, and they appear vertically no matter what I set the direction to. I've also had some success with nested repeaters, but always worry about the overhead, though in this case the data set won't be very large. Doing a DG with a data-driven number of columns looked harder, but maybe I'm missing something simple. On 11/12/07, Alex Harui [EMAIL PROTECTED] wrote: Yes. Only DG has this style. Am I correct that there is no style property to enable grid lines in a TileList?
Re: [flexcoders] Grid lines in TileList
I was also having trouble getting rotated labels on a PlotChart - if anyone has an example of that, I'd love to see it. On 11/12/07, Richard Rodseth [EMAIL PROTECTED] wrote: Darn. Any suggestions for the 2-d dashboard-style grid I'm doing? I've played around with PlotChart, but it wants numeric axes, which I suppose I could fudge now that I'm building an adapted model. The TileList is working OK, but I tried alternating colours, and they appear vertically no matter what I set the direction to. I've also had some success with nested repeaters, but always worry about the overhead, though in this case the data set won't be very large. Doing a DG with a data-driven number of columns looked harder, but maybe I'm missing something simple. On 11/12/07, Alex Harui [EMAIL PROTECTED] wrote: Yes. Only DG has this style. Am I correct that there is no style property to enable grid lines in a TileList?