Re: [flexcoders] Auto sizing columns in advanced datagrid
Not sure, but I think you can't do it according to cells content - due to performance issues and the fact that the Flex engine does not render all cells, only the viewable ones. Say you have 1000 rows in the data provider, but only 5 are viewable - flex only renders about 5 or so, not 1000 - so it has no way of knowing the widest value... You might be able to do it with the header value length, since those don't change. I think I saw a post here in the past about this, try doing a search... HTH Sefi On Wed, Dec 10, 2008 at 1:59 PM, lorenzo.boaro [EMAIL PROTECTED]wrote: Hi all, I would have procedure that auto size columns width at the datagrid craetion based on cells or headers content. i appreciate any help regards lorenzo
[flexcoders] Re: speed of the for each looping
The book ActionScript 3 Cookbook and ActionScript 3.0 Bible, talks about this issue, and your interesting disuions on this thread, have pointed me in the right way :) thanks .. By the way, my firm have the first build on a night watcher application, where we use Nokia NFC (RFID) to collect data and Flex for the Show :) and we are able to alter the data on the RFID tag with just Flex and no install of a third party application. The customer is very very happy. --- In flexcoders@yahoogroups.com, Cato Paus [EMAIL PROTECTED] wrote: Hi, all you experts :) I'm tying to speed up my application and I use a lot of exsample for (var i:int = 0; i 5; i++) { trace(i); } so is the for each looping faster ?
Re: [flexcoders] Re: Still getting old swf
Thanks Ross for your valuable suggestions. But this tag itself says that nothing is cached in the browser. I have added this line in the code. But still i don't see any side effects or anything buggy. I will spend some time in investigating or testing this issue. Thanks, with Regards, Jitendra Jain --- On Wed, 10/12/08, ross_w_henderson [EMAIL PROTECTED] wrote: From: ross_w_henderson [EMAIL PROTECTED] Subject: [flexcoders] Re: Still getting old swf To: flexcoders@yahoogroups.com Date: Wednesday, 10 December, 2008, 8:17 PM Jitendra, You might have something buggy going on in your FlexBuilder (I'm assuming that's what you're building with), but I think your problem may be solved just by pressing Shift + Refresh in your browser. The HTTP-EQUIV tag might work, but it might not, depending on variables that I don't know much about. If you are viewing your application locally, as opposed to running it on a webserver, it definitely won't work. Ross --- In [EMAIL PROTECTED] ups.com, jitendra jain jitendra_jain_ [EMAIL PROTECTED] wrote: Hi folks,  I'm getting the old swf everytime iam cleaning the code and building. I think my browser is caching the swf?  Does this line in html will help? META HTTP-EQUIV= CACHE-CONTROL CONTENT=NO- CACHE  Is it safe to add this line or do it will affect my performance of flex as nothing is cached. Let me know your views..  Thanks, with Regards, Jitendra Jain Add more friends to your messenger and enjoy! Go to http://messenger. yahoo.com/ invite/ Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/
[flexcoders] Re: Applying metadata in the middle of mxml - is it possible?
--- In flexcoders@yahoogroups.com, per.olesen [EMAIL PROTECTED] wrote: Hi, Basically, I would like to apply some (of my own) metadata to a component instance inside the mxml. Like this: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:ApplicationControlBar mx:Metadata[MyMetadata]/mx:Metadata mx:Button id=foo label=Blah/ /mx:ApplicationControlBar /mx:Application And then only have the [MyMetadata] applied to the foo button instance. Is this possible? Placing it there makes the compiler bark. I guess this is due to the fact, that mxmlc will put it before a class definition. I then tried something like this: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:ApplicationControlBar mx:Script[MyMetadata]/mx:Script mx:Button id=foo label=Blah/ /mx:ApplicationControlBar /mx:Application but this made the compiler bark too :-) about metadata requiring an associated definition. And of course it is right. My guess is the mxmlc compiler is translating the above to something like: acb = new ApplicationControlBar(); [MyMetadata] b = new Button(); acb.add(b); and of course then it is wrong with the metadata element there. Am I right? Can I do it some other way? I came up with this: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:ApplicationControlBar myns:MetadataButton id=foo label=Blah/ /mx:ApplicationControlBar /mx:Application and then have a component MetadataButton.mxml with this content: ?xml version=1.0 ? mx:Button xmlns:mx=http://www.adobe.com/2006/mxml; mx:Metadata[MyMetadata]/mx:Metadata /mx:Button which works! But the MyMetadata annotation will change on the various buttons. So I would like to inline it, like this: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; mx:ApplicationControlBar mx:Button xmlns:mx=http://www.adobe.com/2006/mxml; mx:Metadata[MyMetadata]/mx:Metadata /mx:Button /mx:ApplicationControlBar /mx:Application but this makes the compiler bark again. Any help? Hi Per, You can tell the compiler to accept custom metadata tags by using the keep-as3-metadata compiler flag. You'll have to add it to your compiler options. See http://livedocs.adobe.com/flex/3/html/help.html?content=compilers_14.html for details. I hope that helps. -- david keutgens software consultant cynergy australia web | http://www.cynergysystems.com
[flexcoders] Defining non closable closable tabs in super tab navigator
Hi, Does anyone know how to create a supertabnavigator with BOTH closeable and non-closeable tabs? I only see an option to define that for all the tabs together. Thanks
[flexcoders] SpeedoMeter
Hi All, I have create a speedometer in flex. Will you guys help me out to dig this well..? All suggestions are welcome... Thanks in Advance... Sanjay Sharma
Re: [flexcoders] SpeedoMeter
http://form-function.blogspot.com/2008/04/gauge-component-v02.html -Josh On Thu, Dec 11, 2008 at 10:25 PM, sanjaypmg [EMAIL PROTECTED] wrote: Hi All, I have create a speedometer in flex. Will you guys help me out to dig this well..? All suggestions are welcome... Thanks in Advance... Sanjay Sharma -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: [EMAIL PROTECTED] :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
[flexcoders] Combobox text does not render on some
I have form window with about 20 combobox fields. Each one is bound to a unique arraycollection which is bindable. When the window is first displayed there are 3 of the combobox firlds that do not display the text from the drop down list even though the value has been loaded correctly. As soon as I click on one of them, they all display correctly. From that point on while using the window they all work correctly as well.
Re: [flexcoders] Re: e4x Strings?
The only way I could make this work is using an external 3rd party library. I am using http://code.google.com/p/xpath-as3. It works but is noticeably slow on datasets exceeding 1000 rows. Sorry to hijack this.. but if you have specific use-cases which you think should perform better, could you post them to the xpath-as3 google group, and we'll try to address it. Thanks, Peter
RE: [flexcoders] Change Timezone
Whoops, sorry. Should have been: var utcH:Number = -5;// New York: EST Regards, -Keith http://keithreinfeld.home.comcast.net http://keithreinfeld.home.comcast.net/ _ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Keith Reinfeld Sent: Wednesday, December 10, 2008 1:07 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Change Timezone Pratik, I would like to know if there is any way to dynamically change the timezone in flex. Not literally, no. Say suppose we have local time and few check boxes to see time in other timezones. When you check and uncheck the check box the time changes according to the selected timezone. This would not depend on the location of the persons timezone. So persons local timezone may be PST but he wants to see the data in EST. To calculate the time elsewhere you have to factor-in the local machine's timezone offset value. I worked out the following for my World Clock last year: snip // Local Time var lDate:Date = new Date(); // Elsewhere Time var utcH:Number = -8;// New York: EST var utcM:Number = 0; var wDate:Date = new Date(lDate.getTime() + (lDate.getTimezoneOffset() * 1000 * 60) + (utcH * 1000 * 60 * 60) + (utcM * 1000 * 60)); trace(wDate = +wDate); /snip Note: The GMT value in the trace will still reflect the local machine's timezone. Just ignore it. The important data are the time and date. Going forward you will want to consider the issues presented by Daylight Saving Time: Does the locale of the local machine observe DST? Is the locale of the local machine currently in DST? Do they observe DST in the designated Elsewhere? Is the designated Elsewhere currently in DST? Regards, -Keith http://keithreinfeld.home.comcast.net http://keithreinfeld.home.comcast.net/ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of pratikshah83 Sent: Tuesday, December 09, 2008 7:15 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Change Timezone Hi Guys, I would like to know if there is any way to dynamically change the timezone in flex. Say suppose we have local time and few check boxes to see time in other timezones. When you check and uncheck the check box the time changes according to the selected timezone. This would not depend on the location of the persons timezone. So persons local timezone may be PST but he wants to see the data in EST. There is the timezoneoffset method but that just gives you the offset of local timezone with respect to UTC. I hope my issue is clear. Any help would be appreciated. Thanks Pratik attachment: winmail.dat
[flexcoders] Re: Flex training
I blogged about my Flex certification exam over here: http://yakovfain.javadevelopersjournal.com/fresh_notes_after_taking_flex_certification_exam.htm HTH Yakov --- In flexcoders@yahoogroups.com, ivo [EMAIL PROTECTED] wrote: Would people recommend taking the Certification Exam from Adobe? From what I hear and looking at the sample questions an experienced dev should ace it without much trouble. I wonder if it is worth the expense and whether its known enough that noting it on a resume carries weight. Thanks, - Ivo From: Anthony DeBonis [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Wednesday, December 10, 2008 2:04:16 PM Subject: [flexcoders] Re: Flex training If you have a group I would recommend an Adobe Training Class If 1-2 people a custom class/mentoring works great. Farata Systems is a good call in NYC Troy Web Consulting - Albany NY Certified Adobe Instructors + Mentoring This link can help you find a training partner http://partners. adobe.com/ public/partnerfi nder/tp/show_ find.do
[flexcoders] HTTPService and response headers
This topic has probably been beaten to death, but I want to make sure I'm not missing something before writing a new service. Looking through the API docs and Google it seems the only way to access response headers is to use a proxy. Is this still the case? thanks -Ricky
Re: [flexcoders] Re: speed of the for each looping
Could you clarify this? Does this non-guarantee apply to numerically indexed arrays and ArrayCollections too? Or just to associative arrays and object properties? The docs imply that the order is maintained by for...in with numerically indexed arrays. It would be a big change if that were not the case. Cheers Dave On 10 Dec 2008, at 23:00, Gordon Smith wrote: So don't use for..in or for each… in if you care about the enumeration order. It could very possibly change in future versions of the Flash Player. nbs ! p; Gordon Smith Adobe Flex SDK
[flexcoders] Re: Defining non closable closable tabs in super tab navigator
Have you seen SuperTabNavigator in Flexlib (http://code.google.com/p/flexlib/) --- In flexcoders@yahoogroups.com, lolr3a [EMAIL PROTECTED] wrote: Hi, Does anyone know how to create a supertabnavigator with BOTH closeable and non-closeable tabs? I only see an option to define that for all the tabs together. Thanks
[flexcoders] Re: Cannot Tab to MovieClips from Flash SWF Loaded with SWFLoader
Repost: Sent similar reply yesterday, but it didn't make it here for some reason. Alex, serious thanks for your help. I got the problem solved a different way, but you pointing me at the IFocus* classes provided it. Basically, I rolled my own FocusManager to be a sort of Hybrid -- it functions normally most of the time, but it's addFocusables() method was altered to be public and to have specific methodology for handling UIMovieClip classes originating in an SWFLoader. In the main MXML file I removed and deactivated the default FocusManager from the application and the systemmanager, Inserted mine in both places, and activated it. I also had to roll my own UIMovieClip class and downloaded the source to the Flex Component Kit classes to do it. I then wrote a bit of JSFL that adds my custom UIMovieClip class as the Base Class for all MC's in the Library. I also subclassed the SWFLoader to pull MovieClips from the loaded SWF (based on their AccessibilityProperties) and add them to my FocusManager on onLoad, and remove them onUnload. So far so good. It's going to take a ton of tweaking to get the Flash to behave similarly to the Flex controls -- and I haven't even partially addressed the accessibility yet. Thanks for the point in the right direction!
Re: [flexcoders] Flex/flash and Firefox 3.0.x performance
On Friday 05 Dec 2008, schneiderjim wrote: then doing nothing, the firefox 3.0.x process sits at about 40% CPU usage. Doing the same with Firefox 2.0.0.18 and the firefox process goes back down to 0% - 2% CPU usage ... more like I'd expect. Does this happen when using a clean FireFox profile ? -- Tom Chiverton Helping to globally disseminate killer strategic convergence 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 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] LCDS - Handling client disconnection on the server
Hi, I have a Data Management Service running on my Livecycle server. I have a managed array collection of Users. When a client disconnects (he closes the application or his browser or his internet connexion is lost), I want the client's user to be removed from the managed array collection of Users. Is there a reliable way for the server to detect that a client is disconnected ? I don't want to rely on the Application.onDisconnect event of the Flex application... Kind regards, Bart
[flexcoders] Adobe AIR 1.5 great review on InfoWorld
InfoWorld has given a 9.3/10 (Excellent) rating to AIR 1.5 in a very nice review: http://www.infoworld.com/article/08/12/11/50TC-adobe-air_1.html?source=NLC-DAILYcgd=2008-12-11
[flexcoders] Re: Defining non closable closable tabs in super tab navigator
valdhor thanks for the reply but you didn't really read my question... I AM using *super tab navigator*. I need to be able to make both closeable AND non-closeable tabs in the same navigator... --- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote: Have you seen SuperTabNavigator in Flexlib (http://code.google.com/p/flexlib/) --- In flexcoders@yahoogroups.com, lolr3a tzahi_elhay@ wrote: Hi, Does anyone know how to create a supertabnavigator with BOTH closeable and non-closeable tabs? I only see an option to define that for all the tabs together. Thanks
[flexcoders] How to call Flex function in Flash file?
I embed a swf in Flex, Do you think if it is possible for the Flash swf can access Flex function? How to do this with as3 in flash and flex? Thanks Mark
[flexcoders] Re: Combobox text does not render on some
Something's not done correctly. Post some code. -TH --- In flexcoders@yahoogroups.com, darylgmyers [EMAIL PROTECTED] wrote: I have form window with about 20 combobox fields. Each one is bound to a unique arraycollection which is bindable. When the window is first displayed there are 3 of the combobox firlds that do not display the text from the drop down list even though the value has been loaded correctly. As soon as I click on one of them, they all display correctly. From that point on while using the window they all work correctly as well.
[flexcoders] Re: Flex training
--- In flexcoders@yahoogroups.com, Aaron Hardy [EMAIL PROTECTED] wrote: If you have solid experience in developing a variety of Flex applications, you should be able to pass with little studying. I recently took it and felt it was worth my time. For any company specifically looking for Flex developers, they should be aware of the certification. While it may not boost your credibility a ton, if it comes down to two people that have very similar credentials but one has the certification, it can definitely help. The fact that the certification is published by Adobe helps too. If Adobe says you're a certified expert, anyone questioning your expertise (potential employers) will have a more difficult time doing so. That's my take. If you're interested in study material for the exam, feel free to read: http://aaronhardy.com/flex/adobe-flex-certification-study-materials/ Does anyone know how this is scored? For instance, in the SAT (Scholastic Aptitude Test), there is a penalty for guessing in that a certain percentage of the questions you guessed wrong is subtracted from the ones you guessed right. So if you completely don't know the answer on the SAT, you're better off not even trying the question than getting it wrong. Is there any information on how guessing affects your score in the certification exam? Thanks; Amy
[flexcoders] Re: Defining non closable closable tabs in super tab navigator
OK So, have you read the documentation (http://flexlib.googlecode.com/svn/trunk/docs/flexlib/containers/SuperTabNavigator.html) and taken a look at the code sample for the SuperTabNavigator? In the example code there is... setClosePolicyForTab(0, SuperTab.CLOSE_NEVER); There is also... // Always Show Close Button setClosePolicyForTab(0, SuperTab.CLOSE_ALWAYS); and... // Only Show Close Button on Currently Selected Tab setClosePolicyForTab(0, SuperTab.CLOSE_SELECTED); HTH Steve --- In flexcoders@yahoogroups.com, lolr3a [EMAIL PROTECTED] wrote: valdhor thanks for the reply but you didn't really read my question... I AM using *super tab navigator*. I need to be able to make both closeable AND non-closeable tabs in the same navigator... --- In flexcoders@yahoogroups.com, valdhor valdhorlists@ wrote: Have you seen SuperTabNavigator in Flexlib (http://code.google.com/p/flexlib/) --- In flexcoders@yahoogroups.com, lolr3a tzahi_elhay@ wrote: Hi, Does anyone know how to create a supertabnavigator with BOTH closeable and non-closeable tabs? I only see an option to define that for all the tabs together. Thanks
[flexcoders] Flex Certification for Flex 3
Does anyone know if Adobe is going to update the Flex Certification exam for Flex to 3? With Flex 4 on the radar it seems a little late but better than nothing.
Re: [flexcoders] Bring Alert in front of DownloadProgressBar
To hide the progress bar you should override the progress handler with an empty function (or add your own code to show the progress). Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com On Wed, Dec 10, 2008 at 9:23 AM, ilikeflex [EMAIL PROTECTED] wrote: Hi I am using the preloader in my application. I have override the below method. // Define the event listeners for the preloader events. override public function set preloader(preloader:Sprite):void { preloader.addEventListener (FlexEvent.INIT_COMPLETE,myHandleInitEnd); } // Event listeners for the FlexEvent.INIT_COMPLETE event. private function myHandleInitEnd(event:Event):void { Alert.show(Yahooo); } I want this Alert should come in front of DownloadProgressBar. If i run above code then Alert is hidden behind the DownloadProgressBar. Secondly if we can hide the DownloadProgressBar that will be awesome. Any pointers will be highly appeciated. I tried using visible=false but it does not work. Thanks ilikelfex
[flexcoders] Re: Best practice for calling asynchronous functions?
--- In flexcoders@yahoogroups.com, Mark Carter [EMAIL PROTECTED] wrote: Thanks for all the responses. I hadn't really looked into the ASyncToken until now. However, for me it seems that using the ASyncToken would be limited to the implementation of the, for example, save(XML, Function, Function) method. The calling code doesn't need to know about it. Right. The calling code doesn't need to do anything different. The change is inside your method. Here's an example: /* Execute method. If calling object passes in result and fault handlers, those are used. Otherwise, the defaults are used. */ public static function execute(categoryID:int=-1, searchString:String=null, resultHandler:Function=null, faultHandler:Function=null):void{ if (_channels.channels.length==0) { throw new Error('No endpoint specified for GetCategories command Remote Object'); } //set up remote object _ro.channelSet=_channels; _ro.destination = 'AMF_Category'; _ro.source = 'AMF_Category'; //set up a token so we can tell the result of this call from other calls var token:AsyncToken=_ro.getServicesCount (categoryID-1?categoryID: null, searchString); //assign the result and fault handlers from the calling object token.addResponder(new Responder(! (resultHandler==null)?resultHandler:countLoaded, ! (faultHandler==null)? faultHandler: loadFailed)); } /* trace out the return since we don't know where to put it */ private static function countLoaded (e:ResultEvent):void{ trace(e.result.toString() + ' profiles'); } private static function loadFailed(e:FaultEvent):void{ trace(e.fault); } In my opinion this is neater than something like: var asyncToken:ASyncToken = save(xml); asyncToken.addResponder(... Suit yourself. You weren't satisfied with what you were using. I offered an alternative. Also, I don't like adding responders after the call has been made. I know it works, but still... Me neither. I'm not sure why they built it this way, but unfortunately that's what we have. Just don't dispatch an event in between LOL. Maybe I should start a new topic for this next question, but... ...in my implementation, I create a new HTTPService for each call. Any ideas how (in)efficient this is? I'm thinking it's pretty bad. As you can imagine, it keeps the implementation much simpler. No need for the ASyncToken. Just add new listeners each time a call is made. Everything is garbage collected. Oh, hang on, what keeps a reference to the HTTPService? Good question. What did you do with all the old eventListeners you were complaining about in your original post?
Re: [flexcoders] ping from flash
On Friday 05 Dec 2008, flexaustin wrote: Is it possible to do a ping or rdp from Flash? No. You can use (Java) wrappers around Flex to invoke native commands, however. -- Tom Chiverton Helping to enormously synthesize frictionless end-to-end turn-key schemas 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 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 * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
Re: [flexcoders] Some questions
On Friday 05 Dec 2008, Olivier Ziller wrote: is it possible, with flex, to drive a card reader? i mean reading and writing to a mifare card? if not possible with flex, is it with air? Assuming a Mifare card doesn't just appear as a filesystem in the O/S; Flex - no, it's inside the browser sandbox. AIR, maybe, but you'll need a wrapper to execute native executables. for business applications, how do you handle all printing needs? we will use a java backend (blazeds) so is it the best to generate pdf on the server side? We do that, yup but using ColdFusion for the PDF stuff. The UJAX stuff is fairly good for pure-Java stuff. i've read that file upload is not working on firefox when using https. If true, it's a big issue. Could you confirm this problem? It works fine, but it doesn't pass along any session tokens. There are several work arounds. Check the bug out on bugs.adobe.com. -- Tom Chiverton Helping to enormously leverage supply-chains 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] LCDS - Handling client disconnection on the server
On the server, you can listen for session disconnect events. Probably the best intro to this is Seth's blog posting: http://greetingsfromoakland.blogspot.com/2008/11/post-max.html Jeff From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Besite - Bart Sent: Thursday, December 11, 2008 7:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS - Handling client disconnection on the server Hi, I have a Data Management Service running on my Livecycle server. I have a managed array collection of Users. When a client disconnects (he closes the application or his browser or his internet connexion is lost), I want the client's user to be removed from the managed array collection of Users. Is there a reliable way for the server to detect that a client is disconnected ? I don't want to rely on the Application.onDisconnect event of the Flex application... Kind regards, Bart inline: image001.jpginline: image002.jpg
RE: [flexcoders] Re: Best practice for calling asynchronous functions?
...adding responders after the call has been made... That is not actually what happens. The call is not made at that line, just set up. I recall reading a fuller explanation, but didn't follow the internals well enough to repeat it. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Thursday, December 11, 2008 11:47 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Best practice for calling asynchronous functions? --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Mark Carter [EMAIL PROTECTED] wrote: Thanks for all the responses. I hadn't really looked into the ASyncToken until now. However, for me it seems that using the ASyncToken would be limited to the implementation of the, for example, save(XML, Function, Function) method. The calling code doesn't need to know about it. Right. The calling code doesn't need to do anything different. The change is inside your method. Here's an example: /* Execute method. If calling object passes in result and fault handlers, those are used. Otherwise, the defaults are used. */ public static function execute(categoryID:int=-1, searchString:String=null, resultHandler:Function=null, faultHandler:Function=null):void{ if (_channels.channels.length==0) { throw new Error('No endpoint specified for GetCategories command Remote Object'); } //set up remote object _ro.channelSet=_channels; _ro.destination = 'AMF_Category'; _ro.source = 'AMF_Category'; //set up a token so we can tell the result of this call from other calls var token:AsyncToken=_ro.getServicesCount (categoryID-1?categoryID: null, searchString); //assign the result and fault handlers from the calling object token.addResponder(new Responder(! (resultHandler==null)?resultHandler:countLoaded, ! (faultHandler==null)? faultHandler: loadFailed)); } /* trace out the return since we don't know where to put it */ private static function countLoaded (e:ResultEvent):void{ trace(e.result.toString() + ' profiles'); } private static function loadFailed(e:FaultEvent):void{ trace(e.fault); } In my opinion this is neater than something like: var asyncToken:ASyncToken = save(xml); asyncToken.addResponder(... Suit yourself. You weren't satisfied with what you were using. I offered an alternative. Also, I don't like adding responders after the call has been made. I know it works, but still... Me neither. I'm not sure why they built it this way, but unfortunately that's what we have. Just don't dispatch an event in between LOL. Maybe I should start a new topic for this next question, but... ...in my implementation, I create a new HTTPService for each call. Any ideas how (in)efficient this is? I'm thinking it's pretty bad. As you can imagine, it keeps the implementation much simpler. No need for the ASyncToken. Just add new listeners each time a call is made. Everything is garbage collected. Oh, hang on, what keeps a reference to the HTTPService? Good question. What did you do with all the old eventListeners you were complaining about in your original post?
[flexcoders] SWFLoader runtime error?
Hi, This is the code mx:SWFLoader id=mySWFLoader bottom=10 left=10 source=asset/ffTalkSimpleSwf.swf / This is the error message Error #2044: Unhandled securityError:. text=Error #2140: Security sandbox violation: file:///D:/WORKSPACE/Flex Builder 3/FFTest1/bin-debug/FF_Talk_Simple.swf cannot load file:///D:/WORKSPACE/Flex Builder 3/FFTest1/bin-debug/asset/ffTalkSimpleSwf.swf. Local-with-filesystem and local-with-networking SWF files cannot load each other. Please give me a idea to fix this. Thanks Mark
[flexcoders] can you truncate a multiline TextArea?
does anyone know of an existing component that can truncate multiline text? I'm looking to either use an already made one, or create my own multiline TextArea and be able to truncate when the textHeight reaches more than the set height of the component. So far I haven't been able to get a correct height for it, I keep getting a much larger height than it actually is because the textHeight reflects the size of the htmlText, even though I'm only setting text, not htmlText on it. Is there a way to get a more accurate textHeight?
Re: [flexcoders] Some questions
Also check out Merapi (http://www.merapiproject.net/), If you're using AIR, it can give you the extra control you need. Cheers, Nate On Thu, Dec 11, 2008 at 8:54 AM, Tom Chiverton [EMAIL PROTECTED] wrote: On Friday 05 Dec 2008, Olivier Ziller wrote: is it possible, with flex, to drive a card reader? i mean reading and writing to a mifare card? if not possible with flex, is it with air? Assuming a Mifare card doesn't just appear as a filesystem in the O/S; Flex - no, it's inside the browser sandbox. AIR, maybe, but you'll need a wrapper to execute native executables. for business applications, how do you handle all printing needs? we will use a java backend (blazeds) so is it the best to generate pdf on the server side? We do that, yup but using ColdFusion for the PDF stuff. The UJAX stuff is fairly good for pure-Java stuff. i've read that file upload is not working on firefox when using https. If true, it's a big issue. Could you confirm this problem? It works fine, but it doesn't pass along any session tokens. There are several work arounds. Check the bug out on bugs.adobe.com. -- Tom Chiverton Helping to enormously leverage supply-chains 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: SWFLoader runtime error?
fixed.Thanks
RE: [flexcoders] txtbx focus at login
In my template I put this line in the body tag: onLoad=window.document.${application}.focus(); That works in IE but I can't get FF(3.0.4) to work. One of the link I listed in an earlier post suggested adding this line to get FF to play nice as FF has a known issue with the embed tag: param name=wmode value=opaque / and embed ... wmode=opaque .../embed But none of this is working with FF. I may have to let this go and thank my lucky stars my clients are all internal and most of them use IE! Thanks for all the support. -Robert --- On Fri, 12/5/08, Tracy Spratt [EMAIL PROTECTED] wrote: From: Tracy Spratt [EMAIL PROTECTED] Subject: RE: [flexcoders] txtbx focus at login To: flexcoders@yahoogroups.com Date: Friday, December 5, 2008, 6:23 PM This works in IE: window.onload = setFocusOnLoad; function setFocusOnLoad(){ ${swf}.focus(); } From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com ] On Behalf Of Robert Byrne Sent: Friday, December 05, 2008 4:34 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] txtbx focus at login I'm looking into this now, but won't get back to it for a while: http://www.igorcost a.org/?p= 179 There also a bit about it here: http://www.htmlforu ms.com/archive/ index.php/ t-64150.html Thanks for the pointers. -Robert --- On Fri, 12/5/08, Tracy Spratt [EMAIL PROTECTED] com wrote: From: Tracy Spratt [EMAIL PROTECTED] com Subject: RE: [flexcoders] txtbx focus at login To: [EMAIL PROTECTED] ups.com Date: Friday, December 5, 2008, 3:35 PM This is because the Flash Player instance itself (Object/Embed tag) does not have the focus in the Browser. There is a bit of javascript code that will set the focus, but last I heard it only works in IE. I can find that script if it would be useful. Tracy From: [EMAIL PROTECTED] ups.com [mailto: [EMAIL PROTECTED] ups.com ] On Behalf Of Robert Byrne Sent: Friday, December 05, 2008 1:25 PM To: [EMAIL PROTECTED] ups.com Subject: [flexcoders] txtbx focus at login This is a bit odd. When I first open the application, the focus IS set on the login txtbx but when I start typing nothing happens. If I tab to the password txtbx I can type. If I tab back to the login, I can type. If I click anywhere on the flex app, not just in the login txtbx, I can type. I know the focus is on the login txtbx because there is an orange box around it. When tabbing to the password, the orange box moves to the password. I tried setting focus to the flash object in the html wrapper within a window.onload event using both focus() and click(). Nothing. Any ideas? Thanks - Robert. Here's some code: MXML: mx:Label text=@Resource( key='loginId' , bundle='Labels' ) fontWeight= bold width=60 / mx:TextInput id=usernameInput width=140 / AS: override protected function init():void{ super.init() ; this.logger. debug(init ); this.loginForm. defaultButton = this.loginButton; this.usernameInput. setFocus( ); }
RE: [flexcoders] Best practice for calling asynchronous functions?
I haven't been following this thread, but the sample code below can actually be shortened to something like this: save(xml).addResponder(new AsyncResponder(handleResult, handleFault)); No AsyncToken in the code and rather than new'ing the responder, if you always want to direct results/faults to a consistent pair of handler functions you could set up the AsyncResponder earlier and just pass in a ref. save(xml).addResponder(saveResponder); The only reason to actually get a ref to the returned AsyncToken is if you want to add some dynamic properties to it that will help drive your handling of the eventual async result/fault (the token - and any custom state you've tagged it with - is accessible within your result/fault callbacks when they execute). But for scenarios like that where I want to hang onto some data from the call site, I often find it simpler to take advantage of the variable/scope capture that a closure provides by defining my result/fault callbacks as inline lambda functions rather than manually capturing state by copying a portion of it into properties of the AsyncToken. So something like: save(xml).addResponder(new AsyncResponder( function(... , // inline result handler function function(... // inline fault handler function )); Rather than new'ing an HTTPService for every call you make and trying to manage adding/removing event listeners (which will prevent instances from being GC'ed) in your wrapper I'd recommend just following the first convention I list above for each call: someMethod(args).addResponder(new AsyncResponder(handleResult, handleFault)); Best, Seth From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Carter Sent: Wednesday, December 10, 2008 7:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Best practice for calling asynchronous functions? Thanks for all the responses. I hadn't really looked into the ASyncToken until now. However, for me it seems that using the ASyncToken would be limited to the implementation of the, for example, save(XML, Function, Function) method. The calling code doesn't need to know about it. In my opinion this is neater than something like: var asyncToken:ASyncToken = save(xml); asyncToken.addResponder(... Also, I don't like adding responders after the call has been made. I know it works, but still... Maybe I should start a new topic for this next question, but... ...in my implementation, I create a new HTTPService for each call. Any ideas how (in)efficient this is? As you can imagine, it keeps the implementation much simpler. No need for the ASyncToken. Just add new listeners each time a call is made. Everything is garbage collected. Oh, hang on, what keeps a reference to the HTTPService? -- View this message in context: http://www.nabble.com/Best-practice-for-calling-asynchronous-functions--tp20930596p20948799.html Sent from the FlexCoders mailing list archive at Nabble.com.
RE: [flexcoders] txtbx focus at login
Last I heard, this was not possible in FF. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Robert Byrne Sent: Thursday, December 11, 2008 12:53 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] txtbx focus at login In my template I put this line in the body tag: onLoad=window.document.${application}.focus(); That works in IE but I can't get FF(3.0.4) to work. One of the link I listed in an earlier post suggested adding this line to get FF to play nice as FF has a known issue with the embed tag: param name=wmode value=opaque / and embed ... wmode=opaque .../embed But none of this is working with FF. I may have to let this go and thank my lucky stars my clients are all internal and most of them use IE! Thanks for all the support. -Robert --- On Fri, 12/5/08, Tracy Spratt tspr...@lariatinc.com wrote: From: Tracy Spratt tspr...@lariatinc.com Subject: RE: [flexcoders] txtbx focus at login To: flexcoders@yahoogroups.com Date: Friday, December 5, 2008, 6:23 PM This works in IE: window.onload = setFocusOnLoad; function setFocusOnLoad(){ ${swf}.focus(); } From: flexcoders@yahoogroups.com [mailto: flexcoders@yahoogroups.com ] On Behalf Of Robert Byrne Sent: Friday, December 05, 2008 4:34 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] txtbx focus at login I'm looking into this now, but won't get back to it for a while: http://www.igorcost a.org/?p= 179 There also a bit about it here: http://www.htmlforu ms.com/archive/ index.php/ t-64150.html Thanks for the pointers. -Robert --- On Fri, 12/5/08, Tracy Spratt tspr...@lariatinc. com wrote: From: Tracy Spratt tspr...@lariatinc. com Subject: RE: [flexcoders] txtbx focus at login To: flexcod...@yahoogro ups.com Date: Friday, December 5, 2008, 3:35 PM This is because the Flash Player instance itself (Object/Embed tag) does not have the focus in the Browser. There is a bit of javascript code that will set the focus, but last I heard it only works in IE. I can find that script if it would be useful. Tracy From: flexcod...@yahoogro ups.com [mailto: flexcod...@yahoogro ups.com ] On Behalf Of Robert Byrne Sent: Friday, December 05, 2008 1:25 PM To: flexcod...@yahoogro ups.com Subject: [flexcoders] txtbx focus at login This is a bit odd. When I first open the application, the focus IS set on the login txtbx but when I start typing nothing happens. If I tab to the password txtbx I can type. If I tab back to the login, I can type. If I click anywhere on the flex app, not just in the login txtbx, I can type. I know the focus is on the login txtbx because there is an orange box around it. When tabbing to the password, the orange box moves to the password. I tried setting focus to the flash object in the html wrapper within a window.onload event using both focus() and click(). Nothing. Any ideas? Thanks - Robert. Here's some code: MXML: mx:Label text=@Resource( key='loginId' , bundle='Labels' ) fontWeight= bold width=60 / mx:TextInput id=usernameInput width=140 / AS: override protected function init():void{ super.init() ; this.logger. debug(init ); this.loginForm. defaultButton = this.loginButton; this.usernameInput. setFocus( ); }
RE: [flexcoders] RE: services-config.xml: compc or just mxmlc?
I think what I'm really asking is when does the services-config.xml metadata get baked into a .swf (or .swc)? When you compile with mxmlc and -services, a subset of your config is baked in the swf. It looks like compc doesn't complain about a -services option, although the 'baked in' aspect of this is code-gen'ed into the generated Flex init code. I don't know whether any of that is generated for a swc, but feel free to give it a try. You could test by compiling a swc with -services, then building a swf (including this swc) without -services and checking for baked in config. The baked in subset of config ends up living here at runtime: mx.messaging.config.ServerConfig#xml If you change services-config.xml, you should recompile the artifact that it's baked into. Avoid compiling it into multiple artifacts. After changes to [RemoteClass]'s you should recompile the respective artifacts they live in. With your componentization all being a compile time concern here, it seems to me like you could get this all to work. Good luck :) Best, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Wednesday, December 10, 2008 9:56 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RE: services-config.xml: compc or just mxmlc? Seth, Thanks--this is really handy. But I think what I was asking is a little simpler: there are no modules (in the Flex sense of the word) here. I'm essentially just interested in building a main app and being able to extend it after-the-fact with an add-on that gets compiled into a single .swf application. That is: main app: src/index.mxml (the Application, but only a wrapper around Main.mxml) src/Main.mxml (the actual brains of the app) src/util1.as src/util2.as services-config.xml gets compiled into foo.swf (the default app) *and (separately) foo.swc (a library which includes all the classes compiled from the above sources except index.mxml) later on, someone else (with access to index.mxml, services-config.xml, and foo.swc, but not the sources, wants to extend this): extended version: src/index.mxml (same as above, but now modified to reference Extended.mxml) src/Extended.mxml src/util3.as lib/foo.swc (from above) services-config.xml (from above) this gets compiled into super-foo.swf (the extended app) Suppose that the extended version does not even change services-config.xml or add any objects with [RemoteAlias] metadata. Do I need to reference services-config.xml when (1) building the original foo.swc (2) building the super-foo.swf (3) both ? And if I do extend services-config.xml or add new [RemoteAlias] objects to the extended version, does the answer to the above change (obviously, it has to be at least 2 or 3)? I think what I'm really asking is when does the services-config.xml metadata get baked into a .swf (or .swc)? -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Seth Hodgson shodg...@adobe.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: [flexcoders] RE: services-config.xml: compc or just mxmlc? Date: Tue, 9 Dec 2008 09:43:18 -0800 Hi Maciek, I don't have any practical experience with attempting to compile service config and associated classes into modules and I don't know whether compc would support it or not, but based on some informal discussions with Alex and Jeff I wouldn't recommend it. The core issue is that AMF serialization mappings (client to server class aliases) within Flash Player aren't scoped per module or even app domain as loaded classes are - unfortunately they're scoped to a security domain (broader scope). This means that if the root swf loads two or more modules (each will be loaded in its own child ApplicationDomain by default), where these modules bake in overlapping sets of classes that use [RemoteClass] metadata things won't work. The modules will effectively trample each other's registered class aliases to point to their respective local classes. Say you have a class Foo ([RemoteClass(alias=com.Foo)]), that you've compiled into both modules. You now have two separate class defs on the client (one per module/sub app domain), but only one alias registered (scoped to the security domain both of these app domains belong to). When the loosing module receives a Foo off the network it will fail to deserialize correctly because the alias mapping points to the class def in the other module, which this module doesn't have access to. I think the best approach for now is to place your service config and all shared classes with [RemoteClass] metadata into your root swf, and then expose this to your modules through a controlled API - say a registry of network services or operations the modules can use. You may be able to get away with keeping non-shared classes with [RemoteClass] metadata in specific modules, but I haven't tried that. Best, Seth From:
[flexcoders] Error 2032, but only in IE with php session_start
Hi, I have an app that makes http requests to a php script on the server. If I have session_start() in the back end file so I can use session variables in php, I get the following error: [RPC Fault faultString=HTTP request error faultCode=Server.Error.Request faultDetail=Error: [IOErrorEvent type=ioError bubbles=false cancelable=false eventPhase=2 text=Error #2032]. URL: https://path.to/my/file.php;] But only when I use Internet Explorer. If I use Firefox, it all works beautifully. If I rem out the session_start() line in the php script it works fine, so I can confirm that that is the line that is causing the error. Has anyone seen this? Here's my goal. I have an app that plays videos and users aren't supposed to be able to download the video easily. The very popular firefox plugin Video DownloadHelper can see the mp4 files (but not the flv files for some reason) and download them. I use a php file to read the contents of the videos from a non-web accessible folder. I want to use mp4. What I did was to set a php session variable when the user selects the file from the combobox, then immediately fetch the video. Right before it sends the video the php file unsets the session variable. This means that the user has to use my combobox to see the file, because it is the only thing that can set the session variable and the variable is destroyed as the file is sent. This is only meant to stop casual copying. Our faculty is aware that there's always a way to capture the video. Any ideas? Thanks, Bob
RE: [flexcoders] LCDS - Handling client disconnection on the server
When you unplug the network cable the client may not get a disconnect event from the networking layer until it tries to use that connection to send a request to the server.You might need a heartbeat ping which runs periodically to test the connection to force that close event. Also, if you are on 2.5.1 you might need a hotfix as there was a bug where a client who disconnects, then reconnects again immediately before the session expires was not getting resubscribed properly.That is fixed in 2.6 and 2.6.1. Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Besite - Bart Sent: Thursday, December 11, 2008 9:36 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] LCDS - Handling client disconnection on the server Hi Jeff, I wil have a look at Seth's blog. This morning I tried the following : I have my Data Management Service. On the server I have an assember extending the AbstractAssembler and implementing the MessageClient interface. I bound messageClientCreated and messageClientDestroyed listeners to this class. This works fine and the messageClientDestroyed gets called when I log out or close my browser, but it is not called when I plug out my utp cable... do you know the solution for this ? Thanks in advance, Bart On the server, you can listen for session disconnect events. Probably the best intro to this is Seth's blog posting: http://greetingsfromoakland.blogspot.com/2008/11/post-max.html Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Besite - Bart Sent: Thursday, December 11, 2008 7:33 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] LCDS - Handling client disconnection on the server Hi, I have a Data Management Service running on my Livecycle server. I have a managed array collection of Users. When a client disconnects (he closes the application or his browser or his internet connexion is lost), I want the client's user to be removed from the managed array collection of Users. Is there a reliable way for the server to detect that a client is disconnected ? I don't want to rely on the Application.onDisconnect event of the Flex application... Kind regards, Bart inline: image001.jpginline: image002.jpg
[flexcoders] Re: Flex Certification for Flex 3
It already is http://www.adobe.com/devnet/flex/articles/flex_certification.html
Re: [flexcoders] can you truncate a multiline TextArea?
I would suggest extending the class by adding a property numLines to the textarea - that property would take its value from the textField.numLines, which is a protected property inside TextArea that represents the actual textField used to render text. Then you can call TextArea.getLineMetrics() and multiply it by the number of lines you got from numLines; This is just from the top of my head but this looks like a good solution to me. 2008/12/11 blc187 blc...@yahoo.com does anyone know of an existing component that can truncate multiline text? I'm looking to either use an already made one, or create my own multiline TextArea and be able to truncate when the textHeight reaches more than the set height of the component. So far I haven't been able to get a correct height for it, I keep getting a much larger height than it actually is because the textHeight reflects the size of the htmlText, even though I'm only setting text, not htmlText on it. Is there a way to get a more accurate textHeight?
[flexcoders] Re: Flex Certification for Flex 3
Doh! --- In flexcoders@yahoogroups.com, Anthony DeBonis anth...@... wrote: It already is http://www.adobe.com/devnet/flex/articles/flex_certification.html
[flexcoders] ToggleButtonBar (Padding Issue)
Hi, I was working on ToggleButtonBar and I wanted to move the label to the bottom of the button and it seems to be impossible... I tried using paddingBottom= 0, still it does not move . Can anyone please let me know if you have a solution for it ? Thanks, Kumar.
[flexcoders] AIR application installation Error #0
I am getting the Error #0 with installing an AIR application on Windows XP professional SP2. The AIR runtime is latest (i.e. version 1.5). Here's what happened, a previous install of the application was successful. After uninstalling using Add/Remove programs, the new version of the application was not installed due to Error #0 shown during install following error was logged in .airappinstall.log Error occurred; beginning rollback: [ErrorEvent type=error bubbles=false cancelable=false eventPhase=2 text=1603 errorID=0] After manually removing the registry entries for the application, a reinstall was attempted but it remains unsuccessful despite trying many times. I read through the posts related to this issue have made sure that the currently logged in user belongs to the Administrator group. Windows Event Viewer log shows the following, Date : 12/10/08 Source : MsiInstaller Time : 5:53:02 PMCategory : None Type : Error Event ID : 11714 User : D4M8\admin Computer : D4M8 Description : Product : SampleAIRApplication - Error 1714. The older version of SampleAIRApplication cannot be removed. Contact your technical support group. System error 1612. After this I tried to clean up the system registry with a registry cleaner tool, but it still doesn't install. Please help as this is happening on a customer machine I am unable to reproduce this inhouse. The contents of .airappinstall.log are attached. Thanks Aejaz Starting app install of file:///C:/Documents%20and%20Settings/admin/Desktop/New%20Folder/SampleAIRApplication/SampleAIRApplication/SampleAIRApplication.air UI SWF load is complete UI initialized Unpackaging to C:\Documents and Settings\admin\Local Settings\temp\fla66.tmp unpackaging is complete application is bound to side-by-side version 1.0 application is bound to this version of the runtime app id SampleAIRApplication pub id 31D0E4A8305D8249DE1F9377B612665B83A0EAEA.1 application not currently installed Waiting for user confirmation User confirmed action: install creating native installer in: C:\Documents and Settings\admin\Local Settings\temp\fla67.tmp native installer creation complete Starting install Destination for installed application is C:\Program Files Beginning install Installing C:\Documents and Settings\admin\Local Settings\temp\fla67.tmp\setup.msi Error occurred; beginning rollback: [ErrorEvent type=error bubbles=false cancelable=false eventPhase=2 text=1603 errorID=0] Rolling back install of C:\Documents and Settings\admin\Local Settings\temp\fla67.tmp\setup.msi Rollback due to error complete stateInstalling: [ErrorEvent type=error bubbles=false cancelable=false eventPhase=2 text=1603 errorID=0] starting cleanup of temporary files application installer exiting
RE: [flexcoders] Re: speed of the for each looping
Funny. I didn't realize we were talking about iterating arrays with for..in until just now. I don't think we do that in Flex code. If the docs say arrays will iterate via for..in in index order then I'd probably trust that, especially if you stuff your arrays in index order From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Dave Cragg Sent: Thursday, December 11, 2008 3:08 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: speed of the for each looping Could you clarify this? Does this non-guarantee apply to numerically indexed arrays and ArrayCollections too? Or just to associative arrays and object properties? The docs imply that the order is maintained by for...in with numerically indexed arrays. It would be a big change if that were not the case. Cheers Dave On 10 Dec 2008, at 23:00, Gordon Smith wrote: So don't use for..in or for each... in if you care about the enumeration order. It could very possibly change in future versions of the Flash Player. nbs! p; Gordon Smith Adobe Flex SDK
[flexcoders] Actionscript Time Components
Hello Everyone, I just released some simple open source components for entering dates and times. Hopefully, others will find them useful or even find reasons to improve them. I will be documenting them in the coming weeks. Feedback is welcome. Project URL: http://code.google.com/p/actionscriptdatetimelibrary/ Example Usage: http://actionscriptdatetimelibrary.googlepages.com/index.html SWC: http://actionscriptdatetimelibrary.googlecode.com/files/DateTimeLibrar y.swc Orville
[flexcoders] Re: Error 2032, but only in IE with php session_start
I use session_start() in my PHP files and it works fine (Although I use Remoting). Perhaps there is something else causing the problem that is masked by the removal of the session_start() ? To do what you want, could you perhaps use the referrer header? If the referrer is not your SWF then don't send the file. HTH Steve --- In flexcoders@yahoogroups.com, Ramsey, Robert L robert-ram...@... wrote: Hi, I have an app that makes http requests to a php script on the server. If I have session_start() in the back end file so I can use session variables in php, I get the following error: [RPC Fault faultString=HTTP request error faultCode=Server.Error.Request faultDetail=Error: [IOErrorEvent type=ioError bubbles=false cancelable=false eventPhase=2 text=Error #2032]. URL: https://path.to/my/file.php;] But only when I use Internet Explorer. If I use Firefox, it all works beautifully. If I rem out the session_start() line in the php script it works fine, so I can confirm that that is the line that is causing the error. Has anyone seen this? Here's my goal. I have an app that plays videos and users aren't supposed to be able to download the video easily. The very popular firefox plugin Video DownloadHelper can see the mp4 files (but not the flv files for some reason) and download them. I use a php file to read the contents of the videos from a non-web accessible folder. I want to use mp4. What I did was to set a php session variable when the user selects the file from the combobox, then immediately fetch the video. Right before it sends the video the php file unsets the session variable. This means that the user has to use my combobox to see the file, because it is the only thing that can set the session variable and the variable is destroyed as the file is sent. This is only meant to stop casual copying. Our faculty is aware that there's always a way to capture the video. Any ideas? Thanks, Bob
RE: [flexcoders] SpeedoMeter
I second that... what an absolutely brilliant component! From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Josh McDonald Sent: Friday, 12 December 2008 1:46 a.m. To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] SpeedoMeter http://form-function.blogspot.com/2008/04/gauge-component-v02.html -Josh On Thu, Dec 11, 2008 at 10:25 PM, sanjaypmg sanjay...@yahoo.co.ukmailto:sanjay...@yahoo.co.uk wrote: Hi All, I have create a speedometer in flex. Will you guys help me out to dig this well..? All suggestions are welcome... Thanks in Advance... Sanjay Sharma -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.commailto:j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
[flexcoders] Flex digital readout
Hi. Is there a digital (LED) readout component for Flex out there? Thanks.
[flexcoders] Connecting Flex 3 to ASP.NET Using LINQ
A friend of mine over at http://19Nates.com made a great post for beginners on how to connect flex 3 to ASP.NET. I would recommend it to anyone that wants to venture to .NET or anyone who just wants to learn some basics. http://www.cftips.net/post.cfm/connecting-flex-3-to-asp-net-using-linq
[flexcoders] Setting up and connecting a simple CSS file with Flex 3
I consider myself a developer with limited design skills. I decided this weekend that I wanted to change that by learning some simple design techniques for flex 3. Check out my blog post about setting up and connecting a simple CSS file with Flex 3. http://www.cftips.net/post.cfm/setting-up-and-connecting-a-simple-css-file-with-flex-3
[flexcoders] One computer unable to connect to XMLSocket server
I've coded a custom socket server in PHP, finished it and passed it off to the client, but there's on guy (the PM, actually) who can never pass data back and forth. From his side, Flash says he's connected, but he never gets the accepted message back from the server, and the server never shows any indication that he ever did connect. He is able to send messages without error, but the server never picks them up. I've uploaded a test app and have the server running at - http://tinyurl.com/6ezacj Does it work for everyone else? You should get all green checkmarks (just click continue if you get an RTE on the ping step). If it breaks, it will spin forever on the ping step. Anyone know why his one computer might be having problems? Thanks! ~sean
[flexcoders] Re: One computer unable to connect to XMLSocket server
Some code: http://pastie.textmate.org/337070 - the base client class http://pastie.textmate.org/337071 - the base server class (there are several helping classes not shown)
RE: [flexcoders] Re: One computer unable to connect to XMLSocket server
I get a big X mark when clicking connect to server on both firefox and opera Heres the log: Connect to Server [X] [Error] Error #2048 Connect to Server [ ] Create Socket Connection [√] Creating on sockets.rapidintake.com:80 Create Socket Connection [ ] From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of seanclarkhess Sent: Friday, 12 December 2008 9:20 a.m. To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: One computer unable to connect to XMLSocket server Some code: http://pastie.textmate.org/337070 - the base client class http://pastie.textmate.org/337071 - the base server class (there are several helping classes not shown)
[flexcoders] what is the minimum version of FP supported by flex 3.2?
Will flex 3.2 apps run in FP 9.0.115, or do they require 9.0.124, anyone know? Jeff Tapper» Senior Consultant digital primates IT Consulting Group ® Phone: 847.824.7800, x222 | Fax: 847.655.2867 jtap...@digitalprimates.net
Re: [flexcoders] One computer unable to connect to XMLSocket server
Works here in both 9.0.124.0 on Ubuntu 8.04 and 10.0.12.36 on Ubuntu 8.10. Hope this helps. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: seanclarkhess seanh...@gmail.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com Subject: [flexcoders] One computer unable to connect to XMLSocket server Date: Thu, 11 Dec 2008 20:10:57 - I've coded a custom socket server in PHP, finished it and passed it off to the client, but there's on guy (the PM, actually) who can never pass data back and forth. From his side, Flash says he's connected, but he never gets the accepted message back from the server, and the server never shows any indication that he ever did connect. He is able to send messages without error, but the server never picks them up. I've uploaded a test app and have the server running at - http://tinyurl.com/6ezacj Does it work for everyone else? You should get all green checkmarks (just click continue if you get an RTE on the ping step). If it breaks, it will spin forever on the ping step. Anyone know why his one computer might be having problems? Thanks! ~sean
[flexcoders] Am i high?
or does it seem sometimes that flex4 (using 3.2 sdk) doesn't always recompile? Anybody noticed this, I'm on a mac. Thanks, Patrick
[flexcoders] ComboBox SelectedItem Problem with resultFormat e4x - Very Urgent
Hi I have an Flex file (.mxml) in which i am making the HTTPService call to one JSP. This JSP returns me an XML data. I need to populate the comboBox in the FLEX with the data coming from the JSP in XML format. This is the sample code. test.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% backgroundColor=#FF creationComplete=srv.send() layout=absolute mx:HTTPService id=srv url=../test/test.jsp resultFormat=e4x result = resultHandler(event) fault=faultHandler(event) method=POST /mx:HTTPService mx:ComboBox id=comboBox width=200 labelField=@label dataProvider={srv.lastResult.company} change=changed()/ /mx:Application mx:Script ![CDATA[ import mx.controls.Alert; private function resultHandler(event:Event):void{ Alert.show(In Result); private function faultHandler(event:Event):void{ Alert.show(event.toString()); } } private function changed():void{ Alert.show(comboBox.selectedItem.data); } ]] /mx:Script XML Input from JSP: ?xml version=1.0 encoding=utf-8? response company data=c1 label=company1/ company data=c2 label=company2/ /response I am able to populate the comboBox with the data coming from the JSP. But the problem is comboBox.selectedItem.data is not giving me any value. It should give me c1 if the company1 and c2 if company2 is selected. But it does not give me any value. comboBox.selectedItem.label works fine. But i need comboBox.selectedItem.data for my requirement. Any idea why is this not working. At the same if i remove the resultFormat e4x attribute (i.e working with default resultFormat of Object), i am able to retrieved the selected value using comboBox.selectedItem.data. Ofcourse the code is modified as below since the format of response data is different. mx:HTTPService id=srv url=../test/test.jsp result = resultHandler(event) fault=faultHandler(event) method=POST /mx:HTTPService mx:ComboBox id=comboBox width=200 labelField=label dataProvider={srv.lastResult.response.company} change=changed()/ Please let me know why this selectedItem.data is failing when i use e4x resultFormat. Am i missing out anything? This is very urgent. Thanks in advance -- View this message in context: http://www.nabble.com/ComboBox-SelectedItem-Problem-with-resultFormat-e4x---Very-Urgent-tp20964177p20964177.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Re: One computer unable to connect to XMLSocket server
False alarm -- The PM had an internet filter installed, even though he repeatedly denied having any firewalls or anything. All fixed...
Re: [flexcoders] Am i high?
how are you using Flex 4 using the 3.2 sdk? On 11-Dec-08, at 3:40 PM, djhatrick wrote: or does it seem sometimes that flex4 (using 3.2 sdk) doesn't always recompile? Anybody noticed this, I'm on a mac. Thanks, Patrick
[flexcoders] Cascading deletes - any good workarounds?
Using Live Cycle Data Services (2.6) we're having trouble implementing cascading deletes with large amounts of one-to-many relationships. Our workarounds are not working smoothly, and we don't want to have to delete everything completely by hand. Anyone found a good way to handle cascading deletes in LCDS 2.6? Or know if/when cascading delete handling is slated to be included a future LCDS version? --Derek, U of Iowa
Re: [flexcoders] Am i high?
If you're using the build from MAX, it's not an especially tested config right now On 12/11/08 9:40 PM, djhatrick djhatr...@yahoo.com wrote: or does it seem sometimes that flex4 (using 3.2 sdk) doesn't always recompile? Anybody noticed this, I'm on a mac. Thanks, Patrick
[flexcoders] save AMF formated object to a file with PHP
Hi all, can some1 help me with saving AMF object to a file. I have and Array object in PHP with some text and bynary data $Config = array(); //authorisation URL $Config[authURL] = authUrl; $Config[DocumentID] = DocumentID; $Config[Data] = fopen(Doc.pdf); now I need to serialize it to AMF formatted object and save it as binary file i.e. Doc.amf or something. In the end I need to be able to load it inside Flex with simple URLLoader and get it back with loader data var Config:Object = new Object (); Config = dataContent.readObject(event.target.data); so anything like AMF.serialize in amfphp/zend or simmilar? Thx, Tanja
[flexcoders] Re: ComboBox SelectedItem Problem with resultFormat e4x - Very Urgent
Try combobox.selectedit...@data --- In flexcoders@yahoogroups.com, samsonkiran samsonkir...@... wrote: Hi I have an Flex file (.mxml) in which i am making the HTTPService call to one JSP. This JSP returns me an XML data. I need to populate the comboBox in the FLEX with the data coming from the JSP in XML format. This is the sample code. test.mxml ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% backgroundColor=#FF creationComplete=srv.send() layout=absolute mx:HTTPService id=srv url=../test/test.jsp resultFormat=e4x result = resultHandler(event) fault=faultHandler(event) method=POST /mx:HTTPService mx:ComboBox id=comboBox width=200 labelField=@label dataProvider={srv.lastResult.company} change=changed()/ /mx:Application mx:Script ![CDATA[ import mx.controls.Alert; private function resultHandler(event:Event):void{ Alert.show(In Result); private function faultHandler(event:Event):void{ Alert.show(event.toString()); } } private function changed():void{ Alert.show(comboBox.selectedItem.data); } ]] /mx:Script XML Input from JSP: ?xml version=1.0 encoding=utf-8? response company data=c1 label=company1/ company data=c2 label=company2/ /response I am able to populate the comboBox with the data coming from the JSP. But the problem is comboBox.selectedItem.data is not giving me any value. It should give me c1 if the company1 and c2 if company2 is selected. But it does not give me any value. comboBox.selectedItem.label works fine. But i need comboBox.selectedItem.data for my requirement. Any idea why is this not working. At the same if i remove the resultFormat e4x attribute (i.e working with default resultFormat of Object), i am able to retrieved the selected value using comboBox.selectedItem.data. Ofcourse the code is modified as below since the format of response data is different. mx:HTTPService id=srv url=../test/test.jsp result = resultHandler(event) fault=faultHandler(event) method=POST /mx:HTTPService mx:ComboBox id=comboBox width=200 labelField=label dataProvider={srv.lastResult.response.company} change=changed()/ Please let me know why this selectedItem.data is failing when i use e4x resultFormat. Am i missing out anything? This is very urgent. Thanks in advance -- View this message in context: http://www.nabble.com/ComboBox-SelectedItem-Problem-with-resultFormat-e4x---Very-Urgent-tp20964177p20964177.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] Getting NULL Object Reference while deleting last element of the list
Hi Guys I am trying to implement the delete entries of the list box. The code works fine till the last entry, when i am trying to delete the last item after selection it is throwing error TypeError: Error #1009: Cannot access a property or method of a null object reference. I have seen this error so many times but I am not sure how will i fix this in the following code. Please help me in fixing this error Thanks Anuj /*CODE*/ mx:Button x=322 y=237 label=Add id=_addButton click=addToAssociatedDevices(event)/ private function addToAssociatedDevices(evt:MouseEvent):void { var _addDevicesLen:int=devicesInList.length; var _addToAssociatedDevicesArr:Array; for(var i:*=0;i_addDevicesLen-1;i++) { _addToAssociatedDevicesArr=nvrsInPoolList.selectedItems; } if((_addToAssociatedDevicesArr is Array)(_addToAssociatedDevicesArr!=null)) { var removeIndex:int = 0; for each (var addItemVal:* in _addToAssociatedDevicesArr) { if(addItemVal!=null) { IList(camerasInPoolList.dataProvider).addItem(addItemVal as Object); //Adds a device to the Add To Camera Pool list arrAddToPool.push(addItemVal); //Removes a device from the Remove From Pool list removeIndex = arrRemoveFromPool.indexOf(addItemVal); if(removeIndex -1) { arrRemoveFromPool.splice(removeIndex,1); } } } } for(var t:*=0;t_addToAssociatedDevicesArr.length;t++) { if(nvrsInPoolList!=null) { IList(nvrsInPoolList.dataProvider).removeItemAt(nvrsInPoolList.selectedIndex); } } }
[flexcoders] Re: SpeedoMeter
I concur, Thomas Gonzalez's gauge component rocks. Cheers, Sunil
[flexcoders] Re: Lazy loading trees
Thank you. I am unclear on where the classes QueryBuilderTreeDelegate and ReferenceDataBrowserDelegate are supposed to be. I realize that I can implement ITreeDataDescriptor and use getChildren() to provide the children of any given node. What I don't know how to do is fetch a node's child data asynchronously from the server. getChildren() has to return something right away, so what does the callback function (from the asynchronous server call) do? Should it fire an event to the tree? If so, which one? Dan --- In flexcoders@yahoogroups.com, Johannes Nel johannes@... wrote: Implement ITreeDataDescriptor and set the tree's data descriptor thus every time you open a node you call the getChildren function of your data descriptor a simple example internal class ReferenceDataDescriptor implements ITreeDataDescriptor { private var __delegate:QueryBuilderTreeDelegate; public function ReferenceDataDescriptor(delegate:QueryBuilderTreeDelegate) { __delegate = delegate; } public function getChildren(node:Object, model:Object=null):ICollectionView { var referenceDataDelegate:ReferenceDataBrowserDelegate = __delegate.referenceDataDelegate var gt:GenericTable = GenericTable } then store the data i get back in a hash table so hash['a\b'] = ArraycCOlleciton for local caching. On Tue, Dec 9, 2008 at 4:04 AM, dandante danda...@... wrote: Hello, I have a Tree control and I want to load each node's children in lazy fashion--that is, when the user expands a node, I want to fetch that node's children from the server. (there is way too much data to populate the entire tree ahead of time). I've looked around and the closest I came to a solution is this old post: http://www.mail-archive.com/flexcoders@yahoogroups.com/msg62360.html This code works, but it seems that it will only modify the children of the root nodes. It isn't clear how to expand this code to work with a deep tree. Does anyone have ideas on that, specifically, or on other approaches to this problem? Thanks -- j:pn \\no comment
RE: [flexcoders] what is the minimum version of FP supported by flex 3.2?
Should be the same as 3.0. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Jeff Tapper Sent: Thursday, December 11, 2008 12:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] what is the minimum version of FP supported by flex 3.2? Will flex 3.2 apps run in FP 9.0.115, or do they require 9.0.124, anyone know? Jeff Tapper Senior Consultant digital primates IT Consulting Group (r) Phone: 847.824.7800, x222 | Fax: 847.655.2867 jtap...@digitalprimates.net
[flexcoders] MXML Components and measure()
When is it that you have to implement measure()? If you're building components in MXML, purely out of other standard Flex components, do you ever need to bother with measure()? I'm making an MXML item renderer, and I'm running into some trouble with the DataGrid handling the variable row height - particularly once I put this into my renderer: mx:Text htmlText={*some HTML from somewhere*}/ Coming at this rather naively, it seems that the VBox that the Text each ought to have appropriate measure() implementations already, but clearly something's gone wrong. Any tips would be helpful. Regards, Michael
Re: [flexcoders] Re: speed of the for each looping
I've spent a lot of time poking around inside the collections stack (it's just interesting), and I can't find a situation where you'll get a different order for for each..in over indexed looping at the moment (Fx 3). That could of course change without notice, but for now I think that where speed isn't important, you can safely pick the one that produces the prettier or more comprehensible code :) -Josh On Fri, Dec 12, 2008 at 5:32 AM, Alex Harui aha...@adobe.com wrote: Funny. I didn't realize we were talking about iterating arrays with for..in until just now. I don't think we do that in Flex code. If the docs say arrays will iterate via for..in in index order then I'd probably trust that, especially if you stuff your arrays in index order *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Dave Cragg *Sent:* Thursday, December 11, 2008 3:08 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: speed of the for each looping Could you clarify this? Does this non-guarantee apply to numerically indexed arrays and ArrayCollections too? Or just to associative arrays and object properties? The docs imply that the order is maintained by for...in with numerically indexed arrays. It would be a big change if that were not the case. Cheers Dave On 10 Dec 2008, at 23:00, Gordon Smith wrote: So don't use for..in or for each… in if you care about the enumeration order. It could very possibly change in future versions of the Flash Player. nbs! p; Gordon Smith Adobe Flex SDK -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
[flexcoders] runtime class type reference?
Is there a way to get a reference to the runtime type of an AS3 object? Something like Foo.class in Java? I think I can do var mysteryObjClass:Class = getDefinitionByName(getClassInfo(mysteryObj).name); but this strikes me as a rather roundabout way of doing it. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
Re: [flexcoders] Best practice for calling asynchronous functions?
Some quick pointers (I do the framework stuff where I work): All (afaik) network requests are queued up until the end of frame, so you can nearly always add responders to a token... ...Except request errors, such as an invalid SOAP request. These can in some circumstances generate Fault exceptions that never make it to the token :( Here's some example code: // ... //This code is to catch invocation problems, since Flash has decided to interrupt the flow of the VM for //FaultEvent rather than dispatch it on next frame from the token operation.addEventListener(FaultEvent.FAULT, invocationFaultHandler); //Send the request log.debug(Sending request...); token = operation.send(); log.debug(...Send attempt completed); //Remove our invocation fault listener operation.removeEventListener(FaultEvent.FAULT, invocationFaultHandler); //Do we need to send this info on to the token's listeners in a frame or two? if (invocationFaultEvent) //Instance-level global { log.debug(There was an invoke error, which means the token listeners aren't notified. Will redispatch to them in 250ms); //When we create the timer, we're using a hard listener reference because this helper instance may otherwise be collected before we're done! //So make sure to remove the handler (and kill the timer) on firing! timer = new Timer(250, 1); timer.addEventListener(TimerEvent.TIMER, reDispatchInvocationFault); timer.start(); } return token; } private function invocationFaultHandler(event : FaultEvent) : void { log.error(A fault occured during invocation); this.invocationFaultEvent = event; } private function reDispatchInvocationFault(event : TimerEvent) : void { //Important! timer.removeEventListener(TimerEvent.TIMER, reDispatchInvocationFault); timer.stop(); timer = null; token.mx_internal::applyFault(invocationFaultEvent); } On Fri, Dec 12, 2008 at 4:08 AM, Seth Hodgson shodg...@adobe.com wrote: I haven't been following this thread, but the sample code below can actually be shortened to something like this: save(xml).addResponder(new AsyncResponder(handleResult, handleFault)); No AsyncToken in the code and rather than new'ing the responder, if you always want to direct results/faults to a consistent pair of handler functions you could set up the AsyncResponder earlier and just pass in a ref. save(xml).addResponder(saveResponder); The only reason to actually get a ref to the returned AsyncToken is if you want to add some dynamic properties to it that will help drive your handling of the eventual async result/fault (the token - and any custom state you've tagged it with - is accessible within your result/fault callbacks when they execute). But for scenarios like that where I want to hang onto some data from the call site, I often find it simpler to take advantage of the variable/scope capture that a closure provides by defining my result/fault callbacks as inline lambda functions rather than manually capturing state by copying a portion of it into properties of the AsyncToken. So something like: save(xml).addResponder(new AsyncResponder( function(... , // inline result handler function function(... // inline fault handler function )); Rather than new'ing an HTTPService for every call you make and trying to manage adding/removing event listeners (which will prevent instances from being GC'ed) in your wrapper I'd recommend just following the first convention I list above for each call: someMethod(args).addResponder(new AsyncResponder(handleResult, handleFault)); Best, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mark Carter Sent: Wednesday, December 10, 2008 7:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Best practice for calling asynchronous functions? Thanks for all the responses. I hadn't really looked into the ASyncToken until now. However, for me it seems that using the ASyncToken would be limited to the implementation of the, for example, save(XML, Function, Function) method. The calling code doesn't need to know about it. In my opinion this is neater than something like: var asyncToken:ASyncToken = save(xml); asyncToken.addResponder(... Also, I don't like adding responders after the call has been made. I know it works, but still... Maybe I should start a new topic for this next question, but... ...in my implementation, I create a new HTTPService for
[flexcoders] Update ArrayCollection on LocaleChain change
I am trying to update an ArrayCollection with new values from a localeChain change. Everything tied to an display control is changing properly, however, the ArrayCollection does not. I've tried the following three methods for accessing the resource, but none work. Is the ResourceManager binding ignored on AC's? Is there a solution? [Bindable] public var cbDP:ArrayCollection = new ArrayCollection(); cbDP.addItem( {label:Application.application.resourceManager.getString('myResources', 'FIRST_NAME'), data:0}); cbDP.addItem( {label:_resourceManager.getString('myResources', 'LAST_NAME'), data:1}); cbDP.addItem( {label:ResourceManager.getInstance().getString('myResources', 'PHONE'), data:2});
RE: [flexcoders] runtime class type reference?
There isn't much introspection APIs in AS. I'd use getQualifiedClassName instead of getClassInfo. getClassInfo can be expensive From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Thursday, December 11, 2008 3:03 PM To: flexcoders Subject: [flexcoders] runtime class type reference? Is there a way to get a reference to the runtime type of an AS3 object? Something like Foo.class in Java? I think I can do var mysteryObjClass:Class = getDefinitionByName(getClassInfo(mysteryObj).name); but this strikes me as a rather roundabout way of doing it. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
RE: [flexcoders] Re: speed of the for each looping
You have too much time on your hands... I would expect collections to iterate much faster by using getItemAt or cursors instead of array indexers or for..in. I swear someone published a comparison once. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Josh McDonald Sent: Thursday, December 11, 2008 2:57 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: speed of the for each looping I've spent a lot of time poking around inside the collections stack (it's just interesting), and I can't find a situation where you'll get a different order for for each..in over indexed looping at the moment (Fx 3). That could of course change without notice, but for now I think that where speed isn't important, you can safely pick the one that produces the prettier or more comprehensible code :) -Josh On Fri, Dec 12, 2008 at 5:32 AM, Alex Harui aha...@adobe.commailto:aha...@adobe.com wrote: Funny. I didn't realize we were talking about iterating arrays with for..in until just now. I don't think we do that in Flex code. If the docs say arrays will iterate via for..in in index order then I'd probably trust that, especially if you stuff your arrays in index order From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Dave Cragg Sent: Thursday, December 11, 2008 3:08 AM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: Re: [flexcoders] Re: speed of the for each looping Could you clarify this? Does this non-guarantee apply to numerically indexed arrays and ArrayCollections too? Or just to associative arrays and object properties? The docs imply that the order is maintained by for...in with numerically indexed arrays. It would be a big change if that were not the case. Cheers Dave On 10 Dec 2008, at 23:00, Gordon Smith wrote: So don't use for..in or for each... in if you care about the enumeration order. It could very possibly change in future versions of the Flash Player. nbs! p; Gordon Smith Adobe Flex SDK -- 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.commailto:j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
RE: [flexcoders] MXML Components and measure()
Normally you only need to implement measure if you didn't base the component on a container, but item renderers are a bit different. Their measure methods must take the explicitWIdth and calculate measuredHeight. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Michael Prescott Sent: Thursday, December 11, 2008 2:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] MXML Components and measure() When is it that you have to implement measure()? If you're building components in MXML, purely out of other standard Flex components, do you ever need to bother with measure()? I'm making an MXML item renderer, and I'm running into some trouble with the DataGrid handling the variable row height - particularly once I put this into my renderer: mx:Text htmlText={some HTML from somewhere}/ Coming at this rather naively, it seems that the VBox that the Text each ought to have appropriate measure() implementations already, but clearly something's gone wrong. Any tips would be helpful. Regards, Michael
Re: [flexcoders] Re: speed of the for each looping
Hey, I said *where speed isn't important* :) And I can't help that I always want to see the wizard behind the curtain! =] -Josh On Fri, Dec 12, 2008 at 9:19 AM, Alex Harui aha...@adobe.com wrote: You have too much time on your hands… I would expect collections to iterate much faster by using getItemAt or cursors instead of array indexers or for..in. I swear someone published a comparison once. *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Josh McDonald *Sent:* Thursday, December 11, 2008 2:57 PM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: speed of the for each looping I've spent a lot of time poking around inside the collections stack (it's just interesting), and I can't find a situation where you'll get a different order for for each..in over indexed looping at the moment (Fx 3). That could of course change without notice, but for now I think that where speed isn't important, you can safely pick the one that produces the prettier or more comprehensible code :) -Josh On Fri, Dec 12, 2008 at 5:32 AM, Alex Harui aha...@adobe.com wrote: Funny. I didn't realize we were talking about iterating arrays with for..in until just now. I don't think we do that in Flex code. If the docs say arrays will iterate via for..in in index order then I'd probably trust that, especially if you stuff your arrays in index order *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Dave Cragg *Sent:* Thursday, December 11, 2008 3:08 AM *To:* flexcoders@yahoogroups.com *Subject:* Re: [flexcoders] Re: speed of the for each looping Could you clarify this? Does this non-guarantee apply to numerically indexed arrays and ArrayCollections too? Or just to associative arrays and object properties? The docs imply that the order is maintained by for...in with numerically indexed arrays. It would be a big change if that were not the case. Cheers Dave On 10 Dec 2008, at 23:00, Gordon Smith wrote: So don't use for..in or for each… in if you care about the enumeration order. It could very possibly change in future versions of the Flash Player. nbs! p; Gordon Smith Adobe Flex SDK -- 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 -- 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] Best practice for calling asynchronous functions?
Hi Josh, This sounds like a bug in SOAP serialization in the Flex SDK that's generating a Fault locally on the client (no networking involved) but apparently has a bug and does so incorrectly. Would you mind logging a bug with test case if you haven't already? Thanks, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Josh McDonald Sent: Thursday, December 11, 2008 3:05 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Best practice for calling asynchronous functions? Some quick pointers (I do the framework stuff where I work): All (afaik) network requests are queued up until the end of frame, so you can nearly always add responders to a token... ...Except request errors, such as an invalid SOAP request. These can in some circumstances generate Fault exceptions that never make it to the token :( Here's some example code: // ... //This code is to catch invocation problems, since Flash has decided to interrupt the flow of the VM for //FaultEvent rather than dispatch it on next frame from the token operation.addEventListener(FaultEvent.FAULT, invocationFaultHandler); //Send the request log.debug(Sending request...); token = operation.send(); log.debug(...Send attempt completed); //Remove our invocation fault listener operation.removeEventListener(FaultEvent.FAULT, invocationFaultHandler); //Do we need to send this info on to the token's listeners in a frame or two? if (invocationFaultEvent) //Instance-level global { log.debug(There was an invoke error, which means the token listeners aren't notified. Will redispatch to them in 250ms); //When we create the timer, we're using a hard listener reference because this helper instance may otherwise be collected before we're done! //So make sure to remove the handler (and kill the timer) on firing! timer = new Timer(250, 1); timer.addEventListener(TimerEvent.TIMER, reDispatchInvocationFault); timer.start(); } return token; } private function invocationFaultHandler(event : FaultEvent) : void { log.error(A fault occured during invocation); this.invocationFaultEvent = event; } private function reDispatchInvocationFault(event : TimerEvent) : void { //Important! timer.removeEventListener(TimerEvent.TIMER, reDispatchInvocationFault); timer.stop(); timer = null; token.mx_internal::applyFault(invocationFaultEvent); } On Fri, Dec 12, 2008 at 4:08 AM, Seth Hodgson shodg...@adobe.com wrote: I haven't been following this thread, but the sample code below can actually be shortened to something like this: save(xml).addResponder(new AsyncResponder(handleResult, handleFault)); No AsyncToken in the code and rather than new'ing the responder, if you always want to direct results/faults to a consistent pair of handler functions you could set up the AsyncResponder earlier and just pass in a ref. save(xml).addResponder(saveResponder); The only reason to actually get a ref to the returned AsyncToken is if you want to add some dynamic properties to it that will help drive your handling of the eventual async result/fault (the token - and any custom state you've tagged it with - is accessible within your result/fault callbacks when they execute). But for scenarios like that where I want to hang onto some data from the call site, I often find it simpler to take advantage of the variable/scope capture that a closure provides by defining my result/fault callbacks as inline lambda functions rather than manually capturing state by copying a portion of it into properties of the AsyncToken. So something like: save(xml).addResponder(new AsyncResponder( function(... , // inline result handler function function(... // inline fault handler function )); Rather than new'ing an HTTPService for every call you make and trying to manage adding/removing event listeners (which will prevent instances from being GC'ed) in your wrapper I'd recommend just following the first convention I list above for each call: someMethod(args).addResponder(new AsyncResponder(handleResult, handleFault)); Best, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Mark Carter Sent: Wednesday, December 10, 2008 7:23 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Best practice for calling asynchronous functions? Thanks for all the responses. I hadn't really looked into the ASyncToken until now. However, for me it seems that
[flexcoders] Re: Best practice for calling asynchronous functions?
--- In flexcoders@yahoogroups.com, Tracy Spratt tspr...@... wrote: ...adding responders after the call has been made... That is not actually what happens. The call is not made at that line, just set up. I recall reading a fuller explanation, but didn't follow the internals well enough to repeat it. Regardless, the flow of the logic doesn't make much sense, especially when someone comes behind you to maintain the code who doesn't know much about remoting...
RE: [flexcoders] runtime class type reference?
That's too bad--with classes as first-class objects, it's pretty sexy to be able to do something like var someClass:Class = getDefinitionByName(com.truviso.SomeClass); var someObj:ISomeInterface = new someClass(); ... instead of having to lather on the syntax like in Java. It'd be nice to do more stuff along those lines. Thanks anyway, Alex. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Alex Harui aha...@adobe.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: RE: [flexcoders] runtime class type reference? Date: Thu, 11 Dec 2008 15:18:09 -0800 There isn’t much introspection APIs in AS. I’d use getQualifiedClassName instead of getClassInfo. getClassInfo can be expensive From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Thursday, December 11, 2008 3:03 PM To: flexcoders Subject: [flexcoders] runtime class type reference? Is there a way to get a reference to the runtime type of an AS3 object? Something like Foo.class in Java? I think I can do var mysteryObjClass:Class = getDefinitionByName(getClassInfo(mysteryObj).name); but this strikes me as a rather roundabout way of doing it. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com
[flexcoders] Re: Setting up and connecting a simple CSS file with Flex 3
--- In flexcoders@yahoogroups.com, johngag6969 johnga...@... wrote: I consider myself a developer with limited design skills. I decided this weekend that I wanted to change that by learning some simple design techniques for flex 3. Check out my blog post about setting up and connecting a simple CSS file with Flex 3. http://www.cftips.net/post.cfm/setting-up-and-connecting-a-simple- css-file-with-flex-3 Not sure what: 500 ROOT CAUSE: java.lang.NoClassDefFoundError: Could not initialize class cfEvent2ecfm1002780577 at sun.reflect.GeneratedConstructorAccessor4866.newInstance (Unknown Source) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance (DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance (Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) has to do with the topic. But thanks ;-)
[flexcoders] Re: Lazy loading trees
--- In flexcoders@yahoogroups.com, dandante danda...@... wrote: Thank you. I am unclear on where the classes QueryBuilderTreeDelegate and ReferenceDataBrowserDelegate are supposed to be. I realize that I can implement ITreeDataDescriptor and use getChildren() to provide the children of any given node. What I don't know how to do is fetch a node's child data asynchronously from the server. getChildren() has to return something right away, so what does the callback function (from the asynchronous server call) do? Should it fire an event to the tree? If so, which one? Check out this on how to let getChildren return something immediately even if you don't yet have a result: http://www.johnwilger.com/2007/03/future-value-pattern-in- actionscript-3.html
[flexcoders] [Little off topic] Timezone or TimeZone
I'm currently writing time zone (timezone sp?) logic for the Flash player, and my co-worker and I got into an argument about whether it was one word or two, and how it was spelled. I just wanted to ping the group and get your opinion. Cheers, Nate
[flexcoders] Adobe AIR Installer has encountered a problem
Has anyone come across this problem. I had successfully installed AIR 1.5 previously when suddenly some of my AIR apps stopped running with this error: Adobe AIR Installer has encountered a problem and needs to close. We are sorry for the inconvenience. I note that I can still run my AIR apps through Flex Builder. A google search on this error has not been fruitful. Adobe, or anyone's help would be appreciated.
Re: [flexcoders] [Little off topic] Timezone or TimeZone
One word from what I've come across., but when i write it on a mac it underlines it, says its either Time-zone or Time zone , i think its one of those colour or color things (British/Canadian Spelling vs America) - Faisal On 11-Dec-08, at 7:33 PM, Nate Beck wrote: I'm currently writing time zone (timezone sp?) logic for the Flash player, and my co-worker and I got into an argument about whether it was one word or two, and how it was spelled. I just wanted to ping the group and get your opinion. Cheers, Nate
RE: [flexcoders] [Little off topic] Timezone or TimeZone
Attempting to apply logic to English language is a fruitless endeavor. Tracy From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nate Beck Sent: Thursday, December 11, 2008 7:33 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] [Little off topic] Timezone or TimeZone I'm currently writing time zone (timezone sp?) logic for the Flash player, and my co-worker and I got into an argument about whether it was one word or two, and how it was spelled. I just wanted to ping the group and get your opinion. Cheers, Nate
Re: [flexcoders] Best practice for calling asynchronous functions?
Hi Seth, It stems I think from the fact that the Async stuff in the SDK (AsyncToken, IResponder impls) are a little too closely tied to Flex's underlying remoting stuff. But I've already brought that up on the SDK dev list and it seemed you guys are on top of that issue. The problem is that from the SDK's point of view, there is no request. There's no IMessage, there's nothing to wait on. However from the application's point of view, there is. If I'm going to go to the trouble of building a failing case and submitting a bug, I may as well include a patch. SOAPEncoder throws an exception when asked to build an incorrect request which is reasonable, but of course this happens before the token is returned to the application code, and the event is sent to the Operation (and WebService I assume) before the application gets a chance to register its interest. Is there a place in the SDK code where a non-visual component needs to do a callLater() that I can copy? Do they just use the old new Timer(1,1) trick? -Josh On Fri, Dec 12, 2008 at 9:29 AM, Seth Hodgson shodg...@adobe.com wrote: Hi Josh, This sounds like a bug in SOAP serialization in the Flex SDK that's generating a Fault locally on the client (no networking involved) but apparently has a bug and does so incorrectly. Would you mind logging a bug with test case if you haven't already? Thanks, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Josh McDonald Sent: Thursday, December 11, 2008 3:05 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Best practice for calling asynchronous functions? Some quick pointers (I do the framework stuff where I work): All (afaik) network requests are queued up until the end of frame, so you can nearly always add responders to a token... ...Except request errors, such as an invalid SOAP request. These can in some circumstances generate Fault exceptions that never make it to the token :( Here's some example code: // ... //This code is to catch invocation problems, since Flash has decided to interrupt the flow of the VM for //FaultEvent rather than dispatch it on next frame from the token operation.addEventListener(FaultEvent.FAULT, invocationFaultHandler); //Send the request log.debug(Sending request...); token = operation.send(); log.debug(...Send attempt completed); //Remove our invocation fault listener operation.removeEventListener(FaultEvent.FAULT, invocationFaultHandler); //Do we need to send this info on to the token's listeners in a frame or two? if (invocationFaultEvent) //Instance-level global { log.debug(There was an invoke error, which means the token listeners aren't notified. Will redispatch to them in 250ms); //When we create the timer, we're using a hard listener reference because this helper instance may otherwise be collected before we're done! //So make sure to remove the handler (and kill the timer) on firing! timer = new Timer(250, 1); timer.addEventListener(TimerEvent.TIMER, reDispatchInvocationFault); timer.start(); } return token; } private function invocationFaultHandler(event : FaultEvent) : void { log.error(A fault occured during invocation); this.invocationFaultEvent = event; } private function reDispatchInvocationFault(event : TimerEvent) : void { //Important! timer.removeEventListener(TimerEvent.TIMER, reDispatchInvocationFault); timer.stop(); timer = null; token.mx_internal::applyFault(invocationFaultEvent); } On Fri, Dec 12, 2008 at 4:08 AM, Seth Hodgson shodg...@adobe.com wrote: I haven't been following this thread, but the sample code below can actually be shortened to something like this: save(xml).addResponder(new AsyncResponder(handleResult, handleFault)); No AsyncToken in the code and rather than new'ing the responder, if you always want to direct results/faults to a consistent pair of handler functions you could set up the AsyncResponder earlier and just pass in a ref. save(xml).addResponder(saveResponder); The only reason to actually get a ref to the returned AsyncToken is if you want to add some dynamic properties to it that will help drive your handling of the eventual async result/fault (the token - and any custom state you've tagged it with - is accessible within your result/fault callbacks when they execute). But for scenarios like that where I want to hang onto some data from the call site, I often find it simpler to take advantage of the variable/scope capture that a closure provides by defining my result/fault callbacks as inline lambda
Re: [flexcoders] runtime class type reference?
There are other cool utils around that do introspection, but here's mine: http://is.gd/7iTx -Josh On Fri, Dec 12, 2008 at 9:30 AM, Maciek Sakrejda msakre...@truviso.comwrote: That's too bad--with classes as first-class objects, it's pretty sexy to be able to do something like var someClass:Class = getDefinitionByName(com.truviso.SomeClass); var someObj:ISomeInterface = new someClass(); ... instead of having to lather on the syntax like in Java. It'd be nice to do more stuff along those lines. Thanks anyway, Alex. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.com -Original Message- From: Alex Harui aha...@adobe.com Reply-To: flexcoders@yahoogroups.com To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Subject: RE: [flexcoders] runtime class type reference? Date: Thu, 11 Dec 2008 15:18:09 -0800 There isn't much introspection APIs in AS. I'd use getQualifiedClassName instead of getClassInfo. getClassInfo can be expensive From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Maciek Sakrejda Sent: Thursday, December 11, 2008 3:03 PM To: flexcoders Subject: [flexcoders] runtime class type reference? Is there a way to get a reference to the runtime type of an AS3 object? Something like Foo.class in Java? I think I can do var mysteryObjClass:Class = getDefinitionByName(getClassInfo(mysteryObj).name); but this strikes me as a rather roundabout way of doing it. -- Maciek Sakrejda Truviso, Inc. http://www.truviso.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 -- Therefore, send not to know For whom the bell tolls. It tolls for thee. Like the cut of my jib? Check out my Flex blog! :: Josh 'G-Funk' McDonald :: 0437 221 380 :: j...@gfunk007.com :: http://flex.joshmcdonald.info/ :: http://twitter.com/sophistifunk
[flexcoders] AS ResourceBundle Keys with Args?
I am creating ActionScript ResourceBundles. Is possible to create a resource key/value via AS that allows arguments like: rb.content[DISTANCE_FORMAT] = {0} miles; I am getting key/value pairs from a database so I will be creating the RBs at runtime. So will be looping thru the result set with something like: rb.content[record[i].key] = {0} record[i].value; Thanks, Jeff
[flexcoders] Maintaining scale when resizing embed tag
Hello listers, I have a Flex App with scaleMode set to StageScaleMode.SHOW_ALL, the Application tag dimension set to 300x500 and it scaled perfectly when modifying the dimensions of the embed tag. To make things cleaner I removed all the AS3 code from the Application MXML file and placed it in an AS3 class that extends Application (BaseApp.as). I then updated the MXML file to have base:BaseApp xmlns:base=* as the root tag with dimension still at 300x500. Now I find that the scale mode is not preserved correctly when modifying the dimensions of the embed tag. The UI content in the MXML scales down way farther that the embed dimensions. If I sized the embed tag at 150x250 I see the flash content takes up those dimensions but the visual content provided by the MXML subclass is scaled down to 90x120 . If I move the dimensions from the MXML subclass to the base class then the content is scaled even further to like 45x75 Can anyone help me understand what is going on and how I can make the content scale correctly? Thanks, - Ivo
Re: [flexcoders] Best practice for calling asynchronous functions?
Amy-28 wrote: Right. The calling code doesn't need to do anything different. The change is inside your method. Here's an example: Thanks for that - its roughly what I had in mind - but its good for me to see an example. Amy-28 wrote: In my opinion this is neater than something like: var asyncToken:ASyncToken = save(xml); asyncToken.addResponder(... Suit yourself. You weren't satisfied with what you were using. I offered an alternative. Maybe I wasn't being clear. I just prefer to keep any ASyncToken code out of the calling code. Having it inside the implementation is not a problem for me (other than for the other problems with it discussed in this topic). So, I don't see it as an alternative - its more of an implementation detail. Amy-28 wrote: As you can imagine, it keeps the implementation much simpler. No need for the ASyncToken. Just add new listeners each time a call is made. Everything is garbage collected. Oh, hang on, what keeps a reference to the HTTPService? Good question. What did you do with all the old eventListeners you were complaining about in your original post? My current implementation has something like: function save(xml:XML, successFunc:Function, failureFunc:Function):void { var service:HTTPService = new HTTPService(); ... service.addEventListener(ResultEvent.RESULT, function(evt:ResultEvent):void { trace(Successfully saved XML); successFunc(); }); service.send(); // called after the event listeners have been added :) } That's it. The successFunc and failureFunc are only scoped to the calling code's method and so should be garbage collected when the service is garbage collected. What I don't know is when the service is garbage collected? I'm assuming not before the result or fault event is fired! -- View this message in context: http://www.nabble.com/Best-practice-for-calling-asynchronous-functions--tp20930596p20969533.html Sent from the FlexCoders mailing list archive at Nabble.com.
[flexcoders] SecurityError
hello all, I meet a big trouble. I use flex to development firefox addon. It's ok when I run the html which compliled by flex. But when I package it to a firefox addon, it occurs SecurityError: Error #2060. Could you tell how to process this error? I'm really nerver-racking thanks, dialogtmp
Re: [flexcoders] Best practice for calling asynchronous functions?
Josh McDonald-4 wrote: The problem is that from the SDK's point of view, there is no request. There's no IMessage, there's nothing to wait on. However from the application's point of view, there is. I don't quite understand... Wouldn't any problems before the async token is returned, be thrown as an exception from the method returning the async token? Therefore the calling code just needs to catch that exception and handle it. The only problem with this would be if an event is generated after the async token is returned and before the responder is added. This would only be an issue in a multi-threaded environment. -- View this message in context: http://www.nabble.com/Best-practice-for-calling-asynchronous-functions--tp20930596p20969714.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Best practice for calling asynchronous functions?
SOAPEncoder throws an exception, which is caught by Operation, swallowed, and then a fault event is dispatched from the Operation instance. If you do all your async stuff using responders because you need to know *which* action has just finished or faulted (among other things), you never get to hear about it. -Josh On Fri, Dec 12, 2008 at 2:20 PM, Mark Carter c...@mark.carter.name wrote: Josh McDonald-4 wrote: The problem is that from the SDK's point of view, there is no request. There's no IMessage, there's nothing to wait on. However from the application's point of view, there is. I don't quite understand... Wouldn't any problems before the async token is returned, be thrown as an exception from the method returning the async token? Therefore the calling code just needs to catch that exception and handle it. The only problem with this would be if an event is generated after the async token is returned and before the responder is added. This would only be an issue in a multi-threaded environment. -- View this message in context: http://www.nabble.com/Best-practice-for-calling-asynchronous-functions--tp20930596p20969714.html Sent from the FlexCoders mailing list archive at Nabble.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 -- 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: Lazy loading trees
those classes were just random stuff i was using from where i copied the code. On Fri, Dec 12, 2008 at 2:16 AM, Amy amyblankens...@bellsouth.net wrote: --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, dandante danda...@... wrote: Thank you. I am unclear on where the classes QueryBuilderTreeDelegate and ReferenceDataBrowserDelegate are supposed to be. I realize that I can implement ITreeDataDescriptor and use getChildren() to provide the children of any given node. What I don't know how to do is fetch a node's child data asynchronously from the server. getChildren() has to return something right away, so what does the callback function (from the asynchronous server call) do? Should it fire an event to the tree? If so, which one? Check out this on how to let getChildren return something immediately even if you don't yet have a result: http://www.johnwilger.com/2007/03/future-value-pattern-in- actionscript-3.html -- j:pn \\no comment
RE: [flexcoders] Best practice for calling asynchronous functions?
Right, definitely a bug in mx.rpc.soap.Operation#invokePendingCall where it invokes a helper method to dispatch fault events directly if it hits encoding errors, etc. An example of what it should be doing can be seen in mx.rpc.soap.mxml.Operation#send: new AsyncDispatcher(dispatchRpcEvent, [faultEvent], 1); mx.rpc.AsyncDispatcher is a (currently @private) helper class that helps avoids Timer leaks due to overlooking cleaning up event listeners when using the old Timer(1, 1) idiom. Best, Seth From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Josh McDonald Sent: Thursday, December 11, 2008 9:20 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Best practice for calling asynchronous functions? SOAPEncoder throws an exception, which is caught by Operation, swallowed, and then a fault event is dispatched from the Operation instance. If you do all your async stuff using responders because you need to know *which* action has just finished or faulted (among other things), you never get to hear about it. -Josh On Fri, Dec 12, 2008 at 2:20 PM, Mark Carter c...@mark.carter.name wrote: Josh McDonald-4 wrote: The problem is that from the SDK's point of view, there is no request. There's no IMessage, there's nothing to wait on. However from the application's point of view, there is. I don't quite understand... Wouldn't any problems before the async token is returned, be thrown as an exception from the method returning the async token? Therefore the calling code just needs to catch that exception and handle it. The only problem with this would be if an event is generated after the async token is returned and before the responder is added. This would only be an issue in a multi-threaded environment.
Re: [flexcoders] SecurityError
There may be bad news on the horizon. There was a way to get around this a while ago by adjusting the allowscriptaccess¹ parameter in your html output to always.¹ If you¹ve already tried this without success... then you are probably hitting crossdomain issues. Flash knows what page¹ it is on and where it is being accessed from if what you are doing violates a crossdomain policy I can guarantee that any solution you find won¹t work for everyone or for very long. Can you post a little bit about what you are trying to do? There might be a more creative¹ way to get around the error. What kinds of things have you already tried? Rick Winscot On 12/11/08 11:09 PM, dialogtmp dialog...@yahoo.com.tw wrote: hello all, I meet a big trouble. I use flex to development firefox addon. It's ok when I run the html which compliled by flex. But when I package it to a firefox addon, it occurs SecurityError: Error #2060. Could you tell how to process this error? I'm really nerver-racking thanks, dialogtmp
[flexcoders] how do you blur smoothly between two states?
hrmm, I don't get it Say I have this on rollover: mx:Blur id=blur duration=1000 blurXTo=10 blurYTo=10 blurXFrom=0 blurYFrom=0 target={this}/ and this on roll out: mx:Blur id=unblur duration=1000 blurXTo=0 blurYTo=0 blurXFrom=10 blurYFrom=10 target={this}/ works, cool, rock on. however if I mouse off at say 500ms the blur JUMPs to the to value and then works it way back. kind of sucks. I've tried ommiting blurfrom or setting the value to *, and even blurXFrom={blur.blurXFrom} blurYFrom={blur.blurYFrom}but no dice. what gives?