Re: [SPAM] [flexcoders] How to call a Actionscript function in a UI child from UI father ?
Also you would want to make all functions public that are to be accessed by outside objects. I see you marked getFileSize as private. On Thu, Oct 15, 2009 at 10:11 AM, Tracy Spratt tr...@nts3rd.com wrote: Don’t use binding braces in actionscript (the event handler declaration is actionscript) Try: click=getFileSize(data.filesize) That assumes the data object is created and has that property. Tracy Spratt, Lariat Services, development services available -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *polo_enzo *Sent:* Wednesday, October 14, 2009 2:11 PM *To:* flexcoders@yahoogroups.com *Subject:* [SPAM] [flexcoders] How to call a Actionscript function in a UI child from UI father ? when I try to call the getFileSize with the param: {data.filesize}, it does not work ? I am quite new in Flex Technology... Can somebody tell me what is wrong ? --- FlickrRIA.mxml mx:Script ![CDATA[ private function getFileSize(filesize:String):void { imageText.text = filesize; } ]] /mx:Script --- FlickrThumbnail.mxml mx:VBox xmlns:mx=http://www.adobe.com/2006/mxml; width=125 height=125 horizontalAlign=center horizontalScrollPolicy=off verticalScrollPolicy=off paddingBottom=5 paddingLeft=5 paddingRight=5 paddingTop=5 mx:Image width=75 height=75 source={data.thumbnail.url} click=getFileSize({data.filesize})/ mx:Text id=imageText text={data.credit} / /mx:VBox thx,
Re: [flexcoders] Blank Screen issue with application preloaders
Ok, I hope that's really the case. Will check from other systems. On Fri, Apr 24, 2009 at 8:03 PM, nospam allowed nos...@advancedonsite.comwrote: Works great here, loads almost instantly, must be related to your flash ver or computer/network? On Thu, Apr 23, 2009 at 5:59 AM, b_alen alen.ba...@gmail.com wrote: I get a blank screen for more than 10 seconds for the app that's about 700k in size. Only then the preloader appears and starts from somewhere around 70%. In the Flash days, this was easily solved by having one small SWF with preloader that would load the main SWF in empty movie clip. Is something like this possible in Flex? I did a small experiment with loading the Flex app into Flash SWF, but then the sizing and alignments were lost. I also tried loading a Flex app into a smaller Flex app, but still there was a blank screen for quite a while. It's a huge usability issue knowing that users leave after 8 seconds, which is actualy true looking at google analytics reports. I've checked numerous blogs about custom preloaders but only found that all of them have the same issue. These are all the apps and samples with the same issue: http://tv.adobe.com/# http://onflash.org/ted/2006/07/flex-2-custom-preloaders.php http://onflash.org/ted/2006/07/flex-2-preloaders-swf-png-gif-examples.php http://jessewarden.com/2007/07/making-a-cooler-preloader-in-flex-part-1-of-3.html -- Thanks Jason
Re: [flexcoders] Which Unit Testing Framework to use?
Thanks Errol, your blog is very useful. I found FlexUnit most discussed and endorsed by Adobe, that's why assumed it's a leader of the pack, I didn't do any tech research on it though. Maciek, thanks for your feedback on FlexMonkey, it definitely gives me enough confidence to give it a go. Alen On Sat, Jan 10, 2009 at 5:49 AM, Maciek Sakrejda msakre...@truviso.comwrote: For what it's worth, it's true that FlexMonkey is not a unit testing framework (it's more about generating functional tests for the UI), but it's fantastic (especially 0.6+). I first found out about it from this list earlier this week, and about a day later, I started moving our tests to it (from FunFX). Initially getting it working in Flex 3.0 was a pain (it is built against a library that was built against 3.1, which introduced some breaking api changes), but now that it's running, it's a great tool. It records interactions and essentially generates FlexUnit tests for you (in theory, it can generate test for any unit testing framework with asynchronous test case support, but it's currently tied into FlexUnit). I highly recommend it. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Errol Thompson kiw...@acm.org kiwiet%40acm.org Reply-To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: RE: [flexcoders] Which Unit Testing Framework to use? Date: Sat, 10 Jan 2009 13:00:02 +1300 After a brief search on flex unit testing I found that FlexUnit is supposed to be the leader of the pack. I am interested in why you think FlexUnit is the leader of the pack. I know that Adobe have adopted it but its syntax for asserts and assert options are limited. On my blog (http://kiwi-et.blogspot.com/2008/12/assertive-tests.html), I compared the asserts available for FlexUnit, Fluint, FUnit, and FluxUint. I have written other blogs which talk about the differences between the frameworks. I haven't explored the use of FlexMonkey as the description of what it did didn't match my requirements. On my current project, we are using FlexUnit. - Errol Thompson Kiwi-ET Computing Education Research Wellington, New Zealand Phone: +64 21 210 1662 E-Mail: kiwiet (at) acm.org kiwiet (at) computer.org Web: www.teach.thompsonz.net -
Re: [flexcoders] Which Unit Testing Framework to use?
Interestingly, nobody ever mentioned FlexMonkey on this forum, but it seems like good stuff. Thanks for the responses and advice. A. On Wed, Jan 7, 2009 at 3:50 AM, Josh McDonald dzn...@gmail.com wrote: I can report that I'm happy with FlexUnit as well. I *really* don't like the syntax for async stuff, but wrapping nice syntax around bad is what we do for a living, so when I need it I'll write it (and release it, of course!) -Josh On Wed, Jan 7, 2009 at 12:02 AM, Wally Kolcz wko...@isavepets.com wrote: Been looking at FlexUnit, FUnit, and ASUnit. Like FlexUnit best so far... -- *From*: b_alen alen.ba...@gmail.com *Sent*: Tuesday, January 06, 2009 5:50 AM *To*: flexcoders@yahoogroups.com *Subject*: [flexcoders] Which Unit Testing Framework to use? After a brief search on flex unit testing I found that FlexUnit is supposed to be the leader of the pack. Also, there is FlexMonkey that looks to be promising and it even uses FlexUnit. http://code.google.com/p/flexmonkey/ Are there any other frameworks worth considering and what is your general experience with various frameworks. Thanks. Alen -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
Re: [flexcoders] Re: AIR app uninstall issue - database stays in applicationStorageDirectory forever?
Well, at least if we would be able to know that we're installing it and not just running it. Then I could at least hack that and clean old stuff before starting again fresh, this would also be acceptable for the client. So I guess there's no solution available unfortunately, apart from third party products like InstallAnywhere. On Wed, Dec 10, 2008 at 7:56 PM, valdhor [EMAIL PROTECTED]wrote: If AIR won't do it and there are time constraints you may like to look into a full installer product like InstallAnywhere (http://www.acresso.com/products/ia/installanywhere-overview.htm) or InstallShield (http://www.acresso.com/products/is/installshield-overview.htm). --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Gregor Kiddie [EMAIL PROTECTED] wrote: Well... Keeping with the theme of un-installers not cleaning up after themselves, and leaving out ugly hacks... How about an explicit clean up option in the application to delete all that stuff that the users can use before uninstalling IF they don't want it next time... 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 [EMAIL PROTECTED] From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Alen Balja Sent: 10 December 2008 03:02 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: Re: [flexcoders] AIR app uninstall issue - database stays in applicationStorageDirectory forever? Because they have stored bookmarks, notes and other stuff with their product. They uninstall the product, install it again and they're still there. It's marked as critical with their QA and I don't think we could get away with it. Well, I guess I could tell them that Adobe knows better than them, and they did this for a reason, but I doubt they'd buy that. Anyway, looking forward to see some other ugly hack advices if anyone has similar expereince. Or if someone from Adobe like Alex knows some tricks.
Re: [flexcoders] AIR app uninstall issue - database stays in applicationStorageDirectory forever?
Because they have stored bookmarks, notes and other stuff with their product. They uninstall the product, install it again and they're still there. It's marked as critical with their QA and I don't think we could get away with it. Well, I guess I could tell them that Adobe knows better than them, and they did this for a reason, but I doubt they'd buy that. Anyway, looking forward to see some other ugly hack advices if anyone has similar expereince. Or if someone from Adobe like Alex knows some tricks. On Tue, Dec 9, 2008 at 1:22 PM, Gregor Kiddie [EMAIL PROTECTED] wrote: Yeah, solutions to this tend to end up being messy. Question is, why do your users consider keeping their settings from one install to another a bug? 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 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 [EMAIL PROTECTED] -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alen Balja *Sent:* 08 December 2008 10:27 *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] AIR app uninstall issue - database stays in applicationStorageDirectory forever? Thanks guys, but this still doesn't solve my problem. Gregor, I understand that Mac users would delete the folder and nothing could be run then, but at least I need a workaround to run some code at the install time, or first time the application runs after install, is there a way to do at least that? Then I could check for any old files and delete them, reset prefs, etc. As user Dan commented in the Oli's blog, I also got the same idea of checking the file dates and times in applicationDirectory, if that time is less than 1 minute from now, then it is a fresh install and I need to clean up what is in the applicationStorageDirectory. If that date is older, that means I'm just running the same already installed application again, and I leave everything as is. But as Dan posted, this seems like a very very ugly hack. a. On Mon, Dec 8, 2008 at 1:33 PM, Gregor Kiddie [EMAIL PROTECTED] wrote: Take a look at Oli Goldman's article on why the AIR app installer doesn't clean up after itself. http://blogs.adobe.com/simplicity/2008/07/why_uninstallers_dont_clean_up_user_files.html 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 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 [EMAIL PROTECTED] -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alen Balja *Sent:* 08 December 2008 03:34 *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] AIR app uninstall issue - database stays in applicationStorageDirectory forever? I would really appreciate if someone maybe close to Adobe would shed some light on the issue. Can it be done, are there some workarounds. It's really annoying, we're few days from release and client just found this bug. The bug is that ApplicationStorageDirectory doesn't get deleted on uninstall. Hence, all the user's settings remain after he uninstalls the app and installs it again. (Plus it's very ugly to have all the files there forever) Not sure if I'm doing something wrong, on the application launch I'm copying SQLite database from applicationDirectory to applicationStorageDirectory, in order to be able to read and write. Of course, I check if the database already exists there or not. var dbFile:File = File.applicationDirectory. resolvePath(database.db); var DBDestination:File = File.applicationStorageDirectory.resolvePath(db/database.db); if (!DBDestination.exists) { dbFile.copyTo(DBDestination); } Everything is fine here, up to the point when application is uninstalled. Database stays there even after the uninstall and hence breaks some critical functionality. It might be that I'm not following some best practices, or there is a way to manually clean up the stuff, I don't
Re: [flexcoders] AIR app uninstall issue - database stays in applicationStorageDirectory forever?
Thanks guys, but this still doesn't solve my problem. Gregor, I understand that Mac users would delete the folder and nothing could be run then, but at least I need a workaround to run some code at the install time, or first time the application runs after install, is there a way to do at least that? Then I could check for any old files and delete them, reset prefs, etc. As user Dan commented in the Oli's blog, I also got the same idea of checking the file dates and times in applicationDirectory, if that time is less than 1 minute from now, then it is a fresh install and I need to clean up what is in the applicationStorageDirectory. If that date is older, that means I'm just running the same already installed application again, and I leave everything as is. But as Dan posted, this seems like a very very ugly hack. a. On Mon, Dec 8, 2008 at 1:33 PM, Gregor Kiddie [EMAIL PROTECTED] wrote: Take a look at Oli Goldman's article on why the AIR app installer doesn't clean up after itself. http://blogs.adobe.com/simplicity/2008/07/why_uninstallers_dont_clean_up_user_files.html 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 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 [EMAIL PROTECTED] -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alen Balja *Sent:* 08 December 2008 03:34 *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] AIR app uninstall issue - database stays in applicationStorageDirectory forever? I would really appreciate if someone maybe close to Adobe would shed some light on the issue. Can it be done, are there some workarounds. It's really annoying, we're few days from release and client just found this bug. The bug is that ApplicationStorageDirectory doesn't get deleted on uninstall. Hence, all the user's settings remain after he uninstalls the app and installs it again. (Plus it's very ugly to have all the files there forever) Not sure if I'm doing something wrong, on the application launch I'm copying SQLite database from applicationDirectory to applicationStorageDirectory, in order to be able to read and write. Of course, I check if the database already exists there or not. var dbFile:File = File.applicationDirectory. resolvePath(database.db); var DBDestination:File = File.applicationStorageDirectory.resolvePath(db/database.db); if (!DBDestination.exists) { dbFile.copyTo(DBDestination); } Everything is fine here, up to the point when application is uninstalled. Database stays there even after the uninstall and hence breaks some critical functionality. It might be that I'm not following some best practices, or there is a way to manually clean up the stuff, I don't know. Any ideas? Alen On Fri, Dec 5, 2008 at 7:24 PM, b_alen [EMAIL PROTECTED] wrote: Not sure if I'm doing something wrong, on the application launch I'm copying SQLite database from applicationDirectory to applicationStorageDirectory, in order to be able to read and write. Of course, I check if the database already exists there or not. var dbFile:File = File.applicationDirectory.resolvePath(database.db); var DBDestination:File = File.applicationStorageDirectory.resolvePath(db/database.db); if (!DBDestination.exists) { dbFile.copyTo(DBDestination); } Everything is fine here, up to the point when application is uninstalled. Database stays there even after the uninstall and hence breaks some critical functionality. It might be that I'm not following some best practices, or there is a way to manually clean up the stuff, I don't know. Any ideas? Alen
Re: [flexcoders] AIR app uninstall issue - database stays in applicationStorageDirectory forever?
I would really appreciate if someone maybe close to Adobe would shed some light on the issue. Can it be done, are there some workarounds. It's really annoying, we're few days from release and client just found this bug. The bug is that ApplicationStorageDirectory doesn't get deleted on uninstall. Hence, all the user's settings remain after he uninstalls the app and installs it again. (Plus it's very ugly to have all the files there forever) Not sure if I'm doing something wrong, on the application launch I'm copying SQLite database from applicationDirectory to applicationStorageDirectory, in order to be able to read and write. Of course, I check if the database already exists there or not. var dbFile:File = File.applicationDirectory. resolvePath(database.db); var DBDestination:File = File.applicationStorageDirectory.resolvePath(db/database.db); if (!DBDestination.exists) { dbFile.copyTo(DBDestination); } Everything is fine here, up to the point when application is uninstalled. Database stays there even after the uninstall and hence breaks some critical functionality. It might be that I'm not following some best practices, or there is a way to manually clean up the stuff, I don't know. Any ideas? Alen On Fri, Dec 5, 2008 at 7:24 PM, b_alen [EMAIL PROTECTED] wrote: Not sure if I'm doing something wrong, on the application launch I'm copying SQLite database from applicationDirectory to applicationStorageDirectory, in order to be able to read and write. Of course, I check if the database already exists there or not. var dbFile:File = File.applicationDirectory.resolvePath(database.db); var DBDestination:File = File.applicationStorageDirectory.resolvePath(db/database.db); if (!DBDestination.exists) { dbFile.copyTo(DBDestination); } Everything is fine here, up to the point when application is uninstalled. Database stays there even after the uninstall and hence breaks some critical functionality. It might be that I'm not following some best practices, or there is a way to manually clean up the stuff, I don't know. Any ideas? Alen
Re: [flexcoders] RE: How to display special characters like #176; in ComboBox list
Did you try with unicode chars like I told you? \u00B0 - this is for the small circle (deegre) _aHC2SODP = [{data:*0*, label:*0 *\u00B0*F*},{data:*20*, label:*2 * \u00B0*F*}]; On Fri, Dec 5, 2008 at 11:57 PM, Tracy Spratt [EMAIL PROTECTED] wrote: Aargh, the shoemaker's children are barefoot. I am creating a static dataProvider for the combobox: _aHC2SODP = [{data:*0*, label:*0 #176;F*},{data:*20*, label:*2 #176;F*}]; //looking for the degree symbol But the above renders literally. I have discovered that building a string in actionscript and then assigning it to a Label.text also does **not** work: *var* sTemp:String = *0 #176;F*; lbltest.text = sTemp; The entity code renders literally. But declaratively, the degree symbol renders as desired: mx:Label text=0 #176;F / So one sure solution is to create my static dataProviders declaratively. So I guess my question changes to Is there some way to do this in AS? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alex Harui *Sent:* Friday, December 05, 2008 12:01 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] RE: How to display special characters like ° in ComboBox list Ha! I've always wanted to say this to you: Post your code. :-) Isn't that XML syntax that won't work in a CDATA block of ActionScript? *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Tracy Spratt *Sent:* Thursday, December 04, 2008 4:13 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] How to display special characters like ° in ComboBox list The special character numeric references work fine in Label and Text and such, but are interpreted literally in a ComboBox's drop list. Any sugestions? Tracy
Re: [flexcoders] RE: How to display special characters like #176; in ComboBox list
Hey, glad you solved it! I also didn't read enough to understand that you're not loading data from the server, so I wasn't as direct as I could be. Luckily I'm just doing the same thing on the current, in fact degree symbol was on my list just few hours before your post. On Sat, Dec 6, 2008 at 1:58 AM, Tracy Spratt [EMAIL PROTECTED] wrote: Sorry Alen, I clearly need to read all responses before I reply. Daddy Alex said post the code and I tripped over my own feet to comply ;) The hex / unicode solution is the ticket. Thanks everyone! Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alex Harui *Sent:* Friday, December 05, 2008 1:19 PM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] RE: How to display special characters like ° in ComboBox list Be nice now. Tracy, the issue is that in the declarative example we are parsing the XML, but in the AS example, we are just parsing text and not XML so the \u format is needed there. *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alen Balja *Sent:* Friday, December 05, 2008 10:17 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] RE: How to display special characters like ° in ComboBox list Did you try with unicode chars like I told you? \u00B0 - this is for the small circle (deegre) _aHC2SODP = [{data:*0*, label:*0 *\u00B0*F*},{data:*20*, label:*2 * \u00B0*F*}]; On Fri, Dec 5, 2008 at 11:57 PM, Tracy Spratt [EMAIL PROTECTED] wrote: Aargh, the shoemaker's children are barefoot. I am creating a static dataProvider for the combobox: _aHC2SODP = [{data:*0*, label:*0 #176;F*},{data:*20*, label:*2 #176;F*}]; //looking for the degree symbol But the above renders literally. I have discovered that building a string in actionscript and then assigning it to a Label.text also does **not** work: *var* sTemp:String = *0 #176;F*; lbltest.text = sTemp; The entity code renders literally. But declaratively, the degree symbol renders as desired: mx:Label text=0 #176;F / So one sure solution is to create my static dataProviders declaratively. So I guess my question changes to Is there some way to do this in AS? Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alex Harui *Sent:* Friday, December 05, 2008 12:01 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] RE: How to display special characters like ° in ComboBox list Ha! I've always wanted to say this to you: Post your code. :-) Isn't that XML syntax that won't work in a CDATA block of ActionScript? *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Tracy Spratt *Sent:* Thursday, December 04, 2008 4:13 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] How to display special characters like ° in ComboBox list The special character numeric references work fine in Label and Text and such, but are interpreted literally in a ComboBox's drop list. Any sugestions? Tracy
Re: [flexcoders] Getting the selected text from HTML control
Copying to clipboard is different thing. You can copy stuff to clipboard once you have access to it. Selected text in the HTML component is buried somewhere deep in the component and it's hard to dig it out. Anyway I achieved the same by adding JavaScript to get the selection and then AS to do stuff with selected text. Alen On Tue, Nov 4, 2008 at 5:48 PM, Tom Chiverton [EMAIL PROTECTED]wrote: On Monday 03 Nov 2008, b_alen wrote: option. Is it possible to achieve the same by clicking on any button and copy the selection to clipboard? Have you checked the live docs for the clipboard-related objects ? -- Tom Chiverton Helping to heterogeneously develop bleeding-edge cutting-edge turn-key internet experiences 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 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] Re: Numbers gone crazy: 5 - 4.8 = 0.2000000000000018 ?
Yes, toFixed() is a better option. It still does not solve the problem as we don't know to what value to fix the numbers to achieve consistent behavior. In practice using something like toFixed(8) for every Number should do the job, but then again we can't be sure. I also found this blog that seems useful: http://www.zeuslabs.us/2007/01/30/flash-floating-point-number-errors/ On Mon, Jul 21, 2008 at 3:33 PM, Kuldeep Atil [EMAIL PROTECTED] wrote: well, u can use number.tofixed(2); --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, b_alen [EMAIL PROTECTED] wrote: Here is how I arrived at this: var res:Number; var a:Number = 5; var b:Number = 4.8; res = a - b; trace(result: + res + , a: + a + , b: + b); The trace clearly shows that the value of a is 5, and the value of b is 4.8. However the end result is clearly shown as 0.2018. Ok, I wanted to create a workaround where I will make sure that b is really 4.8, and I used toPecision() method. var b1:String = b.toPrecision(2); var b2:Number = Number(b1); trace(b1: + b1 + , b2: + b2); res = a - b2; trace(result: + res + , b1: + b1 + , b2: + b2); Again with same result. b2 was traced as 4.8, but the end result still showing 0.2018. As this can of course break all further calculations I had to make sure result is really holding a value that it should, based on all mathematical logic. So I did this: var res1:String = res.toPrecision(2); res = Number(res1); trace(result: + res); I got the expected result and the value of res is now 0.2. This is however very ugly, in case I'm not doing something wrong. Every time we expect a floating point value in our calculation we have to handle it to ensure the proper value is calculated, because what Flash calculates is just wrong. Also, every intermediate calculation has to be stored in a variable converted to String with toPrecision and back to Number for future use. I really don't know how to properly handle this and would appreciate any advice. Imagine the shopping cart system with this sort of unpredictable behavior. For the end, here's one more weirdness: var c:Number = 488.8; trace(c: + c + , c.toPrec: + c.toPrecision(2)); Traces out c: 4.8, c.toPrec: 4.9e+2 Thanks, Alen var c:Number = 488.8;
Re: [flexcoders] No of Lines of Code
We used externalis once, program for this once. Can't remember the name exactly but it's LineC or something like this. Do some Googling there are plenty of free options available. On Wed, Jun 25, 2008 at 6:57 AM, Paramjit Jolly [EMAIL PROTECTED] wrote: Hi all, Anyone have any idea, In any flex project we need to know ….no of lines of code.. Any prebuild component or technique for this ? I need to publish some statics on basis of this . Thanks Regards Jolly * * * IMPORTANT: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message. Please advise immediately if you or your employer do not consent to Internet email for messages of this kind. Opinions, conclusions and other information contained in this e-mail message that do not relate to the official business of Life Fitness shall be understood as neither given nor endorsed by it. * Love to God, Everyone starts loving you. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Tracy Spratt *Sent:* Wednesday, June 25, 2008 9:34 AM *To:* flexcoders@yahoogroups.com *Subject:* RE: [flexcoders] httpservice and repetitive calls As I understand from my reading, the W3C specs state that POST methods do not cache. There are posts on this list about it, and I am sure you could look into the specs themselves. I have just always used POST, and never had any problems. Aspx is nice because Request(myParm) handles both post and get parameters. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Cameron *Sent:* Tuesday, June 24, 2008 6:48 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] httpservice and repetitive calls I never saw my first post come through...hence the second post. That worked by the way, but I'm curious as to why? Cameron Tracy Spratt wrote: See my response to your first post. Use the POST method instead of get. Tracy -- *From:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com[mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] *On Behalf Of *Cameron *Sent:* Tuesday, June 24, 2008 1:18 PM *To:* flexcoders@yahoogroups.com flexcoders%40yahoogroups.com *Subject:* [flexcoders] httpservice and repetitive calls I'm using the httpservice to make a call to an aspx page which runs a query and returns the results. This is fine, but if I try to run the same call again, the service is not actually going out to make the call, but rather just returning the results from the previous call. I know this because the aspx page logs each call made to it. I always see the first call, but no subsequent calls come through if I post the same data. If I send a different set of data, the call works fine, but then will not post that data again. Any ideas on why it doesn't want to actually make the call? Below are the relevant pieces of code: script ... public function lblClickHandler(event:Event):void{ tgtdata = event.currentTarget.data.toString(); customer_id = event.currentTarget.data; useHttpService(); } public function useHttpService():void { userReq.url = dstURL; //set in another part of the code userReq.method = GET; var Obj:Object = new Object(); Obj.w = wispid; //wispid is just a number that is set elsewhere Obj.i = tgtdata; userReq.send(Obj); } ... /script mx:HTTPService id=userReq result=gethttpResult(event) fault=handleFault(event) useProxy=false method=GET resultFormat=object /
Re: [flexcoders] Flex Efficiency
Yes, I will definitely look into it, but if there is already an article addressing this particular problem it would be better to check that first to see if I can even apply it in this case. Thanks On Mon, Jun 23, 2008 at 9:13 AM, Alex Harui [EMAIL PROTECTED] wrote: I suggest you look at the examples for how modules work. I do not have time to customize examples
Re: [flexcoders] Flex Efficiency
I basically have the list of SWF paths available in xml and then call them in the SWFLoader. Hundreds of SWF's can be added through admin CMS and become available without the need of recompiling the app. Adding instances of classes is a better alternative to that? Can you please post a quick snippet how to load using class instance? On Sun, Jun 22, 2008 at 11:02 AM, Alex Harui [EMAIL PROTECTED] wrote: You want to add instances of classes, not whole SWFs. Look into how modules work.
Re: [flexcoders] Flex Efficiency
Alex, do you have any more info on the subject, especially what are the workarounds? I too am using lots of really tiny and simple external swf animations and performance is really really bad. If I remember correctly it's much worse than Flash Player 7. The profiler will help you find inefficiencies in your app. Loading lots of SWFs is, of course, going to eat resources.
Re: [flexcoders] Flex Efficiency
Thanks, Alex. Unfortunately that is the main problem as I let users add graphics on the fly to create their artwork. And graphics are small swf animations, really simple ones. How is adding swf's different in this regard than adding jpegs, gifs or png's on the fly? Also is there a limit set? Because after adding lots of them, some of them just start to disappear and all I do is stack them with addChild(). Can we expect same performance issues when adding lots of visual objects such as buttons, canvases, etc...? If I add 100 simple swfs and 100 button controls, will it behave the same? On Sun, Jun 22, 2008 at 3:37 AM, Alex Harui [EMAIL PROTECTED] wrote: There are no workarounds. Good design for Flash minimizes use of resources. The profiler can help you tune things, but if you use lots of SWFs you're going to pay a price. However, that may not be your main problem, and the profiler can help you determine that. -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Alen Balja *Sent:* Saturday, June 21, 2008 3:57 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Flex Efficiency Alex, do you have any more info on the subject, especially what are the workarounds? I too am using lots of really tiny and simple external swf animations and performance is really really bad. If I remember correctly it's much worse than Flash Player 7. The profiler will help you find inefficiencies in your app. Loading lots of SWFs is, of course, going to eat resources.
Re: [flexcoders] Re: Cairngorm Event Question
First you have to understand the concept of Cairngorm and then UM extensions. Especially in light of what you're trying to achieve. Recoding your project in Cairngorm manner might be an issue depending on how far are you with it and how many developers are on it. It is very straightforward otherwise and I would most definitely recommend you to start using it. If you need some guidance on Cairngorm let us know, but the good starting point would be this: http://cairngormdocs.org/, read the six part article that you find there. The basic idea behind Caringorm is a simple MVC architecture where you make the view as dumb as possible, it just dispatches the events based on (user) actions. Alen On Fri, Jun 20, 2008 at 5:57 AM, donvoltz [EMAIL PROTECTED] wrote: Thanks for your responses. I agree with the idea that binding should work, I have set up 2 datagrids with the same data provider, the standard data grid works fine when the model locator is updated, however, the advanced one does not. Is it because I am using a grouping tag with the advanced data grid that the refresh() is needed or should this work with binding as well? Also, I have looked at the UM Cairngorm. It looks interesting but a little beyond me. Do you have any recommendations for getting more information on using this than what is supplied at google code?? I do not understand the idea of event hooks. Thanks again for the useful information Don
Re: [flexcoders] Converting simple XML data into Array
Check the HTTPService resultFormat property. http://livedocs.adobe.com/flex/2/langref/mx/rpc/http/HTTPService.html#resultFormat Alen On Fri, Jun 20, 2008 at 7:11 AM, flexawesome [EMAIL PROTECTED] wrote: hey there, I was using loop to push them into Array Is there a way to convert this XML file into Array more easily? thanks files filefile name1/file filefile name2/file filefile name3/file . /files
Re: [flexcoders] Cairngorm Event Question
You can try Universal Mind Cairngorm Extensions: http://code.google.com/p/flexcairngorm/ Among others it has these Event features: - Built-in support to transport responders for direct view or business logic callbacks. - Implementation of AnnounceFaultEvent to allow business logic to centralize error reporting and logging. - Implementation of EventGenerator to allow developers to automate dispatching of sequences of events. - Events now should self-dispatch... for direct deliver to the business/controller layer. Alen On Thu, Jun 19, 2008 at 6:18 AM, donvoltz [EMAIL PROTECTED] wrote: I have been building on my cairngorm experience and have come up to a snag. I understand the whole idea about using the controller to trap and respond to events, however, how do I deal with custom view components that need to respond to an event. For example, I have a custom component that contains an advanced data grid. I am filling the modelLocator with data from the server and using this as the data provider for the advanced data grid. The problem I have is when the user selects a different date, I generate a cairngorm event to load new data from the server. This information is dealt with in the controller, however, I am not able to send the event to the custom component to refresh the advance data grid and display the data. Would someone help me to understand how I can use the events, or generate a new custom event to trigger some activity within a custom view component Thanks for the help Don
[flexcoders] +Re: Possible to add some data to load to the default preloader?
http://groups.yahoo.com/group/flexcoders/message/115325;_ylc=X3oDMTJ0Zm5xOXRzBF9TAzk3MzU5NzE1BGdycElkAzEyMjg2MTY3BGdycHNwSWQDMTcwNTAwNzIwNwRtc2dJZAMxMTUzMjUEc2VjA2Rtc2cEc2xrA3Ztc2cEc3RpbWUDMTIxMjY4ODQ0NQ-- Can't do that, data is coming from aspx. In fact the only way this could work is to add info* to swf which data has to be loaded with the swf itself. Then the Flash Player would read that, calculate the size of data and add it to the preloader of the main swf. Once the whole bunsh is downloaded, data would be there in the native format on the root of the app. Am I dreaming? * How to add this info is the question. It can't be through AS that's for sure, because AS is not running until the app is loaded. Write in the header of the swf? Write in the HTML embed directives? - Put the data in an RSL? From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of b_alen Sent: Thursday, June 05, 2008 3:23 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Possible to add some data to load to the default preloader? I always have some stuff to load before the app can be used. Is it possible to stick that loading into the default preloader? So the swf would know that it has to load other files also before it dispatches the event that it's fully loaded. Maybe some compiler directives, I don't know. Thanks
[flexcoders] Re: Accessing nested DisplayObjects programatically
I'm not trying to acces the children from MXML file, but from a Controller class. My app is set up in the following way: application script var ctrl:Controller = new Controller(this); script !-- all the nested ui elements here -- /application What I wanted to achieve is that I don't have to have any code in the MXML file (well appart from instantiating controller) and that I controll all the UI from a Controller class which upon construction creates the references to all the UI elements I'm interested in. Now, this works by casting to Conatainers and drilling down with the getChildByName() but I don't know if I want to do that anymore. Beacuse: I heard that in Adobe labs they dropped this concept of a controller helper and are instead relying quite heavily on the code inside MXML. Heavily means all the UI stuff. I'm quite new so I don't know which approach to take. I'm personally n favour of keeping as much as possiblenthe classes, but if the Adobe folks say different then I'm sure they also know what they're talking about. --- I have heard the Adobe folks advise against using getChildByName() because name is internal and may not forever equal id. Why aren't you just using id? Tracy From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Alen Balja Sent: Monday, April 02, 2007 3:37 AM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Accessing nested DisplayObjects programatically Cheers, it works. The return type of getChildByName() is DisplayObject so I didn't even think of typing it to something else. Now I can easily drill down the UI hierarchy and create references to important UI elements in class. I just started with Flex and the idea is to remove all the code from mxml file and use a class to interact with UI elements. Alen -- Type it as a Container Object. Can DisplayObject even contain children??? On 02/04/2007, at 7:52 AM, Alen Balja wrote: Hi list, Is there a way to access nested children of the Application object programatically? I have an app: Application object and inside I have HDividededBox (id=topFrame) and inside of this I have two more elements with ID properties. These are VBox (id=leftPane) and VBox (id=rightPane). If I do like this: topFrame = app.getChildByName(topContainer);
[flexcoders] Re: Accessing nested DisplayObjects programatically
Cheers, it works. The return type of getChildByName() is DisplayObject so I didn't even think of typing it to something else. Now I can easily drill down the UI hierarchy and create references to important UI elements in class. I just started with Flex and the idea is to remove all the code from mxml file and use a class to interact with UI elements. Alen --- Type it as a Container Object. Can DisplayObject even contain children??? On 02/04/2007, at 7:52 AM, Alen Balja wrote: Hi list, Is there a way to access nested children of the Application object programatically? I have an app: Application object and inside I have HDividededBox (id=topFrame) and inside of this I have two more elements with ID properties. These are VBox (id=leftPane) and VBox (id=rightPane). If I do like this: topFrame = app.getChildByName(topContainer);
[flexcoders] Accessing nested DisplayObjects programatically
Hi list, Is there a way to access nested children of the Application object programatically? I have an app: Application object and inside I have HDividededBox (id=topFrame) and inside of this I have two more elements with ID properties. These are VBox (id=leftPane) and VBox (id=rightPane). If I do like this: topFrame = app.getChildByName(topContainer); I can get the DisplayObject. But I don't see any way how to access the children of topFrame, both of these don't work: rightPane = topFrame.getChildByName(rightPane); // of course because DisplayObject doesn't have getChildByName method rightPane = app.getChildByName(rightPane); // because application sees its children just one level of children hierarchy I'm sure there must be a way, but after fair amount of googling and experimenting I couldn't find any. Cheers, Alen