[flexcoders] How to force grid dataprovider to update when combobox editor option selected
Hi, all. I have the following code: mx:AdvancedDataGrid id=ticketsGridTop height=115 width=150 allowDragSelection=false editable=true draggableColumns=false resizableColumns=false headerRenderer=com.tailgate.platform.movietickets.HeaderRenderer selectable=false borderSides=top bottom dataProvider={model.availableItems} mx:columns mx:AdvancedDataGridColumn headerText=Ticket Type dataField=name editable=false / mx:AdvancedDataGridColumn id=quantityColumn rendererIsEditor=true editorDataField=selectedIndex headerText=Ticket Quantity editable=true dataField=quantity mx:itemRenderer mx:Component mx:ComboBox width=20 dataProvider=[0,1,2,3,4,5,6,7,8,9,10] / /mx:Component /mx:itemRenderer /mx:AdvancedDataGridColumn /mx:columns /mx:AdvancedDataGrid My problem is that the quantity field of my dataprovider doesn't update immediately after I select an option from the ComboBox. First I have to select, then I have to click a (second time) somewhere else, in order for the quantity field in the dataprovider's object to update. Any idea why this is, and how I can have the quantity field of the dataprovider update upon select, without the additional click? Thanks much. LT
[flexcoders] Re: Reusing HTTPService
Hi, Tracy. Thanks for your response. It's good to hear that others use this solution. Makes me feel like it's not just a stop-gap hack. However, what made me uncomfortable is the idea in OOP that classes should be open to extension, closed to modification. It's generally a code smell if one keeps having to literally add code to an existing class in order to add functionality. Especially when the added functionality bears such a strong resemblance to existing behaviors. What do you think? I really like your idea of adding properties to AsyncToken. Is AsyncToken a dynamic class? Is that how you do it? Thanks again. LT --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: This is a normal pattern. What about it makes you uncomfortable? You are using a single result handler function, correct? The switch() statement makes chaining calls easy and facilitates debugging since a single breakpoint or trace() will track all RPC calls. I have found that two string properties (callId, and nextAction ) on the AsyncToken work for all my needs so far An alternative would be to put a callback function in an AsyncToken property or use the addResponder() methods. I personally find those solutions messy. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lagos_tout Sent: Friday, October 10, 2008 8:35 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Reusing HTTPService Hi, I'm re-using an instance of HTTPService, changing the request arguments to get different responses from the server. But I found that if, for instance, I made 3 calls this way with the HTTPService, each of the 3 result handlers registered for each call is executed every time a result returned. I solved this by storing a reference to the unique AsyncToken returned by each service call and matching it to the AsyncToken contained in each ResultEvent's token property in order to determine which result handler to execute. I'm not terribly happy with this setup. It seems messy. I'd appreciate any suggestions on how I can reuse an HTTPService instance without ending up with long switch statements with countless if thisAsyncToken then do thisHandler, else if thatAsyncToken then do thatHandler... and so on. Thanks much. LT
Re: [flexcoders] Re: My Flex Form
First forget what I said about the result handler because I thought you should receive the data from the service while in reality you want to send it! Now back to the code in the CDATA block. It must be clear that the CDATA block is not a function!! It is like writing code for a class but without the class block delimiters, I mean without public class ClassName { and the closing }. So this code is illegal in a CDATA block (more specifically the second line): var obj:Object = new Object(); obj.Name = Name.text; The second line must live in a function. In your case put the code in the click event handler of the send button: private function sendButtonClickHandler(event:MouseEvent):void { var obj:Object = new Object(); obj.Name = Name.text; myContactService.send(obj); } On Thu, Oct 16, 2008 at 7:49 AM, brucewhealton [EMAIL PROTECTED]wrote: Hi, I was wondering if you could expand on this... more specifically. I'm not quite following you. I was given a framework regarding how to do this, from an instructor on the Lynda.com library of online training. He gave me the basic framework for what needs to happen. I know I am missing something. I'm really frustrated that I still cannot get this very basic thing working. Can someone show how specifically this would be done, please. Let's say we have just one field, a Text Input field in a FormItem tag and then a Button tag, with a click event handler, that calls the php form processor called FormToEmail.php This is what I know, that the php form processor wants a _POST[] array variable. So, I have, mx:HTTPService id=myContactService url=FormToEmail.php method=POST/ Then in a CDATA block, I setup an Object. My instructor said that this would be used to send the data as expected by the form processor, which in this case is, FormToEmail.php So, I have: var obj:Object = new Object(); obj.Name = Name.text; If the form had just one Form Item, for simplicity in demonstrating this, we could assume Name is the id of that FormItem. Can someone please in detail explain or demonstrate what would be done, specifically. If you know of a place where this is explained on the web, please let me know. Clearly, I'm missing something here but I am not following what that is. thanks, Bruce --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Haykel BEN JEMIA [EMAIL PROTECTED] wrote: Most of the code in the CDATA block will be inserted in a class during compilation so you can write whatever is allowed in a class block (declarations and function definitions). The assignments are hence not allowed there, they must live in a function. In your case, you should do the assignments in the result handler of the HTTPService anyway. Hope this helps! On Wed, Oct 15, 2008 at 6:22 AM, brucewhealton [EMAIL PROTECTED]wrote: Hello all, Flex is not liking the way I setup the Object in a CDATA block in a Form Component. I have a Form component in a forms subfolder/subdirectory of the src directory/folder. I have an application in the src folder called FormRequest.mxml and in the forms folder I setup a Form Component that I called ContactForm.mxml My form processor will take variable value pairs and email them to me. In HTML, I use a form tag and then input name=name type=text/ So, I have in the Form component (which is in the file ContactForms.mxml in the forms subfolder) an HTTPService as such: mx:HTTPService id=myContactService url=FormToEmail.php method=POST/ Then I have mx:FormItem label=Name: mx:TextInput id=Name width=195/ /mx:FormItem mx:FormItem id=Email label=Email: fontSize=16 mx:TextInput width=195/ /mx:FormItem mx:FormItem label=Your Message: fontSize=16 mx:TextArea id=Message height=100 width=195/ /mx:FormItem mx:FormItem mx:Button label=Contact Us fontSize=16 click=myContactService.send(obj)/ /mx:FormItem In the CDATA AS block, I have this: var obj:Object = new Object(); obj.Name = Name.text; obj.Email = Email.text; obj.Message = Message.text; It doesn't like this, as it gives me an error message on the 2nd, 3rd and 4th lines saying that obj is an undefined property. Am I missing public or private in front of the var? Sometimes I get confused when that is left off the code. Somehow, I've got to get the Name, Email and Message, that the user types into the Form Items, connected to the obj Object. Then I have to give it to the FormToEmail.php form processor that takes _POST ['inputtextvariable'] It looks for variables of that form in the _POST variable. In HTML the data comes from the name attribute of the INPUT tag. Should all of this be in the ContactForm.mxml component? This is called from FormRequest.mxml inside a Panel, I have this: mx:Panel title=Contact Us forms:ContactForm id=myContactForm/ /mx:Panel Does this sound right? I
[flexcoders] Re: Reusing HTTPService
Thanks, Dmitri. This is a great idea. Unfortunately though, in this project, I don't have control over what's returned by the server, so I can't add the requestId. But with your suggestion, you still end up needing to match requestIds with handlers on the client right? So do you use a massive switch for that? Thanks again. LT --- In flexcoders@yahoogroups.com, Dmitri Girski [EMAIL PROTECTED] wrote: If I were you, I would simply add the requestId into the server's response, so client always knows which request-response pair it handles. This idea lies behind most of the transmissions protocols. Cheers, Dmitri. --- In flexcoders@yahoogroups.com, lagos_tout lagos.tout@ wrote: Hi, I'm re-using an instance of HTTPService, changing the request arguments to get different responses from the server. But I found that if, for instance, I made 3 calls this way with the HTTPService, each of the 3 result handlers registered for each call is executed every time a result returned. I solved this by storing a reference to the unique AsyncToken returned by each service call and matching it to the AsyncToken contained in each ResultEvent's token property in order to determine which result handler to execute. I'm not terribly happy with this setup. It seems messy. I'd appreciate any suggestions on how I can reuse an HTTPService instance without ending up with long switch statements with countless if thisAsyncToken then do thisHandler, else if thatAsyncToken then do thatHandler... and so on. Thanks much. LT
[flexcoders] Flex uploader / accessing local files?
Hi - I've made a flex uploading application that gets a file from the client's file system using FileReference() and uploads it to a server. I'd like to be able to resize the image before it is sent to the server, but apparently flex doesn't have access to the actual bits that make up the image file, only a reference to the file. Surely there must be a way to manipulate that image data from the client's file before it gets to the server? Has anyone done anything like this? I've looked all around but haven't had much luck. Thanks in advance, Rob
[flexcoders] Re: How long does it usually take for new topics to post?
Cool. Thanks. Go Canada! :) --- In flexcoders@yahoogroups.com, Dimitrios Gianninas [EMAIL PROTECTED] wrote: We are only a hand full of moderators and we try to approve messages as fast as possible, so sometimes it might take up to a day to get your message approved, we just ask for little bit of patience. Take me for example, I'm from Canada, it was Thanksgiving for us here, so I wasn't next to PC much :) So I approved things only this morning. Dimitrios Gianninas RIA Developer Team Lead Optimal Payments Inc. From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Richard Rodseth Sent: Tuesday, October 14, 2008 10:47 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] How long does it usually take for new topics to post? I think it may be the way gmail works. I've noticed that my posts don't show up under my flexcoders tag until I get a reply. On Mon, Oct 13, 2008 at 12:16 PM, lagos_tout [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Hi, How long does it take for a new topic to post to this group? I submitted one last Friday using the site (not email) and it still hasn't shown up. This isn't the first time that's happened either. Just trying to figure out if maybe it's a problem on my end. Thanks. LT -- WARNING --- This electronic message and its attachments may contain confidential, proprietary or legally privileged information, which is solely for the use of the intended recipient. No privilege or other rights are waived by any unintended transmission or unauthorized retransmission of this message. If you are not the intended recipient of this message, or if you have received it in error, you should immediately stop reading this message and delete it and all attachments from your system. The reading, distribution, copying or other use of this message or its attachments by unintended recipients is unauthorized and may be unlawful. If you have received this e-mail in error, please notify the sender. AVIS IMPORTANT -- Ce message électronique et ses pièces jointes peuvent contenir des renseignements confidentiels, exclusifs ou légalement privilégiés destinés au seul usage du destinataire visé. L'expéditeur original ne renonce à aucun privilège ou à aucun autre droit si le présent message a été transmis involontairement ou s'il est retransmis sans son autorisation. Si vous n'êtes pas le destinataire visé du présent message ou si vous l'avez reçu par erreur, veuillez cesser immédiatement de le lire et le supprimer, ainsi que toutes ses pièces jointes, de votre système. La lecture, la distribution, la copie ou tout autre usage du présent message ou de ses pièces jointes par des personnes autres que le destinataire visé ne sont pas autorisés et pourraient être illégaux. Si vous avez reçu ce courrier électronique par erreur, veuillez en aviser l'expéditeur.
[flexcoders] Re: My Flex Form
We are close, hopefully. I still get an error on the lines inside the sendMyData function. It is giving me an error that says, Error: Access to undefined property Name, Error: Access to undefined property Email, Error: Access to undefined property Message, It should be noted that I have the component, named FormComponent in a subfolder form the source root, in a file called FormComponent.mxml, of course. That file just has the Form and the FormItem tags, with InputText fields with id of Name, Email, Message. I instantiate the Form component into the application called ContactForm. So, I uploaded the project to the web on the server I use. It seems like this would be the best way to see what I am missing or doing wrong. So, please check it out here: http://fwweb.biz/ContactForm.zip thanks, Bruce --- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote: There are a few things wrong with your form... You have the id=Email on the FormItem - it should be on the TextInput. The name of your form component is ContactForms.mxml but you try to instantiate it with forms:ContactForm id=myContactForm/ (Note ContactForms and ContactForm is different). You cannot set properties of a variable inside a CDATA block. You must do it in a function (Which is inside the CDATA block). eg. private function sendMyData():void { var obj:Object = new Object(); obj.Name = Name.text; obj.Email = Email.text; obj.Message = Message.text; myContactService.send(obj); } and change the button mxml to mx:Button label=Contact Us fontSize=16 click=sendMyData()/
[flexcoders] Re: My Flex Form
Hi, thanks for the help. I did what you mention below. Someone else posted somethingsimilar about putting the Object property into the function. It still doesn't like that yet. It gives me an error on the line in the function where I am assigning values to the Object properties... Specifically it doesn't like: obj.Name = Name.text; it says: Access to undefined property Name Now, one problem might be that I am not passing any parameters to the function. I'll see about the way you specified the function and see if that fixes things. To see more specifically what I did, please click on this to download the zip archive file of my Flex Project: http://fwweb.biz/ContactForm.zip thanks, Bruce --- In flexcoders@yahoogroups.com, Haykel BEN JEMIA [EMAIL PROTECTED] wrote: First forget what I said about the result handler because I thought you should receive the data from the service while in reality you want to send it! Now back to the code in the CDATA block. It must be clear that the CDATA block is not a function!! It is like writing code for a class but without the class block delimiters, I mean without public class ClassName { and the closing }. So this code is illegal in a CDATA block (more specifically the second line): var obj:Object = new Object(); obj.Name = Name.text; The second line must live in a function. In your case put the code in the click event handler of the send button: private function sendButtonClickHandler(event:MouseEvent):void { var obj:Object = new Object(); obj.Name = Name.text; myContactService.send(obj); } On Thu, Oct 16, 2008 at 7:49 AM, brucewhealton
[flexcoders] Re: Every second time I debug my app, Flex closes Safari :(
I think you can avoid this if you open another site in the first tab before debugging and leave it open as you debug and re-debug. --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: If I reload the app (and kill the debugging session) in the browser beforehand, then Builder will reuse the tab correctly without killing the browser. -Josh On Wed, Oct 15, 2008 at 3:41 PM, Josh McDonald [EMAIL PROTECTED] wrote: Doing that kills the entire browser process. I really can't for the life of me figure out the problem. I've had it happen from Builder and from Flex Plugin, and only in some workspaces even on the same machine :( -Josh On Wed, Oct 15, 2008 at 3:24 PM, Rob Kunkle [EMAIL PROTECTED] wrote: I think this happens because the debugger is still running when you start it the second time. Try pressing the red stop debugging square in flex builder to stop the debugger, and see if that fixes the problem. r --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote: Hey guys, In one or two workspaces, everything works fine. In most of them, however, every second time I debug an app, everything goes as normal but then Builder kills the Safari application (not just the old tab, but the entire app). This is of course *incredibly* annoying given how slow all this stuff is. Any ideas what causes this? -Josh -- 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 :: josh@ :: http://flex.joshmcdonald.info/ -- 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/ -- 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/
Re: [flexcoders] Re: Every second time I debug my app, Flex closes Safari :(
Nope, nor if I have a bunch of sites open in another window. On Thu, Oct 16, 2008 at 5:22 PM, arieljake [EMAIL PROTECTED] wrote: I think you can avoid this if you open another site in the first tab before debugging and leave it open as you debug and re-debug. --- In flexcoders@yahoogroups.com, Josh McDonald [EMAIL PROTECTED] wrote: If I reload the app (and kill the debugging session) in the browser beforehand, then Builder will reuse the tab correctly without killing the browser. -Josh On Wed, Oct 15, 2008 at 3:41 PM, Josh McDonald [EMAIL PROTECTED] wrote: Doing that kills the entire browser process. I really can't for the life of me figure out the problem. I've had it happen from Builder and from Flex Plugin, and only in some workspaces even on the same machine :( -Josh On Wed, Oct 15, 2008 at 3:24 PM, Rob Kunkle [EMAIL PROTECTED] wrote: I think this happens because the debugger is still running when you start it the second time. Try pressing the red stop debugging square in flex builder to stop the debugger, and see if that fixes the problem. r --- In flexcoders@yahoogroups.com, Josh McDonald dznuts@ wrote: Hey guys, In one or two workspaces, everything works fine. In most of them, however, every second time I debug an app, everything goes as normal but then Builder kills the Safari application (not just the old tab, but the entire app). This is of course *incredibly* annoying given how slow all this stuff is. Any ideas what causes this? -Josh -- 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 :: josh@ :: http://flex.joshmcdonald.info/ -- 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/ -- 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/ -- 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/
[flexcoders] Right side sub-menu change to left side
Dear All, May be I miss it. Normally, when menu control display sub-menu, is is on right side. How to change it on left side. My control is on the top-right corner. When it display submenu, it is on the top of original menu. It doesn't mvoe to left side. If it can't, any workaround ?
[flexcoders] Refresh screen after changing 'Global' font size
How to refresh screen ? Though I increase font size, it doesn't refresh. I use invalidatesize() but not success
[flexcoders] Re: Refresh screen after changing 'Global' font size
I'm confused. It works for Application.application.setstyle(fontSize,12) --- In flexcoders@yahoogroups.com, itdanny2002 [EMAIL PROTECTED] wrote: How to refresh screen ? Though I increase font size, it doesn't refresh. I use invalidatesize() but not success
Re: [flexcoders] Re: Open Source SDK SVN down
On Thursday 16 Oct 2008, reflexactions wrote: Finding the download location for the debug version of player on Adobe site is always very very hard... Agreed. There are many links it might be from the main download page (other downloads, additional downloads, different O/S or browser, etc.) and only one of them is any use. -- Tom Chiverton Helping to carefully orchestrate collaborative CEOs This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Reusing HTTPService
No worries. BTW, there is another way of doing it - each request is represented by some object which creates HTTPService and subscribes for the response. Because each instance sends single request, there is no problem to decode the response. Cheers, Dmitri. --- In flexcoders@yahoogroups.com, lagos_tout [EMAIL PROTECTED] wrote: Thanks, Dmitri. This is a great idea. Unfortunately though, in this project, I don't have control over what's returned by the server, so I can't add the requestId. But with your suggestion, you still end up needing to match requestIds with handlers on the client right? So do you use a massive switch for that? Thanks again. LT --- In flexcoders@yahoogroups.com, Dmitri Girski mitek17@ wrote: If I were you, I would simply add the requestId into the server's response, so client always knows which request-response pair it handles. This idea lies behind most of the transmissions protocols. Cheers, Dmitri. --- In flexcoders@yahoogroups.com, lagos_tout lagos.tout@ wrote: Hi, I'm re-using an instance of HTTPService, changing the request arguments to get different responses from the server. But I found that if, for instance, I made 3 calls this way with the HTTPService, each of the 3 result handlers registered for each call is executed every time a result returned. I solved this by storing a reference to the unique AsyncToken returned by each service call and matching it to the AsyncToken contained in each ResultEvent's token property in order to determine which result handler to execute. I'm not terribly happy with this setup. It seems messy. I'd appreciate any suggestions on how I can reuse an HTTPService instance without ending up with long switch statements with countless if thisAsyncToken then do thisHandler, else if thatAsyncToken then do thatHandler... and so on. Thanks much. LT
Re: [flexcoders] Re: Extending UIComponent memory issues.
Doug, Jason, Since I am a self-centered person that doesn't like to be misunderstood, ;-), I could have brought up the 4000 object issue. In previous threads with Jason, he said this was a requirement from the higher order. So I left it where it was, 4000 objects. As far as the IUIComponent issue, it is Container that requires them not 'Flex' itself. This is where as flex projects, Web 2.0 and performance are reaching a point where it's not just making a Flash IDE animation anymore. When the requirements of these projects come to this level there is more engineering involved and Flex out of the box is not going to handle situations like this. The absolute way to do this is creating a UIComponent subclass that is the container, creating your layout algorithm in this component. Subclass FlexSprite, make that your content loader component. Then instantiate the content components in the UIComponent container. This is the lean version of your design I envision. You could even recycle the content renderers in your container component Lot's of things you could do ;-) Mike On Wed, Oct 15, 2008 at 10:47 PM, flexaustin [EMAIL PROTECTED] wrote: Doug, what would you go with? Sprite? I thought sprite, but you need to implement all the IUIComponent stuff or use composition correct? Wouldn't composition reduce the benefits gained by using Sprite? Doug, if you message me and I can tell you where to see the component. jason (underscore) newport {at) hot mail --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Doug McCune [EMAIL PROTECTED] wrote: You've got 4,000 things all moving around at once? Are all 4,000 of those actually visible? 4,000 UI components seems like a lot for any layout manager to have to deal with. I'd try to focus on figuring out how to reduce the number of UIComponents before I worried about how much memory each one is taking up. I may be totally off base, but I can't imagine a scenario where you want 4,000 images all on the screen at the same time. And if you do really need to load 4,000 swfs all at the same time then you probably want something that's lighter than custom UIComponent classes, which would keep those 4,000 objects out of the normal invalidation/validation cycles of the display list. Doug On Wed, Oct 15, 2008 at 1:34 PM, Michael Schmalle [EMAIL PROTECTED]wrote: A side note, You are doing some very expensive leg work in the 'content' setter. You need to break that out into commitProperties() and updateDisplayList(). You would get a huge performance increase for sure. As far as the memory, doesn't look to weird, event listeners without weak references can make thing hang around as well. Mike On Wed, Oct 15, 2008 at 3:08 PM, flexaustin [EMAIL PROTECTED] wrote: So I have this base component, that when running profiler, says its eating up tons of memory. I have about 4000 of these at one time in my Flex app (see component code below). This base component is extended by two other components, which are then extended by two more components each so 3 or 4 levels above this base component. 1. My first question is does the profiler just point to the base class or are there actually 4000 of these being created outside of their extended children? 2. My 2nd question is is their anything wrong with the code below? Why is it eatin memory? The parameter content when pulled in is a swf file (icon) that is 5kb each so 5kb * 4000... you get the math. When I run this progam the CarouselImage's are using up 30% to 35% of my apps memory usage. And my app is eating up 725,000kb of mem usage, thus crashing my pretty decent computer. // --- BEGIN CODE -- package com.mysite.views.components { import flash.display.DisplayObject; import flash.system.ApplicationDomain; import mx.core.UIComponent; import mx.events.ResizeEvent; public class CarouselImage extends UIComponent { // Content private var _content:DisplayObject; private var _contentWidth:Number; private var _contentHeight:Number; public function CarouselImage(content:*=null) { super(); // Set content this.content = content; } // Properties [Inspectable] public function get content():DisplayObject { return _content; } public function set content(value:*):void { if (_content != null) { removeChild(_content) removeEventListener(ResizeEvent.RESIZE, handleResize); } if (value is String) { try { value = ApplicationDomain.currentDomain.getDefinition(value); } catch (error:*) { // Do nothing } } if (value is Class) value = new value(); _content = value as DisplayObject; if (_content != null) { _contentWidth = _content.width; _contentHeight = _content.height;
[flexcoders] Re: TabNavigator - have to click twice on tab to display page
All - thanks for your help. It is a bug with Adobe - here is the url. http://bugs.adobe.com/jira/browse/SDK-17120 Hyder mentioned at the very beginning of the thread - thanks --- In flexcoders@yahoogroups.com, donald_d_hook [EMAIL PROTECTED] wrote: _rico - you may be right. Thanks! --- In flexcoders@yahoogroups.com, rleuthold rleuthold@ wrote: Maybe the issue is related to this bug - http://bugs.adobe.com/jira/browse/SDK-15974 _rico --- In flexcoders@yahoogroups.com, donald_d_hook donald_d_hook@ wrote: Tracy - thanks - thats what I have started to do... I appreciate the feedback from you and everyone else - thanks! --- In flexcoders@yahoogroups.com, Tracy Spratt tspratt@ wrote: This is definitely not normal behavior, so you must have something unusual going on. We haven't seen any code so we are just stabbing in the dark. Rip out everything until it works, start adding it back til it breaks. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tim Hoff Sent: Friday, September 26, 2008 12:52 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: TabNavigator - have to click twice on tab to display page So, when you click the 2nd tab, does the 2nd tab remain selected, or does it switch back to the first tab? If it stays on the 2nd tab, are you still seeing the content from the first tab, or is it just blank; until you click the 2nd tab again? -TH --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , donald_d_hook donald_d_hook@ wrote: TH - No, I m not doing that, thats what I thought it was originally. Thanks --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tim Hoff TimHoff@ wrote: Cool, one other thing to check would be if you are manually setting the selectedIndex of the TabNavigator anywhere. Just guessing though; without seeing the code. -TH --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , donald_d_hook donald_d_hook@ wrote: TH - THanks - I will give it a shot and see. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tim Hoff TimHoff@ wrote: Sounds suspiciously like a callLater() solution. Have you tested whether the creationComplete event is actually firing, before you click tab2, for all of the child components? Sometimes not setting the data, in a timely fashion, can also make a view appear blank. -TH --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Manu Dhanda manuraj.dhanda@ wrote: Hi Tracy, It's really an issue with TabNavigator and we had faced it. I won't say that I need to click the tab twice, but I need to switch back to Tab1 and then come back to Tab2 to see the content on my 2nd Tab. And yes, already tried with creationPolicy='all', but it din't worked. -Manu. Tracy Spratt wrote: Are you programatically doing anything with the content of tab 2? Do you understand about deferred instantiation and creationPolicy? Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of donald_d_hook Sent: Thursday, September 25, 2008 2:15 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] TabNavigator - have to click twice on tab to display page I have a tab navigator with 3 tabs. Each tab has a canvas with several components on it. when the page is displayed, you see the 1st tab. When I navigate to the 2nd tab, I have to click the 2nd tab twice in order to view the contents of the tab. It looks like the first click on the 2nd tab goes back to the first tab, then the 2nd click displays the contents of the 2nd tab. Was wondering if anyone has experienced
[flexcoders] [LCDS] Using where in in the SQL assembler
I am unsuccesfully trying using a SELECT index_id, vpn_id FROM circuit WHERE index_id in ('123', '234') sql statement with LCDS' SQL assembler. In my data-management-config.xml, I configured the sql as SELECT index_id, vpn_id FROM circuit WHERE index_id in (#list#). And in Flex, I tried sending 'list' as an Array, a String (with and without quotes) but without success. It always return an empty set but does not return a fault. Does anybody know how I should code this? Thanks, Benjamin.
RE: [flexcoders] Can AIR call local DLLs?
The basic answer, anointed by Adobe, no.. There is no COM bridge in Air, and I don't expect there to be one either. Of note: http://www.mikechambers.com/blog/2008/01/17/commandproxy-net-air-integra tion-proof-of-concept/ another approach http://www.merapiproject.net/ Although that's a java bridge K From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of thegators_2002 Sent: Wednesday, October 15, 2008 8:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Can AIR call local DLLs? I have a couple older Flash 8 apps that are wrapped inside Zinc, and that call a custom DLL I did that takes some XML output from the Flash and blends it with an XML report template to spit out a PDF. I have some new applications to do, converting Flex web apps to AIR. But I need to print PDF reports for them as well. For AIR, is there any way that I can use the same custom print DLLs I have already written? I don't want to write these reports in Flex, they are really long and complex, and it would be a bad idea to have two versions to maintain along with the web-based versions. I just upgraded to Flex 3, but haven't seen this exact issue dealt with - printing to a PDF using some sort of external report template, rather than writing it out inside Flex. Thanks! image001.jpgimage002.jpg
[flexcoders] Game programming with flex
I have just posted a series of articles that show you how to create a game with Flex. http://www.brighthub.com/internet/web-development/articles/11010.aspx It's a work in progress, so any suggestions you may have would be appreciated.
[flexcoders] Flash Player 10 debug?
Hi Everyone, quick question that I've not found an answer to. Is it OK to install the debug version of Flash Player 10 and still work with Flex 3 and Flash CS3, any problems or anything with that? Or do we have to stick with Flash player 9 until the next Flex release for FP 10 compatibility? Thanks in advance, Peter. -- Peter Witham http://www.evolutiondata.com Internet and Multimedia developer Certified Flash Designer.
Re: [flexcoders] Re: Open Source SDK SVN down
ok... - Original Message From: reflexactions [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, 16 October, 2008 8:40:45 AM Subject: [flexcoders] Re: Open Source SDK SVN down Finding the download location for the debug version of player on Adobe site is always very very hard... Everytime there is a new release you seem to have to run around many different links and sections trying to find the magic one that leads to the download location. Maybe put the download link permanently in the developer connection home page then tell people thats where you go. --- In [EMAIL PROTECTED] ups.com, Matt Chotin [EMAIL PROTECTED] wrote: And the culprit is... Folks downloading debug players from Subversion. Please don't use Subversion as your download location, thanks! Matt On 10/15/08 2:05 PM, Josh McDonald [EMAIL PROTECTED] wrote: Yeah It's back up for me, cheers! On Thu, Oct 16, 2008 at 2:15 AM, Matt Chotin [EMAIL PROTECTED] wrote: Should be back up now, we're investigating. The load on the server is high and we're not sure why.. On 10/15/08 2:30 AM, Josh McDonald [EMAIL PROTECTED] wrote: opensource.adobe. com/svn/* http://opensource. adobe..com/ svn/* http://opensource. adobe.com/ svn/* is toast from where I'm sitting. Is it just me? -Josh - - -- -- Flexcoders Mailing List FAQ: http://groups. yahoo.com/ group/flexcoders /files/flexcoder sFAQ.txt Alternative FAQ location: https://share. acrobat.com/ adc/document. do? docid=942dbdc8- e469-446f- b4cf-1e62079f684 7 Search Archives: http://www.mail- archive.com/ flexcoders% 40yahoogroups. comYahoo! Groups Links From Chandigarh to Chennai - find friends all over India. Go to http://in.promos.yahoo.com/groups/citygroups/
[flexcoders] adding the user input to an arraycollection
i would like to get the input from the user using textinput boxes and add them to the arraycollection defined in the code below. i had defined a method addToArray for serving the purpose.what should be the type of the arguments passed to that function. th code follows: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var bookSales:ArrayCollection = new ArrayCollection( [{bookType: Fiction, Sales: 143}, {bookType: Nonfiction, Sales: 189}, {bookType: Technology, Sales: 178}, {bookType: Self-help, Sales: 224}]); private function chartLabel(dataItem:Object, field:String, index:int, dataPercent:Number):String { return dataItem.bookType + represents \n + dataPercent + % \n of our sales; } private function addToArray():void{ } ]] /mx:Script mx:Panel title=Pie Chart mx:PieChart width=100% height=100% dataProvider={bookSales} showDataTips=true mx:series mx:PieSeries field=Sales labelPosition=callout labelFunction=chartLabel mx:fills mx:RadialGradient mx:entries mx:GradientEntry color=#E9C836/ mx:GradientEntry color=#AA9127/ /mx:entries /mx:RadialGradient mx:RadialGradient mx:entries mx:GradientEntry color=#A1AECF/ mx:GradientEntry color=#47447A/ /mx:entries /mx:RadialGradient mx:RadialGradient mx:entries mx:GradientEntry color=#339932/ mx:GradientEntry color=#339998/ /mx:entries /mx:RadialGradient mx:RadialGradient mx:GradientEntry color=#6FB35F/ mx:GradientEntry color=#497B54/ /mx:RadialGradient /mx:fills /mx:PieSeries /mx:series /mx:PieChart /mx:Panel /mx:Application Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/
[flexcoders] Re: The Repeater control and the getChildren() method
Hi, Well, i think i didn't explain my problem very well. The problem wasn't with the repeater, but the repeater parent. let's say my application is like this mx:Panel id=displayScreen mx:Repeater id=rep mx:Button id=toto/ mx:TextInput id=tata/ /mx:Repeater /mx:Panel I have to code a very generic code, which doesn't need to know the component ids, even if they have some. I made a method which need to know to component parent that need to be match with the datas. let say my method is fillFields(parent:UIComponent, datas:XML). then i'll use it like this fillFields(displayScreen, datas). the method will check the parent childs, and recursively will find all the component in the dispalyScreen and check in the XML document if there is a data for the component. Some guys will tell me to use the databinding, but the datas that i receive from my httpService isnt well formed, that's why i have to manually match datas with components. Now the problem is that when i'll call the fillFields method on the panel (like in the example), the getChildren method of the panel wont give the repeater like a child. If i want to know the repeaters in the panel, i have to use the mx_internal namespaced method childRepeaters. I managed to change the way i use the repeater, and i created a custom component which is a box with the repeater inside. This way the getChildren method will be able to get the box and pass it the datas. This make me create the repeater in ActionScript, what's a real pain. I overrided the addchild method and used this one override public function addChild(child:DisplayObject):DisplayObject { var descriptorProps:Object = {}; descriptorProps.type = UIComponent(child).descriptor.type; descriptorProps.id = UIComponent(child).descriptor.id; descriptorProps.propertiesFactory = UIComponent(child).descriptor.propertiesFactory; descriptorProps.events = UIComponent(child).descriptor.events; descriptorProps.effects = UIComponent(child).descriptor.effects; descriptorProps.document = UIComponent(child).descriptor.document; _repeater.childDescriptors.push(new UIComponentDescriptor(descriptorProps)); return _repeater.addChild(child); } And now i have a problem with the initializeRepeater method. all the component i use are Box-based, and i have this error now TypeError: Error #1034: Echec de la contrainte de type : conversion de [EMAIL PROTECTED] en com.probtp.fwg.components.PButton impossible. at mx.core::UIComponent/createReferenceOnParentDocument()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8199] at mx.core::Container/createComponentFromDescriptor()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:3648] at mx.core::Repeater/createComponentFromDescriptor()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Repeater.as:734] at mx.core::Repeater/createComponentsFromDescriptors()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Repeater.as:786] at mx.core::Repeater/initializeRepeater()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Repeater.as:529] at com.probtp.fwg.components::Prep/fillInternalFields()[C:\Code\CC_Views\PB19664_IG_ClientLeger-project_Dev1_View1\vob0003-vob\IG_ClientLeger-project-component\IG_Core\src\com\probtp\fwg\components\Prep.as:79] at com.probtp.fwg.components::Prep/set dataProvider()[C:\Code\CC_Views\PB19664_IG_ClientLeger-project_Dev1_View1\vob0003-vob\IG_ClientLeger-project-component\IG_Core\src\com\probtp\fwg\components\Prep.as:70] at com.probtp.util::ScreenUtils/fillFields()[C:\Code\CC_Views\PB19664_IG_ClientLeger-project_Dev1_View1\vob0003-vob\IG_ClientLeger-project-component\IG_Core\src\com\probtp\util\ScreenUtils.as:198] at com.probtp.util::ScreenUtils/fillFields()[C:\Code\CC_Views\PB19664_IG_ClientLeger-project_Dev1_View1\vob0003-vob\IG_ClientLeger-project-component\IG_Core\src\com\probtp\util\ScreenUtils.as:205] at com.probtp.IG_ContactsModule.components::F0010/onResponseReceive()[C:\Code\CC_Views\PB19664_IG_ClientLeger-project_Dev1_View1\vob0003-vob\IG_ClientLeger-project-component\IG_ModuleCore\src\com\probtp\IG_ContactsModule\components\F0010.mxml:32] at com.probtp.IG_ContactsModule.components::F0010/initModule()[C:\Code\CC_Views\PB19664_IG_ClientLeger-project_Dev1_View1\vob0003-vob\IG_ClientLeger-project-component\IG_ModuleCore\src\com\probtp\IG_ContactsModule\components\F0010.mxml:24] at com.probtp.IG_ContactsModule.components::F0010/___F0010_Canvas1_creationComplete()[C:\Code\CC_Views\PB19664_IG_ClientLeger-project_Dev1_View1\vob0003-vob\IG_ClientLeger-project-component\IG_ModuleCore\src\com\probtp\IG_ContactsModule\components\F0010.mxml:2] at flash.events::EventDispatcher/dispatchEventFunction() at flash.events::EventDispatcher/dispatchEvent() at
[flexcoders] about cairngorm's ViewHelper
Hi all I am very confused in using cairngorm framework, when data comes back from server to the command's result method i want to notify the view to refresh.(or other actions). in most cases i used data binding, but sometimes i need other ways to notify the view. ViewHelper was not recommended in cairngorm now, i do't know how to do this :( Any help would be greatly appreciated. Thanks
[flexcoders] Locale in Flex
How do I Get Client specific System Locale in flex suppose if the client is working in japan the locale i want is ja_JP or if he is in us locale i want is en_US
[flexcoders] dynamic TileList
I'm wondering if there is a way to have a TileList dynamically determine how many rows and columns it should display based on the browser window size. (not just based on screen resolution since I don't want to assume that the users will allows have their browsers maximized) I'd like to just specify the rowHeight=225 columnWidth=125 and let the tilelist fill up the screen intelligently. Is this possible or am I better off with a different control? Thanks, Arshak
Re: [flexcoders] Problem with scaleX for system fonts!
I know scaling TextField and UITextField works, so your problem has to do with how the Label component is overriding the scaleX and scaleY properties. I'm not sure exactly in the code the disconnect is. - Daniel Freiman On Thu, Oct 16, 2008 at 5:30 AM, akila_ksri [EMAIL PROTECTED] wrote: Hi, I need to apply horizontal scaling for a text with 'Arial' font. lbl.scaleX = 0.70 simply does not work . I can only see that there is a change in the width of the label. Is there anything i am missing out to scale the text?? Is scaling not applicable for system fonts? ( I tried the same with font 'Verdana', but again, no luck!) Any help would be greatly appreciated. Thanks, Akila
Re: [flexcoders] Re: Open Source SDK SVN down
Google has found the flash debug player for me as the first hit 100% of the time. On Wed, Oct 15, 2008 at 11:10 PM, reflexactions [EMAIL PROTECTED]wrote: Finding the download location for the debug version of player on Adobe site is always very very hard... Everytime there is a new release you seem to have to run around many different links and sections trying to find the magic one that leads to the download location. Maybe put the download link permanently in the developer connection home page then tell people thats where you go. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Matt Chotin [EMAIL PROTECTED] wrote: And the culprit is... Folks downloading debug players from Subversion. Please don't use Subversion as your download location, thanks! Matt On 10/15/08 2:05 PM, Josh McDonald [EMAIL PROTECTED] wrote: Yeah It's back up for me, cheers! On Thu, Oct 16, 2008 at 2:15 AM, Matt Chotin [EMAIL PROTECTED] wrote: Should be back up now, we're investigating. The load on the server is high and we're not sure why. On 10/15/08 2:30 AM, Josh McDonald [EMAIL PROTECTED] wrote: opensource.adobe.com/svn/* http://opensource.adobe.com/svn/* http://opensource.adobe.com/svn/* is toast from where I'm sitting. Is it just me? -Josh -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do? docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Re: My Flex Form
The problems you are having are related to very basic actionscript and object oriented programming knowledge. Don't get me wrong, I'm in no way blaming you, I just want to give you the advice to read some documentation about AS and OO programming because otherwise you will be loosing much time with basic things! You can start with Programming ActionScript 3.0 from the Flex documentation: http://livedocs.adobe.com/flex/3/html/help.html?content=Part6_ProgAS_1.html Now to the problem. You are getting this error because the Name field is not defined where you are calling it, but in the FormComponent. If you instantiate the FormComponent with an id of form for example, you can access it with: form.Name. Note that it has to be declared public in the component to be able access it from outside the component. Hope it helps! On Thu, Oct 16, 2008 at 9:10 AM, brucewhealton [EMAIL PROTECTED]wrote: Hi, thanks for the help. I did what you mention below. Someone else posted somethingsimilar about putting the Object property into the function. It still doesn't like that yet. It gives me an error on the line in the function where I am assigning values to the Object properties... Specifically it doesn't like: obj.Name = Name.text; it says: Access to undefined property Name Now, one problem might be that I am not passing any parameters to the function. I'll see about the way you specified the function and see if that fixes things. To see more specifically what I did, please click on this to download the zip archive file of my Flex Project: http://fwweb.biz/ContactForm.zip thanks, Bruce --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Haykel BEN JEMIA [EMAIL PROTECTED] wrote: First forget what I said about the result handler because I thought you should receive the data from the service while in reality you want to send it! Now back to the code in the CDATA block. It must be clear that the CDATA block is not a function!! It is like writing code for a class but without the class block delimiters, I mean without public class ClassName { and the closing }. So this code is illegal in a CDATA block (more specifically the second line): var obj:Object = new Object(); obj.Name = Name.text; The second line must live in a function. In your case put the code in the click event handler of the send button: private function sendButtonClickHandler(event:MouseEvent):void { var obj:Object = new Object(); obj.Name = Name.text; myContactService.send(obj); } On Thu, Oct 16, 2008 at 7:49 AM, brucewhealton -- Haykel Ben Jemia Allmas Web RIA Development http://www.allmas-tn.com
RE: [flexcoders] Flash Player 10 debug?
Theres nothing to stop you except the (small) risk that you miss a bug or difference that only occurs in FP9. Personally I installed FP10 in internet explorer (which I don't normally use at all) and tested on that until I was reasonably happy that everything was working the same way as it was in 9. Having just got CS4 I bit the bullet and updated all my players to 10 this morning. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Witham Sent: 15 October 2008 22:31 To: flexcoders@yahoogroups.com Subject: [flexcoders] Flash Player 10 debug? Hi Everyone, quick question that I've not found an answer to. Is it OK to install the debug version of Flash Player 10 and still work with Flex 3 and Flash CS3, any problems or anything with that? Or do we have to stick with Flash player 9 until the next Flex release for FP 10 compatibility? Thanks in advance, Peter. -- Peter Witham http://www.evolutiondata.com http://www.evolutiondata.com Internet and Multimedia developer Certified Flash Designer. __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __
[flexcoders] sailorsea21 - How can I add the progress loading box when I load a module?
Hi everyone, how can I add the progress loading box when I load a module? Is it an automated thing with flex or must I code it? Thanks. :)
Re: [flexcoders] Flash Player 10 debug?
I haven't add any problems. Alan On Oct 15, 2008, at 5:31 PM, Peter Witham wrote: s it OK to install the debug version of Flash Player 10 and still work with Flex 3 and Flash CS3,
Re: [flexcoders] about cairngorm's ViewHelper
On Thursday 16 Oct 2008, Fu Di wrote: ViewHelper was not recommended in cairngorm now, i do't know how to do this :( You could use ChangeWatcher to observe the model from the view. You might also want to look at the Universal Mind extensions to Cairngorm too. -- Tom Chiverton Helping to adaptively drive methodologies This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * 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] Re: The Repeater control and the getChildren() method
On Thursday 16 Oct 2008, lysfael wrote: Some guys will tell me to use the databinding, but the datas that i receive from my httpService isnt well formed, that's why i have to manually match datas with components. You could use a setter method (i.e. public function set myDatas(d:*):void{}) if you need more control over what happens, or a changeWatcher inside the component observing the public bindable. -- Tom Chiverton Helping to preemptively engage out-of-the-box dot-com error-free platforms This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by The Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.comYahoo! Groups Links * To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ * Your email settings: Individual Email | Traditional * To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) * To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] * To unsubscribe from this group, send an email to: [EMAIL PROTECTED] * Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/
[flexcoders] Re: Problem with scaleX for system fonts!
--- In flexcoders@yahoogroups.com, akila_ksri [EMAIL PROTECTED] wrote: Hi, I need to apply horizontal scaling for a text with 'Arial' font. lbl.scaleX = 0.70 simply does not work . I can only see that there is a change in the width of the label. Is there anything i am missing out to scale the text?? Is scaling not applicable for system fonts? ( I tried the same with font 'Verdana', but again, no luck!) Any help would be greatly appreciated. Try one of the following: 1) Set the blendMode to layer 2) Set the container's cacheAsBitmap to true 3) Embed the font HTH; Amy
[flexcoders] Adding Quantity to Cart
I created this cart and now I'm trying to code the actionscript to handle all the capabilities. So far I am able to add items to the cart using an ArrayCollection. Now, I am having trouble adding the quantity according to what the numeric stepper indicates. I'm using a standard tilelist and the numeric stepper is located in the item renderer. Also, I want to be able to increase the quantity if the same item gets added to the cart. Any suggestions please let me know. Below is a my code: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=vertical xmlns=* creationComplete=srv.send() mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] public var cartItems:ArrayCollection = new ArrayCollection(); public var formatter:CurrencyFormatter = null; public function buyItem(event:Event):void{ addItemToCart(event.target.data); } public function addItemToCart(product:Object):void{ cartItems.addItem({image: product.image, partNum: product.partNum, qty: 1, price: product.price}); } public function currencyFunction(item:Object, dgc:DataGridColumn):String{ if(formatter==null){ formatter = new CurrencyFormatter(); CurrencyFormatter(formatter).precision=2; CurrencyFormatter(formatter).rounding=up; } return formatter.format(item[dgc.dataField]); } ]] /mx:Script mx:CurrencyFormatter id=cf currencySymbol=$ precision=2/ mx:HTTPService id=srv url=http://www.cedcat.com/data/overStock.xml; useProxy=false result=(srv.lastResult.overStock.product) showBusyCursor=true/ mx:TileList width=100% height=100 dataProvider={srv.lastResult.overStock.product} mx:itemRenderer mx:Component cartOverStock buy=outerDocument.buyItem(event)/ /mx:Component /mx:itemRenderer /mx:TileList mx:DataGrid id=cartGrid textAlign=center dataProvider={cartItems} mx:columns mx:DataGridColumn id=partNum width=120 headerText=Product dataField=partNum editable=false/ mx:DataGridColumn id=quantity width=60 headerText=Qty rendererIsEditor=true dataField=qty editable=false/ mx:DataGridColumn width=80 headerText=Price dataField=price editable=false labelFunction=currencyFunction/ /mx:columns /mx:DataGrid /mx:Application // cartOverStock Component ?xml version=1.0 encoding=utf-8? mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=145 height=100 mx:Metadata [Event(buy)] /mx:Metadata mx:CurrencyFormatter currencySymbol=$ id=cf precision=2/ mx:VBox left=5 right=5 top=5 bottom=5 verticalGap=0 mx:Label text={data.partNum}/ mx:HBox width=100% height=100% horizontalGap=3 mx:Canvas width=100% height=100% borderStyle=solid cornerRadius=4 borderThickness=3 id=canvas1 backgroundColor=#FF mx:Image width=100% height=100% verticalAlign=middle horizontalAlign=center source={data.image} completeEffect=Fade/ /mx:Canvas mx:VBox width=55 height=100% verticalAlign=middle horizontalAlign=center verticalGap=2 mx:Label text={cf.format(data.price)} width=55 textAlign=left fontWeight=bold/ mx:NumericStepper width=100% id=qtyNumStepper minimum=1/ mx:LinkButton label=Buy width=55 click=dispatchEvent(new Event('buy',true))/ /mx:VBox /mx:HBox /mx:VBox /mx:Canvas
Re: [flexcoders] dynamic TileList
On Oct 16, 2008, at 1:35 AM, arshak_navruzyan wrote: I'd like to just specify the rowHeight=225 columnWidth=125 and let the tilelist fill up the screen intelligently. Is this possible or am I better off with a different control? I might be reading this wrong but... that's how the TileList works You can either specify an explicit number of rows/columns or just pass it a row height and column width and it'll fill up the available area. cheers, jon
[flexcoders] Problem with scaleX for system fonts!
Hi, I need to apply horizontal scaling for a text with 'Arial' font. lbl.scaleX = 0.70 simply does not work . I can only see that there is a change in the width of the label. Is there anything i am missing out to scale the text?? Is scaling not applicable for system fonts? ( I tried the same with font 'Verdana', but again, no luck!) Any help would be greatly appreciated. Thanks, Akila
[flexcoders] newbie question on synchronous and asynchronous events
From Flex cookbook beta on adobe.com, How to handle events in a TestCase? article: Testing behavior in a TestCase often involves waiting for asynchronous events. If the TestCase methods only concern synchronous events like property change events fired immediately when the property is set, no special handling is required. It is only when asynchronous events are involved that extra care needs to be taken. A common example would be waiting for a URLLoad to finish or a UIComponent to finish creation. My question is: How do I distinguish between the synchronous and asynchronous events? From what is said, if the event is synchronous, then I could test for event effect in synchronous manner. For example: public function testSync(){ this.myValue = 0 addEventListener(MySynch.Sync, listener) dispatchEvent(new MySynch) assertEquals (this.myValue, 10) } public function listener(){ this.myValue = 10 } Now, if I write the code for WebService send, test code would not work. Am I getting this right? If so, how do I distinguish between the synchronous and asynchronous events? Thanks, Dan
Re: [flexcoders] newbie question on synchronous and asynchronous events
I always treat events as asynchronous - I don't see how else you can deal with them. I'll have to check out the cookbook article.. Paul - Original Message - From: Dan [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, October 16, 2008 4:03 PM Subject: [flexcoders] newbie question on synchronous and asynchronous events From Flex cookbook beta on adobe.com, How to handle events in a TestCase? article: Testing behavior in a TestCase often involves waiting for asynchronous events. If the TestCase methods only concern synchronous events like property change events fired immediately when the property is set, no special handling is required. It is only when asynchronous events are involved that extra care needs to be taken. A common example would be waiting for a URLLoad to finish or a UIComponent to finish creation. My question is: How do I distinguish between the synchronous and asynchronous events? From what is said, if the event is synchronous, then I could test for event effect in synchronous manner. For example: public function testSync(){ this.myValue = 0 addEventListener(MySynch.Sync, listener) dispatchEvent(new MySynch) assertEquals (this.myValue, 10) } public function listener(){ this.myValue = 10 } Now, if I write the code for WebService send, test code would not work. Am I getting this right? If so, how do I distinguish between the synchronous and asynchronous events? Thanks, Dan -- 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
[flexcoders] Re: adding the user input to an arraycollection
Add them as Object, the idea is to update the bookSales if I'm reading this right? so when you pass the to the function you do it as pair values {bookType: Fiction, Sales: 143}. HTH, Cheers, Claudiu --- In flexcoders@yahoogroups.com, sainath evuri [EMAIL PROTECTED] wrote: i would like to get the input from the user using textinput boxes and add them to the arraycollection defined in the code below. i had defined a method addToArray for serving the purpose.what should be the type of the arguments passed to that function. th code follows: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Script ![CDATA[ import mx.collections.ArrayCollection; [Bindable] private var bookSales:ArrayCollection = new ArrayCollection( [{bookType: Fiction, Sales: 143}, {bookType: Nonfiction, Sales: 189}, {bookType: Technology, Sales: 178}, {bookType: Self-help, Sales: 224}]); private function chartLabel(dataItem:Object, field:String, index:int, dataPercent:Number):String { return dataItem.bookType + represents \n + dataPercent + % \n of our sales; } private function addToArray():void{ } ]] /mx:Script mx:Panel title=Pie Chart mx:PieChart width=100% height=100% dataProvider={bookSales} showDataTips=true mx:series mx:PieSeries field=Sales labelPosition=callout labelFunction=chartLabel mx:fills mx:RadialGradient mx:entries mx:GradientEntry color=#E9C836/ mx:GradientEntry color=#AA9127/ /mx:entries /mx:RadialGradient mx:RadialGradient mx:entries mx:GradientEntry color=#A1AECF/ mx:GradientEntry color=#47447A/ /mx:entries /mx:RadialGradient mx:RadialGradient mx:entries mx:GradientEntry color=#339932/ mx:GradientEntry color=#339998/ /mx:entries /mx:RadialGradient mx:RadialGradient mx:GradientEntry color=#6FB35F/ mx:GradientEntry color=#497B54/ /mx:RadialGradient /mx:fills /mx:PieSeries /mx:series /mx:PieChart /mx:Panel /mx:Application Connect with friends all over the world. Get Yahoo! India Messenger at http://in.messenger.yahoo.com/?wm=n/
Re: [flexcoders] Locale in Flex
You need to be more specific. If you're running a web app is highly porbably to save that into a cookie on user computer. You pass that to flash as input parameter and precess it when flex loads (mainappp creationComplete or something - you'll have it in the :parameters variable in the main app). if you want to read it form client's computer that is doable to google it for some solution it must be there. There are lots of utlities functions inside the framework. HTH, Claudiu - Original Message From: Ciby Jose [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Thursday, October 16, 2008 1:20:09 PM Subject: [flexcoders] Locale in Flex How do I Get Client specific System Locale in flex suppose if the client is working in japan the locale i want is ja_JP or if he is in us locale i want is en_US
[flexcoders] Override mx:Window close function
I'm attempting to override a mx:Window's response to a close, so that if someone closes the window, it only hides it. The use case is that it's a properties window that can then be reopened when they select another element. The problem, of course, is that once a window has been closed you cannot reopen it. I have overridden the close function, but that is not having the effect I want. It seems I somehow need to override the event that is called when the deactivate event is called. How might I go about doing this?
Re: [flexcoders] Override mx:Window close function
Hi, If I remeber correctly, you need to listen for window closing event and call event.preventDefault(). This will stop the default behavior and then allow you to hide the window, setting the visible or whatever implementation you have. Mike On Thu, Oct 16, 2008 at 12:11 PM, Nick Collins [EMAIL PROTECTED] wrote: I'm attempting to override a mx:Window's response to a close, so that if someone closes the window, it only hides it. The use case is that it's a properties window that can then be reopened when they select another element. The problem, of course, is that once a window has been closed you cannot reopen it. I have overridden the close function, but that is not having the effect I want. It seems I somehow need to override the event that is called when the deactivate event is called. How might I go about doing this? -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
[flexcoders] Repeater control and custom Component
Hello, Since it's not the same problem as the old one, i post a new topic on this, i hope this way to do enter in the ToS. I created a component Box-Based, which contains a repeater and some other attributes. Since my english isn't perfect i'll post part of the code i produced and tell you what's the problem now. public function Prep() { super(); _repeater = new Repeater(); _repeater.dataProvider = _dataProvider; super.addChild(_repeater); } override protected function createChildren():void { this.creationPolicy = ContainerCreationPolicy.NONE; super.createChildren(); _repeater.childDescriptors = this.childDescriptors; } private function fillInternalFields():void { if(_dataProvider != null) { _repeater.dataProvider = _dataProvider; _repeater.initializeRepeater(this.parent as IContainer,true); } } the fillInternalFields() is a method called when i set the datas of the component. i get an error in the createReferenceOnDocument method as it's set here TypeError: Error #1034: Echec de la contrainte de type : conversion de [EMAIL PROTECTED] en mx.controls.Button impossible. at mx.core::UIComponent/createReferenceOnParentDocument()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\UIComponent.as:8199] at mx.core::Container/createComponentFromDescriptor()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Container.as:3648] at mx.core::Repeater/createComponentFromDescriptor()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Repeater.as:734] at mx.core::Repeater/createComponentsFromDescriptors()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Repeater.as:786] at mx.core::Repeater/initializeRepeater()[E:\dev\3.0.x\frameworks\projects\framework\src\mx\core\Repeater.as:529] at com.probtp.fwg.components::Prep/fillInternalFields()[C:\Code\CC_Views\PB19664_IG_ClientLeger-project_Dev1_View1\vob0003-vob\IG_ClientLeger-project-component\IG_Core\src\com\probtp\fwg\components\Prep.as:72] where the line 8199 is r = parentDocument[id] = []; In the debug mode, r = null, parentDocument[id] = null . Any suggestions on what to do here will be welcome please.
Re: [flexcoders] Re: Open Source SDK SVN down
We're getting the player downloads page updated to have everything. Should go up today. We'll try to be better about making that location permanent. On 10/16/08 6:17 AM, Daniel Freiman [EMAIL PROTECTED] wrote: Google has found the flash debug player for me as the first hit 100% of the time. On Wed, Oct 15, 2008 at 11:10 PM, reflexactions [EMAIL PROTECTED] wrote: Finding the download location for the debug version of player on Adobe site is always very very hard... Everytime there is a new release you seem to have to run around many different links and sections trying to find the magic one that leads to the download location. Maybe put the download link permanently in the developer connection home page then tell people thats where you go. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Matt Chotin [EMAIL PROTECTED] wrote: And the culprit is... Folks downloading debug players from Subversion. Please don't use Subversion as your download location, thanks! Matt On 10/15/08 2:05 PM, Josh McDonald [EMAIL PROTECTED] wrote: Yeah It's back up for me, cheers! On Thu, Oct 16, 2008 at 2:15 AM, Matt Chotin [EMAIL PROTECTED] wrote: Should be back up now, we're investigating. The load on the server is high and we're not sure why. On 10/15/08 2:30 AM, Josh McDonald [EMAIL PROTECTED] wrote: opensource.adobe.com/svn/* http://opensource.adobe.com/svn/* http://opensource.adobe.com/svn/* http://opensource.adobe.com/svn/* is toast from where I'm sitting. Is it just me? -Josh -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Alternative FAQ location: https://share.acrobat.com/adc/document.do? docid=942dbdc8-e469-446f-b4cf-1e62079f6847 Search Archives: http://www.mail-archive.com/flexcoders% 40yahoogroups.comYahoo! Groups Links
Re: [flexcoders] Override mx:Window close function
Thanks! That did it. On Thu, Oct 16, 2008 at 11:16 AM, Michael Schmalle [EMAIL PROTECTED]wrote: Hi, If I remeber correctly, you need to listen for window closing event and call event.preventDefault(). This will stop the default behavior and then allow you to hide the window, setting the visible or whatever implementation you have. Mike On Thu, Oct 16, 2008 at 12:11 PM, Nick Collins [EMAIL PROTECTED]wrote: I'm attempting to override a mx:Window's response to a close, so that if someone closes the window, it only hides it. The use case is that it's a properties window that can then be reopened when they select another element. The problem, of course, is that once a window has been closed you cannot reopen it. I have overridden the close function, but that is not having the effect I want. It seems I somehow need to override the event that is called when the deactivate event is called. How might I go about doing this? -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
[flexcoders] Re: WebService operation faults propigating up to WebService fault handler.
I'll bounce this back up as it's hard to find any source code samples using the Actionscript version of WebService, and properly handling all the different errors, etc... Thanks, --- In flexcoders@yahoogroups.com, Todd [EMAIL PROTECTED] wrote: Hello All, I have a problem that I can't figure out. With WebService faults, and operations that return SOAPFaults...read on for the detais. 1) I've created my WebService through ActionScript (not the MXML Component). var ws:WebService = new WebService(); 2) I've attached a fault listener to it. I had to do this because it seems that SOAPEncoder errors were never being caught otherwise. ws.addEventListener(FaultEvent.FAULT, onServiceFault) 3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. For example, to call getInvoices, I have a command that calls into the appropriate method on the ServiceDelegate called getInvoices, which looks like: public function getInvoices(params:Object):void{ Operation(ws.SearchInvoices).encoder.strictNillability = true; var token:AsyncToken = ws.SearchInvoices(params); token.addResponder(this.responder); } As you can see, I'm using the AsyncToken, and adding the Commmand as the responder. The Command has both fault and result handlers as defined by the IResponder interface. 4) The this.responder is set during the contstructor of the Service Delegate, like so: public function ServiceDelegate(responder:IResponder) { this.responder = responder; } So, now my problem is, that when a SOAPFault is raised in the call to the SearchInvoices WebService operation, both the FAULT on my Command (which is the responder), AND the fault (onServiceFault ) for the WebService definition. I'd really rather not have this happen, but can't really figure out exactly what's going on. ALSO, I had to add the fault handler to the WebService because we were having all sorts of SOAPEncoder errors that were never being raised. What's someone to do? Is it that since I'm using the AsyncResponder to handle for the result/fault, that the WebService is never notified that the Fault has already been handled? What's the proper design around this? Is there a way to set the status that the Fault's been handled? It almost seems like the fault is being raised twice. Thanks, Todd
Re: [flexcoders] Flash Player 10 debug?
Thanks all, I noticed a blog post this morning mentioning that Flex B 3.2 was on the way that would support. I'd offer a link, but I cannot find it now. I think I'll go ahead and install it and try so very hard to resist buying CS4 just yet :) Thanks again, Peter. On Thu, Oct 16, 2008 at 8:51 AM, Jim Hayes [EMAIL PROTECTED] wrote: Theres nothing to stop you except the (small) risk that you miss a bug or difference that only occurs in FP9. Personally I installed FP10 in internet explorer (which I don't normally use at all) and tested on that until I was reasonably happy that everything was working the same way as it was in 9. Having just got CS4 I bit the bullet and updated all my players to 10 this morning. -Original Message- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Peter Witham *Sent:* 15 October 2008 22:31 *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Flash Player 10 debug? Hi Everyone, quick question that I've not found an answer to. Is it OK to install the debug version of Flash Player 10 and still work with Flex 3 and Flash CS3, any problems or anything with that? Or do we have to stick with Flash player 9 until the next Flex release for FP 10 compatibility? Thanks in advance, Peter. -- Peter Witham http://www.evolutiondata.com Internet and Multimedia developer Certified Flash Designer. __ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. __ -- Peter Witham http://www.evolutiondata.com Internet and Multimedia developer Certified Flash Designer.
[flexcoders] mogulus.com = looking for flex/flash talent in NYC
Hi All. I hope job postings are allowed in this mailing list. If not, apologies. We are looking for a talented Flex/Flash Designer/Developer to join the team immediately. Rather than post here though, anyone interested should check out: http://www.mogulus.com/info/jobdesc?id=7 Thanks Phil Worthington Chief Product Officer Mogulus
[flexcoders] MasterTextInput - Open Source
Guys, I developed a component for Flex called MasterTextInput. Fully Open Source project and created on Google Code. The MasterTextInput extends from standard TextInput class with new features and facilities implemented to help us in our day-to-day. Below the list of features already developed in this version v0.1: == AUTO CASE TYPE TEXT == Desc: Convert the text automatically typed in lowercase or uppercase. Property: capsType () Values: - normal: No case [DEFAULT] - lowercase: convert in Lower Case - upercase: convert in Uper Case - init: Convert the first letter of each word in Upercase. == AUTO TAB ON KEY PRESS ENTER == Desc: Automatically puts the focus on the next component when to pressed the Enter key. Performs the same function TAB key. Property: nextFocusOnEnter () Values: - True: Enable function [DEFAULT] - False: Disable function Events: - EnterPressed: Shot by pressing the ENTER key. It can be used for customized implementations. == AUTO RESTRICT == Desc: Restrictions on input of text already implemented. Property: onlyRestrict () Values: - None: Do not place restrictions [DEFAULT] - Number: Accepts only numeric characters - Alphabetic: Accepts only text - AlphabeticNoSpecial: Accepts only text, but does not accept special characters like: @ - / * ... Note: For customized restrictions continue using the property Restrict (). == EMBEDED VALIDATORS == Desc: Embedded Validation. Will no longer be necessary to create Validators for each field. Already there is the automatic validations only setting a property of MasterTextInput. Validation of the messages are automatically translated into Portuguese / English / Spanish without the need for any kind of implementation. Property: validator () Values: - none: No automatic validation [DEFAULT] - email: Validation of E-mail - phone: Validation of Phone Number - number: Validation of number - string: Validation of string - date: Validation of date Remarks: - All specific properties to each validator also exists in MasterTextInput. Eg. FormatInput validator to date, MaxValue for Number, MaxLenght for String and so for all other properties patterns of validators. - There is a public object called currentValidator he will always point to the current validator of his MasterTextInput, so you can track any changes of the validator dynamically, linking it to an Array for grouped validation and any other function. - The properties Trigger () and triggerEvent () exist in MasterTextInput in order to define when will be triggered the validation of the field. The default is to quit when the focus of the component. Property: ValidationLanguage () Desc: This property will be the language that will be displayed Validators messages. Values: - Portuguese: All messages are in Portuguese for validation. [DEFAULT] - English: Messages of validation in English. - Spanish: Messages of validation in Spanish. Remarks: - You can change the language dynamically just setting this property by Action Script. == CLEAR BUTTON == Desc: Will display a button with an X icon. When click the button, the field will be cleared. Property: showClearButton () Values: - True: Display button [DEFAULT] - False: Do not show button == Deployments in progress for version v0.2: * Auto formatters - Format DATE - Zip Format - Format Phone - Custom formatting: ###.###.##-## * Undo and Redo * Prompt Label I would ask those who are interested, make the download from the site of the project. Please tests and contribute with new ideas to be implemented. Project website: http://code.google.com/p/mastertextinput/ My site: http://www.flexpernambuco.com.br/ suggestions to: [EMAIL PROTECTED] I hope you enjoy! Regards, Juliano Mendes
[flexcoders] Need help for mx:MenuBar?
Hi, I want to use use mx:MenuBar and I need see the submenu when I mouse over top menu .but now I can see the submenu when I click topmenu. I want to use change() event to do some function so I need monse over to see sub menu. Thanks MK mx:MenuBar id=myMenuBar labelField=@label fillAlphas=[1.0, 1.0] fillColors=[#FFFDFD, #FFFDFD] mx:XMLList menuitem label=MenuItem A menuitem label=SubMenuItem A-1 enabled=False/ menuitem label=SubMenuItem A-2/ /menuitem menuitem label=MenuItem B type=check selected=true/ menuitem label=MenuItem C type=check selected=false/ menuitem label=MenuItem D menuitem label=SubMenuItem D-1 type=radio groupName=one/ menuitem label=SubMenuItem D-2 type=radio groupName=one selected=true/ menuitem label=SubMenuItem D-3 type=radio groupName=one/ /menuitem /mx:XMLList /mx:MenuBar
Re: [flexcoders] Custom index.template.html for each new project
bumpanybody? Mark Lapasa wrote: How can I edit the index.template.html so that everytime I create a Flex Project, it will always load up my custom template. I find myself always copying and pasting from a working index.template.html from another project everytime I create a new one. Thx, -mL Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. -- *Mark Lapasa* |* *Developer |* [EMAIL PROTECTED] *|* Tier**1*CRM Inc. |* **T:* 416.932-4784 | *www.Tier1CRM.com http://www.tier1crm.com/ * * * /Tier1CRM Inc. formerly StraightThrough CRM Solutions Inc./// Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail.
[flexcoders] Re: Need help for mx:MenuBar?
I see a demo at http://www.customware.net/repository/display/FLEX/Flex+Menu+Example The mouse over works after first click a menu. How this works?
RE: [flexcoders] Re: Efficiency and objects in the display list
I think that is correct. Quoting Alex, Navigator children must be Containers, Container children must be IUIComponents, and UIComponent children can be anything. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Wednesday, October 15, 2008 11:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Efficiency and objects in the display list --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: Container children must be UIComponents. You will need to add the sprites to a UIComponent first. I think technically there's just an interface that has to be implemented on whatever you add (IFlexDisplayObject? IUIComponent?). If you extend Sprite or whatever and implement whichever one is needed, you could add it to a container. -Amy
[flexcoders] Foriegn language support with an embeded font - need help
Hello - I currently have a Flex Application in which I have an embedded font (a SWF I created in Flash, and included all the glyphs needed for all the languages this app will support, i.e. - Japanese). In my app, I load in a labels XML file, which has the proper characters in it (English for English, Japanese for Japanese, etc), and use the values from that XML file to populate all my Labels. For whatever reason, only the English characters are working, Japanese and all other languages are not. I'm not exactly sure how I need to handle this - but I thought as long as my embedded font had the proper glyphs it would render the characters - apparently this is not true. Anyone have any experience with this type of set up, and any thoughts on how I can get foriegn language support going? thanks!
RE: [flexcoders] Re: Reusing HTTPService
Yes, AsyncToken is dynamic. Example: Invoke send: var oRequest:Object = new Object(); oRequest.Arg1 = value1; var callToken:AsyncToken = service.send(oRequest); callToken.callId = myQuery1; In the result Handler: var callToken:AsyncToken = event.token; var sCallId = callToken.callId; //myQuery1 switch(sCallId) {//Process the result conditionally case myQuery1: //do whatever. this example calls another data service query break; ... Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lagos_tout Sent: Thursday, October 16, 2008 2:26 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Reusing HTTPService Hi, Tracy. Thanks for your response. It's good to hear that others use this solution. Makes me feel like it's not just a stop-gap hack. However, what made me uncomfortable is the idea in OOP that classes should be open to extension, closed to modification. It's generally a code smell if one keeps having to literally add code to an existing class in order to add functionality. Especially when the added functionality bears such a strong resemblance to existing behaviors. What do you think? I really like your idea of adding properties to AsyncToken. Is AsyncToken a dynamic class? Is that how you do it? Thanks again. LT --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: This is a normal pattern. What about it makes you uncomfortable? You are using a single result handler function, correct? The switch() statement makes chaining calls easy and facilitates debugging since a single breakpoint or trace() will track all RPC calls. I have found that two string properties (callId, and nextAction ) on the AsyncToken work for all my needs so far An alternative would be to put a callback function in an AsyncToken property or use the addResponder() methods. I personally find those solutions messy. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of lagos_tout Sent: Friday, October 10, 2008 8:35 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Reusing HTTPService Hi, I'm re-using an instance of HTTPService, changing the request arguments to get different responses from the server. But I found that if, for instance, I made 3 calls this way with the HTTPService, each of the 3 result handlers registered for each call is executed every time a result returned. I solved this by storing a reference to the unique AsyncToken returned by each service call and matching it to the AsyncToken contained in each ResultEvent's token property in order to determine which result handler to execute. I'm not terribly happy with this setup. It seems messy. I'd appreciate any suggestions on how I can reuse an HTTPService instance without ending up with long switch statements with countless if thisAsyncToken then do thisHandler, else if thatAsyncToken then do thatHandler... and so on. Thanks much. LT
Re: [flexcoders] Custom index.template.html for each new project
What about creating a empty project, which contains your settings and copy this stuff over to the new project? Cheers Ralf. On Thu, Oct 16, 2008 at 7:41 PM, Mark Lapasa [EMAIL PROTECTED] wrote: bumpanybody? Mark Lapasa wrote: How can I edit the index.template.html so that everytime I create a Flex Project, it will always load up my custom template. I find myself always copying and pasting from a working index.template.html from another project everytime I create a new one. Thx, -mL Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. -- Mark Lapasa | Developer | [EMAIL PROTECTED] | Tier1CRM Inc. | T: 416.932-4784 | www.Tier1CRM.com Tier1CRM Inc. formerly StraightThrough CRM Solutions Inc. Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail.
Re: [flexcoders] Re: Efficiency and objects in the display list
And to put the icing on the cake... The deal is the LayoutManager loves the IUIComponent interface which has another buddy called IFlexDisplayObject. IFlexDisplayObject is instrumental in coupling measurements plus nesting levels that the layout manager needs to do it's queue sorting when laying out display objects. Navigators need Container children because Container is hard coded into them all. :) They have implemented IContainer and added some members to it. I hope they get all these concrete references out of the framework eventually. If the Flex framework is going to be really successful in the long run, everything needs to be renderers/factories and interfaces. I got three years on riding Alex's coattails in this area. ;-) Like how about IScrollContainer... this is in my framework now. Mike On Thu, Oct 16, 2008 at 2:06 PM, Tracy Spratt [EMAIL PROTECTED] wrote: I think that is correct. Quoting Alex, Navigator children must be Containers, Container children must be IUIComponents, and UIComponent children can be anything. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Amy *Sent:* Wednesday, October 15, 2008 11:36 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Efficiency and objects in the display list --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Container children must be UIComponents. You will need to add the sprites to a UIComponent first. I think technically there's just an interface that has to be implemented on whatever you add (IFlexDisplayObject? IUIComponent?). If you extend Sprite or whatever and implement whichever one is needed, you could add it to a container. -Amy -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
RE: [flexcoders] Re: WebService operation faults propigating up to WebService fault handler.
Do you need the fault handler on the operation? I typically a single fault handler for all operations. I also use a single handler for all results as well, actually. I don't like using responders. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Todd Sent: Thursday, October 16, 2008 12:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: WebService operation faults propigating up to WebService fault handler. I'll bounce this back up as it's hard to find any source code samples using the Actionscript version of WebService, and properly handling all the different errors, etc... Thanks, --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Todd [EMAIL PROTECTED] wrote: Hello All, I have a problem that I can't figure out. With WebService faults, and operations that return SOAPFaults...read on for the detais. 1) I've created my WebService through ActionScript (not the MXML Component). var ws:WebService = new WebService(); 2) I've attached a fault listener to it. I had to do this because it seems that SOAPEncoder errors were never being caught otherwise. ws.addEventListener(FaultEvent.FAULT, onServiceFault) 3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. For example, to call getInvoices, I have a command that calls into the appropriate method on the ServiceDelegate called getInvoices, which looks like: public function getInvoices(params:Object):void{ Operation(ws.SearchInvoices).encoder.strictNillability = true; var token:AsyncToken = ws.SearchInvoices(params); token.addResponder(this.responder); } As you can see, I'm using the AsyncToken, and adding the Commmand as the responder. The Command has both fault and result handlers as defined by the IResponder interface. 4) The this.responder is set during the contstructor of the Service Delegate, like so: public function ServiceDelegate(responder:IResponder) { this.responder = responder; } So, now my problem is, that when a SOAPFault is raised in the call to the SearchInvoices WebService operation, both the FAULT on my Command (which is the responder), AND the fault (onServiceFault ) for the WebService definition. I'd really rather not have this happen, but can't really figure out exactly what's going on. ALSO, I had to add the fault handler to the WebService because we were having all sorts of SOAPEncoder errors that were never being raised. What's someone to do? Is it that since I'm using the AsyncResponder to handle for the result/fault, that the WebService is never notified that the Fault has already been handled? What's the proper design around this? Is there a way to set the status that the Fault's been handled? It almost seems like the fault is being raised twice. Thanks, Todd
Re: [flexcoders] Re: Efficiency and objects in the display list
One correction on my part. It's IUIComponent that is important. IFlexDisplayObject is for skins so you can call move(), setActualSize() and get a measuredWidth and measuredHeight from them. The allows for the polymorphic behavior when laying out skins and components. Your code can see the same thing and does not have to differentiate between a component or skin (Shape). The IFlexDisplayObject gives an impression of the core DisplayObject as well. The ILayoutManagerClient interface allows the layoutManager to use nesting and call validation on the components in the queue. Mike On Thu, Oct 16, 2008 at 2:11 PM, Michael Schmalle [EMAIL PROTECTED]wrote: And to put the icing on the cake... The deal is the LayoutManager loves the IUIComponent interface which has another buddy called IFlexDisplayObject. IFlexDisplayObject is instrumental in coupling measurements plus nesting levels that the layout manager needs to do it's queue sorting when laying out display objects. Navigators need Container children because Container is hard coded into them all. :) They have implemented IContainer and added some members to it. I hope they get all these concrete references out of the framework eventually. If the Flex framework is going to be really successful in the long run, everything needs to be renderers/factories and interfaces. I got three years on riding Alex's coattails in this area. ;-) Like how about IScrollContainer... this is in my framework now. Mike On Thu, Oct 16, 2008 at 2:06 PM, Tracy Spratt [EMAIL PROTECTED]wrote: I think that is correct. Quoting Alex, Navigator children must be Containers, Container children must be IUIComponents, and UIComponent children can be anything. Tracy -- *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On Behalf Of *Amy *Sent:* Wednesday, October 15, 2008 11:36 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Re: Efficiency and objects in the display list --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Container children must be UIComponents. You will need to add the sprites to a UIComponent first. I think technically there's just an interface that has to be implemented on whatever you add (IFlexDisplayObject? IUIComponent?). If you extend Sprite or whatever and implement whichever one is needed, you could add it to a container. -Amy -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'. -- Teoti Graphix, LLC http://www.teotigraphix.com Teoti Graphix Blog http://www.blog.teotigraphix.com You can find more by solving the problem then by 'asking the question'.
Re: [flexcoders] Custom index.template.html for each new project
slight improvementbut not much different than what I am already doing. Setting up a new project is easy but tedious with all the copy pasting i have to do. I've managed to trim a good part of it using the application-config.xml. Ralf Bokelberg wrote: What about creating a empty project, which contains your settings and copy this stuff over to the new project? Cheers Ralf. On Thu, Oct 16, 2008 at 7:41 PM, Mark Lapasa [EMAIL PROTECTED] mailto:mlapasa%40tier1crm.com wrote: bumpanybody? Mark Lapasa wrote: How can I edit the index.template.html so that everytime I create a Flex Project, it will always load up my custom template. I find myself always copying and pasting from a working index.template.html from another project everytime I create a new one. Thx, -mL Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. -- Mark Lapasa | Developer | [EMAIL PROTECTED] mailto:mlapasa%40Tier1CRM.com | Tier1CRM Inc. | T: 416.932-4784 | www.Tier1CRM.com Tier1CRM Inc. formerly StraightThrough CRM Solutions Inc. Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. -- *Mark Lapasa* |* *Developer |* [EMAIL PROTECTED] *|* Tier**1*CRM Inc. |* **T:* 416.932-4784 | *www.Tier1CRM.com http://www.tier1crm.com/ * * * /Tier1CRM Inc. formerly StraightThrough CRM Solutions Inc./// Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail.
RE: [flexcoders] Custom index.template.html for each new project
Look in your sdk directory: sdks\2.0.1\resources\html-templates sdks\3.0.0\templates -Kyle From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Mark Lapasa Sent: Thursday, October 16, 2008 1:32 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Custom index.template.html for each new project slight improvementbut not much different than what I am already doing. Setting up a new project is easy but tedious with all the copy pasting i have to do. I've managed to trim a good part of it using the application-config.xml. Ralf Bokelberg wrote: What about creating a empty project, which contains your settings and copy this stuff over to the new project? Cheers Ralf. On Thu, Oct 16, 2008 at 7:41 PM, Mark Lapasa [EMAIL PROTECTED]mailto:mlapasa%40tier1crm.com mailto:mlapasa%40tier1crm.com wrote: bumpanybody? Mark Lapasa wrote: How can I edit the index.template.html so that everytime I create a Flex Project, it will always load up my custom template. I find myself always copying and pasting from a working index.template.html from another project everytime I create a new one. Thx, -mL Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. -- Mark Lapasa | Developer | [EMAIL PROTECTED]mailto:mlapasa%40Tier1CRM.com mailto:mlapasa%40Tier1CRM.com | Tier1CRM Inc. | T: 416.932-4784 | www.Tier1CRM.com Tier1CRM Inc. formerly StraightThrough CRM Solutions Inc. Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. -- *Mark Lapasa* |* *Developer |* [EMAIL PROTECTED]mailto:mlapasa%40Tier1CRM.com *|* Tier**1*CRM Inc. |* **T:* 416.932-4784 | *www.Tier1CRM.com http://www.tier1crm.com/ * * * /Tier1CRM Inc. formerly StraightThrough CRM Solutions Inc./// Notice of confidentiality: The information contained in this e-mail is intended only for the use of the individual or entity named above and may be confidential. Should the reader of this message not be the intended recipient, you are hereby notified that any unauthorized dissemination, distribution or reproduction of this message is strictly prohibited. If you have received this message in error, please advise the sender immediately and destroy the e-mail. inline: image001.jpginline: image002.jpg
[flexcoders] How to tell AdvancedDataGrid to not display child nodes
Hi, I have an ArrayCollection its members might have children property set to a list of child members. I want to use AdvancedDataGrid for a convenient filtering capability, but I want to display data as a list without child nodes. Is there anyway I can tell my AdvancedDataGrid to display top parent elements only without displaying child nodes. I don't want to set the children property to null since I need to use it for a different AdvancedDataGrid. I tried to set dataProvider to my ArrayCollection, but the child nodes still show up. I also tried to overwrite HierarchicalData class and overrride the getChildren as well as hasChildren methods, but this does not help. Any advice is greatly appreciated. Tung Chau
[flexcoders] Custom DataGrid and Custom itemRenderer and Custom Event
Here is my code from the TaskDG that extends Datagrid, waht I want is to lisen for the event from the custom itemRenderer added to the column with ClassFactory! switch (filterState) { case 0: this.columns = new Array(); column = new DataGridColumn(active); column.headerText = Active; column.itemRenderer = new ClassFactory(TaskActive); // add listner where Alex?? column.width = 50; column.sortable = false; dgCol.push(column); column = new DataGridColumn(startDateTime); column.headerText = Forfallsdato; column.itemRenderer = new ClassFactory(ItemDateFormat); dgCol.push(column); this.columns = dgCol; fadeIn.target = this; fadeIn.play(); break;
[flexcoders] Re: WebService operation faults propigating up to WebService fault handler.
Hmmm...interesting. I got into the Responders/AsyncTokens because that's how all the Cairngorm samples were setup. But with what you say, it's very consistent with all the samples using MXML WebServices...putting a fault on the operation. But with faults on the operation, what happens when Flex can't even call the operation because of a SOAPEncoder error? Originally, all was fine with using Responders, but then I noticed that errors from the SOAPEncoder were getting swallowed, and when Flex tried building a SOAP message, but couldn't because of some improper format, nothing would happen. It would sit there. Adding an error handler to the actual service solved that. Now, however, I'm stuck with Responder's handling faults, and the actual WebService handling faults. I'd like to at least not have the Web Service fault trigger if the responder handled it. I'm about 12 Web Services, 140+ calls into this thing. I don't think it'll be possible for me to get rid of my Responder cairngorm infrastructure...but I'd like to at least get a handle on how/where the faults are raised from. Had I done this again, I'd probably take your approach of having a single handler, use that as the master that subs things out depending upon the type of response. This would have the benefit of a single point in dealing with the Flex services layer... --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Do you need the fault handler on the operation? I typically a single fault handler for all operations. I also use a single handler for all results as well, actually. I don't like using responders. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Todd Sent: Thursday, October 16, 2008 12:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: WebService operation faults propigating up to WebService fault handler. I'll bounce this back up as it's hard to find any source code samples using the Actionscript version of WebService, and properly handling all the different errors, etc... Thanks, --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Todd tprekaski@ wrote: Hello All, I have a problem that I can't figure out. With WebService faults, and operations that return SOAPFaults...read on for the detais. 1) I've created my WebService through ActionScript (not the MXML Component). var ws:WebService = new WebService(); 2) I've attached a fault listener to it. I had to do this because it seems that SOAPEncoder errors were never being caught otherwise. ws.addEventListener(FaultEvent.FAULT, onServiceFault) 3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. For example, to call getInvoices, I have a command that calls into the appropriate method on the ServiceDelegate called getInvoices, which looks like: public function getInvoices(params:Object):void{ Operation(ws.SearchInvoices).encoder.strictNillability = true; var token:AsyncToken = ws.SearchInvoices(params); token.addResponder(this.responder); } As you can see, I'm using the AsyncToken, and adding the Commmand as the responder. The Command has both fault and result handlers as defined by the IResponder interface. 4) The this.responder is set during the contstructor of the Service Delegate, like so: public function ServiceDelegate(responder:IResponder) { this.responder = responder; } So, now my problem is, that when a SOAPFault is raised in the call to the SearchInvoices WebService operation, both the FAULT on my Command (which is the responder), AND the fault (onServiceFault ) for the WebService definition. I'd really rather not have this happen, but can't really figure out exactly what's going on. ALSO, I had to add the fault handler to the WebService because we were having all sorts of SOAPEncoder errors that were never being raised. What's someone to do? Is it that since I'm using the AsyncResponder to handle for the result/fault, that the WebService is never notified that the Fault has already been handled? What's the proper design around this? Is there a way to set the status that the Fault's been handled? It almost seems like the fault is being raised twice. Thanks, Todd
[flexcoders] Re: How to tell AdvancedDataGrid to not display child nodes
Please ignore my question. It should work. --- In flexcoders@yahoogroups.com, tungchau81 [EMAIL PROTECTED] wrote: Hi, I have an ArrayCollection its members might have children property set to a list of child members. I want to use AdvancedDataGrid for a convenient filtering capability, but I want to display data as a list without child nodes. Is there anyway I can tell my AdvancedDataGrid to display top parent elements only without displaying child nodes. I don't want to set the children property to null since I need to use it for a different AdvancedDataGrid. I tried to set dataProvider to my ArrayCollection, but the child nodes still show up. I also tried to overwrite HierarchicalData class and overrride the getChildren as well as hasChildren methods, but this does not help. Any advice is greatly appreciated. Tung Chau
[flexcoders] sailorsea21 - RemoveChild question.
Hi, I have a Tile in my application: mx:Tile width=100% height=100% id=tiletest/ I also have a linkbutton that loads moduleloaders in mx:Tile: mx:LinkButton label=Load click=loadmodule() buttonMode=true/ mx:Script ![CDATA[ import mx.modules.ModuleLoader; public function loadmodule():void { var moduleloader:ModuleLoader = new ModuleLoader(); tiletest.addChild(moduleloader); moduleloader.url = test.swf; } ]] /mx:Script I can load the module several times but my problem is: If I load several modules, how can I remove a specific one, let's say the third one that was loaded? Do I need to add a specific remove button within the module application? If so, what script can I use??? Thank you.
RE: [flexcoders] sailorsea21 - RemoveChild question.
Store a reference to the added child in an array or associative array(object). _aChildren[one] = tiletest.addChild(moduleloader); then you can do: tiletest.removeChild(_aChildren[one] ); Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sailorsea21 Sent: Thursday, October 16, 2008 3:37 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] sailorsea21 - RemoveChild question. Hi, I have a Tile in my application: mx:Tile width=100% height=100% id=tiletest/ I also have a linkbutton that loads moduleloaders in mx:Tile: mx:LinkButton label=Load click=loadmodule() buttonMode=true/ mx:Script ![CDATA[ import mx.modules.ModuleLoader; public function loadmodule():void { var moduleloader:ModuleLoader = new ModuleLoader(); tiletest.addChild(moduleloader); moduleloader.url = test.swf; } ]] /mx:Script I can load the module several times but my problem is: If I load several modules, how can I remove a specific one, let's say the third one that was loaded? Do I need to add a specific remove button within the module application? If so, what script can I use??? Thank you.
RE: [flexcoders] Re: WebService operation faults propigating up to WebService fault handler.
So can you leave the fault handler on the service and not user the ones on the operations? Or point those to some dummy handler? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Todd Sent: Thursday, October 16, 2008 3:25 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: WebService operation faults propigating up to WebService fault handler. Hmmm...interesting. I got into the Responders/AsyncTokens because that's how all the Cairngorm samples were setup. But with what you say, it's very consistent with all the samples using MXML WebServices...putting a fault on the operation. But with faults on the operation, what happens when Flex can't even call the operation because of a SOAPEncoder error? Originally, all was fine with using Responders, but then I noticed that errors from the SOAPEncoder were getting swallowed, and when Flex tried building a SOAP message, but couldn't because of some improper format, nothing would happen. It would sit there. Adding an error handler to the actual service solved that. Now, however, I'm stuck with Responder's handling faults, and the actual WebService handling faults. I'd like to at least not have the Web Service fault trigger if the responder handled it. I'm about 12 Web Services, 140+ calls into this thing. I don't think it'll be possible for me to get rid of my Responder cairngorm infrastructure...but I'd like to at least get a handle on how/where the faults are raised from. Had I done this again, I'd probably take your approach of having a single handler, use that as the master that subs things out depending upon the type of response. This would have the benefit of a single point in dealing with the Flex services layer... --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Tracy Spratt [EMAIL PROTECTED] wrote: Do you need the fault handler on the operation? I typically a single fault handler for all operations. I also use a single handler for all results as well, actually. I don't like using responders. Tracy From: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com ] On Behalf Of Todd Sent: Thursday, October 16, 2008 12:37 PM To: flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: WebService operation faults propigating up to WebService fault handler. I'll bounce this back up as it's hard to find any source code samples using the Actionscript version of WebService, and properly handling all the different errors, etc... Thanks, --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Todd tprekaski@ wrote: Hello All, I have a problem that I can't figure out. With WebService faults, and operations that return SOAPFaults...read on for the detais. 1) I've created my WebService through ActionScript (not the MXML Component). var ws:WebService = new WebService(); 2) I've attached a fault listener to it. I had to do this because it seems that SOAPEncoder errors were never being caught otherwise. ws.addEventListener(FaultEvent.FAULT, onServiceFault) 3) I'm using a Cairngorm Command/ServiceDelegate calling scheme. For example, to call getInvoices, I have a command that calls into the appropriate method on the ServiceDelegate called getInvoices, which looks like: public function getInvoices(params:Object):void{ Operation(ws.SearchInvoices).encoder.strictNillability = true; var token:AsyncToken = ws.SearchInvoices(params); token.addResponder(this.responder); } As you can see, I'm using the AsyncToken, and adding the Commmand as the responder. The Command has both fault and result handlers as defined by the IResponder interface. 4) The this.responder is set during the contstructor of the Service Delegate, like so: public function ServiceDelegate(responder:IResponder) { this.responder = responder; } So, now my problem is, that when a SOAPFault is raised in the call to the SearchInvoices WebService operation, both the FAULT on my Command (which is the responder), AND the fault (onServiceFault ) for the WebService definition. I'd really rather not have this happen, but can't really figure out exactly what's going on. ALSO, I had to add the fault handler to the WebService because we were having all sorts of SOAPEncoder errors that were never being raised. What's someone to do? Is it that since I'm using the AsyncResponder to handle for the result/fault, that the WebService is never notified that the Fault has already been handled? What's the proper design around this? Is there a way to set the status that the Fault's been handled? It almost seems like the fault is being raised twice. Thanks, Todd
[flexcoders] Re: sailorsea21 - RemoveChild question.
Hi Tracy, thank you for your quick response. I'm a little stuck on this one... I can't get it to work... I'm now able to load a module and unload it. But if I load several modules, I'm only able to unload the latest one. When I try unloading the other loaded modules I receive the follow error: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/removeChild() at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo veChild()[E:\dev\3.1.0 \frameworks\projects\framework\src\mx\core\UIComponent.as:5074] at mx.core::Container/removeChild()[E:\dev\3.1.0 \frameworks\projects\framework\src\mx\core\Container.as:2267] at content_module_template_blank/click() [C:\Inetpub\wwwroot\LWY\UI\UI Score\UI Score 004 \src\content_module_template_blank.mxml:29] This is my code: import mx.states.RemoveChild; import mx.modules.ModuleLoader; import mx.controls.Button; private var moduleloader:ModuleLoader; private var button:Button; public function loadmodule():void { moduleloader = new ModuleLoader(); tiletest.addChild(moduleloader); moduleloader.url = test.swf; button = new Button(); button.label = unload; button.addEventListener(MouseEvent.CLICK, click); tiletest.addChild(button); } private function click(evt:MouseEvent):void { tiletest.removeChild(moduleloader); tiletest.removeChild(button); } mx:Tile width=100% height=100% id=tiletest/ mx:LinkButton label=Load click=loadmodule() buttonMode=true/ Thank you very much. -David.
[flexcoders] WebORB 3.5 - Error: Call to a member function getServiceURI() on a non-objec
[flexcoders] WebORB 3.5 - Error: Call to a member function getServiceURI() on a non-objec
I just downloaded WebORB 3.5 and got done setting it up. Now, my project is setup on my system (xampp / php 5.2.5). And when I point my browser to weborb.php, I get the following fatal error: Fatal error: Call to a member function getServiceURI() on a non-object in C:\xampp\htdocs\projects\gulfspecials\weborb\Message\Request.php on line 75 Anyone know how to fix this problem?
[flexcoders] Re: Flex Project to be converted to run on WebOrb
You can override the server settings required for weborb by adding the context root parameter to the compiler. -compiler.context-root={POINT_TO_weborb\web-inf\flex} It worked for me! Hope it helps! Hyder Alamgir alamgirdesigns.blogspot.com www.gulfspecials.com --- In flexcoders@yahoogroups.com, valdhor [EMAIL PROTECTED] wrote: All you need to do is update your compiler settings to use the remoting-config.xml and services-config.xml files. Something like: -locale en_US -services services-config.xml Make sure your xml files are set up to point to your server. Then create your remote objects in ActionScript and use them. Something like: environmentservice = new RemoteObject(CommonFunctionsDestination); environmentservice.requestTimeout = 30; environmentservice.getEnvironmentVariables.addEventListener(ResultEven t.RESULT, EnvironmentHandler); environmentservice.addEventListener(FaultEvent.FAULT, faultHandler); environmentservice.getEnvironmentVariables(); --- In flexcoders@yahoogroups.com, Eric Dunn edunn@ wrote: Hello all, Does anyone know how to convert a Flex Project to run on a server that was not originally configured to do so? I have a project that that is currently configured to standalone. I have been playing with WebOrb and would like to convert this existing project to run in WebOrb. The Flex Server section in the project Properties is disabled... Any ideas other than creating a new project with WebOrb and then pasting the existing code into the new project? Eric W Dunn Adaption Technologies 281-465-3326 edunn@
RE: [flexcoders] Re: sailorsea21 - RemoveChild question.
Well, you did not do what I suggested. What do you think is in moduleloader when you click the remove button? The last thing you put in it. Re-read my response. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of sailorsea21 Sent: Thursday, October 16, 2008 4:38 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: sailorsea21 - RemoveChild question. Hi Tracy, thank you for your quick response. I'm a little stuck on this one... I can't get it to work... I'm now able to load a module and unload it. But if I load several modules, I'm only able to unload the latest one. When I try unloading the other loaded modules I receive the follow error: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/removeChild() at mx.core::UIComponent/http://www.adobe.com/2006/flex/mx/internal::$remo http://www.adobe.com/2006/flex/mx/internal::$remo veChild()[E:\dev\3.1.0 \frameworks\projects\framework\src\mx\core\UIComponent.as:5074] at mx.core::Container/removeChild()[E:\dev\3.1.0 \frameworks\projects\framework\src\mx\core\Container.as:2267] at content_module_template_blank/click() [C:\Inetpub\wwwroot\LWY\UI\UI Score\UI Score 004 \src\content_module_template_blank.mxml:29] This is my code: import mx.states.RemoveChild; import mx.modules.ModuleLoader; import mx.controls.Button; private var moduleloader:ModuleLoader; private var button:Button; public function loadmodule():void { moduleloader = new ModuleLoader(); tiletest.addChild(moduleloader); moduleloader.url = test.swf; button = new Button(); button.label = unload; button.addEventListener(MouseEvent.CLICK, click); tiletest.addChild(button); } private function click(evt:MouseEvent):void { tiletest.removeChild(moduleloader); tiletest.removeChild(button); } mx:Tile width=100% height=100% id=tiletest/ mx:LinkButton label=Load click=loadmodule() buttonMode=true/ Thank you very much. -David.
Re: [flexcoders] Flash Player 10 debug?
Do not resist buying CS4, how do you think free products like Flex get funded ;-) On 10/16/08 10:09 AM, Peter Witham [EMAIL PROTECTED] wrote: Thanks all, I noticed a blog post this morning mentioning that Flex B 3.2 was on the way that would support. I'd offer a link, but I cannot find it now. I think I'll go ahead and install it and try so very hard to resist buying CS4 just yet :) Thanks again, Peter. On Thu, Oct 16, 2008 at 8:51 AM, Jim Hayes [EMAIL PROTECTED] wrote: Theres nothing to stop you except the (small) risk that you miss a bug or difference that only occurs in FP9. Personally I installed FP10 in internet explorer (which I don't normally use at all) and tested on that until I was reasonably happy that everything was working the same way as it was in 9. Having just got CS4 I bit the bullet and updated all my players to 10 this morning. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Witham Sent: 15 October 2008 22:31 To: flexcoders@yahoogroups.com Subject: [flexcoders] Flash Player 10 debug? Hi Everyone, quick question that I've not found an answer to. Is it OK to install the debug version of Flash Player 10 and still work with Flex 3 and Flash CS3, any problems or anything with that? Or do we have to stick with Flash player 9 until the next Flex release for FP 10 compatibility? Thanks in advance, Peter.
[flexcoders] Re: Repeater control and custom Component
--- In flexcoders@yahoogroups.com, lysfael [EMAIL PROTECTED] wrote: Hello, Since it's not the same problem as the old one, i post a new topic on this, i hope this way to do enter in the ToS. I created a component Box-Based, which contains a repeater and some other attributes. Since my english isn't perfect i'll post part of the code i produced and tell you what's the problem now. There is no point using a repeater from AS. This is one component that you should use in MXML if you want to use it.
[flexcoders] Flex app on a thin client
Hi. I'm not sure this is a Flex-related issue, but, as Im completely lost, I decided to post this message... We have a Flex app running on a thin client: all users of our app run a single browser copy. This app performs operations on a database. The strange thing is that, if we do any operation (insertions, updates, deletions), the results do not come back. We send an httpservice request but the service never returns... If we leave and enter the app again, we can see that the data was changed (i.e. the operations succeed). If we run the same app on a regular client, it performs as expected (send a service and gte the results back). So... what could be the cause of this behavior? Thanx in advance.
RE: [flexcoders] Re: Repeater control and custom Component
Yes, I still think Lysfael may be approaching this incorrectly, probably making it harder than it needs to be. There is rarely a good reason to use the document model hierarchy to manipulate data driven components. Lysfael, can you explain again what you are trying to do? What data is the dataProvider for the repeater? Is that data different from the data you are trying to show in the repeated controls? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Thursday, October 16, 2008 5:51 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Repeater control and custom Component --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , lysfael [EMAIL PROTECTED] wrote: Hello, Since it's not the same problem as the old one, i post a new topic on this, i hope this way to do enter in the ToS. I created a component Box-Based, which contains a repeater and some other attributes. Since my english isn't perfect i'll post part of the code i produced and tell you what's the problem now. There is no point using a repeater from AS. This is one component that you should use in MXML if you want to use it.
Re: [flexcoders] Flash Player 10 debug?
LOL, I thought they got funded with all the previous versions I brought? My best guess is I'll hold out about a week or two at the most then give in :) Peter. On Thu, Oct 16, 2008 at 4:15 PM, Matt Chotin [EMAIL PROTECTED] wrote: Do not resist buying CS4, how do you think free products like Flex get funded ;-) On 10/16/08 10:09 AM, Peter Witham [EMAIL PROTECTED]peter.witham%40gmail.com wrote: Thanks all, I noticed a blog post this morning mentioning that Flex B 3.2 was on the way that would support. I'd offer a link, but I cannot find it now. I think I'll go ahead and install it and try so very hard to resist buying CS4 just yet :) Thanks again, Peter. On Thu, Oct 16, 2008 at 8:51 AM, Jim Hayes [EMAIL PROTECTED]jim%40primalpictures.com wrote: Theres nothing to stop you except the (small) risk that you miss a bug or difference that only occurs in FP9. Personally I installed FP10 in internet explorer (which I don't normally use at all) and tested on that until I was reasonably happy that everything was working the same way as it was in 9. Having just got CS4 I bit the bullet and updated all my players to 10 this morning. -Original Message- From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of Peter Witham Sent: 15 October 2008 22:31 To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Flash Player 10 debug? Hi Everyone, quick question that I've not found an answer to. Is it OK to install the debug version of Flash Player 10 and still work with Flex 3 and Flash CS3, any problems or anything with that? Or do we have to stick with Flash player 9 until the next Flex release for FP 10 compatibility? Thanks in advance, Peter. -- Peter Witham http://www.evolutiondata.com Internet and Multimedia developer Certified Flash Designer.
RE: [flexcoders] Flex app on a thin client
Security? Firewall on the thin client? What does the fault handler display? What is the middle tier? What OS on the thin client? Have you verified that the server is getting the HTTP requests? Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of gabriela.perry Sent: Thursday, October 16, 2008 6:10 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Flex app on a thin client Hi. I'm not sure this is a Flex-related issue, but, as Im completely lost, I decided to post this message... We have a Flex app running on a thin client: all users of our app run a single browser copy. This app performs operations on a database. The strange thing is that, if we do any operation (insertions, updates, deletions), the results do not come back. We send an httpservice request but the service never returns... If we leave and enter the app again, we can see that the data was changed (i.e. the operations succeed). If we run the same app on a regular client, it performs as expected (send a service and gte the results back). So... what could be the cause of this behavior? Thanx in advance.
Re: [flexcoders] Flash Player 10 debug?
Are you guys refunding what we paid for FB2 and 3? COOL... :-) On 17/10/2008, at 9:19 AM, Peter Witham wrote: LOL, I thought they got funded with all the previous versions I brought? My best guess is I'll hold out about a week or two at the most then give in :) Peter. On Thu, Oct 16, 2008 at 4:15 PM, Matt Chotin [EMAIL PROTECTED] wrote: Do not resist buying CS4, how do you think free products like Flex get funded ;-) On 10/16/08 10:09 AM, Peter Witham [EMAIL PROTECTED] wrote: Thanks all, I noticed a blog post this morning mentioning that Flex B 3.2 was on the way that would support. I'd offer a link, but I cannot find it now. I think I'll go ahead and install it and try so very hard to resist buying CS4 just yet :) Thanks again, Peter. On Thu, Oct 16, 2008 at 8:51 AM, Jim Hayes [EMAIL PROTECTED] wrote: Theres nothing to stop you except the (small) risk that you miss a bug or difference that only occurs in FP9. Personally I installed FP10 in internet explorer (which I don't normally use at all) and tested on that until I was reasonably happy that everything was working the same way as it was in 9. Having just got CS4 I bit the bullet and updated all my players to 10 this morning. -Original Message- From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Peter Witham Sent: 15 October 2008 22:31 To: flexcoders@yahoogroups.com Subject: [flexcoders] Flash Player 10 debug? Hi Everyone, quick question that I've not found an answer to. Is it OK to install the debug version of Flash Player 10 and still work with Flex 3 and Flash CS3, any problems or anything with that? Or do we have to stick with Flash player 9 until the next Flex release for FP 10 compatibility? Thanks in advance, Peter. -- Peter Witham http://www.evolutiondata.com Internet and Multimedia developer Certified Flash Designer.
[flexcoders] Socket to Gmail
Anyone know if someone has written a socket connection to send mail through a gmail account? Rich
[flexcoders] AS equivalent for perl's chop/chomp?
I see String.replace using a regex, but is there a more straightforward way to do this (very) common adjustment? (perl: chop and chomp delete the last character from a string in slightly different ways) thanks, John
[flexcoders] Custom event - Create, dispatch, and listen to.
Trying to create my first custom event. Here is my code: // custom event class: package modulecode { import flash.events.Event; public class remoteClick extends Event { [Event(name=remoteClickEvent, type=flash.events.Event)] private var _remoteRun:Boolean; public function remoteClick(type:String, bubbles:Boolean=false, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } // raising event: import modulecode.remoteClick; var eventObj:remoteClick = new remoteClick (remoteClick.remoteClickEvent); dispatchEvent(eventObj); // Listen to custom event in mxml file: mx:Metadata [Event(name=remoteClickEvent, type=remoteClick.remoteClickEvent)] /mx:Metadata mx:FormItem label= textAlign=right mx:Button label=Run click=handleClick() remoteClickEvent = remoteClickHandler() id=run/ /mx:FormItem Error: Cannot resolve attribute 'remoteClickEvent' for component type mx.controls.Button. Please give me a push here. Thanks
[flexcoders] Re: My Flex Form - please help
Hi, I have to ask something else... when you said change the reference to Name, I wasn't sure that you meant on the left of the = or right. I have taken a class on AS 3.0 and two on Flex 3 and it was very extensive... getting into OOP. I thought I had things figured out. Could you or someone please look at my code and specifically edit it to work. It is very small and I only need to have one field in the form for demonstration purposes. It might be only a line or two that needs to be changed or added. There are only two files so far. Here's the link: http://fwweb.biz/ContactForm.zip Please email me directly or post the fixed code specifically as it would need to be for this to work. I'll reproduce the code below as well. It's not long. As a note, I did find a free Flex/PHP application that does this. However, I want to figure out how to get the very basic application that I started, working right, instead of just taking something else. I want to figure out the exact logic that would work to accomplish what I am trying. By being real basic, I can focus mainly on the details and concepts that I am getting wrong. The instructor in the two classes I took on Flex Builder 3, stated that I needed an HTTPService tag which calls the php form processing script that emails form results to a specified email address - setting the method to POST. In the form component, I would call an AS 3.0 function that creates the object, obj:Object = new Object(); - then in the function sendMyData, I call the HTTPService send method. It sounds like you are saying that I shouldn't use obj but should use something like this: forms:FormComp id=form/ Then, in the function sendMyData(, I just do it like this: form.Name = Name.text; No, that doesn't work. It still gives me an error saying: Access to undefined property Name. I really didn't follow that either. I thought I would need an object that would have properties sent to the HTTPService request which calls the php form processor which will email me the results. Please, check out the code I include and if you or someone else would, please replace what I did wrong with the right code. That way I can see exactly how to make this work. I just got a little confused when you were saying that I need to use form.Name as I didn't know if you meant just replace that in the function that I have and that we are talking about this on the left or right of the equals sign and if not, then what are we setting equal to form.Name. Lastly, I have two large books for learning AS 3.0 and OOP, ActionScript 3.0 Bible and Flex 3.0 Bible. They are rather extensive and long and AS 3.0 Bible does get into OOP. If you would recommend a different or additional text, please let me know. I'll definitely start reading the information at the link you sent to me - to the livedocs article. thanks, Bruce --- In flexcoders@yahoogroups.com, Haykel BEN JEMIA [EMAIL PROTECTED] wrote: The problems you are having are related to very basic actionscript and object oriented programming knowledge. Don't get me wrong, I'm in no way blaming you, I just want to give you the advice to read some documentation about AS and OO programming because otherwise you will be loosing much time with basic things! You can start with Programming ActionScript 3.0 from the Flex documentation: http://livedocs.adobe.com/flex/3/html/help.html?content=Part6_ProgAS_1.html Now to the problem. You are getting this error because the Name field is not defined where you are calling it, but in the FormComponent. If you instantiate the FormComponent with an id of form for example, you can access it with: form.Name. Note that it has to be declared public in the component to be able access it from outside the component. Hope it helps! On Thu, Oct 16, 2008 at 9:10 AM, brucewhealton [EMAIL PROTECTED]wrote: Hi, thanks for the help. I did what you mention below. Someone else posted somethingsimilar about putting the Object property into the function. It still doesn't like that yet. It gives me an error on the line in the function where I am assigning values to the Object properties... Specifically it doesn't like: obj.Name = Name.text; it says: Access to undefined property Name Now, one problem might be that I am not passing any parameters to the function. I'll see about the way you specified the function and see if that fixes things. To see more specifically what I did, please click on this to download the zip archive file of my Flex Project: http://fwweb.biz/ContactForm.zip thanks, Bruce
[flexcoders] Module Interfaces Inheritance question
Hi, I did a basic search on this topic and read a few posts, but I think my case seems to be a little different here. I have a fairly large application that I am designing to be broken into one main application that loads multiple modules as required. My main application implements an IMyApp interface with one method right now: getModule(modName:String):* All my modules implement a generic IAppModule interface which includes 2 methods: -initModule() Called after loading and creation of module -handleEvent(evt:Event): Called whenever an event such as MenuEvent etc need to be passed to the module. Each of the modules implement a specific interface, for eg. Module1 implements IModule1 which extends IAppModule, and Module2 implements IModule2 which also extends IAppModule to expose specific functionality within each of the module. So I have the following package structure and classes with their interfaces: 1) class a.MyApp implements a.mod.common.IMyApp (My main app) 2) interface a.mod.common.IModule1 extends interface a.mod.common.IAppModule 3) interface a.mod.common.IModule2 extends interface a.mod.common.IAppModule 4) class a.mod.mod1.Module1 implements a.mod.common.IModule1 (Module 1 compiles to Module1.swf) 5) class a.mod.mod2.Module 2 implements a.mod.common.IModule2 (Module 2 compiles to Module2.swf) My main application handles the logic of loading all the modules at starting and as required as runtime and any module requiring access to another module asks the main application (through the IMyApp interface) for a handle to the other module. Here is my problem. I am trying to access IModule2 from within Module1. I use IMyApp.getModule(Module2) to get a handle to the second module, but when I try to downcast it to IModule2, it throws me an error saying it encountered error with the type coercion. In the error detail it says that it cannot convert a.mod.mod2.Module2 to a.mod.common.IModule2 which stumps me as the class implements that specific interface. If I include all methods from IModule1 and IModule2 into the base interface IAppModule, remove IModule2 entirely and try to cast the IMyApp.getModule(Module2) to IAppModule, it works fine, but this is not what I was looking for. I will end up with one monolithic IAppModule with every method from every module interface. I am not sure what I am missing here. Is there a problem with interface inheritance and modules? When I run a link report for the modules, I am not sure if I am reading the report right, but I do not see IModule2 interface as part of the definitions within script Module2. Can someone please point me in the right direction for this problem? Thank you for your help, Purush
[flexcoders] Axis Label Width in Flex 3 BarChart
I have a problem that I have been struggling with for a couple days. I have a BarChart with a vertical axis that has very long labels. When Flex renders the chart, it squeezes the label making it virtually illegible. Is there a way to allocate enough space for the label to render with proper size. Can I either enforce the font size or a width for the axis to prevent text from shrinking? Thanks, Alex
Re: [flexcoders] Re: My Flex Form - please help
A quick look. You have in sendMyData:: obj.Name = Name.text; obj.Email = Email.text; obj.Message = Message.text; Yet FormComp has: mx:FormItem label=Name: mx:TextInput/ /mx:FormItem mx:FormItem label=Email: mx:TextInput/ /mx:FormItem mx:FormItem label=Message: mx:TextArea/ /mx:FormItem None of the form fields has an id.. Also, mx:Button label=Contact Us fontSize=16 click=sendMyData()/ shows a click handler function sendMyData(), yet there's no function called that in FormComp. sendMydata() is part of the parent application. You can probably get away with referring to Application.application.sendMyData, but that's really bad practice. The coupling of these components is really not as it should be try and build components that can be used standalone without having to refer directly to what is happeining outside. The formComp shouldn't be accessing a handler in the parent application. The form should dispatch a custom event saying that the form has been filled in and that event should include a payload of the form content. The application should listen for that event and despatch a message using the event payload. I would suggest recapping some of your classes. Paul - Original Message - From: brucewhealton [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, October 17, 2008 1:34 AM Subject: [flexcoders] Re: My Flex Form - please help Hi, I have to ask something else... when you said change the reference to Name, I wasn't sure that you meant on the left of the = or right. I have taken a class on AS 3.0 and two on Flex 3 and it was very extensive... getting into OOP. I thought I had things figured out. Could you or someone please look at my code and specifically edit it to work. It is very small and I only need to have one field in the form for demonstration purposes. It might be only a line or two that needs to be changed or added. There are only two files so far. Here's the link: http://fwweb.biz/ContactForm.zip Please email me directly or post the fixed code specifically as it would need to be for this to work. I'll reproduce the code below as well. It's not long. As a note, I did find a free Flex/PHP application that does this. However, I want to figure out how to get the very basic application that I started, working right, instead of just taking something else. I want to figure out the exact logic that would work to accomplish what I am trying. By being real basic, I can focus mainly on the details and concepts that I am getting wrong. The instructor in the two classes I took on Flex Builder 3, stated that I needed an HTTPService tag which calls the php form processing script that emails form results to a specified email address - setting the method to POST. In the form component, I would call an AS 3.0 function that creates the object, obj:Object = new Object(); - then in the function sendMyData, I call the HTTPService send method. It sounds like you are saying that I shouldn't use obj but should use something like this: forms:FormComp id=form/ Then, in the function sendMyData(, I just do it like this: form.Name = Name.text; No, that doesn't work. It still gives me an error saying: Access to undefined property Name. I really didn't follow that either. I thought I would need an object that would have properties sent to the HTTPService request which calls the php form processor which will email me the results. Please, check out the code I include and if you or someone else would, please replace what I did wrong with the right code. That way I can see exactly how to make this work. I just got a little confused when you were saying that I need to use form.Name as I didn't know if you meant just replace that in the function that I have and that we are talking about this on the left or right of the equals sign and if not, then what are we setting equal to form.Name. Lastly, I have two large books for learning AS 3.0 and OOP, ActionScript 3.0 Bible and Flex 3.0 Bible. They are rather extensive and long and AS 3.0 Bible does get into OOP. If you would recommend a different or additional text, please let me know. I'll definitely start reading the information at the link you sent to me - to the livedocs article. thanks, Bruce --- In flexcoders@yahoogroups.com, Haykel BEN JEMIA [EMAIL PROTECTED] wrote: The problems you are having are related to very basic actionscript and object oriented programming knowledge. Don't get me wrong, I'm in no way blaming you, I just want to give you the advice to read some documentation about AS and OO programming because otherwise you will be loosing much time with basic things! You can start with Programming ActionScript 3.0 from the Flex documentation: http://livedocs.adobe.com/flex/3/html/help.html?content=Part6_ProgAS_1.html Now to the problem. You are getting this error because
Re: [flexcoders] Re: My Flex Form - please help
- Original Message - From: Paul Andrews [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, October 17, 2008 3:19 AM Subject: Re: [flexcoders] Re: My Flex Form - please help A quick look. You have in sendMyData:: obj.Name = Name.text; obj.Email = Email.text; obj.Message = Message.text; Yet FormComp has: mx:FormItem label=Name: mx:TextInput/ /mx:FormItem mx:FormItem label=Email: mx:TextInput/ /mx:FormItem mx:FormItem label=Message: mx:TextArea/ /mx:FormItem None of the form fields has an id.. Also, mx:Button label=Contact Us fontSize=16 click=sendMyData()/ shows a click handler function sendMyData(), yet there's no function called that in FormComp. sendMydata() is part of the parent application. You can probably get away with referring to Application.application.sendMyData, but that's really bad practice. The coupling of these components is really not as it should be try and build components that can be used standalone without having to refer directly to what is happeining outside. The formComp shouldn't be accessing a handler in the parent application. The form should dispatch a custom event saying that the form has been filled in and that event should include a payload of the form content. The application should listen for that event and despatch a message using the event payload. I would suggest recapping some of your classes. Paul - Original Message - From: brucewhealton [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, October 17, 2008 1:34 AM Subject: [flexcoders] Re: My Flex Form - please help Hi, I have to ask something else... when you said change the reference to Name, I wasn't sure that you meant on the left of the = or right. I have taken a class on AS 3.0 and two on Flex 3 and it was very extensive... getting into OOP. I thought I had things figured out. Could you or someone please look at my code and specifically edit it to work. It is very small and I only need to have one field in the form for demonstration purposes. It might be only a line or two that needs to be changed or added. There are only two files so far. Here's the link: http://fwweb.biz/ContactForm.zip Please email me directly or post the fixed code specifically as it would need to be for this to work. I'll reproduce the code below as well. It's not long. As a note, I did find a free Flex/PHP application that does this. However, I want to figure out how to get the very basic application that I started, working right, instead of just taking something else. I want to figure out the exact logic that would work to accomplish what I am trying. By being real basic, I can focus mainly on the details and concepts that I am getting wrong. The instructor in the two classes I took on Flex Builder 3, stated that I needed an HTTPService tag which calls the php form processing script that emails form results to a specified email address - setting the method to POST. In the form component, I would call an AS 3.0 function that creates the object, obj:Object = new Object(); - then in the function sendMyData, I call the HTTPService send method. It sounds like you are saying that I shouldn't use obj but should use something like this: forms:FormComp id=form/ Then, in the function sendMyData(, I just do it like this: form.Name = Name.text; No, that doesn't work. It still gives me an error saying: Access to undefined property Name. I really didn't follow that either. I thought I would need an object that would have properties sent to the HTTPService request which calls the php form processor which will email me the results. Please, check out the code I include and if you or someone else would, please replace what I did wrong with the right code. That way I can see exactly how to make this work. I just got a little confused when you were saying that I need to use form.Name as I didn't know if you meant just replace that in the function that I have and that we are talking about this on the left or right of the equals sign and if not, then what are we setting equal to form.Name. Lastly, I have two large books for learning AS 3.0 and OOP, ActionScript 3.0 Bible and Flex 3.0 Bible. They are rather extensive and long and AS 3.0 Bible does get into OOP. If you would recommend a different or additional text, please let me know. I'll definitely start reading the information at the link you sent to me - to the livedocs article. thanks, Bruce --- In flexcoders@yahoogroups.com, Haykel BEN JEMIA [EMAIL PROTECTED] wrote: The problems you are having are related to very basic actionscript and object oriented programming knowledge. Don't get me wrong, I'm in no way blaming you, I just want to give you the advice to read some documentation about AS and OO programming because otherwise you will be loosing much time with basic
Re: [flexcoders] Re: My Flex Form - please help
I completely missed out the fact that the sendMyData() function in the main application refers to fields ( currently with no id) in FormComp, so there are two reasons why, for example, Name.text, cannot be found: The TextInput field has no id and should have an id 'Name' - I already mentioned that. If the field had an id it would be in the FormComp component, not part of the main application. FormComp is in the main application but again has no id. Even with an id you are trying to access fields inside the class that are not public. The real problems are coming from a lack of understanding of scope and the relationship between classes/components. Paul - Original Message - From: Paul Andrews [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, October 17, 2008 3:19 AM Subject: Re: [flexcoders] Re: My Flex Form - please help A quick look. You have in sendMyData:: obj.Name = Name.text; obj.Email = Email.text; obj.Message = Message.text; Yet FormComp has: mx:FormItem label=Name: mx:TextInput/ /mx:FormItem mx:FormItem label=Email: mx:TextInput/ /mx:FormItem mx:FormItem label=Message: mx:TextArea/ /mx:FormItem None of the form fields has an id.. Also, mx:Button label=Contact Us fontSize=16 click=sendMyData()/ shows a click handler function sendMyData(), yet there's no function called that in FormComp. sendMydata() is part of the parent application. You can probably get away with referring to Application.application.sendMyData, but that's really bad practice. The coupling of these components is really not as it should be try and build components that can be used standalone without having to refer directly to what is happeining outside. The formComp shouldn't be accessing a handler in the parent application. The form should dispatch a custom event saying that the form has been filled in and that event should include a payload of the form content. The application should listen for that event and despatch a message using the event payload. I would suggest recapping some of your classes. Paul - Original Message - From: brucewhealton [EMAIL PROTECTED] To: flexcoders@yahoogroups.com Sent: Friday, October 17, 2008 1:34 AM Subject: [flexcoders] Re: My Flex Form - please help Hi, I have to ask something else... when you said change the reference to Name, I wasn't sure that you meant on the left of the = or right. I have taken a class on AS 3.0 and two on Flex 3 and it was very extensive... getting into OOP. I thought I had things figured out. Could you or someone please look at my code and specifically edit it to work. It is very small and I only need to have one field in the form for demonstration purposes. It might be only a line or two that needs to be changed or added. There are only two files so far. Here's the link: http://fwweb.biz/ContactForm.zip Please email me directly or post the fixed code specifically as it would need to be for this to work. I'll reproduce the code below as well. It's not long. As a note, I did find a free Flex/PHP application that does this. However, I want to figure out how to get the very basic application that I started, working right, instead of just taking something else. I want to figure out the exact logic that would work to accomplish what I am trying. By being real basic, I can focus mainly on the details and concepts that I am getting wrong. The instructor in the two classes I took on Flex Builder 3, stated that I needed an HTTPService tag which calls the php form processing script that emails form results to a specified email address - setting the method to POST. In the form component, I would call an AS 3.0 function that creates the object, obj:Object = new Object(); - then in the function sendMyData, I call the HTTPService send method. It sounds like you are saying that I shouldn't use obj but should use something like this: forms:FormComp id=form/ Then, in the function sendMyData(, I just do it like this: form.Name = Name.text; No, that doesn't work. It still gives me an error saying: Access to undefined property Name. I really didn't follow that either. I thought I would need an object that would have properties sent to the HTTPService request which calls the php form processor which will email me the results. Please, check out the code I include and if you or someone else would, please replace what I did wrong with the right code. That way I can see exactly how to make this work. I just got a little confused when you were saying that I need to use form.Name as I didn't know if you meant just replace that in the function that I have and that we are talking about this on the left or right of the equals sign and if not, then what are we setting equal to form.Name. Lastly, I have two large books for learning AS 3.0 and OOP, ActionScript 3.0 Bible and Flex 3.0
[flexcoders] Re: Axis Label Width in Flex 3 BarChart
--- In flexcoders@yahoogroups.com, ashney1 [EMAIL PROTECTED] wrote: I have a problem that I have been struggling with for a couple days. I have a BarChart with a vertical axis that has very long labels. When Flex renders the chart, it squeezes the label making it virtually illegible. Is there a way to allocate enough space for the label to render with proper size. Can I either enforce the font size or a width for the axis to prevent text from shrinking? Thanks, Alex Try setting the gutter size.
Re: [flexcoders] Custom event - Create, dispatch, and listen to.
Hi, Class names should begin with an Uppercase letter. RemoteClick not remoteClick. The type String can be lowercase if you want.. Something like the following.. package modulecode { import flash.events.Event; public static const remoteClick:String=remoteClick; public class RemoteClick extends Event { public function RemoteClick(type:String=remoteClick, bubbles:Boolean=false, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } //Some component that dispatches and handles RemoteClick events MyCanvas script public function handleButtonClick():void{ var eventObj:RemoteClick = new RemoteClick(); //no bubble dispatchEvent(eventObj); } public function handleRemoteClickEvent(e:RemoteClick):void{ trace(handleRemoteClick: +e); } public function init():void{ addEventListener(remoteClick, handleRemoteClickEvent); } /script mx:FormItem label= textAlign=right mx:Button label=Run click=handleButtonClick() id=run/ /mx:FormItem /MyCanvas Or //Some component that dispatches RemoteClick events. NOTE : the name of the event and the type. MyCanvas2 mx:Metadata [Event(name=remoteClick, type=modulecode.RemoteClick)] /mx:Metadata script public function handleButtonClick():void{ var eventObj:RemoteClick = new RemoteClick(); //no bubble dispatchEvent(eventObj); } /script mx:FormItem label= textAlign=right mx:Button label=Run click=handleButtonClick() id=run/ /mx:FormItem /MyCanvas2 Use MyCanvas2 in another component.. ACanvas script function handleRemoteClick(e:RemoteClick):void{ ... } /script MyCanvas2 remoteClick=handleRemoteClick(event) ... / /ACanvas HTH. - shaun
Re: [flexcoders] AS equivalent for perl's chop/chomp?
I don't think so...I've never seen one, but what's hard about using String.replace? Aren't the following functionally equivalent? //perl's chomp String.replace(/[\r\n]*$/); //perl's chop String.replace(/.$/); I guess if you really care, you could extend the String class to add them? Guy On 17/10/2008, at 11:27 AM, john fisher wrote: I see String.replace using a regex, but is there a more straightforward way to do this (very) common adjustment? (perl: chop and chomp delete the last character from a string in slightly different ways) thanks, John
RE: [flexcoders] Re: Efficiency and objects in the display list
Although normal children of a Container must be a IUIComponent, you can add a plain Sprite as a raw child of a Container: var s:Sprite = new Sprite(); // draw into s.graphics // set s.x, s.y, s.width, and s.height myContainer.rawChildren.addChild(s); A raw child doesn't get managed by the LayoutManager, so you must position and size it yourself. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, October 16, 2008 11:07 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Efficiency and objects in the display list I think that is correct. Quoting Alex, Navigator children must be Containers, Container children must be IUIComponents, and UIComponent children can be anything. Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Wednesday, October 15, 2008 11:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Efficiency and objects in the display list --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Container children must be UIComponents. You will need to add the sprites to a UIComponent first. I think technically there's just an interface that has to be implemented on whatever you add (IFlexDisplayObject? IUIComponent?). If you extend Sprite or whatever and implement whichever one is needed, you could add it to a container. -Amy
RE: [flexcoders] Locale in Flex
If what you want is the OS locale, take a look at Capabilities.language (and Capabilities.languages in AIR). Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Ciby Jose Sent: Thursday, October 16, 2008 3:20 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Locale in Flex How do I Get Client specific System Locale in flex suppose if the client is working in japan the locale i want is ja_JP or if he is in us locale i want is en_US
Re: [flexcoders] Re: Efficiency and objects in the display list
Ah. nice tip. I'll give that a try. On 17/10/2008, at 3:58 PM, Gordon Smith wrote: Although normal children of a Container must be a IUIComponent, you can add a plain Sprite as a raw child of a Container: var s:Sprite = new Sprite(); // draw into s.graphics // set s.x, s.y, s.width, and s.height myContainer.rawChildren.addChild(s); A raw child doesn't get managed by the LayoutManager, so you must position and size it yourself. Gordon Smith Adobe Flex SDK Team From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Tracy Spratt Sent: Thursday, October 16, 2008 11:07 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] Re: Efficiency and objects in the display list I think that is correct. Quoting Alex, “Navigator children must be Containers, Container children must be IUIComponents, and UIComponent children can be anything.” Tracy From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Amy Sent: Wednesday, October 15, 2008 11:36 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Efficiency and objects in the display list --- In flexcoders@yahoogroups.com, Tracy Spratt [EMAIL PROTECTED] wrote: Container children must be UIComponents. You will need to add the sprites to a UIComponent first. I think technically there's just an interface that has to be implemented on whatever you add (IFlexDisplayObject? IUIComponent?). If you extend Sprite or whatever and implement whichever one is needed, you could add it to a container. -Amy