Re: [flexcoders] Any Developers on a Mac?
Kevlar suit... *check*! It's good. I'm happy with it, many people are. I think it's much better, many people agree. And many *other* people here will call me a big girl for thinking so. Which I find hilarious. But this is a well-abused topic here. Builder is slightly better in Windows. in my opinion everything else is better on Mac :) -Josh On Mon, Dec 29, 2008 at 8:24 PM, composerguru kbmulvih...@gmail.com wrote: I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Any Developers on a Mac?
I highly recommend searching the archive for the list. There was a pretty large discussion regarding this exact topic within the last few months. Dnk Sent from my iPhone On 29-Dec-08, at 2:24 AM, composerguru kbmulvih...@gmail.com wrote: I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin
RE: [flexcoders] Any Developers on a Mac?
General platform discussions aside, what is it that makes flexbuilder slightly worse on mac than it is in windows? I'm considering trying out a macbook pro as my next laptop (been on windows, sometimes linux, for past ten years or so), but most of my work is in flexbuilder these days so it would be nice to know. Many thanks! -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Josh McDonald Sent: 29 December 2008 10:44 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Any Developers on a Mac? Kevlar suit... *check*! It's good. I'm happy with it, many people are. I think it's much better, many people agree. And many *other* people here will call me a big girl for thinking so. Which I find hilarious. But this is a well-abused topic here. Builder is slightly better in Windows. in my opinion everything else is better on Mac :) -Josh On Mon, Dec 29, 2008 at 8:24 PM, composerguru kbmulvih...@gmail.com mailto:kbmulvih...@gmail.com wrote: I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf- 1e62079f6847 https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf -1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups Links (Yahoo! ID required) mailto:flexcoders-fullfeatu...@yahoogroups.com mailto:flexcoders-fullfeatu...@yahoogroups.com -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com mailto:j...@gfunk007.com :: http://flex.joshmcdonald.info/ http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk http://twitter.com/sophistifunk __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
Re: [flexcoders] DataGrid Sorting
On Mon, Dec 29, 2008 at 7:29 AM, Manu Dhanda manuraj.dha...@gmail.com wrote: I have CheckBox as an itemrenderer. and a custom sorting function for one another column. But once I sort that another column and after that try to use checkbox(to select items), why every selection of checkbox make a call to that custom sorting function?? Because when an item has been modified, either externally or through an item editor, the sort order indicated by the column's sort indicator (the arrow at the top) may have become invalid. The DataGrid has two options here: (1) remove the sort indicator, or (2) resort the collection with the new data. It chooses to resort. One workaround is to listen for the 'itemEditBeginning' event and reset the sort order on the collection. itemEditBeginning=dataGrid.dataProvider.sort = null This won't remove the sort arrow though -- a small discrepancy. I think this is a usability problem. The DataGrid should disable automatic sorting when the user is editing the cells; otherwise, the cells will move about every time the user tabs from one cell to another, and that's not a very nice experience. Manish
Re: [flexcoders] Any Developers on a Mac?
Just general stability, which is (AFAIK) all the fault of the Eclipse team and Apple HQ's low-prioritising of Java, not Adobe's. And IIRC there's a small part of the web service - AS3 generation stuff missing, but it's never been part of my workflow so I can't remember what that is. It's in the archives for the list though. On Mon, Dec 29, 2008 at 9:04 PM, Jim Hayes j...@primalpictures.com wrote: General platform discussions aside, what is it that makes flexbuilder slightly worse on mac than it is in windows? I'm considering trying out a macbook pro as my next laptop (been on windows, sometimes linux, for past ten years or so), but most of my work is in flexbuilder these days so it would be nice to know. Many thanks! -Original Message- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Josh McDonald *Sent:* 29 December 2008 10:44 *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Any Developers on a Mac? Kevlar suit... *check*! It's good. I'm happy with it, many people are. I think it's much better, many people agree. And many *other* people here will call me a big girl for thinking so. Which I find hilarious. But this is a well-abused topic here. Builder is slightly better in Windows. in my opinion everything else is better on Mac :) -Josh On Mon, Dec 29, 2008 at 8:24 PM, composerguru kbmulvih...@gmail.com wrote: I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Your email settings: Individual Email|Traditional Change settings via the Webhttp://groups.yahoo.com/group/flexcoders/join;_ylc=X3oDMTJnOXBnZjF2BF9TAzk3NDc2NTkwBGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRzZWMDZnRyBHNsawNzdG5ncwRzdGltZQMxMjMwNTQ4ODEz(Yahoo! ID required) Change settings via email: Switch delivery to Daily Digestflexcoders-dig...@yahoogroups.com?subject=email+delivery:+Digest| flexcoders-fullfeatu...@yahoogroups.com?subject=change+delivery+format:+Fully+Featured -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
[flexcoders] Any Developers on a Mac?
I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin
RE: [flexcoders] following error BlazeDs integration
That looks suspiciously like you either haven't got your server started, or it is misconfigured. Is this happening in a development environment or in live? If it is in live, then someone has hard coded a reference to the localhost rather than the correct url. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of sunmoorthy1 Sent: 28 December 2008 22:06 To: flexcoders@yahoogroups.com Subject: [flexcoders] following error BlazeDs integration faultCode:Client.Error.MessageSend faultString:'Send failed' faultDetail:'Channel.Connect.Failed error NetConnection.Call.Failed: HTTP: Failed: url: 'http://localhost:8080/billing/messagebroker/amf http://localhost:8080/billing/messagebroker/amf ''
RE: [flexcoders] File Uploading
Post the error stack trace so we can take a look. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of freak182 Sent: 29 December 2008 03:52 To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] File Uploading Hello, Thank you for your help...I just found nice flex uploading here: http://weblog.cahlan.com/files/file_uploads/FileUpload.html...they http://weblog.cahlan.com/files/file_uploads/FileUpload.html...they use php for server side ...actually it works but it gives me IOError #2038 ...im using servlet to upload file and my server is embeded jetty server run using mvn jetty:run-war. Is there any workaround with this? Thanks a lot Cheers Gregor Kiddie wrote: What's the problem you are having? Give a bit more information and we can see if we can help. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co.uk blocked::http://www.inps.co.uk/ http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpd...@inps.co.uk mailto:is.helpdesk%40inps.co.uk From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of freak182 Sent: 28 December 2008 15:01 To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: Re: [flexcoders] File Uploading Hello, Did you solve your problem in file uploading, because im having problem too with file upload in flex. Thanks a lot. Cheers. ericbichara wrote: O btw, i get no error message, just a Complete event back in flex /Eric -- View this message in context: http://www.nabble.com/File-Uploading-tp17081739p21193016.html http://www.nabble.com/File-Uploading-tp17081739p21193016.html http://www.nabble.com/File-Uploading-tp17081739p21193016.html http://www.nabble.com/File-Uploading-tp17081739p21193016.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://www.nabble.com/File-Uploading-tp17081739p21198780.html http://www.nabble.com/File-Uploading-tp17081739p21198780.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Any Developers on a Mac?
Flexbuilder on MacOSX sucks up memory like a hungry hog. Get 4Gb of RAM - you'll be glad you did. I'm stuck on an older MBP and 2Gb hasn't really provided much headroom since I started using FB3. Apart from that, it's all good. I haven't really had stability problems, just out of memory situations. On 29/12/2008, at 10:12 PM, Josh McDonald wrote: Just general stability, which is (AFAIK) all the fault of the Eclipse team and Apple HQ's low-prioritising of Java, not Adobe's. And IIRC there's a small part of the web service - AS3 generation stuff missing, but it's never been part of my workflow so I can't remember what that is. It's in the archives for the list though. On Mon, Dec 29, 2008 at 9:04 PM, Jim Hayes j...@primalpictures.com wrote: General platform discussions aside, what is it that makes flexbuilder slightly worse on mac than it is in windows? I'm considering trying out a macbook pro as my next laptop (been on windows, sometimes linux, for past ten years or so), but most of my work is in flexbuilder these days so it would be nice to know. Many thanks! -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Josh McDonald Sent: 29 December 2008 10:44 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Any Developers on a Mac? Kevlar suit... *check*! It's good. I'm happy with it, many people are. I think it's much better, many people agree. And many *other* people here will call me a big girl for thinking so. Which I find hilarious. But this is a well-abused topic here. Builder is slightly better in Windows. in my opinion everything else is better on Mac :) -Josh On Mon, Dec 29, 2008 at 8:24 PM, composerguru kbmulvih...@gmail.com wrote: I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
[flexcoders] Re: Need functions like Excel NPV, IRR, NPER
Do a google search for your requirements. For example, searches on NPV and IRR yielded the following: http://www.ehow.com/how_2187130_calculate-net-present-value-npv.html http://www.s-anand.net/Calculating_IRR.html You will then need to convert these algorithms to Actionscript (I could not find any Actionscript examples). --- In flexcoders@yahoogroups.com, Pete Appleby bon...@... wrote: Hi, everybody! I need to find Flex 3 functions to calculate NPV, IRR, and NPER just like in Excel. Are these out there anywhere? I don't want to reinvent the wheel. Thanks! Pete
Re: [flexcoders] File Uploading
Hi, The PHP file is not included in the source file. Do you know where to find it? Thank you. Pando From: freak182 eman.noll...@gmail.com To: flexcoders@yahoogroups.com Sent: Monday, December 29, 2008 11:51:46 AM Subject: RE: [flexcoders] File Uploading Hello, Thank you for your help...I just found nice flex uploading here: http://weblog. cahlan.com/ files/file_ uploads/FileUplo ad.html.. .they use php for server side ...actually it works but it gives me IOError #2038 ...im using servlet to upload file and my server is embeded jetty server run using mvn jetty:run-war. Is there any workaround with this? Thanks a lot Cheers Gregor Kiddie wrote: What's the problem you are having? Give a bit more information and we can see if we can help. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co. uk blocked::http://www.inps. co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ inps.co.uk _ _ __ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of freak182 Sent: 28 December 2008 15:01 To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] File Uploading Hello, Did you solve your problem in file uploading, because im having problem too with file upload in flex. Thanks a lot. Cheers. ericbichara wrote: O btw, i get no error message, just a Complete event back in flex /Eric -- View this message in context: http://www.nabble. com/File- Uploading- tp17081739p21193 016.html http://www.nabble. com/File- Uploading- tp17081739p21193 016.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://www.nabble. com/File- Uploading- tp17081739p21198 780.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Any Developers on a Mac?
It lacks some wizards in LCDS data connections, I think I use a MB for developing. Pretty good experience, that is :) Em 2008/12/29, às 11:12, Josh McDonald escreveu: Just general stability, which is (AFAIK) all the fault of the Eclipse team and Apple HQ's low-prioritising of Java, not Adobe's. And IIRC there's a small part of the web service - AS3 generation stuff missing, but it's never been part of my workflow so I can't remember what that is. It's in the archives for the list though. On Mon, Dec 29, 2008 at 9:04 PM, Jim Hayes j...@primalpictures.com wrote: General platform discussions aside, what is it that makes flexbuilder slightly worse on mac than it is in windows? I'm considering trying out a macbook pro as my next laptop (been on windows, sometimes linux, for past ten years or so), but most of my work is in flexbuilder these days so it would be nice to know. Many thanks! -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Josh McDonald Sent: 29 December 2008 10:44 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Any Developers on a Mac? Kevlar suit... *check*! It's good. I'm happy with it, many people are. I think it's much better, many people agree. And many *other* people here will call me a big girl for thinking so. Which I find hilarious. But this is a well-abused topic here. Builder is slightly better in Windows. in my opinion everything else is better on Mac :) -Josh On Mon, Dec 29, 2008 at 8:24 PM, composerguru kbmulvih...@gmail.com wrote: I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo ! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __ -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Your email settings: Individual Email|Traditional Change settings via the Web (Yahoo! ID required) Change settings via email: Switch delivery to Daily Digest | -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Center a Popup window
Thank you so much for the help Manish, that solution ended up working out great! Dan
[flexcoders] Re: Datagrid with timer - what is the best solution?
--- In flexcoders@yahoogroups.com, vincy8080 vincy8...@... wrote: Hi, I'm really new at flex programming, and I'm trying to implement this custom datagrid component: Column 1 and 2 would display datas based on a arraycollection Column 3 would display a countdown timer, counting from the value of column 1 to 0 When the timer reach 0, the line should be erased from the datagrid (and the arraycollection) What would be the best way to implement that? what do you think about custom datagrid with itemrenderer for the timer column? Could you please just tell me in a few words how the way you would implement such component? I think you have several choices for this, none of which really need you to extend DataGrid. One way is to use an itemRenderer that extends a class that implements IDropInListItemRenderer, which I believe label does. I'd add a script tag that had a function in it that implemented the timer. I'd start the timer in the override of the set data() function, whenever the renderer gets any non-null data. Once the timer reaches zero, you have a choice. Since your renderer extends IDropInListItemRenderer, you have access to the DataGrid's dataProvider in the listData property. This means that you could directly delete the item from the dataProvider from the renderer. Another is to generate an event when the timer reaches 0 and allow the containing application to decide what to do. The down side of this is that if the datagrid scrolls at all, items that are not displayed will not count down. Another way is to have the countdown be an actual property of the object itself and have a single timer in the containing app that counts down for all items, calling itemUpdated each time it changes an item. The datagrid would simply display the collection as normal. In this scenario, I probably wouldn't delete the item from the ArrayCollection at all, but would use a filterFunction that hides all items when the counter is 0. That way you can easily reset the display. Hope this gives you some ideas; Amy
[flexcoders] Custom Event Problem
For the file manager I am writing I am having an issue with dispatching a custom event. I have a tree on the left with a custom tree item renderer. In that renderer I have setup a context menu so the user can rename/remove/add directories easily. private function renameDirectory(event:ContextMenuEvent):void { _renamedir = new RenameDirectory _renamedir.oldDirectoryName = data.name; _renamedir.parentPath = data.parent; //add modal window PopUpManager.addPopUp(_renamedir,DisplayObject(Application.application),true); //center modal window PopUpManager.centerPopUp(_renamedir); } My RenameDirectory component works well and does the renaming just fine. The problem I am having is once the folder is renamed i need to refresh the tree to show the changes. I figured for all of my options (add/remove/delete) would just dispatch a custom event. Here is my RenameDirectory.mxml That is dispatching my custom event. ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute title=Rename Directory width=300 height=125 showCloseButton=true creationComplete=centerWindow() close=closeWindow() mx:Metadata [Event(name=refreshTree,type=events.RefreshTreeEvent)] /mx:Metadata mx:Script ![CDATA[ import mx.rpc.remoting.mxml.RemoteObject; import mx.controls.Alert; import mx.managers.PopUpManager; import events.RefreshTreeEvent; public var parentPath:String; public var oldDirectoryName:String; private var ro:RemoteObject = new RemoteObject(); private function centerWindow():void { PopUpManager.centerPopUp(this); } private function closeWindow():void { PopUpManager.removePopUp(this); } private function renameDirectory(event:Event):void { var _old = parentPath + \\ + oldDirectoryName; var _new = parentPath + \\ + newDirectoryName.text; if(_new != _old) { // rename the directory ro.destination = ColdFusion; ro.source = FFManager.src.cfc.FileManager; ro.renameDirectory(_old,_new); ro.showBusyCursor = true; dispatchEvent(new RefreshTreeEvent(refreshTree)); closeWindow(); } } ]] /mx:Script mx:HBox verticalCenter=0 horizontalCenter=0 mx:TextInput id=newDirectoryName text={oldDirectoryName} width=200/ mx:Button label=Save click=renameDirectory(event)/ /mx:HBox /mx:TitleWindow And my custom event. package events { import flash.events.Event; public class RefreshTreeEvent extends Event { public static const REFRESH_TREE:String = refreshTree; public function RefreshTreeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } The problem I am having is that I am unable to listen for this event in my main application. If I add this.addEventListener(RefreshTreeEvent.REFRESH_TREE,reloadTree); The reloadTree method is never called. What am I doing wrong? Thanks again..
Re: [flexcoders] File Uploading
I have one written in Flex/ColdFusion http://cfmu.riaforge.org Thank You Dan Vega danv...@gmail.com http://www.danvega.org On Mon, Dec 29, 2008 at 2:28 AM, Fernando Cabredo fcabred...@yahoo.comwrote: Hi, The PHP file is not included in the source file. Do you know where to find it? Thank you. Pando -- *From:* freak182 eman.noll...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Monday, December 29, 2008 11:51:46 AM *Subject:* RE: [flexcoders] File Uploading Hello, Thank you for your help...I just found nice flex uploading here: http://weblog. cahlan.com/ files/file_ uploads/FileUplo ad.html.. .theyhttp://weblog.cahlan.com/files/file_uploads/FileUpload.html...theyuse php for server side ...actually it works but it gives me IOError #2038 ...im using servlet to upload file and my server is embeded jetty server run using mvn jetty:run-war. Is there any workaround with this? Thanks a lot Cheers Gregor Kiddie wrote: What's the problem you are having? Give a bit more information and we can see if we can help. Gk. Gregor Kiddie Senior Developer INPS Tel: 01382 564343 Registered address: The Bread Factory, 1a Broughton Street, London SW8 3QJ Registered Number: 1788577 Registered in the UK Visit our Internet Web site at www.inps.co. uk blocked::http://www.inps. co.uk/ http://www.inps.co.uk/ The information in this internet email is confidential and is intended solely for the addressee. Access, copying or re-use of information in it by anyone else is not authorised. Any views or opinions presented are solely those of the author and do not necessarily represent those of INPS or any of its affiliates. If you are not the intended recipient please contact is.helpdesk@ inps.co.uk is.helpdesk%40inps.co.uk _ _ __ From: flexcod...@yahoogro ups.com flexcoders%40yahoogroups.com[mailto:flexcod...@yahoogro ups.com flexcoders%40yahoogroups.com] On Behalf Of freak182 Sent: 28 December 2008 15:01 To: flexcod...@yahoogro ups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] File Uploading Hello, Did you solve your problem in file uploading, because im having problem too with file upload in flex. Thanks a lot. Cheers. ericbichara wrote: O btw, i get no error message, just a Complete event back in flex /Eric -- View this message in context: http://www.nabble. com/File- Uploading- tp17081739p21193 016.htmlhttp://www.nabble.com/File-Uploading-tp17081739p21193016.html http://www.nabble. com/File- Uploading- tp17081739p21193 016.htmlhttp://www.nabble.com/File-Uploading-tp17081739p21193016.html Sent from the FlexCoders mailing list archive at Nabble.com. -- View this message in context: http://www.nabble. com/File- Uploading- tp17081739p21198 780.htmlhttp://www.nabble.com/File-Uploading-tp17081739p21198780.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Any Developers on a Mac?
My 0.2 is that I love OS X Apple software but I found I can't rely on Apple hardware. Maybe its bad luck but I have always had hardware problems and more than once a warrantied, applecared machine still took more than a week to resolve. At one point I was heavily invested on Apple hardware but over time the hardware issues really impacted productivity. I have tried to protect against hardware issues with backups and redundant hardware but for a macs it means $$. So now I am a Windows guy. If this machine breaks, gets stolen or whatever I could replace it with $300 a 20 minute drive. From: composerguru kbmulvih...@gmail.com To: flexcoders@yahoogroups.com Sent: Monday, December 29, 2008 2:24:40 AM Subject: [flexcoders] Any Developers on a Mac? I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin
[flexcoders] Re: Custom Event Problem
Try changing the bubbles property to true. The event needs to bubble to the top so that the application sees it. --- In flexcoders@yahoogroups.com, Dan Vega danv...@... wrote: For the file manager I am writing I am having an issue with dispatching a custom event. I have a tree on the left with a custom tree item renderer. In that renderer I have setup a context menu so the user can rename/remove/add directories easily. private function renameDirectory(event:ContextMenuEvent):void { _renamedir = new RenameDirectory _renamedir.oldDirectoryName = data.name; _renamedir.parentPath = data.parent; //add modal window PopUpManager.addPopUp(_renamedir,DisplayObject(Application.application),true); //center modal window PopUpManager.centerPopUp(_renamedir); } My RenameDirectory component works well and does the renaming just fine. The problem I am having is once the folder is renamed i need to refresh the tree to show the changes. I figured for all of my options (add/remove/delete) would just dispatch a custom event. Here is my RenameDirectory.mxml That is dispatching my custom event. ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute title=Rename Directory width=300 height=125 showCloseButton=true creationComplete=centerWindow() close=closeWindow() mx:Metadata [Event(name=refreshTree,type=events.RefreshTreeEvent)] /mx:Metadata mx:Script ![CDATA[ import mx.rpc.remoting.mxml.RemoteObject; import mx.controls.Alert; import mx.managers.PopUpManager; import events.RefreshTreeEvent; public var parentPath:String; public var oldDirectoryName:String; private var ro:RemoteObject = new RemoteObject(); private function centerWindow():void { PopUpManager.centerPopUp(this); } private function closeWindow():void { PopUpManager.removePopUp(this); } private function renameDirectory(event:Event):void { var _old = parentPath + \\ + oldDirectoryName; var _new = parentPath + \\ + newDirectoryName.text; if(_new != _old) { // rename the directory ro.destination = ColdFusion; ro.source = FFManager.src.cfc.FileManager; ro.renameDirectory(_old,_new); ro.showBusyCursor = true; dispatchEvent(new RefreshTreeEvent(refreshTree)); closeWindow(); } } ]] /mx:Script mx:HBox verticalCenter=0 horizontalCenter=0 mx:TextInput id=newDirectoryName text={oldDirectoryName} width=200/ mx:Button label=Save click=renameDirectory(event)/ /mx:HBox /mx:TitleWindow And my custom event. package events { import flash.events.Event; public class RefreshTreeEvent extends Event { public static const REFRESH_TREE:String = refreshTree; public function RefreshTreeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } The problem I am having is that I am unable to listen for this event in my main application. If I add this.addEventListener(RefreshTreeEvent.REFRESH_TREE,reloadTree); The reloadTree method is never called. What am I doing wrong? Thanks again..
Re: [flexcoders] Any Developers on a Mac?
I've developed on a MBP using Flex Builder 2 and 3 for years. I've never had any issue. Just recently upgraded my MacBook Pro to 4 gigs of RAM over the original 2, mostly so I can run a Fusion Virtual Machine at the same time I'm working in OS X. As far as Apple hardware goes... I always get AppleCare for laptops, but I haven't ever needed to use it. My previous Apple laptop, a PowerBook G4, is still going strong. It's almost 7 years old, and my wife uses it. It still runs like a champ. HTH, Nate On Mon, Dec 29, 2008 at 8:16 AM, ivo cervantes_v...@yahoo.com wrote: My 0.2 is that I love OS X Apple software but I found I can't rely on Apple hardware. Maybe its bad luck but I have always had hardware problems and more than once a warrantied, applecared machine still took more than a week to resolve. At one point I was heavily invested on Apple hardware but over time the hardware issues really impacted productivity. I have tried to protect against hardware issues with backups and redundant hardware but for a macs it means $$. So now I am a Windows guy. If this machine breaks, gets stolen or whatever I could replace it with $300 a 20 minute drive. -- *From:* composerguru kbmulvih...@gmail.com *To:* flexcoders@yahoogroups.com *Sent:* Monday, December 29, 2008 2:24:40 AM *Subject:* [flexcoders] Any Developers on a Mac? I'm thinking of converting now that I've dumped Vista... just wondering what your experience might be and if you recommend the change? Thanks in advance, Kevin -- Cheers, Nate http://blog.natebeck.net
Re: [flexcoders] Re: Custom Event Problem
I thought about that as well but it did not work. Thank You Dan Vega danv...@gmail.com http://www.danvega.org On Mon, Dec 29, 2008 at 12:01 PM, valdhor valdhorli...@embarqmail.comwrote: Try changing the bubbles property to true. The event needs to bubble to the top so that the application sees it. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Dan Vega danv...@... wrote: For the file manager I am writing I am having an issue with dispatching a custom event. I have a tree on the left with a custom tree item renderer. In that renderer I have setup a context menu so the user can rename/remove/add directories easily. private function renameDirectory(event:ContextMenuEvent):void { _renamedir = new RenameDirectory _renamedir.oldDirectoryName = data.name; _renamedir.parentPath = data.parent; //add modal window PopUpManager.addPopUp(_renamedir,DisplayObject(Application.application),true); //center modal window PopUpManager.centerPopUp(_renamedir); } My RenameDirectory component works well and does the renaming just fine. The problem I am having is once the folder is renamed i need to refresh the tree to show the changes. I figured for all of my options (add/remove/delete) would just dispatch a custom event. Here is my RenameDirectory.mxml That is dispatching my custom event. ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute title=Rename Directory width=300 height=125 showCloseButton=true creationComplete=centerWindow() close=closeWindow() mx:Metadata [Event(name=refreshTree,type=events.RefreshTreeEvent)] /mx:Metadata mx:Script ![CDATA[ import mx.rpc.remoting.mxml.RemoteObject; import mx.controls.Alert; import mx.managers.PopUpManager; import events.RefreshTreeEvent; public var parentPath:String; public var oldDirectoryName:String; private var ro:RemoteObject = new RemoteObject(); private function centerWindow():void { PopUpManager.centerPopUp(this); } private function closeWindow():void { PopUpManager.removePopUp(this); } private function renameDirectory(event:Event):void { var _old = parentPath + \\ + oldDirectoryName; var _new = parentPath + \\ + newDirectoryName.text; if(_new != _old) { // rename the directory ro.destination = ColdFusion; ro.source = FFManager.src.cfc.FileManager; ro.renameDirectory(_old,_new); ro.showBusyCursor = true; dispatchEvent(new RefreshTreeEvent(refreshTree)); closeWindow(); } } ]] /mx:Script mx:HBox verticalCenter=0 horizontalCenter=0 mx:TextInput id=newDirectoryName text={oldDirectoryName} width=200/ mx:Button label=Save click=renameDirectory(event)/ /mx:HBox /mx:TitleWindow And my custom event. package events { import flash.events.Event; public class RefreshTreeEvent extends Event { public static const REFRESH_TREE:String = refreshTree; public function RefreshTreeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } The problem I am having is that I am unable to listen for this event in my main application. If I add this.addEventListener(RefreshTreeEvent.REFRESH_TREE,reloadTree); The reloadTree method is never called. What am I doing wrong? Thanks again..
RE: [flexcoders] Re: Custom Event Problem
Pop-ups are parented by SystemManager, not Application. If you will search the archives you will find a solution to this. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dan Vega Sent: Monday, December 29, 2008 12:03 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Custom Event Problem I thought about that as well but it did not work. Thank You Dan Vega danv...@gmail.com mailto:danv...@gmail.com http://www.danvega.org http://www.danvega.org On Mon, Dec 29, 2008 at 12:01 PM, valdhor valdhorli...@embarqmail.com mailto:valdhorli...@embarqmail.com wrote: Try changing the bubbles property to true. The event needs to bubble to the top so that the application sees it. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Dan Vega danv...@... wrote: For the file manager I am writing I am having an issue with dispatching a custom event. I have a tree on the left with a custom tree item renderer. In that renderer I have setup a context menu so the user can rename/remove/add directories easily. private function renameDirectory(event:ContextMenuEvent):void { _renamedir = new RenameDirectory _renamedir.oldDirectoryName = data.name; _renamedir.parentPath = data.parent; //add modal window PopUpManager.addPopUp(_renamedir,DisplayObject(Application.application), true); //center modal window PopUpManager.centerPopUp(_renamedir); } My RenameDirectory component works well and does the renaming just fine. The problem I am having is once the folder is renamed i need to refresh the tree to show the changes. I figured for all of my options (add/remove/delete) would just dispatch a custom event. Here is my RenameDirectory.mxml That is dispatching my custom event. ?xml version=1.0 encoding=utf-8? mx:TitleWindow xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute title=Rename Directory width=300 height=125 showCloseButton=true creationComplete=centerWindow() close=closeWindow() mx:Metadata [Event(name=refreshTree,type=events.RefreshTreeEvent)] /mx:Metadata mx:Script ![CDATA[ import mx.rpc.remoting.mxml.RemoteObject; import mx.controls.Alert; import mx.managers.PopUpManager; import events.RefreshTreeEvent; public var parentPath:String; public var oldDirectoryName:String; private var ro:RemoteObject = new RemoteObject(); private function centerWindow():void { PopUpManager.centerPopUp(this); } private function closeWindow():void { PopUpManager.removePopUp(this); } private function renameDirectory(event:Event):void { var _old = parentPath + \\ + oldDirectoryName; var _new = parentPath + \\ + newDirectoryName.text; if(_new != _old) { // rename the directory ro.destination = ColdFusion; ro.source = FFManager.src.cfc.FileManager; ro.renameDirectory(_old,_new); ro.showBusyCursor = true; dispatchEvent(new RefreshTreeEvent(refreshTree)); closeWindow(); } } ]] /mx:Script mx:HBox verticalCenter=0 horizontalCenter=0 mx:TextInput id=newDirectoryName text={oldDirectoryName} width=200/ mx:Button label=Save click=renameDirectory(event)/ /mx:HBox /mx:TitleWindow And my custom event. package events { import flash.events.Event; public class RefreshTreeEvent extends Event { public static const REFRESH_TREE:String = refreshTree; public function RefreshTreeEvent(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } The problem I am having is that I am unable to listen for this event in my main application. If I add this.addEventListener(RefreshTreeEvent.REFRESH_TREE,reloadTree); The reloadTree method is never called. What am I doing wrong? Thanks again..
RE: [flexcoders] DataGrid - create dynamic columns
Yes, is this not working for you? I rarely if ever let Flex generate my columns, since I like having control over the order and such, but DataGrid should do what you are showing. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of markgoldin_2000 Sent: Sunday, December 28, 2008 6:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid - create dynamic columns Is it possible to completely skip datagrid column design and generate all columns as dynamic using dataProvider assigning mechanism? So, this XML sample: root row col11/col1 col22/col2 col33/col3 /row row col14/col1 col25/col2 col36/col3 /row root Will create: --- col1|col2|col3| --- 1 |2 |3 | 4 |5 |6 | --- Or I have to create columns at run-time parsing some data and then assign dataProvider with actual data? Later is what I do now, but I was wondering what others do with showing dataGrids that have dynamic structure. Thanks
RE: [flexcoders] Getting TabNavigator to Release Focus
Are you specifically setting focus on the TextArea when you show the tab? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of shawnsvacha Sent: Sunday, December 28, 2008 12:19 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Getting TabNavigator to Release Focus I'm running into a issue with the tabnavigator. Basically, I am building an AIR app that saves the user's history into a SQLite table. One of the items that is getting saved is the tab the user was last on. The problem is that when I return the user to that tab it refuses to release focus. Since this tab contains a text area, pressing space while typing in the text area switches tabs. Now if I manually navigate to this tab, it works fine -- no switching on space when typing. It is only when the tab is automatically selected upon launch that this happens. Has anyone seen this before? Thanks, Shawn
RE: [flexcoders] DataGrid and XMLListCollection - newbie question
Looks pretty close. What is not working? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Pete Appleby Sent: Friday, December 26, 2008 1:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid and XMLListCollection - newbie question Hi. I am trying to get a very simple datagrid up and going. I need to be able to populate this from an XMLListCollection. This seems very simple, but I am obviously missing the point somewhere in this. It seems that all of the books and online searchs show web services, etc. as source. I need to be able to start at a simpler point. I have tried setting things up both in ActionScript and mxml. The ActionScript is commented out at this point. Either way would be fine. The best would be able to see it work in both ways. The purpose of this snippet is: 1. Initialize the grid with a single row. When the app starts, I have an empty grid. I need to start with a default row in the grid. 2. Allow the user to click the Add Step button to add a new row to the bottom of the grid. 3. Allow the user to click the Clear Steps button to remove all existing rows and then add the default row. 4. Later in the development of this, I will extract the bound data from the grid to create a payment schedule. Here is the code. Thanks! Pete ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute applicationComplete=initApp() mx:Script ![CDATA[ import mx.collections.XMLListCollection; /* [Bindable] public var gridData:XMLListCollection; private const gridInitXML:XML = Steps Step Payments=1 Amount=100 / /Steps ; */ private function initApp():void{ // initialize the data grid // gridData = new XMLListCollection( ); // gridData.addItem( gridInitXML ); } private function handleAddStep():void { gridData.addItem(gridInitXML); } private function handleClearSteps():void { gridData.removeAll(); gridData.addItem(gridInitXML); } ]] /mx:Script mx:XMLListCollection id=gridData source={Steps} / mx:XMLList id=Steps xmlns= Step Payments=1 Amount=100 / /mx:XMLList mx:XML id=gridInitXML Steps Step Payments=1 Amount=100 / /Steps /mx:XML mx:Button x=10 y=10 label=Add Step width=86 id=btnAddStep click=handleAddStep() / mx:Button x=114 y=10 label=Clear Steps width=96 id=btnClearSteps click=handleClearSteps()/ mx:DataGrid id=dgSteps editable=true enabled=true dataProvider={gridData} x=10 y=38 width=200 height=190 mx:columns mx:DataGridColumn headerText=Payments dataField=Payments width=75 textAlign=right/ mx:DataGridColumn headerText=Amount dataField=Amount textAlign=right/ /mx:columns /mx:DataGrid /mx:WindowedApplication
Re: [flexcoders] Re: Custom Event Problem
Just so I am clear are you saying because I told the PopUpManager that the parent was the application my event is not bubbling up correctly? Thank You Dan Vega danv...@gmail.com http://www.danvega.org
RE: [flexcoders] DataGrid and XMLListCollection - newbie question
Ah, I see a couple issues: When you add a step, you want to only add the step node. In your init function you are calling addChiled but passing the entire steps node. Do you specifically want a Payments row to start out with? It should not be necessary. But if so, initialize the DG like this: gridData = new XMLListCollection(gridInitXML.step ); //that expression returns an XMLList with a single step node. In your addStep function do: gridData.addItem(Step Payments= Amount=0); Note, if you want to move the user to the new row and start them editing a cell, use, I believe, editedItemPosition. You probably need to use callLater to invoke that because you need to give the DG time to render the new row before performing actions on it via the UI. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Monday, December 29, 2008 12:47 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] DataGrid and XMLListCollection - newbie question Looks pretty close. What is not working? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Pete Appleby Sent: Friday, December 26, 2008 1:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] DataGrid and XMLListCollection - newbie question Hi. I am trying to get a very simple datagrid up and going. I need to be able to populate this from an XMLListCollection. This seems very simple, but I am obviously missing the point somewhere in this. It seems that all of the books and online searchs show web services, etc. as source. I need to be able to start at a simpler point. I have tried setting things up both in ActionScript and mxml. The ActionScript is commented out at this point. Either way would be fine. The best would be able to see it work in both ways. The purpose of this snippet is: 1. Initialize the grid with a single row. When the app starts, I have an empty grid. I need to start with a default row in the grid. 2. Allow the user to click the Add Step button to add a new row to the bottom of the grid. 3. Allow the user to click the Clear Steps button to remove all existing rows and then add the default row. 4. Later in the development of this, I will extract the bound data from the grid to create a payment schedule. Here is the code. Thanks! Pete ?xml version=1.0 encoding=utf-8? mx:WindowedApplication xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml layout=absolute applicationComplete=initApp() mx:Script ![CDATA[ import mx.collections.XMLListCollection; /* [Bindable] public var gridData:XMLListCollection; private const gridInitXML:XML = Steps Step Payments=1 Amount=100 / /Steps ; */ private function initApp():void{ // initialize the data grid // gridData = new XMLListCollection( ); // gridData.addItem( gridInitXML ); } private function handleAddStep():void { gridData.addItem(gridInitXML); } private function handleClearSteps():void { gridData.removeAll(); gridData.addItem(gridInitXML); } ]] /mx:Script mx:XMLListCollection id=gridData source={Steps} / mx:XMLList id=Steps xmlns= Step Payments=1 Amount=100 / /mx:XMLList mx:XML id=gridInitXML Steps Step Payments=1 Amount=100 / /Steps /mx:XML mx:Button x=10 y=10 label=Add Step width=86 id=btnAddStep click=handleAddStep() / mx:Button x=114 y=10 label=Clear Steps width=96 id=btnClearSteps click=handleClearSteps()/ mx:DataGrid id=dgSteps editable=true enabled=true dataProvider={gridData} x=10 y=38 width=200 height=190 mx:columns mx:DataGridColumn headerText=Payments dataField=Payments width=75 textAlign=right/ mx:DataGridColumn headerText=Amount dataField=Amount textAlign=right/ /mx:columns /mx:DataGrid /mx:WindowedApplication
RE: [flexcoders] Re: Custom Event Problem
The event may be bubbling up correctly, but Application is not in the pop-up's ancestor chain, so it never hears the event. Google, search the archives. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dan Vega Sent: Monday, December 29, 2008 12:35 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Custom Event Problem Just so I am clear are you saying because I told the PopUpManager that the parent was the application my event is not bubbling up correctly? Thank You Dan Vega danv...@gmail.com mailto:danv...@gmail.com http://www.danvega.org http://www.danvega.org
[flexcoders] Extends the layout manager
Hi all, i've this problem... i have three custom components (suppose that are called A, B and C for semplicity). i've also created a custom panel(myPanel) that extends the Panel component. now i would create a personal layout that permit to put for example the A component in myPanel center, the B component under the A component and finally the C component in the myPanel bottom right. How can i rich this layout?how to start to create a class that extends the Layout manager?Is there any example in the web? i appreciate any help? thanks Regards Lorenzo
[flexcoders] Memory Leak - Module + Button + Textinput ?
well i have found a wierd memory leak but this is getting to be a huge problem for me.. suppose this app: ?xml version=1.0 encoding=utf-8? mx:Application creationComplete=init() xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.controls.Alert; import mx.modules.Module; import mx.events.ModuleEvent; import mx.modules.ModuleManager; import mx.modules.IModuleInfo; public var info:IModuleInfo; public var xi:Module; private function init():void { info = ModuleManager.getModule(a.swf?Versao=1.0); info.addEventListener(ModuleEvent.READY, modEventHandler); info.load(); } private function modEventHandler(e:ModuleEvent):void { xi = info.factory.create() as Module ; addChild(xi); } public function remove():void { removeChild(xi); info.removeEventListener(ModuleEvent.READY, modEventHandler); info.unload(); info = null; xi=null; } ]] /mx:Script mx:Button x=200 y=176 id=lasal label=remove click=remove()/ mx:TextInput x=213 y=33/ /mx:Application and the module a.mxml ?xml version=1.0 encoding=utf-8? mx:Module xmlns:com=* xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute width=400 height=300 mx:Button x=26 y=153/ /mx:Module now my problem: if you run this in profiler and just click at the remove button, the instance of module a is removed without problems.. BUT if you before click the remove button type anything into the textinput and click the remove the instance of module a is not removed... but if then just click the textinput and just type anything else in it (just a space for eg) then the instance of module a is removed... wth ? there is this bug http://bugs.adobe.com/jira/browse/SDK-14781 that is somehow related to this but i tried removing the focus from both the textinput or the button but still came with the same result so.. can anyone help me here ? Thanks
RE: [flexcoders] Sprite based control
Be aware that there are rules for parent/children types: Navigator children must be Containers Container children must be IUIComponents UIComponent parents must be IUIComponents UIComponent children can be anything Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of palmavecchio Sent: Saturday, December 27, 2008 3:50 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Sprite based control Hi, I'm making a graphical control that involves programmatically drawn sprites that appear, disappear, and change color according to user input. I think I can bang this out but before getting too far I wanted to see if there are any examples I can look to for smart practices. Thanks a lot to anyone who can get me going on the right track for a graphical custom component.
Re: [flexcoders] Re: Custom Event Problem
got ya,thanks! Thank You Dan Vega danv...@gmail.com http://www.danvega.org
RE: [flexcoders] Re: Custom Event Problem
Is there a reason you don't want to add the event listener directly to the pop-up instance, instead of using bubbling? Also, if you update the dataProvider using the appropriate APIs, you should not need an additional event to update the UI. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dan Vega Sent: Monday, December 29, 2008 12:49 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Custom Event Problem got ya,thanks! Thank You Dan Vega danv...@gmail.com mailto:danv...@gmail.com http://www.danvega.org http://www.danvega.org
Re: [flexcoders] Re: Custom Event Problem
I think you make a great point but im just not sure how to do it. The data provider for the tree is not getting updated just yet. What I am doing is throwing a popup on the screen with what you want to rename the folder to. I do the renaming on the server side. Somehow I have to tell my main application to call the getDirectories() method again. I can do it from the view without really repeating a ton of stuff. Im just kind of stuck on how to make another call back to the server to list the dirs again. Thank You Dan Vega danv...@gmail.com http://www.danvega.org
[flexcoders] Cairngorm ServiceLocator.getInstance(); compile error
In one delegate I have the following: private var __locator:ServiceLocator = new ServiceLocator.getInstance(); And it compiles just fine, and in fact this delegate and remoteobject service work as expected. I then add the same exact command to another identical delegate (other than names, generated using Cairngen), using the same import statement as below ... import com.adobe.cairngorm.business.ServiceLocator; But in the second delegate I get the following error... 1048: Method cannot be used as a constructor. If I remove the .getInstance() from the __locator instantiation, I get no error. I can not find any references to such an error anywhere, any help would be greatly appreciated.
RE: [flexcoders] Cairngorm ServiceLocator.getInstance(); compile error
getInstance() should be a static method, so you don't need to use new when calling it: private var __locator:ServiceLocator = ServiceLocator.getInstance(); HTH, Ryan From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jeremysavoy Sent: Monday, December 29, 2008 10:39 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm ServiceLocator.getInstance(); compile error In one delegate I have the following: private var __locator:ServiceLocator = new ServiceLocator.getInstance(); And it compiles just fine, and in fact this delegate and remoteobject service work as expected. I then add the same exact command to another identical delegate (other than names, generated using Cairngen), using the same import statement as below ... import com.adobe.cairngorm.business.ServiceLocator; But in the second delegate I get the following error... 1048: Method cannot be used as a constructor. If I remove the .getInstance() from the __locator instantiation, I get no error. I can not find any references to such an error anywhere, any help would be greatly appreciated. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
[flexcoders] Application dependencies
Hi All, I have an application I'm refactoring, and it looks like there are a ton of classes that aren't being used. Does anyone have any tricks for finding unused objects in the code base aside from cross-referencing the dependencies list in the linking report that the compiler generates? Any tips are much appreciated... Thanks, Ryan This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
[flexcoders] Canceling remoteobject operation?
I have a situation where a single remoteobject call is triggering multiple faults. In my fault handler, I want to cancel the operation on the first one. However, I'm not sure how to get from the token to the operation that was called. Here's my code: package com.rw.adBlankenship.remoting { import com.rw.adBlankenship.vo.GraphicProfile; import flash.events.Event; import mx.collections.ArrayCollection; import mx.events.CollectionEvent; import mx.messaging.Channel; import mx.messaging.ChannelSet; import mx.messaging.channels.AMFChannel; import mx.rpc.AsyncToken; import mx.rpc.Responder; import mx.rpc.events.FaultEvent; import mx.rpc.events.ResultEvent; import mx.rpc.remoting.RemoteObject; public class GetProfiles { //--- shared variables: //remote object to use: private static var _ro:RemoteObject=new RemoteObject (); private static var _channels:ChannelSet=defaultChannelSet(); /** * Set the profiles collection to the ArrayCollection that * is being used to page through the graphic profiles. * More profiles will be added to it as they are loaded */ public static var profiles:ArrayCollection = new ArrayCollection(); //ensures GraphicProfile gets compiled into this class private static var dummy:GraphicProfile; //sets up default channel set private static function defaultChannelSet():ChannelSet { /* Once we know the settings logic works, this will return a channelset with a default channel that can be used if none is specified. */ return new ChannelSet; } //allows the endpoint to be set from anywhere in the application public static function set endpoint (gateway:String):void { var channel:AMFChannel; //look to see if the channel is already there for (var i:int=0; i_channels.channels.length; i++){ channel=_channels.channels[i]; if (channel.endpoint==gateway) return; } //add channel channel = new AMFChannel('gpChannel'+i, gateway); _channels.addChannel(channel); } public static function get endpoint():String{ return Channel(_channels.channels [_channels.channels.length-1]).endpoint; } /** * Executes the getServices service. * Takes a parameters object with the following properties. * @param categoryID:int-Category to display profiles for (use -1 for string search) * @param searchString:String-Search string to retrieve profiles for (use null for category search) * @param page:int-page number of results to retrieve (defaults to 0) * @param pageSize:int-size of a page of results (how many to ask for) (defaults to 0) */ public static function execute(categoryID:int=- 1,searchString:String=null, page:int=0, pageSize:int=24):void{ if (_channels.channels.length==0) { throw new Error('No endpoint specified for GetCategories command Remote Object'); } _ro.channelSet=_channels; _ro.destination = 'AMF_Category'; _ro.source = 'AMF_Category'; var token:AsyncToken=_ro.getServices (categoryID=-1?null:categoryID, searchString, page, pageSize); token.addResponder(new Responder (profilesLoaded, profileLoadFailed)); } /* Populate current ArrayCollection with the result. This will generate a CollectionChange wherever the other end of the reference is so it will know the categories have arrived.*/ private static function profilesLoaded (e:ResultEvent):void{ //keep from sending tons of collection events profiles.disableAutoUpdate(); for (var i:int=0; ie.result.length; i++) { profiles.addItem(e.result[i] as GraphicProfile); } //send the collection event
[flexcoders] Re: DataGrid - create dynamic columns
Here is a snip of code that shows you how to do this. Its from a tool that just dumps rows/columns based on some basic xml data. Hope it helps you out nameList = dvDmML.rawData.fld_names.fld_name; var rows:XMLList = dvDmML.rawData.rows.row; var dgc:DataGridColumn; var aColumnsNew:Array = []; columnCount=nameList.length(); //Create the columns for (var i:int=0; icolumnCount;i++) { var columnName:XML= nameList[i]; dgc = new DataGridColumn(); dgc.dataField=columnName; dgc.headerText = columnName.toString(); aColumnsNew.push(dgc) } dg.columns = aColumnsNew; //set the dataprovider dg.dataProvider = _dataGridData;
[flexcoders] 2 Datagrid issue
Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
RE: [flexcoders] Re: Custom Event Problem
Ah, ok, you want to update the server and refresh the tree on every change to the tree. Your event mechanism is fine for that. Note that each time you re-assign the dataProvider, which you porbably do in the result handler of the getDirectories method, the Tree will entirely re-render, closing open branches, etc. Preserving this state and re-applying it after a dataProvider re-assignment can be messy. I think I would not-re-assign the dataProvider every time, but rather, in the result handler, if the method call was successful, I would update only the changed dataProvider item specifically. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dan Vega Sent: Monday, December 29, 2008 1:16 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: Custom Event Problem I think you make a great point but im just not sure how to do it. The data provider for the tree is not getting updated just yet. What I am doing is throwing a popup on the screen with what you want to rename the folder to. I do the renaming on the server side. Somehow I have to tell my main application to call the getDirectories() method again. I can do it from the view without really repeating a ton of stuff. Im just kind of stuck on how to make another call back to the server to list the dirs again. Thank You Dan Vega danv...@gmail.com mailto:danv...@gmail.com http://www.danvega.org http://www.danvega.org
RE: [flexcoders] 2 Datagrid issue
Probably, but we'll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
[flexcoders] Flex Builder 3 and SWFObject with IE - blocked content
I'm trying to use swfobject in Flex builder and running into some issues debugging. When I launch a debugging session, IE always says it is blocking content and I have to click to allow blocked content each time Is there some trick to get it to work? I'm assuming the built in Adobe JS gets some kinda 'pass' somewhere such that IE doesnt complain about it Here's my index.template.html html lang=en head titleMy Flex App/title meta http-equiv=Content-Type content=text/html; charset=utf-8 / script type=text/javascript src=js/swfobject.js/script script type=text/javascript src=js/swfaddress.js/script style body { margin: 0px; overflow:hidden } /style /head body scroll=no div id=content pIn order to view this you need JavaScript and Flash Player 9 or greater/p /div script type=text/javascript // ![CDATA[ var so = new SWFObject('${swf}.swf', '${application}', '100%', '100%', '9', '${bgcolor}'); so.useExpressInstall('playerProductInstall.swf'); so.addParam('menu', 'false'); so.write('content'); // ]] /script /body /html
[flexcoders] Re: Need functions like Excel NPV, IRR, NPER
i used the following in a previous project, maybe it might help you: (for calculating payments) public function calculatePMT(PV:Number, IR:Number, YEARS:Number):Number { var newIR:Number = IR/12; var newNP:Number = YEARS*12; return Math.round((PV*(newIR/100)) / (1-Math.pow(1+(newIR/100), -newNP))); } (for calculating present value) public function calculateBond(PMT:Number, IR:Number, YEARS:Number):Number { var newIRb:Number = (IR/100)/12; var newNPb:Number = YEARS*12; var v:Number = Math.pow(1+newIRb, -newNPb); var pv:Number = PMT*(1-v)/newIRb; return Math.round(pv); } --- In flexcoders@yahoogroups.com, valdhor valdhorli...@... wrote: Do a google search for your requirements. For example, searches on NPV and IRR yielded the following: http://www.ehow.com/how_2187130_calculate-net-present-value-npv.html http://www.s-anand.net/Calculating_IRR.html You will then need to convert these algorithms to Actionscript (I could not find any Actionscript examples). --- In flexcoders@yahoogroups.com, Pete Appleby boneoh@ wrote: Hi, everybody! I need to find Flex 3 functions to calculate NPV, IRR, and NPER just like in Excel. Are these out there anywhere? I don't want to reinvent the wheel. Thanks! Pete
Re: [flexcoders] 2 Datagrid issue
Hi Tracy, // MAIN MXML ac = new ArrayCollection(dp); //dp = array of objects bc = new ArrayCollection(dp); private function onChange( e:ListEvent ):void { // Multiple checkboxes able to be selected so // deselect all then reselect single checkbox. for ( var i:int = 0; i ac.length; i ++ ) { ac.getItemAt(i).selected = false; bc.getItemAt(i).selected = false; } if( e.itemRenderer.data.column == e.columnIndex e.itemRenderer.data.row == e.rowIndex ) e.itemRenderer.data.selected = true; ac.itemUpdated( e.itemRenderer.data ); bc.itemUpdated( e.itemRenderer.data ); } // CUSTOM RENDERER override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); this.visible = false; data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; } mx:VBox mx:Label text=Corrected Grid fontSize=14 fontWeight=bold/ local:CustomGrid id=dg2 paddingTop=0 paddingBottom=0 verticalAlign=middle rowHeight=20 change=onChange( event ) allowMultipleSelection=false/ /mx:VBox mx:VBox mx:Label text=Corrected Grid fontSize=14 fontWeight=bold/ local:CustomGrid id=dg3 paddingTop=0 paddingBottom=0 verticalAlign=middle rowHeight=20 change=onChange( event ) allowMultipleSelection=false/ /mx:VBox On 29 Dec 2008, at 19:03, Tracy Spratt wrote: Probably, but we’ll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
[flexcoders] Setting perspectiveProjection disable children interactivity
Hi, This is a Flex project (3.2) complied to target FP10, which utilizes the 3D API. Inside a Canvas object, I add whole bunch of Buttons which are laid out in a 3D carousel fashion. The problem is once I set the projectionCenter property of the Canvas, all the Button instances inside the Canvas stop taking any mouse interaction (including hover highlight, tooltips, click events, etc.), while everything else seems to be working fine. Is this the expected behavior or a bug? Here is the code: //carouselContainer is the Canvas instance var pp:PerspectiveProjection = new PerspectiveProjection(); pp.projectionCenter = new Point(x, y); carouselContainer.transform.perspectiveProjection = pp; //end of code. Thanks.
[flexcoders] Re: 2 Datagrid issue
Are the 2 ArrayCollections using the same source array by any chance? -TH --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: Probably, but we'll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
RE: [flexcoders] Flex Builder 3 and SWFObject with IE - blocked content
The way around that IE thing is, instead of directly declaring the Object/embed tag, use javascript to instantiate the FlashPlayer. That is why the generated wrapper calls the function in the .js file. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Rick Schmitty Sent: Monday, December 29, 2008 2:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Builder 3 and SWFObject with IE - blocked content I'm trying to use swfobject in Flex builder and running into some issues debugging. When I launch a debugging session, IE always says it is blocking content and I have to click to allow blocked content each time Is there some trick to get it to work? I'm assuming the built in Adobe JS gets some kinda 'pass' somewhere such that IE doesnt complain about it Here's my index.template.html html lang=en head titleMy Flex App/title meta http-equiv=Content-Type content=text/html; charset=utf-8 / script type=text/javascript src=js/swfobject.js/script script type=text/javascript src=js/swfaddress.js/script style body { margin: 0px; overflow:hidden } /style /head body scroll=no div id=content pIn order to view this you need JavaScript and Flash Player 9 or greater/p /div script type=text/javascript // ![CDATA[ var so = new SWFObject('${swf}.swf', '${application}', '100%', '100%', '9', '${bgcolor}'); so.useExpressInstall('playerProductInstall.swf'); so.addParam('menu', 'false'); so.write('content'); // ]] /script /body /html
Re: [flexcoders] Re: 2 Datagrid issue
Yup, which I some what naively thought by popping into 2 newly created array collections may overcome potentially causing this issue? Probably not then huh? On 29 Dec 2008, at 19:24, Tim Hoff wrote: Are the 2 ArrayCollections using the same source array by any chance? -TH --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: Probably, but we'll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
RE: [flexcoders] 2 Datagrid issue
As Tim guessed in his post, your two Acs share the same source, so are essentially one dataProvider. Use concat() to make a copy of dp before you create bc. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 2:19 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] 2 Datagrid issue Hi Tracy, // MAIN MXML ac = new ArrayCollection(dp); //dp = array of objects bc = new ArrayCollection(dp); private function onChange( e:ListEvent ):void { // Multiple checkboxes able to be selected so // deselect all then reselect single checkbox. for ( var i:int = 0; i ac.length; i ++ ) { ac.getItemAt(i).selected = false; bc.getItemAt(i).selected = false; } if( e.itemRenderer.data.column == e.columnIndex e.itemRenderer.data.row == e.rowIndex ) e.itemRenderer.data.selected = true; ac.itemUpdated( e.itemRenderer.data ); bc.itemUpdated( e.itemRenderer.data ); } // CUSTOM RENDERER override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); this.visible = false; data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; } mx:VBox mx:Label text=Corrected Grid fontSize=14 fontWeight=bold/ local:CustomGrid id=dg2 paddingTop=0 paddingBottom=0 verticalAlign=middle rowHeight=20 change=onChange( event ) allowMultipleSelection=false/ /mx:VBox mx:VBox mx:Label text=Corrected Grid fontSize=14 fontWeight=bold/ local:CustomGrid id=dg3 paddingTop=0 paddingBottom=0 verticalAlign=middle rowHeight=20 change=onChange( event ) allowMultipleSelection=false/ /mx:VBox On 29 Dec 2008, at 19:03, Tracy Spratt wrote: Probably, but we'll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
[flexcoders] Re: Cairngorm ServiceLocator.getInstance(); compile error
Yep that did it, thanks for your help! --- In flexcoders@yahoogroups.com, Ryan Graham ryan.gra...@... wrote: getInstance() should be a static method, so you don't need to use new when calling it: private var __locator:ServiceLocator = ServiceLocator.getInstance(); HTH, Ryan From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jeremysavoy Sent: Monday, December 29, 2008 10:39 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Cairngorm ServiceLocator.getInstance(); compile error In one delegate I have the following: private var __locator:ServiceLocator = new ServiceLocator.getInstance(); And it compiles just fine, and in fact this delegate and remoteobject service work as expected. I then add the same exact command to another identical delegate (other than names, generated using Cairngen), using the same import statement as below ... import com.adobe.cairngorm.business.ServiceLocator; But in the second delegate I get the following error... 1048: Method cannot be used as a constructor. If I remove the .getInstance() from the __locator instantiation, I get no error. I can not find any references to such an error anywhere, any help would be greatly appreciated. This message is private and confidential. If you have received it in error, please notify the sender and remove it from your system.
[flexcoders] I want AdvancedDataGrid column Headings like DG Column Headings
The ADC column headings have a vertical bar (pipe) near the right side and limit the amount of text in the column headings. Is there an EASY way to have the headings look like the DG headings? Thanks Bruce
Re: [flexcoders] Re: 2 Datagrid issue
Ok I am a numbnut! Rsolved through 2 seperate arrays, into two seperate arraycollections! I must add that if the 2 Array sources are different I then result in the issue of multiple selections (CheckBox) on row and in column. Are there any suggestions on how to overcome this? On 29 Dec 2008, at 19:24, Tim Hoff wrote: Are the 2 ArrayCollections using the same source array by any chance? -TH --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: Probably, but we'll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
RE: [flexcoders] Re: 2 Datagrid issue
We need a little more functional description than, a custom renderer and all that jazz. Exactly what are you trying to show/do? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 3:01 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: 2 Datagrid issue Ok I am a numbnut! Rsolved through 2 seperate arrays, into two seperate arraycollections! I must add that if the 2 Array sources are different I then result in the issue of multiple selections (CheckBox) on row and in column. Are there any suggestions on how to overcome this? On 29 Dec 2008, at 19:24, Tim Hoff wrote: Are the 2 ArrayCollections using the same source array by any chance? -TH --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt tspr...@... wrote: Probably, but we'll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
Re: [flexcoders] Re: 2 Datagrid issue
Ok, my apologies for the irritating vagueness in my explanation: What I am trying to do is populate 2 grids using an array of value objects. Each grid uses various properties of the said value objects, some different and some the same. I have a custom render which extends checkbox and thus displays checkboxes throughout the grids. I simply want to be able to select ONE checkbox in each grid. If a check box in one grid is selected and its row is different to the currently selected check box in the second grid, I will be aiming to then: 1) Deselect the check box in the second grid. 2) Highlight the row in the second grid to match the newly selected row in the first grid. For this to happen I have followed the typical route i.e. have as much of the handling of the check box selections within the renderer itself and driven from the data property e.g. override public function set data(value:Object):void { if( value != null ) { super.data = value; selected = ( data.column == listData.columnIndex data.row == listData.rowIndex ) ? data.selected : false; } } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; ( listData.owner as CustomGrid ).invalidateList(); IList(DataGrid(owner).dataProvider).itemUpdated(data); } btw duplicating an Array using concat() did not work unfortunately as (adobe doc quote) 'changes are still made to both arrays. So I used (adobe docs): private function clone( source:Object ):* { var myBA:ByteArray = new ByteArray(); myBA.writeObject( source ); myBA.position = 0; return( myBA.readObject() ); } On 29 Dec 2008, at 20:25, Tracy Spratt wrote: We need a little more functional description than, “a custom renderer and all that jazz”. Exactly what are you trying to show/do? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 3:01 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: 2 Datagrid issue Ok I am a numbnut! Rsolved through 2 seperate arrays, into two seperate arraycollections! I must add that if the 2 Array sources are different I then result in the issue of multiple selections (CheckBox) on row and in column. Are there any suggestions on how to overcome this? On 29 Dec 2008, at 19:24, Tim Hoff wrote: Are the 2 ArrayCollections using the same source array by any chance? -TH --- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: Probably, but we'll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
[flexcoders] Re: Setting perspectiveProjection disable children interactivity
Just a follow-up from myself;) I am not able to re-compile my existing code using Gumbo sdk since all the code that tries to get/set UIComponent.transform seems to be broken on re-compile. For example: I got: TypeError: Error #1009: Cannot access a property or method of a null object reference. for v3 = items[id].transform.matrix3D.decompose(); In Halo (sdk 3.2), as long as you set UIComponent.z or UIComponent.rotationX/rotationY, you will get the Transform object without any problem. --- In flexcoders@yahoogroups.com, gwangdesign gwangdes...@... wrote: Hi, This is a Flex project (3.2) complied to target FP10, which utilizes the 3D API. Inside a Canvas object, I add whole bunch of Buttons which are laid out in a 3D carousel fashion. The problem is once I set the projectionCenter property of the Canvas, all the Button instances inside the Canvas stop taking any mouse interaction (including hover highlight, tooltips, click events, etc.), while everything else seems to be working fine. Is this the expected behavior or a bug? Here is the code: //carouselContainer is the Canvas instance var pp:PerspectiveProjection = new PerspectiveProjection(); pp.projectionCenter = new Point(x, y); carouselContainer.transform.perspectiveProjection = pp; //end of code. Thanks.
Re: [flexcoders] MySql timestamp column type and Flex DateField
I had to format the string from ActionScript to pass to the Value Object as follows. var eDate:Date = Event_DateCol.selectedDate; var event_Date:String = String(eDate.getFullYear()) + - + String(eDate.getMonth()+1) + - + String(eDate.getDate()) + 00:00:00.0; var parameters:* = { method: Insert, Event_Date: event_Date,..., }; then in the VO public void setEvent_Date(String Event_Date) { if ((Event_Date != null) (Event_Date.length() 0)) { this.Event_Date = Timestamp.valueOf(Event_Date); } } I hope this helps someone else. Mike Oliver wrote: How do I tie a DateField control to a Value Object with a Timestamp column in the database. -- View this message in context: http://www.nabble.com/MySql-timestamp-column-type-and-Flex-DateField-tp21196170p21209213.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Java enum in Flex3
How to convert java enum values into Flex3 object. Any one went thru this problem? Please give your experties? Sundar
[flexcoders] How to interact with the contents of a SWF loaded into Flex?
The problem: from buttons in Flex, how to control going to a frame or frame label in a timeline, in a SWF made in Flash 9, which is then loaded into a Flex project by a SWFLoader component. There will be buttons for next and previous. Each frame to be accessed by a corresponding State in Flex. How to refer to and interact with the contents of a SWF loaded into Flex? Would the above best be done as a Flex component exported from Flash 9? Thanks Kearney Buskirk
[flexcoders] mxmlc | Java heap space
Hi I am compiling the module and i get the error below Error: Java heap space java.lang.OutOfMemoryError: Java heap space Any pointer? target name=compileNavigation mxmlc file=${navigation.src}\NavigationModule.mxml failonerror=true output=${navigation.output} fork=true compiler.include-libraries dir=${navigation.lib} append=true include name=VisualGraph.swc/ /compiler.include-libraries compiler.include-libraries dir=${sowLibrary.lib} append=true include name=ria_msflexlib_flex3.swc/ include name=Cairngorm.swc/ /compiler.include-libraries compiler.include-libraries dir=${sowLibrary.bin} append=true include name=sowLibrary.swc/ /compiler.include-libraries /mxmlc /target Thanks ilikeflex
[flexcoders] Re: Setting perspectiveProjection disable children interactivity
Okay. So, okay. Here I am again. I just got a stripped down version of my code working on Gumbo but not sdk 3.2. In the following code, the Button instance maintains its interactivity (hover, tooltip, gets click event). If the same code gets complied to sdk 3.2, the Button looses hover/tooltip and doesn't take the click event) ?xml version=1.0 encoding=utf-8? Application xmlns=http://ns.adobe.com/mxml/2009; layout=absolute width=800 height=600 creationComplete=initApp(); Script ![CDATA[ import mx.controls.Button; import flash.geom.PerspectiveProjection; private function initApp():void { var btn:Button = new Button(); btn.label = hello world; btn.toolTip = This is the secret ninja!; btn.addEventListener(MouseEvent.CLICK, function(event:MouseEvent):void{trace(Button(event.currentTarget).label+ is clicked!);}); homeBx.addChild(btn); setPPCenter(0, 0); } private function setPPCenter(x:Number, y:Number):void { var pp:PerspectiveProjection = new PerspectiveProjection(); pp.projectionCenter = new Point(x, y); homeBx.transform.perspectiveProjection = pp; } ]] /Script Canvas id=homeBx x=400 y=300 z=0 clipContent=false/ /Application --- In flexcoders@yahoogroups.com, gwangdesign gwangdes...@... wrote: Just a follow-up from myself;) I am not able to re-compile my existing code using Gumbo sdk since all the code that tries to get/set UIComponent.transform seems to be broken on re-compile. For example: I got: TypeError: Error #1009: Cannot access a property or method of a null object reference. for v3 = items[id].transform.matrix3D.decompose(); In Halo (sdk 3.2), as long as you set UIComponent.z or UIComponent.rotationX/rotationY, you will get the Transform object without any problem. --- In flexcoders@yahoogroups.com, gwangdesign gwangdesign@ wrote: Hi, This is a Flex project (3.2) complied to target FP10, which utilizes the 3D API. Inside a Canvas object, I add whole bunch of Buttons which are laid out in a 3D carousel fashion. The problem is once I set the projectionCenter property of the Canvas, all the Button instances inside the Canvas stop taking any mouse interaction (including hover highlight, tooltips, click events, etc.), while everything else seems to be working fine. Is this the expected behavior or a bug? Here is the code: //carouselContainer is the Canvas instance var pp:PerspectiveProjection = new PerspectiveProjection(); pp.projectionCenter = new Point(x, y); carouselContainer.transform.perspectiveProjection = pp; //end of code. Thanks.
Re: [flexcoders] Re: 2 Datagrid issue
With a slightly clearer head I think this may be the solution, handled within the custom renderer: override public function set data(value:Object):void { if( value != null ) { super.data = value; selected = ( data.column == listData.columnIndex data.row == listData.rowIndex ) ? data.selected : false; } } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); for ( var i:int = 0; i DataGrid( listData.owner ).dataProvider.length; i ++ ) { DataGrid( listData.owner ).dataProvider[i].selected = false; } data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; ( listData.owner as CustomGrid ).invalidateList(); IList(DataGrid(owner).dataProvider).itemUpdated(data); } Any thoughts on this technique? Cheers, Simon On 29 Dec 2008, at 20:31, Simon Bailey wrote: Ok, my apologies for the irritating vagueness in my explanation: What I am trying to do is populate 2 grids using an array of value objects. Each grid uses various properties of the said value objects, some different and some the same. I have a custom render which extends checkbox and thus displays checkboxes throughout the grids. I simply want to be able to select ONE checkbox in each grid. If a check box in one grid is selected and its row is different to the currently selected check box in the second grid, I will be aiming to then: 1) Deselect the check box in the second grid. 2) Highlight the row in the second grid to match the newly selected row in the first grid. For this to happen I have followed the typical route i.e. have as much of the handling of the check box selections within the renderer itself and driven from the data property e.g. override public function set data(value:Object):void { if( value != null ) { super.data = value; selected = ( data.column == listData.columnIndex data.row == listData.rowIndex ) ? data.selected : false; } } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; ( listData.owner as CustomGrid ).invalidateList(); IList(DataGrid(owner).dataProvider).itemUpdated(data); } btw duplicating an Array using concat() did not work unfortunately as (adobe doc quote) 'changes are still made to both arrays. So I used (adobe docs): private function clone( source:Object ):* { var myBA:ByteArray = new ByteArray(); myBA.writeObject( source ); myBA.position = 0; return( myBA.readObject() ); }
Re: [flexcoders] mxmlc | Java heap space
Hi, This has come up before. You need to increase the memory available to Java and Ant. Search the archives for ANT_OPTS - Ivo From: ilikeflex ilikef...@yahoo.com To: flexcoders@yahoogroups.com Sent: Monday, December 29, 2008 1:26:26 PM Subject: [flexcoders] mxmlc | Java heap space Hi I am compiling the module and i get the error below Error: Java heap space java.lang.OutOfMemo ryError: Java heap space Any pointer? targetname=compileNavigation mxmlcfile=${navigation. src}\NavigationM odule.mxml failonerror=true output=${navigation. output} fork=true compiler.include- librariesdir=${navigation. lib} append=true includename=VisualGraph. swc/ /compiler.include- libraries compiler.include- librariesdir=${sowLibrary. lib} append=true includename=ria_msflexlib_ flex3.swc/ includename=Cairngorm.swc/ /compiler.include- libraries compiler.include- librariesdir=${sowLibrary. bin} append=true includename=sowLibrary.swc/ /compiler.include- libraries /mxmlc /target Thanks ilikeflex
[flexcoders] Searching Multi Demensional arrays
I have an infinite number of objects child objects that looks something like this below. I know this if it was just one level I could probably accomplish what i need but I am not sure how to do this. All of the path items are always going to be unique. Is there a way to search (drilling down as far as needed) and say give me the object where path = xyz; (Array)#0 [0] (Object)#1 children = (Array)#2 [0] (Object)#3 children = (Array)#4 lastModified = 1230587039867 name = parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\ [1] (Object)#5 lastModified = 1230580833728 name = another_one parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\another_one [2] (Object)#6 children = (Array)#7 lastModified = 1230587312776 name = dan parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\dan [3] (Object)#8 lastModified = 1230581177910 name = ggg parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\ggg [4] (Object)#9 lastModified = 1230581240020 name = hjkl parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\hjkl [5] (Object)#10 lastModified = 1230580116200 name = l parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\l [6] (Object)#11 lastModified = 1230575547578 name = nnn parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\nnn [7] (Object)#12 lastModified = 1230575859098 name = test parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\test mx_internal_uid = B8E4886E-A00D-6D89-CBAA-84C60F791112 name = Home path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data Thank You Dan Vega danv...@gmail.com http://www.danvega.org
RE: [flexcoders] mxmlc | Java heap space
In Flexbuilder : windows | preferences | java | installed JREs (select the JRE), edit, enter something like -Xmx512M in the default VM arguments field Is what has worked for me in the past. There may be other ways and other arguments, however (depending on your scenario, you may not be running ANT from flexbuilder I guess). I have a feeling that ANT_OPTS may be a more specific way of increasing memory available to ANT only, no idea if you can set it as above - I'm very far from expert in these things. It was extremely annoying at the time, and took me a little while to work it out even after a good search of the list archives and a general google (probably due to my ignorance, I have to admit) Any further explainations/info/links would be read with interest by myself, for one. -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of ivo Sent: 29 December 2008 21:32 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] mxmlc | Java heap space Hi, This has come up before. You need to increase the memory available to Java and Ant. Search the archives for ANT_OPTS - Ivo From: ilikeflex ilikef...@yahoo.com To: flexcoders@yahoogroups.com Sent: Monday, December 29, 2008 1:26:26 PM Subject: [flexcoders] mxmlc | Java heap space Hi I am compiling the module and i get the error below Error: Java heap space java.lang.OutOfMemo ryError: Java heap space Any pointer? target name=compileNavigation mxmlc file=${navigation. src}\NavigationM odule.mxml failonerror=true output=${navigation. output} fork=true compiler.include- libraries dir=${navigation. lib} append=true include name=VisualGraph. swc/ /compiler.include- libraries compiler.include- libraries dir=${sowLibrary. lib} append=true include name=ria_msflexlib_ flex3.swc/ include name=Cairngorm.swc/ /compiler.include- libraries compiler.include- libraries dir=${sowLibrary. bin} append=true include name=sowLibrary.swc/ /compiler.include- libraries /mxmlc /target Thanks ilikeflex __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
Re: [flexcoders] Re: 2 Datagrid issue
http://www.nutrixinteractive.com/apps/datagrid_example/dg.html Hmmm, jeez, crack one and always get anotherits a bit unreliable on scrolling I have noticed? On 29 Dec 2008, at 21:30, Simon Bailey wrote: With a slightly clearer head I think this may be the solution, handled within the custom renderer: override public function set data(value:Object):void { if( value != null ) { super.data = value; selected = ( data.column == listData.columnIndex data.row == listData.rowIndex ) ? data.selected : false; } } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); for ( var i:int = 0; i DataGrid( listData.owner ).dataProvider.length; i ++ ) { DataGrid( listData.owner ).dataProvider[i].selected = false; } data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; ( listData.owner as CustomGrid ).invalidateList(); IList(DataGrid(owner).dataProvider).itemUpdated(data); } Any thoughts on this technique? Cheers, Simon On 29 Dec 2008, at 20:31, Simon Bailey wrote: Ok, my apologies for the irritating vagueness in my explanation: What I am trying to do is populate 2 grids using an array of value objects. Each grid uses various properties of the said value objects, some different and some the same. I have a custom render which extends checkbox and thus displays checkboxes throughout the grids. I simply want to be able to select ONE checkbox in each grid. If a check box in one grid is selected and its row is different to the currently selected check box in the second grid, I will be aiming to then: 1) Deselect the check box in the second grid. 2) Highlight the row in the second grid to match the newly selected row in the first grid. For this to happen I have followed the typical route i.e. have as much of the handling of the check box selections within the renderer itself and driven from the data property e.g. override public function set data(value:Object):void { if( value != null ) { super.data = value; selected = ( data.column == listData.columnIndex data.row == listData.rowIndex ) ? data.selected : false; } } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; ( listData.owner as CustomGrid ).invalidateList(); IList(DataGrid(owner).dataProvider).itemUpdated(data); } btw duplicating an Array using concat() did not work unfortunately as (adobe doc quote) 'changes are still made to both arrays. So I used (adobe docs): private function clone( source:Object ):* { var myBA:ByteArray = new ByteArray(); myBA.writeObject( source ); myBA.position = 0; return( myBA.readObject() ); }
[flexcoders] re-passing variable arguments?
I have a method that accepts variable arguments like this: public function doSomethingThenContinue(continueFunction:Function, ...args) { // execute some code that does important stuff // call the continue function now that we are done passing the original args to that function continueFunction(args); } Is it possible to pass the variable arguments on to the generic continueFunction in this manner? I don't really want the args to be passed in a single Array, but want to call the continueFunction with the arguments split out like this dynamically continueFunction(args[0], args[1], etc.) depending on how many were passed in and depending on how many parameters the continueFunction accepts. Is this possible to do somehow? Thanks, Gary
Re: [flexcoders] re-passing variable arguments?
Yes, through the magic of higher-order functions: http://livedocs.adobe.com/flex/3/langref/Function.html#apply() -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: toofah_gm ga...@byu.edu Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] re-passing variable arguments? Date: Mon, 29 Dec 2008 22:58:14 - pass the variable arguments on to the generic continueFunction in this manner? I don't really want the args to be passed in a single Array, but want to call the continueFunction with the arguments split out like this dynamically continueFunction(args[0],
Re: [flexcoders] re-passing variable arguments?
On Tue, Dec 30, 2008 at 4:28 AM, toofah_gm ga...@byu.edu wrote: I have a method that accepts variable arguments like this: public function doSomethingThenContinue(continueFunction:Function, ...args) { // execute some code that does important stuff // call the continue function now that we are done passing the original args to that function continueFunction(args); } Is it possible to pass the variable arguments on to the generic continueFunction in this manner? I don't really want the args to be passed in a single Array, but want to call the continueFunction with the arguments split out like this dynamically continueFunction(args[0], args[1], etc.) depending on how many were passed in and depending on how many parameters the continueFunction accepts. continueFunction.apply(this, args); Manish -- http://manishjethani.com
Re: [flexcoders] re-passing variable arguments?
What you're after is usually called a splat. It's not supported quite so explicitly in AS3, but to do what you're after just use Function.apply(). So in your case, it'd be: continueFunction.apply(this, args); -Josh On Tue, Dec 30, 2008 at 8:58 AM, toofah_gm ga...@byu.edu wrote: I have a method that accepts variable arguments like this: public function doSomethingThenContinue(continueFunction:Function, ...args) { // execute some code that does important stuff // call the continue function now that we are done passing the original args to that function continueFunction(args); } Is it possible to pass the variable arguments on to the generic continueFunction in this manner? I don't really want the args to be passed in a single Array, but want to call the continueFunction with the arguments split out like this dynamically continueFunction(args[0], args[1], etc.) depending on how many were passed in and depending on how many parameters the continueFunction accepts. Is this possible to do somehow? Thanks, Gary -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Searching Multi Demensional arrays
I think you're looking for something like this: public function findPath(items:Array, path:String):Object { for each (var item:Object in items) { if (item.path == path) { return item; } else if (children children.length 0) { var foundItem:Object = findPath(item.children, path); if (foundItem) { return foundItem; } } } } I didn't test out the code, but the concept is what is important. It's recursively calling the same function for each level of children (see how it calls findPath() within the function itself), so it digs down however deep it needs to. Good luck. Aaron Dan Vega wrote: I have an infinite number of objects child objects that looks something like this below. I know this if it was just one level I could probably accomplish what i need but I am not sure how to do this. All of the path items are always going to be unique. Is there a way to search (drilling down as far as needed) and say give me the object where path = xyz; (Array)#0 [0] (Object)#1 children = (Array)#2 [0] (Object)#3 children = (Array)#4 lastModified = 1230587039867 name = parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\ [1] (Object)#5 lastModified = 1230580833728 name = another_one parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\another_one [2] (Object)#6 children = (Array)#7 lastModified = 1230587312776 name = dan parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\dan [3] (Object)#8 lastModified = 1230581177910 name = ggg parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\ggg [4] (Object)#9 lastModified = 1230581240020 name = hjkl parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\hjkl [5] (Object)#10 lastModified = 1230580116200 name = l parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\l [6] (Object)#11 lastModified = 1230575547578 name = nnn parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\nnn [7] (Object)#12 lastModified = 1230575859098 name = test parent = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data\test mx_internal_uid = B8E4886E-A00D-6D89-CBAA-84C60F791112 name = Home path = C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\FFManager\src\data Thank You Dan Vega danv...@gmail.com mailto:danv...@gmail.com http://www.danvega.org http://www.danvega.org
Re: [flexcoders] re-passing variable arguments?
Try continueFunction.apply(args); Aaron toofah_gm wrote: I have a method that accepts variable arguments like this: public function doSomethingThenContinue(continueFunction:Function, ...args) { // execute some code that does important stuff // call the continue function now that we are done passing the original args to that function continueFunction(args); } Is it possible to pass the variable arguments on to the generic continueFunction in this manner? I don't really want the args to be passed in a single Array, but want to call the continueFunction with the arguments split out like this dynamically continueFunction(args[0], args[1], etc.) depending on how many were passed in and depending on how many parameters the continueFunction accepts. Is this possible to do somehow? Thanks, Gary
Re: [flexcoders] Searching Multi Demensional arrays
On Tue, Dec 30, 2008 at 3:35 AM, Dan Vega danv...@gmail.com wrote: I have an infinite number of objects child objects that looks something like this below. I know this if it was just one level I could probably accomplish what i need but I am not sure how to do this. All of the path items are always going to be unique. Is there a way to search (drilling down as far as needed) and say give me the object where path = xyz; [snip] You could index them by path, basically. Go through the object graph and add each object to a map (Object) with the path property as the key. map[obj.path] = obj; Later you can access any object by its path: someObj = map[somePath]; This is typically how you'd do it in AS3/Flex. Manish -- Manish Jethani http://manishjethani.com
Re: [flexcoders] How to interact with the contents of a SWF loaded into Flex?
On Tue, Dec 30, 2008 at 2:55 AM, Kearney Buskirk kear...@lightthrumedia.com wrote: The problem: from buttons in Flex, how to control going to a frame or frame label in a timeline, in a SWF made in Flash 9, which is then loaded into a Flex project by a SWFLoader component. There will be buttons for next and previous. Each frame to be accessed by a corresponding State in Flex. How to refer to and interact with the contents of a SWF loaded into Flex? mx:SWFLoader source=someSWFMovie.swf id=swfMovie / // Later ... var mc:MovieClip = swfMovie.content as MovieClip; mc.goToAndPlay(1); I believe that's how you'd do it. Manish
Re: [flexcoders] Extends the layout manager
On Mon, Dec 29, 2008 at 11:16 PM, lorenzo.boaro lore...@katamail.com wrote: i have three custom components (suppose that are called A, B and C for semplicity). i've also created a custom panel(myPanel) that extends the Panel component. now i would create a personal layout that permit to put for example the A component in myPanel center, the B component under the A component and finally the C component in the myPanel bottom right. What you're looking for is quite simple really. Just set the 'layout' property on the MyPanel instance to 'absolute' and then set the 'x' and 'y' properties on the child objects (A, B, and C instances). You can use constraints-based layout properties like 'left', 'right', horizontalCenter', etc. Manish -- Manish Jethani http://manishjethani.com
Re: [flexcoders] Searching Multi Demensional arrays
since the path will be unique for each object it could serve as the key in a hash. mapPathToObj[obj1.path] = obj only works for exact matches tho, if you are looking for substrings then you will need to iterate over the nodes. From: Dan Vega danv...@gmail.com To: flexcoders@yahoogroups.com Sent: Monday, December 29, 2008 2:05:19 PM Subject: [flexcoders] Searching Multi Demensional arrays I have an infinite number of objects child objects that looks something like this below. I know this if it was just one level I could probably accomplish what i need but I am not sure how to do this. All of the path items are always going to be unique. Is there a way to search (drilling down as far as needed) and say give me the object where path = xyz; (Array)#0 [0] (Object)#1 children = (Array)#2 [0] (Object)#3 children = (Array)#4 lastModified = 1230587039867 name = parent = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data\ [1] (Object)#5 lastModified = 1230580833728 name = another_one parent = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data\ another_one [2] (Object)#6 children = (Array)#7 lastModified = 1230587312776 name = dan parent = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data\ dan [3] (Object)#8 lastModified = 1230581177910 name = ggg parent = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data\ ggg [4] (Object)#9 lastModified = 1230581240020 name = hjkl parent = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data\ hjkl [5] (Object)#10 lastModified = 1230580116200 name = l parent = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data\ l [6] (Object)#11 lastModified = 1230575547578 name = nnn parent = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data\ nnn [7] (Object)#12 lastModified = 1230575859098 name = test parent = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data\ test mx_internal_ uid = B8E4886E-A00D- 6D89-CBAA- 84C60F791112 name = Home path = C:\Program Files\Apache Software Foundation\Apache2. 2\htdocs\ FFManager\ src\data Thank You Dan Vega danv...@gmail. com http://www.danvega. org
[flexcoders] Re: 2 Datagrid issue
--- In flexcoders@yahoogroups.com, Simon Bailey si...@... wrote: Ok I am a numbnut! Rsolved through 2 seperate arrays, into two seperate arraycollections! I must add that if the 2 Array sources are different I then result in the issue of multiple selections (CheckBox) on row and in column. Are there any suggestions on how to overcome this? If the objects contained in each array are the same, then they will have the same properties no matter where you're referring to them from. You could consider letting the datagrid bear the burden of keeping track of the selection like in this TileList example http://blog.flexmonkeypatches.com/2007/09/10/flex-tilelist-with- togglebuttons/ Hope this helps; Amy
[flexcoders] ToggleButtonBar with one or more ComboBoxes instead of buttons: How to build it?
Requesting advice on how to get started making this custom component. Thanks... -A
RE: [flexcoders] Re: 2 Datagrid issue
Your theory seems close. First, what is that click handler stuff doing? It really should just update a property on the dataProvider item that controls the selected state of the checkbox. That loop is unselecting the checkbox in every row in the DG. That does not make sense to me. One suggestion: set data gets called *very* often. It is better to set an instance varialble with the data object in that function, call invalidateProperties(), then do the actual visual work in commitProperties(). But what you have should work, it is just inefficient. Debug the code that sets the selected state. I'd break that ternary expression into steps and trace or step through to see what is happening. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 5:46 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: 2 Datagrid issue http://www.nutrixinteractive.com/apps/datagrid_example/dg.html http://www.nutrixinteractive.com/apps/datagrid_example/dg.html Hmmm, jeez, crack one and always get anotherits a bit unreliable on scrolling I have noticed? On 29 Dec 2008, at 21:30, Simon Bailey wrote: With a slightly clearer head I think this may be the solution, handled within the custom renderer: override public function set data(value:Object):void { if( value != null ) { super.data = value; selected = ( data.column == listData.columnIndex data.row == listData.rowIndex ) ? data.selected : false; } } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); for ( var i:int = 0; i DataGrid( listData.owner ).dataProvider.length; i ++ ) { DataGrid( listData.owner ).dataProvider[i].selected = false; } data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; ( listData.owner as CustomGrid ).invalidateList(); IList(DataGrid(owner).dataProvider).itemUpdated(data); } Any thoughts on this technique? Cheers, Simon On 29 Dec 2008, at 20:31, Simon Bailey wrote: Ok, my apologies for the irritating vagueness in my explanation: What I am trying to do is populate 2 grids using an array of value objects. Each grid uses various properties of the said value objects, some different and some the same. I have a custom render which extends checkbox and thus displays checkboxes throughout the grids. I simply want to be able to select ONE checkbox in each grid. If a check box in one grid is selected and its row is different to the currently selected check box in the second grid, I will be aiming to then: 1) Deselect the check box in the second grid. 2) Highlight the row in the second grid to match the newly selected row in the first grid. For this to happen I have followed the typical route i.e. have as much of the handling of the check box selections within the renderer itself and driven from the data property e.g. override public function set data(value:Object):void { if( value != null ) { super.data = value; selected = ( data.column == listData.columnIndex data.row == listData.rowIndex ) ? data.selected : false; } } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); data.selected= selected; data.row = listData.rowIndex; data.column = listData.columnIndex; ( listData.owner as CustomGrid ).invalidateList(); IList(DataGrid(owner).dataProvider).itemUpdated(data); } btw duplicating an Array using concat() did not work unfortunately as (adobe doc quote) 'changes are still made to both arrays. So I used (adobe docs): private function clone( source:Object ):* { var myBA:ByteArray = new ByteArray(); myBA.writeObject( source ); myBA.position = 0; return( myBA.readObject() ); }
Re: [flexcoders] Searching Multi Demensional arrays
I am grabbing these values from a server side service like so var dirs:Array = event.result as Array; So in the end with an endless amount of children am I still going to have to loop through everything to map them as they come in? Thank You Dan Vega danv...@gmail.com http://www.danvega.org
[flexcoders] Re: 2 Datagrid issue
btw duplicating an Array using concat() did not work unfortunately as (adobe doc quote) 'changes are still made to both arrays. So I used (adobe docs): private function clone( source:Object ):* { var myBA:ByteArray = new ByteArray(); myBA.writeObject( source ); myBA.position = 0; return( myBA.readObject() ); } ObjectUtil.copy works well for a deep copy. -TH --- In flexcoders@yahoogroups.com, Simon Bailey si...@... wrote: Ok, my apologies for the irritating vagueness in my explanation: What I am trying to do is populate 2 grids using an array of value objects. Each grid uses various properties of the said value objects, some different and some the same. I have a custom render which extends checkbox and thus displays checkboxes throughout the grids. I simply want to be able to select ONE checkbox in each grid. If a check box in one grid is selected and its row is different to the currently selected check box in the second grid, I will be aiming to then: 1) Deselect the check box in the second grid. 2) Highlight the row in the second grid to match the newly selected row in the first grid. For this to happen I have followed the typical route i.e. have as much of the handling of the check box selections within the renderer itself and driven from the data property e.g. override public function set data(value:Object):void { if( value != null ) { super.data = value; selected = ( data.column == listData.columnIndex data.row == listData.rowIndex ) ? data.selected : false; } } override protected function clickHandler(event:MouseEvent):void { super.clickHandler(event); data.selected = selected; data.row = listData.rowIndex; data.column = listData.columnIndex; ( listData.owner as CustomGrid ).invalidateList(); IList(DataGrid(owner).dataProvider).itemUpdated(data); } btw duplicating an Array using concat() did not work unfortunately as (adobe doc quote) 'changes are still made to both arrays. So I used (adobe docs): private function clone( source:Object ):* { var myBA:ByteArray = new ByteArray(); myBA.writeObject( source ); myBA.position = 0; return( myBA.readObject() ); } On 29 Dec 2008, at 20:25, Tracy Spratt wrote: We need a little more functional description than, a custom renderer and all that jazz. Exactly what are you trying to show/do? Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 3:01 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: 2 Datagrid issue Ok I am a numbnut! Rsolved through 2 seperate arrays, into two seperate arraycollections! I must add that if the 2 Array sources are different I then result in the issue of multiple selections (CheckBox) on row and in column. Are there any suggestions on how to overcome this? On 29 Dec 2008, at 19:24, Tim Hoff wrote: Are the 2 ArrayCollections using the same source array by any chance? -TH --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: Probably, but we'll need to see a bit of the relevant code. Start with the DataGrid declaration mxml and the change handler function. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Simon Bailey Sent: Monday, December 29, 2008 1:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Datagrid issue Hi, I have 2 DataGrids working with a custom renderer and all that jazz but 2 seperate ArrayCollections as data provider. On select of an item in one grid I set the data['selected'] property accordingly and call an itemUpdated in the ArrayCollection. Can anyone think why a selection in one grid is also selecting an item in the second grid?
[flexcoders] Using the create method in a Flex/Rails app
I'm working with a Flex client and a RESTful Rails app which has the following models: Simulation: has_many loads, buffers and servers Server: belongs_to simulation Load: belongs_to simulation Buffer: belongs_to simulation I have created an input form where the user can input all attributes of a simulation, server, load and buffer, and then click a Submit button. The action of the Submit button should create a new simulation with an associated server, load and buffer. The server, load and buffer can't exist independent of a simulation, nor can a simulation be processed without at least one each of these 3 entities. My initial thought was to use the create method of the simulations_controller to create the simulation, server, load and buffer. However, it is necessary to save the simulation first before creating the load, buffer and server, and additionally I can't figure out how to structure the mx:request that is sent with the HTTPService to trigger the create method. If I include the buffer, for example, in the simulation/simulation XML, I get an error when the simulations_controller tries to process that field while it is creating the Simulation object. Another approach I have tried is to call the HTTPService to create the simulation first, and then call the services to create the server, load and buffer after the simulation is created and I have a simulation_id to reference. However, when I try the latter approach, I get one of those nasty 2032 errors: [FaultEvent fault=[RPC Fault faultString=HTTP request error faultCode=Server.Error.Request faultDetail=Error: [IOErrorEvent type=ioError bubbles=false cancelable=false eventPhase=2 text=Error #2032: Stream Error. URL: http://localhost:3000/simulations.xml;]. URL: /simulations.xml] messageId=C2E405F1-C735-2E7C-0888-855DBC1D7A00 type=fault bubbles=false cancelable=true eventPhase=2] The HTTPService call looks like this: mx:HTTPService id=svcSimulationCreate url=/simulations.xml contentType=application/xml resultFormat=e4x method=POST result=handleSimulationCreateResult (event.result as XML) fault=Alert.show(event.toString()) mx:request xmlns= simulation name{runControlBox.simNameTI.text}/name desc{runControlBox.descTI.text}/desc run_length{runControlBox.runLengthTI.text} /run_length time_units{runControlBox.getTimeUnits (runControlBox.timeUnitsCB.selectedIndex)}/time_units /simulation /mx:request /mx:HTTPService The weird thing is that even though I get this error, the Simulation is created in mySQL database no servers, loads or buffers, just the Simulation. There are no errors on the server window, and the logs don't show anything amiss either. Here is a snippet from my development.log: Processing SimulationsController#create (for 127.0.0.1 at 2008-12-29 20:44:02) [POST] Session ID: BAh7BzoMdXNlcl9pZGkIIgpmbGFzaElDOidBY3Rpb25Db250cm9sbGVyOjpG bGFzaDo6Rmxhc2hIYXNoewAGOgpAdXNlZHsA-- 78b034ba15954f07b8790002a454771bc17a9990 Parameters: {simulation= {name=Test424242, run_length=42, desc=424242, time_un its=hr}, format=xml, action=create, controller=simu lations} [4;36;1mUser Columns (0.015000) [0m[0;1mSHOW FIELDS FROM `users` [0m [4;35;1mUser Load (0.016000) [0m[0mSELECT * FROM `users` WHERE (`users`.`id` = 3) LIMIT 1 [0m [4;36;1mSimulation Columns (0.00) [0m[0;1mSHOW FIELDS FROM `simulations` [0m [4;35;1mSQL (0.00) [0m[0mBEGIN [0m [4;36;1mSQL (0.00) [0m[0;1mSELECT `name` FROM `simulations` WHERE (`simulations`.name = 'Test424242' AND `simulations`.user_id = 3) [0m [4;35;1mSimulation Create (0.015000) [0m[0mINSERT INTO `simulations` (`name`, `updated_at`, `run_length`, `desc`, `time_units`, `user_id`, `created_at`) VALUES('Test424242', '2008-12- 30 01:44:02', 42.0, '424242', 'hr', 3, '2008-12-30 01:44:02') [0m [4;36;1mSQL (0.078000) [0m[0;1mCOMMIT [0m [4;35;1mResource Load (0.00) [0m[0mSELECT * FROM `resources` WHERE (`resources`.simulation_id = 19) [0m [4;36;1mLoad Load (0.00) [0m[0;1mSELECT * FROM `loads` WHERE (`loads`.simulation_id = 19) [0m Completed in 0.18800 (5 reqs/sec) | Rendering: 0.0 (0%) | DB: 0.12400 (65%) | 201 Created [http://localhost/simulations.xml] The examples that I have found in my research either deal with sibling elements such as projects, tasks and locations from _Flexible Rails_, or else elements that are created at different times and aren't tied together, such as a brokerage account, stock positions and movements from _Flex On Rails_. I haven't found any examples where the models are so tightly bound together where one element can't exist without at least one each of the other models. Any suggestions would be greatly appreciated.
Re: [flexcoders] Flex Builder 3 and SWFObject with IE - blocked content
Sorry.. confused... isn't that what my html is doing? SWFObject is instantiating FlashPlayer afaik? On Mon, Dec 29, 2008 at 3:10 PM, Tracy Spratt tspr...@lariatinc.com wrote: The way around that IE thing is, instead of directly declaring the Object/embed tag, use javascript to instantiate the FlashPlayer. That is why the generated wrapper calls the function in the .js file. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Rick Schmitty Sent: Monday, December 29, 2008 2:14 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex Builder 3 and SWFObject with IE - blocked content I'm trying to use swfobject in Flex builder and running into some issues debugging. When I launch a debugging session, IE always says it is blocking content and I have to click to allow blocked content each time Is there some trick to get it to work? I'm assuming the built in Adobe JS gets some kinda 'pass' somewhere such that IE doesnt complain about it Here's my index.template.html html lang=en head titleMy Flex App/title meta http-equiv=Content-Type content=text/html; charset=utf-8 / script type=text/javascript src=js/swfobject.js/script script type=text/javascript src=js/swfaddress.js/script style body { margin: 0px; overflow:hidden } /style /head body scroll=no div id=content pIn order to view this you need JavaScript and Flash Player 9 or greater/p /div script type=text/javascript // ![CDATA[ var so = new SWFObject('${swf}.swf', '${application}', '100%', '100%', '9', '${bgcolor}'); so.useExpressInstall('playerProductInstall.swf'); so.addParam('menu', 'false'); so.write('content'); // ]] /script /body /html
[flexcoders] Change Color of panel from a function
Hello all, I am having troubles finding information on how to change the border color of a panel from a function, here is my code: mx:Panel id=editPanel layout=absolute width=330 height=65% right=10 top=128 mx:Button x=122.5 y=10 click=EditMe id=nodeEditMode label=Edit Mode/ mx:Label x=10 y=37 text=Name/ mx:TextInput x=10 y=63 id=node_Name width=218 editable=false/ /mx:Panel private function EditMe():void { Not sure what to put here } I don't see the ability to change the color when I do editPanel. . Thanks for the help, timgerr
[flexcoders] Re: 2 Datagrid issue
You could consider letting the datagrid bear the burden of keeping track of the selection like in this TileList example http://blog.flexmonkeypatches.com/2007/09/10/flex-tilelist-with- togglebuttons/ Good example, but I'm not convinced that a child should know, or control, a parent. The associative array is a cool solution. But creating a myTileList reference, inside the itemRenderer, limits the use of the itemRenderer for other controls, and seems a bit backwards (IMHO). Yes, the DataGrid (parent) could bear the burden; and should. All of the code in the itemRenderer, that accesses the parent, can be done in the parent itself; through the use of events. Subclassing DataGrid, or TileList, or whatever, in this case, might be a more pure approach; from an OO point of view. -TH --- In flexcoders@yahoogroups.com, Amy amyblankens...@... wrote: --- In flexcoders@yahoogroups.com, Simon Bailey simon@ wrote: Ok I am a numbnut! Rsolved through 2 seperate arrays, into two seperate arraycollections! I must add that if the 2 Array sources are different I then result in the issue of multiple selections (CheckBox) on row and in column. Are there any suggestions on how to overcome this? If the objects contained in each array are the same, then they will have the same properties no matter where you're referring to them from. You could consider letting the datagrid bear the burden of keeping track of the selection like in this TileList example http://blog.flexmonkeypatches.com/2007/09/10/flex-tilelist-with- togglebuttons/ Hope this helps; Amy
[flexcoders] FLEX CHARTING
Hi All, I am using Column chart in my project. Here i need to plot uptime and downtime of the system using column chart. Uptime data will come from the database like this: StatusGraph data date10/date uptime0/uptime /data data date11/date uptime1/uptime /data data date12/date uptime2/uptime /data data date07/date uptime2/uptime /data data date07/date uptime2/uptime /data data date18/date uptime0/uptime /data /StatusGraph I am not getting any downtime information from the database. Doubt i have here is can i do any calculations before plotting the graph. I tried like this. But its not working. mx:ColumnChart id=chart dataProvider={resultXML.System[0].StatusGraph.data} type=100% width=500 height=250 showDataTips=true mx:series mx:ColumnSeries yField=uptime / mx:ColumnSeries yField=100-uptime / -- Doubt /mx:series mx:horizontalAxis mx:CategoryAxis categoryField=date / /mx:horizontalAxis /mx:ColumnChart SO here iam using yfield as 100-uptime to calculate downtime. But its not displaying any data. Can any one help me regarding this. Thanks and Regards, Poornima
Re: [flexcoders] FLEX CHARTING
yField is just a reference to a property or node in your dataset... in your case uptime... if you want to do a calculation, you will have to perform that on your dataset prior to plotting in the ColumnChart... you can't perform a calculation on the field reference as you're trying to do. Brendan On Tue, Dec 30, 2008 at 12:24 AM, kotha poornima poorni_ag...@yahoo.comwrote: Hi All, I am using Column chart in my project. Here i need to plot uptime and downtime of the system using column chart. Uptime data will come from the database like this: StatusGraph data date10/date uptime0/uptime /data data date11/date uptime1/uptime /data data date12/date uptime2/uptime /data data date07/date uptime2/uptime /data data date07/date uptime2/uptime /data data date18/date uptime0/uptime /data /StatusGraph I am not getting any downtime information from the database. Doubt i have here is can i do any calculations before plotting the graph. I tried like this. But its not working. mx:ColumnChart id=chart dataProvider={resultXML.System[0].StatusGraph.data} type=100% width=500 height=250 showDataTips=true mx:series mx:ColumnSeries yField=uptime / mx:ColumnSeries yField=100-uptime / -- Doubt /mx:series mx:horizontalAxis mx:CategoryAxis categoryField=date / /mx:horizontalAxis /mx:ColumnChart SO here iam using yfield as 100-uptime to calculate downtime. But its not displaying any data. Can any one help me regarding this. Thanks and Regards, Poornima -- Brendan Meutzner http://www.meutzner.com/blog/
[flexcoders] Text components in VBox item renderer
I have been reading for hours on the net about this issue..anyone see why this is not working right as a list item renderer? The Text controls are not sizing right, their height is not growing as expected. The title only shows one line, the announcement never shows up. I have variableRowHeight set to true on the list component. ?xml version=1.0 encoding=utf-8? mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:view=org.ariel.view.* horizontalScrollPolicy=off verticalScrollPolicy=off verticalGap=3 mx:Script ![CDATA[ import org.ariel.utils.DateUtil; override public function set data(value:Object):void { super.data = value; if (data != null) { this.date.text = DateUtil.getShortFormatDateString(data.announcementDate); this.title.text = data.title; this.announcement.text = data.announcement; } } ]] /mx:Script mx:Label id=date / mx:Text id=title width={this.width} fontWeight=bold / mx:Text id=announcement width={this.width} / /mx:VBox
Re: [flexcoders] FLEX CHARTING
But you can use the dataFunction property to set a function that does calculations on the fly. On Mon, Dec 29, 2008 at 10:28 PM, Brendan Meutzner bmeutz...@gmail.comwrote: yField is just a reference to a property or node in your dataset... in your case uptime... if you want to do a calculation, you will have to perform that on your dataset prior to plotting in the ColumnChart... you can't perform a calculation on the field reference as you're trying to do. Brendan On Tue, Dec 30, 2008 at 12:24 AM, kotha poornima poorni_ag...@yahoo.comwrote: Hi All, I am using Column chart in my project. Here i need to plot uptime and downtime of the system using column chart. Uptime data will come from the database like this: StatusGraph data date10/date uptime0/uptime /data data date11/date uptime1/uptime /data data date12/date uptime2/uptime /data data date07/date uptime2/uptime /data data date07/date uptime2/uptime /data data date18/date uptime0/uptime /data /StatusGraph I am not getting any downtime information from the database. Doubt i have here is can i do any calculations before plotting the graph. I tried like this. But its not working. mx:ColumnChart id=chart dataProvider={resultXML.System[0].StatusGraph.data} type=100% width=500 height=250 showDataTips=true mx:series mx:ColumnSeries yField=uptime / mx:ColumnSeries yField=100-uptime / -- Doubt /mx:series mx:horizontalAxis mx:CategoryAxis categoryField=date / /mx:horizontalAxis /mx:ColumnChart SO here iam using yfield as 100-uptime to calculate downtime. But its not displaying any data. Can any one help me regarding this. Thanks and Regards, Poornima -- Brendan Meutzner http://www.meutzner.com/blog/
Re: [flexcoders] FLEX CHARTING
Hi Richard, Thanks for the replies.Can you please give me an example?? Thanks Poornima From: Richard Rodseth rrods...@gmail.com To: flexcoders@yahoogroups.com Sent: Tuesday, December 30, 2008 12:14:19 PM Subject: Re: [flexcoders] FLEX CHARTING But you can use the dataFunction property to set a function that does calculations on the fly. On Mon, Dec 29, 2008 at 10:28 PM, Brendan Meutzner bmeutz...@gmail. com wrote: yField is just a reference to a property or node in your dataset... in your case uptime... if you want to do a calculation, you will have to perform that on your dataset prior to plotting in the ColumnChart. .. you can't perform a calculation on the field reference as you're trying to do. Brendan On Tue, Dec 30, 2008 at 12:24 AM, kotha poornima poorni_agile@ yahoo.com wrote: Hi All, I am using Column chart in my project. Here i need to plot uptime and downtime of the system using column chart. Uptime data will come from the database like this: StatusGraph data date10/date uptime0/uptime /data data date11/date uptime1/uptime /data data date12/date uptime2/uptime /data data date07/date uptime2/uptime /data data date07/date uptime2/uptime /data data date18/date uptime0/uptime /data /StatusGraph I am not getting any downtime information from the database. Doubt i have here is can i do any calculations before plotting the graph. I tried like this. But its not working. mx:ColumnChart id=chart dataProvider={resultXML.System[ 0].StatusGraph. data} type=100% width=500 height=250 showDataTips=true mx:series mx:ColumnSeries yField=uptime / mx:ColumnSeries yField=100-uptime / -- Doubt /mx:series mx:horizontalAxis mx:CategoryAxis categoryField=date / /mx:horizontalAxis /mx:ColumnChart SO here iam using yfield as 100-uptime to calculate downtime. But its not displaying any data. Can any one help me regarding this. Thanks and Regards, Poornima -- Brendan Meutzner http://www.meutzner .com/blog/
[flexcoders] qtp spy not working for different component hirerachy
Hi all, I have the following 2 codes under same top hirearchy. The Qtp is able to recognise the component in the repeater in the code 1 and not in the code 2. The only difference in the 2 code bases is that code2 has an extra hbox container. If i remove that extra hbox then the code base 2 is also recognisable. Which makes me think that this has to do something with the hirerarchy of the components. Any one any idea or has faced any issue like this before. code 1: mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% paddingTop=10 paddingBottom=10 paddingRight=10 paddingLeft=10 verticalGap=10 creationComplete=init() xmlns:common=com.fitness.pricingTool.view.common.* xmlns:index=com.fitness.pricingTool.view.index.* mx:Repeater id=indexRepeater dataProvider={indexData} common:FitnessButtonList id=fitnessButtonList rowHeightType=variable buttonLabel={indexRepeater.currentItem.name} listData={indexRepeater.currentItem.data} dataObject={indexRepeater.currentItem} ScreenChange=handleSelectionChange(event) / /mx:Repeater /mx:VBox code 2: mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% paddingTop=10 paddingBottom=10 paddingRight=10 paddingLeft=10 verticalGap=10 creationComplete=init() xmlns:common=com.fitness.pricingTool.view.common.* xmlns:index=com.fitness.pricingTool.view.index.* HBox mx:Repeater id=indexRepeater dataProvider={indexData} common:FitnessButtonList id=fitnessButtonList rowHeightType=variable buttonLabel={indexRepeater.currentItem.name} listData={indexRepeater.currentItem.data} dataObject={indexRepeater.currentItem} ScreenChange=handleSelectionChange(event) / /mx:Repeater /HBox /mx:VBox Thanks jk
Re: [flexcoders] Change Color of panel from a function
On Tue, Dec 30, 2008 at 10:23 AM, timgerr tgallag...@danati.com wrote: Hello all, I am having troubles finding information on how to change the border color of a panel from a function, here is my code: [snip] http://blog.flexexamples.com/tag/bordercolor/ You'll have to call the setStyle method on the Panel object. Manish
Re: [flexcoders] ToggleButtonBar with one or more ComboBoxes instead of buttons: How to build it?
On Tue, Dec 30, 2008 at 5:46 AM, Alan Shaw noden...@gmail.com wrote: Requesting advice on how to get started making this custom component. A combo box is not exactly a button, so my first question is, how is this ToggleButtonBar with ComboBox going to behave exactly? Manish