Re: [flexcoders] Re: TabNavigator changing from MXML to actionscript.
I considered that but say you have four tab where any one can be on or off. that 8 different view states. On Thu, Aug 13, 2009 at 4:41 AM, jaywood58 jayw...@san.rr.com wrote: An easy way might be to use different viewstates (e.g., a base state without the restricted tab, and a derived state that includes the restricted tab), then simply set the appropriate viewstate based on user permissions. Similar to your init() code, it might look something like: if (Permissions.hasPermission(restrictedTab) { currentState = stateWithRestrictedTab; Good luck! --- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Hi I've an application already mostly written. *Background*: This application uses several custom components that extend or contain TabNavigators. A requrirement which I've missed is that if the user doesn't have permission to view a tab then the tab doesn't appear in the tab navigators. However tabs still appear even if the child elements they refer to are invisible. So I guess that I need to do something like this in my MXML files. mx:TabNavigator xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:component=com.example.test.* CreationComplete=init() ... //Normal stuff in here ... public var tab1:CustomComponent1; public var tab2:CustomComponent2; //etc ... private function init():void { if (Permissions.hasPermission(viewTab1) { tab1 = new CustomComponent1; ... // Set the properties that are normally specified in MXML // Add event listeners for all the events normally specified in mxml. // e.g. tab1.addEventListener(SaveEvent.SAVE, handleSave); // Do any bindings that are normally associated with the MXML } } ... /mx:TabNavigator *Questions:* 1. How do I set up the bindings? I have seen http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_7.htmlhowever this leaves me worried that binding will occur differently. I'm particually worried that I'll get binding events occuring before the component is initialised which won't (As is normal in mxml) be swallowed by the framework. I don't even know where I'd put a try block for these errors. 2. Doing things in this way means that tabs the user has permission for but hasn't clicked on don't apply for deferred instanceiation. Is there any way to get this back. (Normally the tab navigator only instances its children when the appropiate tab is selected). 3. Creating the child after CreationComplete doesn't feel right to me. I guess I could overwrite create children in the above example but not when my MXML file contains a TabNavigator rather than is a TabNavigator which is also a situation elsewhere in the application. Is there a better way arround this? Creating a ChildDiscriptor object. Does doing things in this way mean a blank component appears then its contents appear? Thanks in Advance, Wes -- 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
RE: [flexcoders] This mailing list vs the forum.
I use both, mainly answering questions rather than asking them. It's obvious that the majority of the new members of the community have migrated to the forums rather than this list, which generates a lot of noise, which lowers its usefulness to anyone who surfs for useful posts. The mailing list still has the best posters on it (though we appear to have lost Alex to the forums :-(), has less noise and generally has more informed questions and answers. Definitely prefer Flexcoders... 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 Wesley Acheson Sent: 12 August 2009 16:09 To: flexcoders Subject: [flexcoders] This mailing list vs the forum. I saw a mail a while ago about new Adobe forums. Those of you who use both which do you perfer flexcoders or the Adobe forums? I've an impression that the community is pretty strong here. ] Please only answer If you use both. Its not a real opinion to get the opinion of someone who only uses the group as they can't compare. Regards, Wes
[flexcoders] How to search a file name and its path in local machine using adobe AIR
Hello, i'm strugling with above mentioned subjetc line. can any body help me regarding this. actually i've to load a file wchich is stored in local machine..so i've to find ou t the path where the file is stored and then i've to load the file.. thanks in advance regards, adarsh Yahoo! recommends that you upgrade to the new and safer Internet Explorer 8. http://downloads.yahoo.com/in/internetexplorer/
Re: [flexcoders] This mailing list vs the forum.
Hi all, Adobe Forums are definitely the future for the main communication medium for Adobe Flex experts. Forums in general are way superior to mailing lists to exchange the knowledge on the Internet. Things that jump into my mind first - Adobe Forums have better text and code formatting support, pretty good search functionality, Adobe forums are hosted and supported by vendor technology (Adobe), thus you are more likely to receive the response from Adobe's engineers over there. Last, but not the least - most active member of Adobe Forums are promoted with points score, pretty good stuff for your individual ego. Of course, Adobe Forums still have a room to improve, because StackOverFlow web-site is even better :P http://stackoverflow.com/questions/tagged/flex -- Best regards, Andriy Panas
RE: [flexcoders] How to search a file name and its path in local machine using adobe AIR
Take a look at the File class http://livedocs.adobe.com/flex/3/langref/flash/filesystem/File.html It's AIR only. You can use it to reference files by path, load them and manipulate them. 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 Adarsh Agrawal Sent: 13 August 2009 10:20 To: flexcoders@yahoogroups.com Subject: [flexcoders] How to search a file name and its path in local machine using adobe AIR Hello, i'm strugling with above mentioned subjetc line. can any body help me regarding this. actually i've to load a file wchich is stored in local machine..so i've to find ou t the path where the file is stored and then i've to load the file.. thanks in advance regards, adarsh See the Web's breaking stories, chosen by people like you. Check out Yahoo! Buzz http://in.rd.yahoo.com/tagline_buzz_1/*http:/in.buzz.yahoo.com/ .
[flexcoders] Re: How to run another air application from air application
Hi, you help me a lot, but now I have some strange problem: This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance. I make one relase 0.0.1. and install on client. I make new relase 0.0.2. I put new relase on server, also I put descriptor file on the server 0.0.2. I call method to download this new version. Ok. In here updater.update(airFile, updateVersionName.text); updateVersionName.text is number of new version 0.0.2. and it still show this error. So: Certificates are the same. Version on release config and descriptor on server are the same. Client config is lower then on the server and there is still error. --- In flexcoders@yahoogroups.com, Ian Thomas i...@... wrote: Take a look at the flash.desktop.Update class - call the update() method on the AIR file in question rather than using URLLoader(). There's a code snippet that does what you want here: http://livedocs.adobe.com/flex/3/html/help.html?content=updating_apps_1.html HTH, Ian On Wed, Aug 12, 2009 at 8:24 AM, vladakg85vladak...@... wrote: I have one air application. Now I want to make custom update (no default, I want my component) and I made it to download new application version to my app folder now I need to install it, but I don't know how to invoke newVersion.air from action script code??? I try with this but doesn't work: var req:URLRequest = new URLRequest(file:///c:\Documents and Settings\vvucetic.newVersion.air); var rld:URLLoader = new URLLoader(); rld.load(req); fscommand(exec, file:///c:\Documents and Settings\vvucetic.newVersion.air);
Re: [flexcoders] Re: How to run another air application from air application
On Thu, Aug 13, 2009 at 11:07 AM, vladakg85vladak...@yahoo.com wrote: Hi, you help me a lot, but now I have some strange problem: This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance. If you're having trouble rolling your own updater, perhaps you should consider using the Air Update Framework which is supplied with the Flex SDK? There's information here: http://www.adobe.com/devnet/air/articles/air_update_framework.html http://blog.everythingflex.com/2008/08/01/air-update-framework/ HTH, Ian
[flexcoders] Re: How to run another air application from air application
Yes, but I don;t want to use framework. I have to make manual update. I have methods that check if there is new version on server,manually download new version from server, and manually run installer, but I recived this message. This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance. --- In flexcoders@yahoogroups.com, Ian Thomas i...@... wrote: On Thu, Aug 13, 2009 at 11:07 AM, vladakg85vladak...@... wrote: Hi, you help me a lot, but now I have some strange problem: This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance. If you're having trouble rolling your own updater, perhaps you should consider using the Air Update Framework which is supplied with the Flex SDK? There's information here: http://www.adobe.com/devnet/air/articles/air_update_framework.html http://blog.everythingflex.com/2008/08/01/air-update-framework/ HTH, Ian
Re: [flexcoders] Re: How to run another air application from air application
On Thu, Aug 13, 2009 at 11:44 AM, vladakg85vladak...@yahoo.com wrote: Yes, but I don;t want to use framework. I have to make manual update. I have methods that check if there is new version on server,manually download new version from server, and manually run installer, but I recived this message. This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance. Does the 0.2 .air file on the _server_ actually work properly when you try to manually install it? If no, there's your problem right there. :-) Does the 0.2 downloaded .air file actually work properly when you try to manually install it? If not, the download has gone wrong (nothing to do with the update framework). It the second case is true, try looking at the .air file contents in a text editor - does it just contain some HTTP or PHP error data or something? If a text editor doesn't reveal the answer, try a HTTP monitor such as Charles to see if anything odd is going on with the request/response. And try a byte-editor compare between your server .air file and the downloaded .air file. If the downloaded file _does_ work properly when manually installed, then I'm afraid I don't know what's going on - would need more context/test files. HTH, Ian
[flexcoders] Re: How to run another air application from air application
No, download goes ok, if I run file.air manually update is OK. Old version is replaced with new. This is how I get file: urlStream.addEventListener(Event.COMPLETE, loaded); urlStream.load(urlReq); private function loaded(event:Event):void { urlStream.readBytes(fileData, 0, urlStream.bytesAvailable); writeAirFile(); } private function writeAirFile():void { file=File.applicationStorageDirectory.resolvePath(xyz.air); var fileStream:FileStream=new FileStream(); fileStream.open(file, FileMode.WRITE); fileStream.writeBytes(fileData, 0, fileData.length); fileStream.close(); trace(The AIR file is written.); Alert.show(The AIR file is written.); var fileSpecialToInstallUpdate:File=new File(); fileSpecialToInstallUpdate=file; var updater:Updater = new Updater(); var airFile:File = fileSpecialToInstallUpdate; updater.update(airFile, updateVersionName.text); } --- In flexcoders@yahoogroups.com, Ian Thomas i...@... wrote: On Thu, Aug 13, 2009 at 11:44 AM, vladakg85vladak...@... wrote: Yes, but I don;t want to use framework. I have to make manual update. I have methods that check if there is new version on server,manually download new version from server, and manually run installer, but I recived this message. This application cannot be installed because this installer has been mis-configured. Please contact the application author for assistance. Does the 0.2 .air file on the _server_ actually work properly when you try to manually install it? If no, there's your problem right there. :-) Does the 0.2 downloaded .air file actually work properly when you try to manually install it? If not, the download has gone wrong (nothing to do with the update framework). It the second case is true, try looking at the .air file contents in a text editor - does it just contain some HTTP or PHP error data or something? If a text editor doesn't reveal the answer, try a HTTP monitor such as Charles to see if anything odd is going on with the request/response. And try a byte-editor compare between your server .air file and the downloaded .air file. If the downloaded file _does_ work properly when manually installed, then I'm afraid I don't know what's going on - would need more context/test files. HTH, Ian
[flexcoders] Re: ameature question but am desperate
when i use the following code private function insertHandler( ):void{ if (cat.selected == true) { catManager.cats( cats); } } i get the following error Unable to invoke CFC - The CAT argument passed to the cats function is not of type boolean.
[flexcoders] How to handle Remote Service retries?
Let me say firstly that I have posted this in the Adobe Cairngorm forum but got no replies so hoping someone here can help me (I'll update the forum thread when I get an answer). -- Hi, I'm using Cairngorm for my flex apps which have a lot of database/server interaction. Occasionally my host is slow and doesn't respond in time. I'd like to retry these failed remote service calls a few times before alerting the user that there really is a problem. Are there any conventions for doing this? I'm thinking of adding a retry counter somewhere - maybe the Model or ServiceLocator? - and then dispatching a new Event in the Command fault handler. public function fault(event:Object):void { if(retryCount retryMax) { new MyServiceEvent... }else{ Alert.show... } I'm wondering whether I'll run into issues generating another event in the fault handler? This must have been solved before! - but I've read through the Cairngorm docs, searched the forums and can't find any mention of it. All Command Fault Handler examples I've found either do nothing or generate an Alert. I'm also having trouble simulating the timeout if anyone has any suggestions? - I'm using Zend PHP server side. cheers
[flexcoders] How to get the DataGridColumn where a drop occurred
Hi, I'm fairly new to Flex and I'd appreciate your help. I'm trying the following: I have a DataGrid with 28 columns representing a calendar of some sort with dropEnabled set to true and all the drop events defined (dragEnter, dragExit, dragDrop). This part works very well. The leftmost column, which is locked (lockedColumnCount=1), represents resources and the other columns have a count of defects associated to each resource at a specific date. I also have a List with dragEnabled set to true. This list contains a list of defect objects which are different than what is displayed in the DataGrid. When the user clicks on a number of defects displayed in the DataGrid for a resource, the list of defects is displayed in the list. My goal is to be able to drag a defect displayed in the list to a new resource / date location in the DataGrid and update the counts displayed. So far, I'm able to get the row (through calculateDropIndex) but I am unable to figure out the column. I tried calculating the column from the mouse position (x) by adding the columns widths as I iterate through the columns this way: === private function calculateDropColumn(event:DragEvent):int { var colWidth:int = 0; var mouseXpos:int = event.localX; var dropTarget:DataGrid = DataGrid(event.currentTarget); for (var i:int = 0; i dropTarget.columns.length; i++) { if (mouseXpos = colWidth mouseXpos = (colWidth + dropTarget.columns[i].width)) { return i; } colWidth += dropTarget.columns[i].width; } return -1; } === It works fine until I start scrolling the columns to the right... I saw that the DataGrid maintains an Array of visibleColumns and visibleLockedColumns internally through the debugger, but they are not exposed (mx_internal namespace). Anybody has a better way? Am I using the correct component for this kind of thing? Is there a way to determine the visibleColumns another way? Thanks for your help as I am at a lost... Marc
Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) ***
Why all the cloak and dagger response stuff? Did you get asked this on an interview? Or are you testing responses to a question you want to ask while interviewing? Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinnernull/inner/outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
[flexcoders] alt+f4 Short cut key
Hi friends, I want to implement alt+f4 key functionality in my swf application. How can I override the browser keys? Any help will be appreciated Thanks, with Regards, Jitendra Jain Software Engineer 91-9979960798 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php
Re: [flexcoders] Re: How to run another air application from air application
On Thursday 13 Aug 2009, vladakg85 wrote: Yes, but I don;t want to use framework. I have to make manual update. By writing your own framework ? Why bother... ? I don't see you having any particularly odd requirements. -- Helping to autoschediastically deploy IPOs as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Flex Sprite Double click not working
very strange and annoying issue I m facing I have one sprite with drawing api I have one circle init ,where I m trying to call double click but its not working where as mouseup or down and click function working Sajid
Re: [flexcoders] This mailing list vs the forum.
On Thursday 13 Aug 2009, Andriy Panas wrote: Adobe Forums are definitely the future for the main communication medium for Adobe Flex experts. I have to disagree. Things that jump into my mind first - Adobe Forums have better text and code formatting support, Not needed. pretty good search functionality, Google searches both, so any built-in system is pointless. Adobe forums are hosted and supported by vendor technology (Adobe), thus you are more likely to receive the response from Adobe's engineers over there. You know the forum software isn't Adobes, right ? And do you look at who posts here with @adobe address ? Last, but not the least - most active member of Adobe Forums are promoted with points score, So what ? pretty good stuff for your individual ego. If you are in it for your ego, I have bad news for you :-) Of course, Adobe Forums still have a room to improve, Because they suck ? There's no point me reposting the complaints I've posted on it since it's relaunch, I'm sure you'll be able to locate them easily with the forums search engine... -- Helping to ambassadorially network channels as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] This mailing list vs the forum.
On Thu, Aug 13, 2009 at 10:26 AM, Andriy Panasa.pa...@gmail.com wrote: Forums in general are way superior to mailing lists to exchange the knowledge on the Internet. My main issue with that is: Mailing lists are push. Forums are pull. I'm on 6 or 7 different mailing lists. There's no way I'd get round to visiting 6 or 7 different forums to see what's updated several times a day; therefore I wouldn't ever read anything or answer anyone. Ian
Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) ***
Neither. It's for amusement only, for anyone who wants to take a crack at it. And the cloak and dagger response stuff, is, as I explained, so those who would like to take a crack at it can do so without being influenced by others' answers. --- On Thu, 8/13/09, Jeffry Houser j...@dot-com-it.com wrote: From: Jeffry Houser j...@dot-com-it.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 7:50 AM Why all the cloak and dagger response stuff? Did you get asked this on an interview? Or are you testing responses to a question you want to ask while interviewing? Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinner null/inner /outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl. com/684b5h http://www.twitter. com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras .com?c=104 -- http://www.theflexs how.com http://www.jeffryho user.com -- Part of the DotComIt Brain Trust
RE: [flexcoders] This mailing list vs the forum.
It does have to be said, I use the Mailing list functionality of the Adobe forums rather than visiting the forum directly... 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 Ian Thomas Sent: 13 August 2009 14:02 To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] This mailing list vs the forum. On Thu, Aug 13, 2009 at 10:26 AM, Andriy Panasa.pa...@gmail.com mailto:a.panas%40gmail.com wrote: Forums in general are way superior to mailing lists to exchange the knowledge on the Internet. My main issue with that is: Mailing lists are push. Forums are pull. I'm on 6 or 7 different mailing lists. There's no way I'd get round to visiting 6 or 7 different forums to see what's updated several times a day; therefore I wouldn't ever read anything or answer anyone. Ian
Re: [flexcoders] This mailing list vs the forum.
Ian Thomas wrote: On Thu, Aug 13, 2009 at 10:26 AM, Andriy Panasa.pa...@gmail.com wrote: Forums in general are way superior to mailing lists to exchange the knowledge on the Internet. My main issue with that is: Mailing lists are push. Forums are pull. I'm on 6 or 7 different mailing lists. There's no way I'd get round to visiting 6 or 7 different forums to see what's updated several times a day; therefore I wouldn't ever read anything or answer anyone. Ian +1
[flexcoders] 2 Flex App on an unique URL
Hello, I have two flex application that I want to put on an unique website. I don't want to use modules. How to organise the web site to launch the 2 applications ? Thank you, Christopher,
[flexcoders] Multiple currencies
Hello, How to manage a paiement system with several currencies (Euros and Dollars) in a flex application ? Thank you, Christopher
re: [flexcoders] 2 Flex App on an unique URL
Two different host html pages and one page linking them. I.E. clients.html (client.swf application) and admin.html (contains admin.swf) From: christophe_jacquelin christophe_jacque...@yahoo.fr Sent: Thursday, August 13, 2009 6:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Flex App on an unique URL Hello, I have two flex application that I want to put on an unique website. I don't want to use modules. How to organise the web site to launch the 2 applications ? Thank you, Christopher,
Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) ***
Although I did enjoy reading the answers of others; it is unusual to see queries like this on the list, especially with so many disclaimers. Dave Glasser wrote: Neither. It's for amusement only, for anyone who wants to take a crack at it. And the cloak and dagger response stuff, is, as I explained, so those who would like to take a crack at it can do so without being influenced by others' answers. --- On *Thu, 8/13/09, Jeffry Houser /j...@dot-com-it.com/* wrote: From: Jeffry Houser j...@dot-com-it.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 7:50 AM Why all the cloak and dagger response stuff? Did you get asked this on an interview? Or are you testing responses to a question you want to ask while interviewing? Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinner null/inner /outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl. com/684b5h http://www.twitter. com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras .com?c=104 -- http://www.theflexs how.com http://www.jeffryho user.com -- Part of the DotComIt Brain Trust -- Jeffry Houser, Technical Entrepreneur Adobe Community Expert: http://tinyurl.com/684b5h http://www.twitter.com/reboog711 | Phone: 203-379-0773 -- Easy to use Interface Components for Flex Developers http://www.flextras.com?c=104 -- http://www.theflexshow.com http://www.jeffryhouser.com -- Part of the DotComIt Brain Trust
re: [flexcoders] 2 Flex App on an unique URL
Or have a main app that uses the navigateToURL to two different HTML pages that contain the apps. Or since all the app is is a swf, embed 2 swf's on one HTML page. From: christophe_jacquelin christophe_jacque...@yahoo.fr Sent: Thursday, August 13, 2009 6:36 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] 2 Flex App on an unique URL Hello, I have two flex application that I want to put on an unique website. I don't want to use modules. How to organise the web site to launch the 2 applications ? Thank you, Christopher,
[flexcoders] Connecting to remote JMS: name TopicConnectionFactory not bound
Dear all, I'm trying to send messages from and to a remote JMS (activemq) (it is on localhost now for testing purposes). However, I keep getting error messages no matter how I try. The message is: INFO: [LCDS] [INFO] JMS consumer for JMS destination 'java:comp/env/jmz/topic/flex/simpletopic ' is being removed from the JMS adapter due to the following error: Name TopicConnectionFactory is not bound in this Context My tomcat/conf/server.xml looks as follows: Context WatchedResourceWEB-INF/web.xml/WatchedResource Manager pathname=/ Resource name=jms/flex/TopicConnectionFactory auth=Container type=org.apache.activemq.ActiveMQConnectionFactory description=JMS Connection Factory factory=org.apache.activemq.jndi.JNDIReferenceFactory brokerURL=tcp://localhost:61616 brokerName=LocalActiveMQBroker/ Resource name=jmz/topic/flex/simpletopic auth=Container type=org.apache.activemq.command.ActiveMQTopic description=my topic factory=org.apache.activemq.jndi.JNDIReferenceFactory physicalName=APP.STOCK.MARKETDATA/ /Context My messaging config is: ?xml version=1.0 encoding=UTF-8? service id=message-service class=flex.messaging.services.MessageService adapters adapter-definition id=actionscript class=flex.messaging.services.messaging.adapters.ActionScriptAdapter default=true/ adapter-definition id=jms class=flex.messaging.services.messaging.adapters.JMSAdapter/ /adapters !-- another destination cut -- destination id=chat-topic-jms properties jms destination-typeTopic/destination-type message-typejavax.jms.TextMessage/message-type connection-factoryjava:comp/env/jms/flex/TopicConnectionFactory /connection-factory destination-jndi-namejava:comp/env/jmz/topic/flex/simpletopic /destination-jndi-name destination-nameAPP.STOCK.MARKETDATA /destination-name delivery-modeNON_PERSISTENT/delivery-mode message-priorityDEFAULT_PRIORITY/message-priority acknowledge-modeAUTO_ACKNOWLEDGE/acknowledge-mode transacted-sessionsfalse/transacted-sessions initial-context-environment property nameContext.PROVIDER_URL/name valuevm://localhost/value /property property nameContext.INITIAL_CONTEXT_FACTORY/name !--valueorg.apache.activemq.jndi.ActiveMQInitialContextFactory/value -- valueorg.apache.naming.java.javaURLContextFactory/value /property property nameContext.URL_PKG_PREFIXES/name valuejava:org.apache.naming/value /property /initial-context-environment /jms /properties channels channel ref=my-rtmp/ /channels adapter ref=jms/ /destination /service I have tried removing the part about the initial context factory and using the activemq initital context factory.Further I have tried changing Context.Provider_URL to localhost:61616 and the brokerURL to vm:localhost without results. Anyone ideas? Best regards, Bas
[flexcoders] How to AIR applications can access files from remote SMB shares
can any body help me to connect with SMB? Thanks
[flexcoders] How to control cahing in flex3....
Hi all, How to control the image caching in flex3. i.e i need to stop the images to store into temporary internet files. Plz help me Regards, Lokesh
[flexcoders] Flex integration with SAP no login
Hi, I am trying to get data from SAP for my Flex application using webservice. It ask me to login to system to get SAP data. Is there any wayout through which I can pass user/password so that whenever I execute my Flex application will not ask me login credentials.
re: [flexcoders] Multiple currencies
Sets a variable (via combox box, link, locale) that directs a function that performs a currency conversion (math) From: christophe_jacquelin christophe_jacque...@yahoo.fr Sent: Thursday, August 13, 2009 6:38 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Multiple currencies Hello, How to manage a paiement system with several currencies (Euros and Dollars) in a flex application ? Thank you, Christopher
[flexcoders] Re: Open network share in Explorer and Finder
You got any solution at last? I also need SMB or AFP connection. --- In flexcoders@yahoogroups.com, Chad Gray cg...@... wrote: Ok, in safari if I type afp://server/share it mounts the share. If I put this in my AS the button does not launch the browser. I have a feeling the URLRequest type does not like the afp:// section. -Original Message- From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tom Chiverton Sent: Friday, March 28, 2008 11:26 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Open network share in Explorer and Finder On Friday 28 Mar 2008, Chad Gray wrote: var url:String = file://server/share; There should be 3 slashes after the colon. Does MacOS need 'smb' or 'smbfs' rather than file protocol ? What does the URL to a Windows share look like on their brand of Unix ? -- Tom Chiverton Helping to professionally implement next-generation channels on: http://thefalken.livejournal.com This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links
[flexcoders] Flex integration with SAP no login
Hi, I am trying to get data from SAP for my Flex application using webservice. It ask me to login to system to get SAP data. Is there any wayout through which I can pass user/password so that whenever I execute my Flex application will not ask me login credentials.
[flexcoders] Re: BitmapData and Matrix: teach a man to fish (aka matrix).
So I made the following changes: FROM THIS:- numberOfPDFPanelsHigh = Math.max( 1, Math.round(( (_bounds.height * _percentageToScalePrintOut) / imageHeight) + 2.5) ); numberOfPDFPanelsWide = Math.max( 1, Math.round(( (_bounds.width * _percentageToScalePrintOut) / imageWidth) + 15.5) ); TO THIS: --- numberOfPDFPanelsHigh = Math.max( 1, Math.round( (_bounds.height / imageHeight) ) ); numberOfPDFPanelsWide = Math.max( 1, Math.round( (_bounds.width / imageWidth) ) ); I get all the pages, but it is copying a lot of extra whitepages which then need to be removed, not efficient, but it is quick.
[flexcoders] Re: IS IT POSSIBLE??Load an SWF in another SWF using 2 diff loaderContext appdomain
I don't use loaders - I use modules. Here is a quick and dirty example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical creationComplete=onCreationComplete() mx:Script ![CDATA[ private function onCreationComplete():void { currentModule.url = TestModule.swf; } ]] /mx:Script mx:VBox width=100% height=100% paddingTop=0 paddingBottom=0 paddingLeft=0 paddingRight=0 mx:ModuleLoader id=currentModule width=100% height=100%/ /mx:VBox /mx:Application TestModule.mxml ?xml version=1.0 encoding=utf-8? mx:Module xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical mx:Script ![CDATA[ import mx.controls.Alert; private function onButtonClick(event:MouseEvent):void { Alert.okLabel = I didn't mean to; Alert.buttonWidth = 120; Alert.show(Why did you click this button?); } ]] /mx:Script mx:Button label=Don't click this button! click=onButtonClick(event)/ /mx:Module --- In flexcoders@yahoogroups.com, Mehdi elextra...@... wrote: I am getting to the conclusion that the following is not supported at all. (Using flex 3.2 SDK): Loading one SWF into another one using 2 different loaderContext. I tried using the Loader and the SWFLoader (and to some extend the ModuleLoader) 1- Build a simple Flex App with a combo box or Alert Message (on click of a button for instance). (==TestCombo.swf) 2. Load that SWF (from Step 1) using the Loader in a new application Domain (as such: var request:URLRequest = new URLRequest(TestCombo.swf); _loader = new Loader(); _loader.contentLoaderInfo.addEventListener(Event.COMPLETE,handleModuleLo\ aded); _loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR,handleE\ rror); _loader.contentLoaderInfo.addEventListener(SecurityErrorEvent.SECURITY_E\ RROR,handleError); _loader.contentLoaderInfo.addEventListener(Event.UNLOAD, unloadHandler1); var context:LoaderContext = new LoaderContext(); context.applicationDomain = new ApplicationDomain(); // that's KEY! _loader.load(request,context); In the handleModuleLoaded function, I am simply adding the content of the comboSWF into a vbox vbx.rawChildren.addChild(_loader.content); 3. Attempt to see the content of the combo or click on the button to see the Alert from the loaded SWF, and you get an exception. (see below) TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.managers::SystemManager/addPopupRequestHandler()[C:\autobuild\3.2.0\f\ rameworks\projects\framework\src\mx\managers\SystemManager.as:3604] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.managers::PopUpManagerImpl/addPopUp()[C:\autobuild\3.2.0\frameworks\p\ rojects\framework\src\mx\managers\PopUpManagerImpl.as:294] at mx.managers::PopUpManager$/addPopUp()[C:\autobuild\3.2.0\frameworks\proj\ ects\framework\src\mx\managers\PopUpManager.as:169] at mx.controls::Alert$/show()[C:\autobuild\3.2.0\frameworks\projects\framew\ ork\src\mx\controls\Alert.as:519] at TestCombo/___TestCombo_Button1_click()[M:\projects\flex-projects\TestCom\ bo\src\TestCombo.mxml:16] The same code works perfectly fine if you attempt to load the SWF into the same applicationDomain, but that's totally not acceptable for us here. Using the SWFLoader as opposed to the Loader does not even get you this far. The TestCombo.swf is not even loaded. I get the following exception when trying to load the module: (basically complaining about the system Manager being null) TypeError: Error #1009: Cannot access a property or method of a null object reference. at mx.controls::SWFLoader/initSystemManagerCompleteEventHandler()[C:\autobu\ ild\3.2.0\frameworks\projects\framework\src\mx\controls\SWFLoader.as:217\ 4] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at mx.managers::SystemManager/initHandler()[C:\autobuild\3.2.0\frameworks\p\ rojects\framework\src\mx\managers\SystemManager.as:2862] Anything would help. I just need to know whether that's possible or not using flex sdk 3.2. Cheers.
[flexcoders] High CPU usage when I hover and remain in AdvaceddataGrid cell
Hi guys, I created a tree using AdvancedDataGrid and I have 2 very very troubling problems. 1. When I hover over a cell which I have a renderer for, The cpu goes up to 30 and stay there, even if I'm not moving the mouse. 2. For 1000 rows the vertical scroll is realy legging behind the mouse. Are those 2 connected? How can I solve it, the 1'st is more crucial. Please please help Thanks Jo
[flexcoders] crossdomain.xml trhough https (IIS)
Hi all, I have an IIS server that can serve both http and https webservice. I must access webservice from local swf file to both protocol. So I have my crossdomain.xml like that : - # cross-domain-policy allow-http-request-headers-from domain=*** headers=*** secure=* false* / allow-access-from domain=*** secure=*false* / /cross-domain-policy Which works fine in HTTP (despite it's says that it will ignore the secure false) but doesn't in HTTPS. If I use IE to watch the files I get both of them (in HTTP / HTTPS) Any clue ? Thanks Benoît Milgram / Flapflap http://www.kilooctet.net I'm also a music mashup / bootlegs producer : http://www.djgaston.net
Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) ***
On Thursday 13 Aug 2009, Dave Glasser wrote: Neither. It's for amusement only, for anyone who wants to take a crack at it. And the cloak and dagger response stuff, is, as I explained, so those who would like to take a crack at it can do so without being influenced by others' answers. I would have expected 'not reading the replies' to cover that :-) -- Helping to evangelistically engineer e-tailers as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] This mailing list vs the forum.
On Thursday 13 Aug 2009, Gregor Kiddie wrote: It does have to be said, I use the Mailing list functionality of the Adobe forums rather than visiting the forum directly... Last time I checked, this was utterly broken. With mangled bodies, mangled subject lines and the lack of correct headers to allow threading. -- Helping to paradigmatically scale impactful mission-critical seamless clusters as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] Re: TabNavigator changing from MXML to actionscript.
An easy way might be to use different viewstates (e.g., a base state without the restricted tab, and a derived state that includes the restricted tab), then simply set the appropriate viewstate based on user permissions. Similar to your init() code, it might look something like: if (Permissions.hasPermission(restrictedTab) { currentState = stateWithRestrictedTab; Good luck! --- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Hi I've an application already mostly written. *Background*: This application uses several custom components that extend or contain TabNavigators. A requrirement which I've missed is that if the user doesn't have permission to view a tab then the tab doesn't appear in the tab navigators. However tabs still appear even if the child elements they refer to are invisible. So I guess that I need to do something like this in my MXML files. mx:TabNavigator xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:component=com.example.test.* CreationComplete=init() ... //Normal stuff in here ... public var tab1:CustomComponent1; public var tab2:CustomComponent2; //etc ... private function init():void { if (Permissions.hasPermission(viewTab1) { tab1 = new CustomComponent1; ... // Set the properties that are normally specified in MXML // Add event listeners for all the events normally specified in mxml. // e.g. tab1.addEventListener(SaveEvent.SAVE, handleSave); // Do any bindings that are normally associated with the MXML } } ... /mx:TabNavigator *Questions:* 1. How do I set up the bindings? I have seen http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_7.htmlhowever this leaves me worried that binding will occur differently. I'm particually worried that I'll get binding events occuring before the component is initialised which won't (As is normal in mxml) be swallowed by the framework. I don't even know where I'd put a try block for these errors. 2. Doing things in this way means that tabs the user has permission for but hasn't clicked on don't apply for deferred instanceiation. Is there any way to get this back. (Normally the tab navigator only instances its children when the appropiate tab is selected). 3. Creating the child after CreationComplete doesn't feel right to me. I guess I could overwrite create children in the above example but not when my MXML file contains a TabNavigator rather than is a TabNavigator which is also a situation elsewhere in the application. Is there a better way arround this? Creating a ChildDiscriptor object. Does doing things in this way mean a blank component appears then its contents appear? Thanks in Advance, Wes
[flexcoders] Re: crossdomain.xml trhough https (IIS)
Ok, so I narrow down the scope : In fact I have three crossdomain.xml file one is the root : cross-domain-policy site-control permitted-cross-domain-policies=all/ /cross-domain-policy and two others in 2 different virtual directory for the webservices with that : cross-domain-policy allow-http-request-headers-from domain=* headers=* secure=false / allow-access-from domain=* secure=false/ /cross-domain-policy What seems to happening is that in HTTPS, the crossdomain policy of the virtual directory are not loaded. So I'm not sure if its an IIS rediredtion problem or a crossdomain issue. Addind this tags : allow-http-request-headers-from domain=* headers=* secure=false / allow-access-from domain=* secure=false/ to the root crossdomain file make all works fine but it's not a good solution. Benoît Milgram / Flapflap http://www.kilooctet.net I'm also a music mashup / bootlegs producer : http://www.djgaston.net On Thu, Aug 13, 2009 at 5:36 PM, Flap Flap flapflapl...@kilooctet.netwrote: Hi all, I have an IIS server that can serve both http and https webservice. I must access webservice from local swf file to both protocol. So I have my crossdomain.xml like that : - #123146758b920521_ cross-domain-policy allow-http-request-headers-from domain=*** headers=*** secure=* false* / allow-access-from domain=*** secure=*false* / /cross-domain-policy Which works fine in HTTP (despite it's says that it will ignore the secure false) but doesn't in HTTPS. If I use IE to watch the files I get both of them (in HTTP / HTTPS) Any clue ? Thanks Benoît Milgram / Flapflap http://www.kilooctet.net I'm also a music mashup / bootlegs producer : http://www.djgaston.net
Re: [flexcoders] Charts - how to disable the little arm stroke to the chart dataTip
I'm not sure, but I think the following style applied to your chart should do the trick : callout-stroke: ClassReference(null); thomas --- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056 2009/8/11 djhatrick djhatr...@yahoo.com I want to hide that element, if possible. Thanks, Patrick
[flexcoders] RegExpValidator Not working with code-behind
We use the code-behind technique to attach AS to MXML. Doing this has caused an interesting issue with RegExpValidator. If the regular expression is defined in the AS file and contains a quantifier, it causes validation to act funky. In the following example, if you type about 20 zeroes into the IP field it goes from invalid, to valid, and back to invalid. Obviously it should be invalid after the first zero is typed and stay that way unless a proper IP is entered. However, if you take the same regExp string and put it in the MXML file it works as expected. Note that escaping or not escaping the { or } characters while the string is in the AS file has no effect on the validation. Test.mxml - mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:local=* minWidth=800 minHeight=600 local:MyComp/ /mx:Application MyComp.mxml --- ?xml version=1.0 encoding=utf-8? custom:MyCompScript xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:custom=* mx:FormItem id=fiIPAddress label=IP Address: required=true mx:TextInput id=tiIPAddress/ /mx:FormItem mx:RegExpValidator id=ipValidator expression={validIPExpression} source={tiIPAddress} property=text trigger={tiIPAddress} triggerEvent=change noMatchError=Invalid IP Address Format./ !-- works if you use expression=^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$-- /custom:MyCompScript MyCompScript.as --- package { import mx.containers.Form; public class MyCompScript extends Form { [Bindable] public var validIPExpression:String = ^(([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.){3}([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])$; //public var validIPExpression:String = ^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$; // Neither of the above work public function MyCompScript() { super(); } } } Does this seem like a bug, or just a limitation introduced by using the code-behind technique? Thanks, Geoff p.s. Don't know what code-behind is? http://learn.adobe.com/wiki/display/Flex/Code+Behind
Re: [flexcoders] RegExpValidator Not working with code-behind
Geoff, Try: public var validIPExpression:RegExp = /^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$/; instead. Could be because by directly specifying the expression, the MXML-AS parser correctly decides to treat it as a RegExp. But when directly binding to the value, binding sees it just as a String. HTH, Ian On Thu, Aug 13, 2009 at 5:17 PM, Geoffreygtb...@yahoo.com wrote: We use the code-behind technique to attach AS to MXML. Doing this has caused an interesting issue with RegExpValidator. If the regular expression is defined in the AS file and contains a quantifier, it causes validation to act funky. In the following example, if you type about 20 zeroes into the IP field it goes from invalid, to valid, and back to invalid. Obviously it should be invalid after the first zero is typed and stay that way unless a proper IP is entered. However, if you take the same regExp string and put it in the MXML file it works as expected. Note that escaping or not escaping the { or } characters while the string is in the AS file has no effect on the validation. Test.mxml - mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:local=* minWidth=800 minHeight=600 local:MyComp/ /mx:Application MyComp.mxml --- ?xml version=1.0 encoding=utf-8? custom:MyCompScript xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:custom=* mx:FormItem id=fiIPAddress label=IP Address: required=true mx:TextInput id=tiIPAddress/ /mx:FormItem mx:RegExpValidator id=ipValidator expression={validIPExpression} source={tiIPAddress} property=text trigger={tiIPAddress} triggerEvent=change noMatchError=Invalid IP Address Format./ !-- works if you use expression=^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$-- /custom:MyCompScript MyCompScript.as --- package { import mx.containers.Form; public class MyCompScript extends Form { [Bindable] public var validIPExpression:String = ^(([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.){3}([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])$; //public var validIPExpression:String = ^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$; // Neither of the above work public function MyCompScript() { super(); } } } Does this seem like a bug, or just a limitation introduced by using the code-behind technique? Thanks, Geoff p.s. Don't know what code-behind is? http://learn.adobe.com/wiki/display/Flex/Code+Behind
[flexcoders] Re: *** So you think you know ActionScript? (Read original post first) ***
--- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Paul Andrews Sent: Wednesday, August 12, 2009 9:33 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinnernull/inner/outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. xmlList is set to point at somthing which isn't a list, so I think the trace statement will not be reached. That's my 02:31AM thought.. All e4x expressions return an XMLList. It can be empty but is never a null. Besides, the characters. null in a text node are just a string. null in an AS comparison is a special value. The trace will display false. Trace(xmllist.text() ==null ); //would return true. Tracy Spratt, Lariat Services, development services available Like Tracy, I thought it would return false, for the same reason -- that innernull/inner would be interpreted as a string. Was surprised when I ran the code and saw true. What's going on? It seems like the AS decoder recognizes null as a special case.
[flexcoders] Sandbox Bridge Help!
Hi all and thank you for a great mailing list. I'm trying to use the parentSandboxBridge, but I can't really find any good explanations of it. Here is what i'm trying to do. I have an AIR application where the users can create overlays on a video file. One example of this would be to place a SWF file with a form in it on top of a video. The submit function of the form needs to call a function in the air application, which throws a security sandbox violation. It seems that the sandbox bridge should be able to allow this functionality, but i can't seem to figure out how. Any help would be greatly appreciated. Thanks Allan
[flexcoders] mxmlc compiling errors with swc created with flash cs4
Hi, I am building up an ANT task which is giving me some grief when the compilation occurs. I have 3 SWC's. One of them contains a few movieclips I converted to a SWC to use as animated graphics in my UI. FlexBuilder compiles the file with no problems. When I run ANT task and it hits the mxmlc action it throws an error and says Error: Type was not found or was not a compile-time constant this is the compiler part of the ANT task. mxmlc file=${SRC_DIR}/SprintMain.mxml output=${DEPLOY_DIR}/@{dir}/Main.swf load-config filename=${FLEX_HOME}/frameworks/flex-config.xml/ source-path path-element=${FLEX_HOME}/frameworks/ compiler.library-path dir=${LIBS_DIR} append=true include name=FlexUnit.swc / include name=fonts.swc / include name=userInterfaceSwc.swc / // I have tried removing the .swc but still no luck /compiler.library-path /mxmlc Am I missing something from the args? thanks MaTT
re: [flexcoders] Re: ameature question but am desperate
I was getting the same CFC cannot be invoked error. What I found out, from my set up, that I was using MySQL and you cannot add a true/false to the database as a Boolean field. Its either a 1 or 0. If you create a varchar field, the code works fine. Not sure what type of DB you were using or how you set up your tables. From: Wally Kolcz wko...@isavepets.com Sent: Tuesday, August 11, 2009 10:15 AM To: flexcoders@yahoogroups.com Subject: re: [flexcoders] Re: ameature question but am desperate Ohhh I am wrong, you want to pass in a Boolean. So forget my last response. However. I still am curious about your CFC path and your CFC, itself, it returning a 'String' (returnType), but you're not returning anything after the query From: stinasius stinas...@yahoo.com Sent: Tuesday, August 11, 2009 6:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: ameature question but am desperate this is the code mxml file with Remote object call ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.rpc.events.ResultEvent; import mx.rpc.events.FaultEvent; import mx.controls.Alert; public function handleStringResult(event:ResultEvent):void{ onCompleteHandler(); } private function onCompleteHandler():void{ Alert.show(Congratulations!); } private function insertHandler():void{ catManager.cats(cat.selected); } ]] /mx:Script mx:RemoteObject id=catManager destination=ColdFusion source=chkbx_dbinsert.insert showBusyCursor=true mx:method name=cats result=handleStringResult(event) fault=mx.controls.Alert.show(event.fault.faultString)/ /mx:RemoteObject mx:CheckBox x=100 y=73 label=Cats id=cat/ mx:Button x=100 y=99 label=Insert click=insertHandler()/ /mx:Application cfc cfcomponent cffunction name=cats access=remote returntype=string cfargument name=cat type=boolean required=no/ cfquery name=regCat datasource=cats INSERT INTO cats(cat) VALUES(#arguments.cat#) /cfquery /cffunction /cfcomponent
RE: [flexcoders] Flex Sprite Double click not working
You have to opt in to doubleclicks. An InteractiveObject doesn't dispatch a DOUBLE_CLICK event when it is double-clicked unless its doubleClickEnabled property is true. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Sajid Hussain Sent: Thursday, August 13, 2009 5:46 AM To: Code Subject: [flexcoders] Flex Sprite Double click not working very strange and annoying issue I m facing I have one sprite with drawing api I have one circle init ,where I m trying to call double click but its not working where as mouseup or down and click function working Sajid _,___
[flexcoders] Re: RegExpValidator Not working with code-behind
Didn't seem to help. I changed the String to a RegExp, escaped and didn't escape the {} characters, and also tried with and without the [Bindable] metadata tag. As long as the regular expression is in the actionscript file, it just doesn't work properly. Actually, in this instance, nothing ever validates as a valid IP address. Geoff --- In flexcoders@yahoogroups.com, Ian Thomas i...@... wrote: Geoff, Try: public var validIPExpression:RegExp = /^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$/; instead. Could be because by directly specifying the expression, the MXML-AS parser correctly decides to treat it as a RegExp. But when directly binding to the value, binding sees it just as a String. HTH, Ian On Thu, Aug 13, 2009 at 5:17 PM, Geoffreygtb...@... wrote: We use the code-behind technique to attach AS to MXML. Doing this has caused an interesting issue with RegExpValidator. If the regular expression is defined in the AS file and contains a quantifier, it causes validation to act funky. In the following example, if you type about 20 zeroes into the IP field it goes from invalid, to valid, and back to invalid. Obviously it should be invalid after the first zero is typed and stay that way unless a proper IP is entered. However, if you take the same regExp string and put it in the MXML file it works as expected. Note that escaping or not escaping the { or } characters while the string is in the AS file has no effect on the validation. Test.mxml - mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:local=* minWidth=800 minHeight=600 local:MyComp/ /mx:Application MyComp.mxml --- ?xml version=1.0 encoding=utf-8? custom:MyCompScript xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:custom=* mx:FormItem id=fiIPAddress label=IP Address: required=true mx:TextInput id=tiIPAddress/ /mx:FormItem mx:RegExpValidator id=ipValidator expression={validIPExpression} source={tiIPAddress} property=text trigger={tiIPAddress} triggerEvent=change noMatchError=Invalid IP Address Format./ !-- works if you use expression=^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$-- /custom:MyCompScript MyCompScript.as --- package { import mx.containers.Form; public class MyCompScript extends Form { [Bindable] public var validIPExpression:String = ^(([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])\.){3}([01]?[0-9]{1,2}|2[0-4][0-9]|25[0-5])$; //public var validIPExpression:String = ^(([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])\.)\{3\}([01]?[0-9]\{1,2\}|2[0-4][0-9]|25[0-5])$; // Neither of the above work public function MyCompScript() { super(); } } } Does this seem like a bug, or just a limitation introduced by using the code-behind technique? Thanks, Geoff p.s. Don't know what code-behind is? http://learn.adobe.com/wiki/display/Flex/Code+Behind
[flexcoders] Re: Flex integration with SAP no login
Does the web service allow you to send login credentials as part of the XML? If so, how? (Envelope or headers) --- In flexcoders@yahoogroups.com, shailesh_natu shailesh_n...@... wrote: Hi, I am trying to get data from SAP for my Flex application using webservice. It ask me to login to system to get SAP data. Is there any wayout through which I can pass user/password so that whenever I execute my Flex application will not ask me login credentials.
RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) ***
Ah, I see something I missed at first. This example is using literal xml, so the null IS getting interpreted by AS as null and not as a string. I bet it would be different if you did: var xml:XML = XML(outerinnernull/inner/outer); Even so I am still surprised because the null should be the text node and the expression should return an XMLList with zero length. Very interesting. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of jaywood58 Sent: Thursday, August 13, 2009 12:48 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tr...@... wrote: _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of Paul Andrews Sent: Wednesday, August 12, 2009 9:33 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinnernull/inner/outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. xmlList is set to point at somthing which isn't a list, so I think the trace statement will not be reached. That's my 02:31AM thought.. All e4x expressions return an XMLList. It can be empty but is never a null. Besides, the characters. null in a text node are just a string. null in an AS comparison is a special value. The trace will display false. Trace(xmllist.text() ==null ); //would return true. Tracy Spratt, Lariat Services, development services available Like Tracy, I thought it would return false, for the same reason -- that innernull/inner would be interpreted as a string. Was surprised when I ran the code and saw true. What's going on? It seems like the AS decoder recognizes null as a special case.
[flexcoders] any tool can create Java entities from as 3 VOs?
Hi I have build many AS3 VOs (about 150),may I use some tool to create java VOs from the AS 3 VOs. Thanks Mark (PS:VO:Value Object(Properties and get/set mothods))
Re: [flexcoders] alt+f4 Short cut key
The day Flash Player provides alt-f4 support is the day when World of Warcraft provides it too http://forums.worldofwarcraft.com/thread.html?topicId=12454665647 jitendra jain wrote: Hi friends, I want to implement alt+f4 key functionality in my swf application. How can I override the browser keys? Any help will be appreciated Thanks, with Regards, Jitendra Jain Software Engineer 91-9979960798 Send free SMS to your Friends on Mobile from your Yahoo! Messenger. Download Now! http://messenger.yahoo.com/download.php Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail.
[flexcoders] manual update of air by opening new version fails - but update framework works
We are able to use the update framework to update our apps, and I remember at one point, users could double click a newer version of our .air file to update their program, but that has stopped working. What needs to be in place for that type of manual update to work? Thanks.
Re: [flexcoders] Re: TabNavigator changing from MXML to actionscript.
I have it working now thanks for all your assistance. On Thu, Aug 13, 2009 at 5:44 PM, jaywood58 jayw...@san.rr.com wrote: An easy way might be to use different viewstates (e.g., a base state without the restricted tab, and a derived state that includes the restricted tab), then simply set the appropriate viewstate based on user permissions. Similar to your init() code, it might look something like: if (Permissions.hasPermission(restrictedTab) { currentState = stateWithRestrictedTab; Good luck! --- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Hi I've an application already mostly written. *Background*: This application uses several custom components that extend or contain TabNavigators. A requrirement which I've missed is that if the user doesn't have permission to view a tab then the tab doesn't appear in the tab navigators. However tabs still appear even if the child elements they refer to are invisible. So I guess that I need to do something like this in my MXML files. mx:TabNavigator xmlns:mx=http://www.adobe.com/2006/mxml; xmlns:component=com.example.test.* CreationComplete=init() ... //Normal stuff in here ... public var tab1:CustomComponent1; public var tab2:CustomComponent2; //etc ... private function init():void { if (Permissions.hasPermission(viewTab1) { tab1 = new CustomComponent1; ... // Set the properties that are normally specified in MXML // Add event listeners for all the events normally specified in mxml. // e.g. tab1.addEventListener(SaveEvent.SAVE, handleSave); // Do any bindings that are normally associated with the MXML } } ... /mx:TabNavigator *Questions:* 1. How do I set up the bindings? I have seen http://livedocs.adobe.com/flex/3/html/help.html?content=databinding_7.htmlhowever this leaves me worried that binding will occur differently. I'm particually worried that I'll get binding events occuring before the component is initialised which won't (As is normal in mxml) be swallowed by the framework. I don't even know where I'd put a try block for these errors. 2. Doing things in this way means that tabs the user has permission for but hasn't clicked on don't apply for deferred instanceiation. Is there any way to get this back. (Normally the tab navigator only instances its children when the appropiate tab is selected). 3. Creating the child after CreationComplete doesn't feel right to me. I guess I could overwrite create children in the above example but not when my MXML file contains a TabNavigator rather than is a TabNavigator which is also a situation elsewhere in the application. Is there a better way arround this? Creating a ChildDiscriptor object. Does doing things in this way mean a blank component appears then its contents appear? Thanks in Advance, Wes -- 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
Re: [flexcoders] This mailing list vs the forum.
I don't think I'm going to bother joining the forums then. On Thu, Aug 13, 2009 at 5:38 PM, Tom Chiverton tom.chiver...@halliwells.com wrote: On Thursday 13 Aug 2009, Gregor Kiddie wrote: It does have to be said, I use the Mailing list functionality of the Adobe forums rather than visiting the forum directly... Last time I checked, this was utterly broken. With mangled bodies, mangled subject lines and the lack of correct headers to allow threading. -- Helping to paradigmatically scale impactful mission-critical seamless clusters as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.Halliwells.com.
RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) ***
Actually, no. It would interpret it as null if it were enclosed in curly braces like this: var xml:XML = outerinner{null}/inner/outer; And even then, null might be converted to its String value, null, as the content of the element. I'd have to try it to know for sure. In the example I gave, the content of the element is a String consisting of the letters n, u, l and l, in that order. In any case, the xmlList variable would reference a non-null XMLList object. That's easily proven by dereferencing it: trace(The length is + xmlList.length()); That would output The length is 1. --- On Thu, 8/13/09, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 3:49 PM Ah, I see something I missed at first. This example is using “literal” xml, so the null IS getting interpreted by AS as null and not as a string. I bet it would be different if you did: var xml:XML = XML(“outerinner null/inner /outer”); Even so I am still surprised because the null should be the text node and the expression should return an XMLList with zero length. Very interesting. Tracy Spratt, Lariat Services, development services available From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of jaywood58 Sent: Thursday, August 13, 2009 12:48 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** --- In flexcod...@yahoogro ups.com, Tracy Spratt tracy @... wrote: _ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of Paul Andrews Sent: Wednesday, August 12, 2009 9:33 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinner null/inner /outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. xmlList is set to point at somthing which isn't a list, so I think the trace statement will not be reached. That's my 02:31AM thought.. All e4x expressions return an XMLList. It can be empty but is never a null. Besides, the characters. null in a text node are just a string. null in an AS comparison is a special value. The trace will display false. Trace(xmllist. text() ==null ); //would return true. Tracy Spratt, Lariat Services, development services available Like Tracy , I thought it would return false, for the same reason -- that innernull /inner would be interpreted as a string. Was surprised when I ran the code and saw true. What's going on? It seems like the AS decoder recognizes null as a special case.
[flexcoders] Re: any tool can create Java entities from as 3 VOs?
I've used XDoclet to create VOs from Java Beans, so I'd imagine the process can work in reverse. Here's the xml XDoclet uses: project name=value-object-generator default=main property name=xdoclet.plugin.install.dir value=C:/eclipse/xdoclet-plugins-dist-1.0.4/ path id=xdoclet.task.classpath fileset dir=${xdoclet.plugin.install.dir}/lib include name=**/*.jar / /fileset pathelement location=${xdoclet.plugin.install.dir}/lib/xdoclet-plugin-actionscript-1.0.4.jar/ /path taskdef name=xdoclet classname=org.xdoclet.ant.XDocletTask classpathref=xdoclet.task.classpath/ target name=main xdoclet !-- 'fileset' is the path to the beans you want to convert to value objects. You may specify a specific directory, leave it as is to generate all beans. -- fileset dir=C:/workspace/beans/target/generated-sources/xjc/com/gdais/emtk/beans include name=**/*.java/ /fileset !-- 'destdir' is the path where the generated value objects will be put. -- component classname=org.xdoclet.plugin.actionscript.ActionScript3Plugin destdir=C:/workspace/flex-value-objects/generated-VOs/ /xdoclet /target /project HTH, Geoff --- In flexcoders@yahoogroups.com, markflex2007 markflex2...@... wrote: Hi I have build many AS3 VOs (about 150),may I use some tool to create java VOs from the AS 3 VOs. Thanks Mark (PS:VO:Value Object(Properties and get/set mothods))
[flexcoders] Re: any tool can create Java entities from as 3 VOs?
This is the plugin I used. http://docs.codehaus.org/display/XDOCLET/Actionscript+plugin Maybe someone made a plugin that goes the other way, AS to Java. Geoff --- In flexcoders@yahoogroups.com, Geoffrey gtb...@... wrote: I've used XDoclet to create VOs from Java Beans, so I'd imagine the process can work in reverse. Here's the xml XDoclet uses: project name=value-object-generator default=main property name=xdoclet.plugin.install.dir value=C:/eclipse/xdoclet-plugins-dist-1.0.4/ path id=xdoclet.task.classpath fileset dir=${xdoclet.plugin.install.dir}/lib include name=**/*.jar / /fileset pathelement location=${xdoclet.plugin.install.dir}/lib/xdoclet-plugin-actionscript-1.0.4.jar/ /path taskdef name=xdoclet classname=org.xdoclet.ant.XDocletTask classpathref=xdoclet.task.classpath/ target name=main xdoclet !-- 'fileset' is the path to the beans you want to convert to value objects. You may specify a specific directory, leave it as is to generate all beans. -- fileset dir=C:/workspace/beans/target/generated-sources/xjc/com/gdais/emtk/beans include name=**/*.java/ /fileset !-- 'destdir' is the path where the generated value objects will be put. -- component classname=org.xdoclet.plugin.actionscript.ActionScript3Plugin destdir=C:/workspace/flex-value-objects/generated-VOs/ /xdoclet /target /project HTH, Geoff --- In flexcoders@yahoogroups.com, markflex2007 markflex2007@ wrote: Hi I have build many AS3 VOs (about 150),may I use some tool to create java VOs from the AS 3 VOs. Thanks Mark (PS:VO:Value Object(Properties and get/set mothods))
Re: [flexcoders] drawings dont get clipped by holder
Well, actually the contentHolder (said as a uicomponent) is a class extending uicomponent and overriding measure(), which is using getBounds(). Also drawing is done into sprites within the contentHolder. The problem is drawings arent clipped till a certain distance of moving, which corresponds I think to the orgin of sprite within the contentHolder coordinates space. But the origin of sprite is not the left most graphics element drawn into the sprite. thomas --- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056 2009/8/10 Alex Harui aha...@adobe.com If you draw into a UIComponent, the UIComponent needs to report the correct width/height for the Canvas to clip it properly. UIComponent doesn’t do that automatically so you’d need to create a custom component. Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *thomas parquier *Sent:* Saturday, August 08, 2009 10:24 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] drawings dont get clipped by holder Hi, I writing an app which can draw shapes on sprites within a uicomponent (contentHolder), which holds some other canvas components. This contentHolder can be move within a canvas (drawingCanvas) which has clipContent=true. But clipping seems erratic : shapes dont seem to be taken into account especially at left hand side of drawingCanvas when some graphics are negative in sprites coordinates space. thomas --- http://www.web-attitude.fr/ msn : thomas.parqu...@web-attitude.fr softphone : sip:webattit...@ekiga.net sip%3awebattit...@ekiga.net téléphone portable : +33601 822 056
[flexcoders] Data binding inside Repeater?
Hi, I'm having a bit of trouble using the following combination of data binding and Repeater and could use some enlightenment: mx:ArrayCollection id=fred some data here... /mx:ArrayCollection mx:ArrayCollection id=measurements mx:Object dataProvider={fred} / /mx:ArrayCollection mx:Repeater id=measurementRepeater dataProvider=measurements my:Chart dataProvider={measurementRepeater.currentItem.dataProvider} / /mx:Repeater The intention is to have my chart bind to 'fred' via the Repeater iteration over measurements, a kind of double-binding, I suppose. My chart component does render the initial data in 'fred' but doesn't respond to subsequent changes to 'fred', i.e., I'm not getting dynamic binding. But if I change the repeater line above to this: my:Chart dataProvider={fred} / then everything works as expected. Is there a way to do in MXML what I'm trying to do above? Thanks, Garry
RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) ***
Ok, if you say so. What is the result of your investigation? It gets kind of complicated because AS does implicit toString() sometimes which can hide what is really happening. Do: trace(xmlList == null); and trace(xmlList == null); return the same result? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dave Glasser Sent: Thursday, August 13, 2009 5:22 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** Actually, no. It would interpret it as null if it were enclosed in curly braces like this: var xml:XML = outerinner{null}/inner/outer; And even then, null might be converted to its String value, null, as the content of the element. I'd have to try it to know for sure. In the example I gave, the content of the element is a String consisting of the letters n, u, l and l, in that order. In any case, the xmlList variable would reference a non-null XMLList object. That's easily proven by dereferencing it: trace(The length is + xmlList.length()); That would output The length is 1. --- On Thu, 8/13/09, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 3:49 PM Ah, I see something I missed at first. This example is using literal xml, so the null IS getting interpreted by AS as null and not as a string. I bet it would be different if you did: var xml:XML = XML(outerinner null/inner /outer); Even so I am still surprised because the null should be the text node and the expression should return an XMLList with zero length. Very interesting. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of jaywood58 Sent: Thursday, August 13, 2009 12:48 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** --- In flexcod...@yahoogro ups.com, Tracy Spratt tracy @... wrote: _ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of Paul Andrews Sent: Wednesday, August 12, 2009 9:33 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinner null/inner /outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. xmlList is set to point at somthing which isn't a list, so I think the trace statement will not be reached. That's my 02:31AM thought.. All e4x expressions return an XMLList. It can be empty but is never a null. Besides, the characters. null in a text node are just a string. null in an AS comparison is a special value. The trace will display false. Trace(xmllist. text() ==null ); //would return true. Tracy Spratt, Lariat Services, development services available Like Tracy , I thought it would return false, for the same reason -- that innernull /inner would be interpreted as a string. Was surprised when I ran the code and saw true. What's going on? It seems like the AS decoder recognizes null as a special case.
RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) ***
Does anybody want to try to figure out what the E4X spec says it should do? It's certainly possible that the Player implementation of E4X is doing it wrong. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Thursday, August 13, 2009 3:10 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** Ok, if you say so. What is the result of your investigation? It gets kind of complicated because AS does implicit toString() sometimes which can hide what is really happening. Do: trace(xmlList == null); and trace(xmlList == null); return the same result? Tracy Spratt, Lariat Services, development services available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dave Glasser Sent: Thursday, August 13, 2009 5:22 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** Actually, no. It would interpret it as null if it were enclosed in curly braces like this: var xml:XML = outerinner{null}/inner/outer; And even then, null might be converted to its String value, null, as the content of the element. I'd have to try it to know for sure. In the example I gave, the content of the element is a String consisting of the letters n, u, l and l, in that order. In any case, the xmlList variable would reference a non-null XMLList object. That's easily proven by dereferencing it: trace(The length is + xmlList.length()); That would output The length is 1. --- On Thu, 8/13/09, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 3:49 PM Ah, I see something I missed at first. This example is using literal xml, so the null IS getting interpreted by AS as null and not as a string. I bet it would be different if you did: var xml:XML = XML(outerinner null/inner /outer); Even so I am still surprised because the null should be the text node and the expression should return an XMLList with zero length. Very interesting. Tracy Spratt, Lariat Services, development services available From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of jaywood58 Sent: Thursday, August 13, 2009 12:48 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** --- In flexcod...@yahoogro ups.com/mc/compose?to=flexcoders%40yahoogroups.com, Tracy Spratt tracy @... wrote: _ From: flexcod...@yahoogro ups.com/mc/compose?to=flexcoders%40yahoogroups.com [mailto:flexcod...@yahoogro ups.com/mc/compose?to=flexcoders%40yahoogroups.com] On Behalf Of Paul Andrews Sent: Wednesday, August 12, 2009 9:33 PM To: flexcod...@yahoogro ups.com/mc/compose?to=flexcoders%40yahoogroups.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinner null/inner /outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. xmlList is set to point at somthing which isn't a list, so I think the trace statement will not be reached. That's my 02:31AM thought.. All e4x expressions return an XMLList. It can be empty but is never a null. Besides, the characters. null in a text node are just a string. null in an AS comparison is a special value. The trace will display false. Trace(xmllist. text() ==null ); //would return true. Tracy Spratt, Lariat Services, development services available Like Tracy , I thought it would return false, for the same reason -- that innernull /inner would be interpreted as a string. Was surprised when I ran the code and saw true. What's going on? It seems like the AS decoder recognizes null as a special case.
RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) ***
--- On Thu, 8/13/09, Tracy Spratt tr...@nts3rd.com wrote: Ok, if you say so. What is the result of your investigation? I just checked, and it does indeed convert null to null. So it's effectively the same with or without the curly braces. The element contains a String 4 characters long. It gets kind of complicated because AS does implicit toString() sometimes which can hide what is really happening. Do: trace(xmlList == null); and trace(xmlList == “null”); return the same result? Surprisingly, the second one doesn't compile. It failed with the error: Error: Comparison between a value with static type XMLList and a possibly unrelated type String. But if it did compile, I would expect it to produce the same result. And just to make sure, I was able to compile and run this: ... var s:* = null trace(xmlList == s); and the output was the same as when comparing xmlList to null.
RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) ***
By my reading, everything seems to be working how it's supposed to work. But how it's supposed to work is very surprising to me. And it's not really E4X that's producing the odd behavior, it's the == operator. I'll go ahead and post the answer and explanation in my next message. --- On Thu, 8/13/09, Gordon Smith gosm...@adobe.com wrote: From: Gordon Smith gosm...@adobe.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 6:54 PM Does anybody want to try to figure out what the E4X spec says it should do? It's certainly possible that the Player implementation of E4X is doing it wrong. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Thursday, August 13, 2009 3:10 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** Ok, if you say so. What is the result of your investigation? It gets kind of complicated because AS does implicit toString() sometimes which can hide what is really happening. Do: trace(xmlList == null); and trace(xmlList == “null”); return the same result? Tracy Spratt, Lariat Services, development services available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dave Glasser Sent: Thursday, August 13, 2009 5:22 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** Actually, no. It would interpret it as null if it were enclosed in curly braces like this: var xml:XML = outerinner{null}/inner/outer; And even then, null might be converted to its String value, null, as the content of the element. I'd have to try it to know for sure. In the example I gave, the content of the element is a String consisting of the letters n, u, l and l, in that order. In any case, the xmlList variable would reference a non-null XMLList object. That's easily proven by dereferencing it: trace(The length is + xmlList.length()); That would output The length is 1. --- On Thu, 8/13/09, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 3:49 PM Ah, I see something I missed at first. This example is using “literal” xml, so the null IS getting interpreted by AS as null and not as a string. I bet it would be different if you did: var xml:XML = XML(“outerinner null/inner /outer”); Even so I am still surprised because the null should be the text node and the expression should return an XMLList with zero length. Very interesting. Tracy Spratt, Lariat Services, development services available From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of jaywood58 Sent: Thursday, August 13, 2009 12:48 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** --- In flexcod...@yahoogro ups.com, Tracy Spratt tracy @... wrote: _ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of Paul Andrews Sent: Wednesday, August 12, 2009 9:33 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinner null/inner /outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. xmlList is set to point at somthing which isn't a list, so I think the trace statement will not be reached. That's my 02:31AM thought.. All e4x expressions return an
RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) ***
Well, the == operator produces a lot of interesting behavior. That's why there's a === operator. ☺ Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dave Glasser Sent: Thursday, August 13, 2009 4:39 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** By my reading, everything seems to be working how it's supposed to work. But how it's supposed to work is very surprising to me. And it's not really E4X that's producing the odd behavior, it's the == operator. I'll go ahead and post the answer and explanation in my next message. --- On Thu, 8/13/09, Gordon Smith gosm...@adobe.com wrote: From: Gordon Smith gosm...@adobe.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 6:54 PM Does anybody want to try to figure out what the E4X spec says it should do? It's certainly possible that the Player implementation of E4X is doing it wrong. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Tracy Spratt Sent: Thursday, August 13, 2009 3:10 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** Ok, if you say so. What is the result of your investigation? It gets kind of complicated because AS does implicit toString() sometimes which can hide what is really happening. Do: trace(xmlList == null); and trace(xmlList == “null”); return the same result? Tracy Spratt, Lariat Services, development services available From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dave Glasser Sent: Thursday, August 13, 2009 5:22 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** Actually, no. It would interpret it as null if it were enclosed in curly braces like this: var xml:XML = outerinner{null}/inner/outer; And even then, null might be converted to its String value, null, as the content of the element. I'd have to try it to know for sure. In the example I gave, the content of the element is a String consisting of the letters n, u, l and l, in that order. In any case, the xmlList variable would reference a non-null XMLList object. That's easily proven by dereferencing it: trace(The length is + xmlList.length()); That would output The length is 1. --- On Thu, 8/13/09, Tracy Spratt tr...@nts3rd.com wrote: From: Tracy Spratt tr...@nts3rd.com Subject: RE: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** To: flexcoders@yahoogroups.com Date: Thursday, August 13, 2009, 3:49 PM Ah, I see something I missed at first. This example is using “literal” xml, so the null IS getting interpreted by AS as null and not as a string. I bet it would be different if you did: var xml:XML = XML(“outerinner null/inner /outer”); Even so I am still surprised because the null should be the text node and the expression should return an XMLList with zero length. Very interesting. Tracy Spratt, Lariat Services, development services available From: flexcod...@yahoogro ups.com [mailto:flexcoders@ yahoogroups. com] On Behalf Of jaywood58 Sent: Thursday, August 13, 2009 12:48 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] Re: *** So you think you know ActionScript? (Read original post first) *** --- In flexcod...@yahoogro ups.com, Tracy Spratt tracy @... wrote: _ From: flexcod...@yahoogro ups.com [mailto:flexcod...@yahoogro ups.com] On Behalf Of Paul Andrews Sent: Wednesday, August 12, 2009 9:33 PM To: flexcod...@yahoogro ups.com Subject: Re: [flexcoders] *** So you think you know ActionScript? (Read original post first) *** Dave Glasser wrote: Consider this code snippet: var xml:XML = outerinner null/inner /outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Please provide an answer without running the code (of course) and, better yet, without consulting any documentation, or any of the other answers that may have been posted already (if you read the list in chronological order.) Pretend it's a job interview question and you have to give it your best shot off the top of your head. And also, if you don't mind, don't top-post your answer, so that if someone does read your answer before the original post, they might get a chance to answer without having seen yours first. xmlList is set to point at somthing which isn't a list, so I think the trace statement will not be reached. That's my 02:31AM thought.. All e4x expressions return an
[flexcoders] *** So you think you know ActionScript? (THE ANSWER) ***
Consider this code snippet: var xml:XML = outerinnernull/inner/outer; var xmlList:XMLList = xml.inner; trace(xmlList == null); What does the trace statement output, true or false, and why? Well, first, let's stipulate that the innner element in the XML object contains the String null. It's not an empty element, for those who might think that null is interpreted as a literal null. Second, the expression xml.inner returns a non-null XMLList object, which is assigned to the variable xmlList. If you were to dereference the xmlList variable, say by calling its length() method, it would assuredly not throw a #1009 null reference error, but rather it would return 1, which is the number of child elements of outer that have the name inner. So the inner element is the only member of xmlList. So now you have reference to a non-null XMLList of length 1. It seems obvious that comparing that reference to null with the equality operator (==) should evaluate to false, right? Well, it doesn't. The expression: xmlList == null evaluates to true, and that is what the trace statement outputs in the original example. After spending about 4 hours looking in all the wrong places for a bug that was actually caused by this odd little quirk, once I found out what was really causing the problem, I thought for sure that it had to be a bug in the ActionScript or E4X implementation. After all, it can't be right that a non-null object reference is considered equivalent to null, right? Wrong again. If you read the ASDoc for the equality operator, that's what it's supposed to do. In the Flex 3.2 Language Reference, the section on the equality operator says: If the data types of the operands do not match, the result is false except in the following circumstances: ... One operand is of type XMLList, and either of the following conditions is true: * The length property of the XMLList object is 0, and the other object is undefined. * The length property of the XMLList object is 1, and one element of the XMLList object matches the other operand. In our case, the length property (poor choice of words, since .length would return another XMLList) is 1, so the result will be based on a comparison between the one element of the XMLList, which is an XML object, and the other operand, which is null. So what does the equality operator doc say about XML objects to non-XML operands? It says the result is false unless one operand is of type XML with simple content (hasSimpleContent() == true), and after both operands are converted to strings with the toString() method, the resulting strings match. So here, we do in fact have an XML object, the inner node, with simple content, i.e. the String null. And when you convert that XML object to a string with the toString() method, you will simply have the string null. And when you convert the OTHER OPERAND, which is null, to a string, you will also have null, and therefore the equality operation will return true. So there you have it. It's working the way it was designed to work. A null is converted to the string null for the purpose of an equality comparison. Personally, I think it was a poorly thought-out design decision, but hey, what do I know? Maybe they had their reasons. I think the language designers should have made a separate rule or two to cover cases when one operand is null or undefined and the other is not. And as a side note, if the strict equality operator (===) is used, then the expression: xmlList === null evaluates to false, as you would expect.
[flexcoders] regex: keyword search
Users provide keywords separated by spaces through an input box, and I would like to see if they all exist in a certain text. So for example if a user provides flex awesome or awesome flex they should both match the phrase flex is quite awesome. The following regex won't work because it is order dependent: .*keyword1.*keyword2.* Is there a way to tell the regex to search the entire string from the beginning for each keyword? Currently I am looping through each keyword and testing them separately - if all tests pass then I return true, but that seems wasteful. Thanks, Baz
[flexcoders] ItemRenderer Effects Virtualization
Is it possible to implement effects on virtualized itemrenderers? What about if the change in underlying data is based on an ArrayCollection filterFunction? Basically, I show/hide items based on keywords users type. I would like to fade the items in and out when they are shown/hidden. The show/hide is implemented using a filterFunction on my source ArrayCollection, so the data isn't actually being added/removed. Thoughts? Cheers, Baz