RE: [flexcoders] - MXMLC -includes
-includes takes classnames not file or directory names. If you don't want an ever-growing commandline, use a -config file. For example, for the project Foo.mxml, the file Foo-config.xml can contain other mxmlc options like ?xml version=1.0? flex-config includes symbolsomepackage.somesubpackage.SomeClass/symbol symbolsomeotherpackage.someothersubpackage.SomeOtherClass/symbol Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Eduardo Dias Sent: Monday, August 31, 2009 9:28 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] - MXMLC -includes Hello Guys, I would like to force the flex compiler to include a set of class from a specific dir. I'm using ant to compile my project and i know that i can use the compiler option -includes to links one or more classes. However i don't want to everytime I create a new class have to add it at the compiler arguments. Do you guys know how can I include a entire dir and force the compiler to include these classes? Thank for your time
[flexcoders] Chart GridLines error message
Hi, I keep getting the following error when trying to use GridLines with direction attribute in my chart: Cannot resolve attribute 'direction' for component type mx.charts.GridLines. Here is a sample snippet code: mx:LineChart id=linechart height=100% width=100% paddingLeft=5 paddingRight=5 showDataTips=true dataProvider={expensesAC} mx:horizontalAxis mx:CategoryAxis categoryField=Month/ /mx:horizontalAxis mx:backgroundElements mx:GridLines direction=horizontal mx:horizontalStroke mx:Stroke weight=1/ /mx:horizontalStroke mx:horizontalFill mx:SolidColor color=0xCC alpha=.66/ /mx:horizontalFill /mx:GridLines /mx:backgroundElements mx:series mx:LineSeries yField=Profit form=curve displayName=Profit/ mx:LineSeries yField=Expenses form=curve displayName=Expenses/ mx:LineSeries yField=Amount form=curve displayName=Amount/ /mx:series /mx:LineChart Not sure why this error happends since i found dozens example on web with same parameter but maybe someone can tell me why this happens? Thanks in advance, Best regards -- View this message in context: http://www.nabble.com/Chart-GridLines-error-message-tp25235518p25235518.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Chart GridLines error message
Found solution few mins after posting this - in Flex 4 style direction is renamed to gridDirection so this may be useful to someone else maybe having this same problem. Cheers |Mirko wrote: Hi, I keep getting the following error when trying to use GridLines with direction attribute in my chart: Cannot resolve attribute 'direction' for component type mx.charts.GridLines. Here is a sample snippet code: mx:LineChart id=linechart height=100% width=100% paddingLeft=5 paddingRight=5 showDataTips=true dataProvider={expensesAC} mx:horizontalAxis mx:CategoryAxis categoryField=Month/ /mx:horizontalAxis mx:backgroundElements mx:GridLines direction=horizontal mx:horizontalStroke mx:Stroke weight=1/ /mx:horizontalStroke mx:horizontalFill mx:SolidColor color=0xCC alpha=.66/ /mx:horizontalFill /mx:GridLines /mx:backgroundElements mx:series mx:LineSeries yField=Profit form=curve displayName=Profit/ mx:LineSeries yField=Expenses form=curve displayName=Expenses/ mx:LineSeries yField=Amount form=curve displayName=Amount/ /mx:series /mx:LineChart Not sure why this error happends since i found dozens example on web with same parameter but maybe someone can tell me why this happens? Btw, i am using Flash Builder with Flex 4.0 SDK. Thanks in advance, Best regards -- View this message in context: http://www.nabble.com/Chart-GridLines-error-message-tp25235518p25235611.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Why no event dispatched?
Do what Tracy mentions: either add bubbles=true in the constructor here: this.dispatchEvent(new LoginEvent(LoginEvent.FAILED)) On Mon, Aug 31, 2009 at 9:40 PM, Wally Kolcz wko...@isavepets.com wrote: *My Events:* package com.isavepets.rm.events { import flash.events.Event; public class LoginEvent extends Event { public static const LOGIN:String = loginEvent; public static const LOGOUT:String = logoutEvent; public static const FAILED:String = loginAttemptFailedEvent; public var username:String; public var password:String; public function LoginEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false) { super(type, bubbles, cancelable); } } } *My Listener on the LoginPanel component View:* public function attemptLogin(username:String, password:String):void { this.addEventListener(LoginEvent.FAILED, loginFailed); var login:LoginEvent = new LoginEvent(LoginEvent.LOGIN); login.username = username; login.password = password; dispatchEvent(login); } -- *From*: Tracy Spratt tr...@nts3rd.com *Sent*: Monday, August 31, 2009 10:37 AM *To*: flexcoders@yahoogroups.com *Subject*: RE: [flexcoders] Why no event dispatched? Your event is not set to bubble, so you listener must be: myLoginManagerInstance.addEventListener(); Is it? Tracy Spratt, Lariat Services, development services available -- *From:*flexcod...@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Wally Kolcz *Sent:* Monday, August 31, 2009 12:09 PM *To:*flexcod...@yahoogroups.com *Subject:* [flexcoders] Why no event dispatched? Can anyone tell me what I am missing from this Class that not dispatch the LoginEvent.FAILED? package com.isavepets.rm.business { import com.isavepets.rm.events.LoginEvent; import flash.events.EventDispatcher; import flash.events.IEventDispatcher; import mx.collections.ArrayCollection; public class LoginManager extends EventDispatcher { public var username:String; public var role:String; public var rescueID:int; public function LoginManager(target:IEventDispatcher=null) { super(target); } public function manageLogin(e:ArrayCollection):Boolean { if (e.length !=0){ DataModel.getInstance().username = e.getItemAt(0).username; DataModel.getInstance().role = e.getItemAt(0).role; DataModel.getInstance().rescueID = e.getItemAt(0).rescueID; return true; }else{ this.dispatchEvent(new LoginEvent(LoginEvent.FAILED)); /* Alert.show(Incorrect Username and/or Password, Please Try Again, Login Failed); */ return false; } } } } -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
[flexcoders] how to create datagrid custom component using as3 and flex
Hello, i've to display some fixed settings in a table in my application..so should i implement it.. how to create custom component for data grid using as3 and flex 3. regards, adarsh Love Cricket? Check out live scores, photos, video highlights and more. Click here http://cricket.yahoo.com
Re: [flexcoders] How to know that an application has createdCompleted ?
What about setting a variable to true in application creation complete and checking against this when your other component is inited? On Mon, Aug 31, 2009 at 2:06 PM, elextraana elextra...@yahoo.ca wrote: Hi there, I built a little component that needs the application to be fully completed before it starts working itself. I.e: I need to listen to the application creationComplete event. Now, that works if the user adds my component in the first page...However when it is added in a state for example that is supposed to get active later on in the application, application creationComplete has obviously long been fired I am sure there is a simple answer to my question, I just could not find any flag on the application object that would tell me that it is done in its lifecycle flow. Thnx. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
[flexcoders] Spark skins and Halo components question
Hi, While browsing through Flex SDK folder i found: Flash Builder Beta\sdks\4.0.0\frameworks\projects\sparkskins\src\mx\skins\spark\TabSkin.mxml Which appears to be Spark FXG skin for TabNavigator's Tab but i don't know how to use it since TabNavigator is Halo component and this skin is Spark skin so i can't use skinClass property of TabNavigator component since that property doesn't exist in Halo component. But i guess there is a way to use Spark skin on Halo component so if someone can help me out with this i would really appreciate it? Thanks in advance, Best regards -- View this message in context: http://www.nabble.com/Spark-skins-and-Halo-components-question-tp25236439p25236439.html Sent from the FlexCoders mailing list archive at Nabble.com.
Re: [flexcoders] Free Flex Builder download
On Saturday 29 Aug 2009, write2akpriya16 wrote: Is there any free Flex Builder download version available?? If you are unemployed, yes. How do I install a Flex builder application in my personal computer ?? Although there is a time limited trial on the Adobe site too. -- Helping to confidentially unleash front-end deliverables as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [Spam] Re: [flexcoders] Creating a flex library project that referencesa remote SVN path?
On Friday 28 Aug 2009, Nick Middleweek wrote: Some guy at work has just said download teh SVN, do an export to clean the SVN files and use the SWC in my main flex projects lib folder... That sound about right? Yup. If the project doesn't provide a .swc itself, you'll need to start a new SVN project, use that to build the Flex library, and then you can set that as the library project of your main program. In those cases we tend to import the remote SVN into our local SVN, commit the .swc file and then use svn:externals to import the .swc into the main programs 'lib' folder. -- Helping to challengingly develop exceptional clicks-and-mortar collaborative best-of-breed e-commerce as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
Re: [flexcoders] CSV file: Coldfusion to Flex/Air
On Monday 31 Aug 2009, Scott wrote: Has anyone created a dynamic query to csv through Coldfusion and been able to receive it through Flex or Air? I am not sure what steps you are asking for help with. ColdFusion can obviously easily convert CSV to a native query, and CF can also send queries to Flex. When I was doing straight Coldfusion code I could create a CSV file on the fly without dumping it on the webserver first. CF already runs on the webserver ? I can't see anyway to pass that back through to Air, does anyone know if a way? Write a CFC that returns it, and use RemoteObject in Flex to invoke it. -- Helping to conveniently envisioneer interactive prospective proactive appliances as part of the IT team of the year, '09 and '08 This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at Halliwells LLP, 3 Hardman Square, Spinningfields, Manchester, M3 3EB. A list of members is available for inspection at the registered office together with a list of those non members who are referred to as partners. We use the word ?partner? to refer to a member of the LLP, or an employee or consultant with equivalent standing and qualifications. Regulated by the Solicitors Regulation Authority. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 2500. For more information about Halliwells LLP visit www.halliwells.com.
[flexcoders] click and doubleClick on the same button?
Hello, I'm having difficulty setting both a click and a doubleClick event on the same button. Is it possible? Thanks, Nick
[flexcoders] Accessing DataGridColumn item renderer variable
Hello Everyone, Within a DataGrid, I have a DataGridColumn that uses a custom component as the item renderer. Within the component, I have an ArrayCollection that stores a set of value objects. My problem is that I cannot access the ArrayCollection values from outside of the item renderer component. Does anyone know how it would be possible to do this? I have posted a code snippet below. mx:Script ![CDATA[ // Cannot access arrFiles from here. ]] /mx:Script mx:DataGrid editable=true mx:columns mx:DataGridColumn id=dgcUpload width=130 headerText=Uploaded Files editable=false mx:itemRenderer mx:Component mx:VBox mx:Script ![CDATA[ [Bindable]public var arrFiles:ArrayCollection = new ArrayCollection(); ]] /mx:Script /mx:VBox /mx:Component /mx:itemRenderer /mx:DataGridColumn /mx:columns /mx:DataGrid Is this possible? Thank you in advance for any assistance, Orville
Re: [flexcoders] click and doubleClick on the same button?
The only way I've been able to accomplish this is to use a timer to filter out a double click, and then ferry the original click event to an eventual click handler. The downside to this is the hardcoded timer delay doesn't reflect the user's system's double-click delay, and I'm not sure how to read that in (I'm not even sure that Flex uses this anyway). Example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal xmlns:local=* mx:Script ![CDATA[ private var doubleClickFilterTimer:Timer; private var pendingMouseEvent:MouseEvent; private function button_doubClickHandler(event:MouseEvent):void { if(doubleClickFilterTimer) doubleClickFilterTimer.stop(); trace('double clicked'); } private function button_clickHandler(event:MouseEvent):void { if(!doubleClickFilterTimer) { doubleClickFilterTimer = new Timer(200, 1); doubleClickFilterTimer.addEventListener(TimerEvent.TIMER_COMPLETE, doubleClickFilterTimer_timerCompleteHandler); } else { doubleClickFilterTimer.reset(); } pendingMouseEvent = event; doubleClickFilterTimer.start(); } private function doubleClickFilterTimer_timerCompleteHandler(event:TimerEvent):void { finishClickHandler(pendingMouseEvent); pendingMouseEvent = null; } private function finishClickHandler(event:MouseEvent):void { trace('clicked'); } ]] /mx:Script mx:Button label=Click or Double-Click Me click=button_clickHandler(event) doubleClickEnabled=true doubleClick=button_doubClickHandler(event) / /mx:Application Hope that helps, Beau On Tue, Sep 1, 2009 at 9:27 AM, Nick Middleweek n...@middleweek.co.ukwrote: Hello, I'm having difficulty setting both a click and a doubleClick event on the same button. Is it possible? Thanks, Nick -- Beau D. Scott Software Engineer
Re: [Spam] Re: [flexcoders] click and doubleClick on the same button?
Beau, Thanks for this code... I've got another question though, I'll post it as another thread... Cheers, Nick 2009/9/1 Beau Scott beau.sc...@gmail.com The only way I've been able to accomplish this is to use a timer to filter out a double click, and then ferry the original click event to an eventual click handler. The downside to this is the hardcoded timer delay doesn't reflect the user's system's double-click delay, and I'm not sure how to read that in (I'm not even sure that Flex uses this anyway). Example: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal xmlns:local=* mx:Script ![CDATA[ private var doubleClickFilterTimer:Timer; private var pendingMouseEvent:MouseEvent; private function button_doubClickHandler(event:MouseEvent):void { if(doubleClickFilterTimer) doubleClickFilterTimer.stop(); trace('double clicked'); } private function button_clickHandler(event:MouseEvent):void { if(!doubleClickFilterTimer) { doubleClickFilterTimer = new Timer(200, 1); doubleClickFilterTimer.addEventListener(TimerEvent.TIMER_COMPLETE, doubleClickFilterTimer_timerCompleteHandler); } else { doubleClickFilterTimer.reset(); } pendingMouseEvent = event; doubleClickFilterTimer.start(); } private function doubleClickFilterTimer_timerCompleteHandler(event:TimerEvent):void { finishClickHandler(pendingMouseEvent); pendingMouseEvent = null; } private function finishClickHandler(event:MouseEvent):void { trace('clicked'); } ]] /mx:Script mx:Button label=Click or Double-Click Me click=button_clickHandler(event) doubleClickEnabled=true doubleClick=button_doubClickHandler(event) / /mx:Application Hope that helps, Beau On Tue, Sep 1, 2009 at 9:27 AM, Nick Middleweek n...@middleweek.co.ukwrote: Hello, I'm having difficulty setting both a click and a doubleClick event on the same button. Is it possible? Thanks, Nick -- Beau D. Scott Software Engineer
[flexcoders] Re: Modules and fonts vanishing is giving me the cramps
Very doubtful that I did that. To be on the safe side, is having this inside my creationComplete event of every module a good idea? Yes. var myLoaderContext:LoaderContext = new LoaderContext(); myLoaderContext.applicationDomain = ApplicationDomain.currentDomain; I always make sure that my visual components for whatever module I am creating are only inside my module. It was really weird, the puremvc, issue, it was just a reference to my model with with retrieveProxy inside of one of my shell commands. All I did was remove that reference and my fonts reapeared. What I do is put all my commands in my shell, and use the puremvc shellModuleJuction paradigm, which cleanly, decouples any references to the modules directly through a nice event mechanism. This is a pretty intense flex project. Off hand, say you have a module that checks in at 1.2 megs with out doing the link reports. When I do all the link stuff with a build script, what can I expect that to be reduced to? Any ideas, mostly it's datagrids and charts inside. Also, looks like I am not going to make Adobe Max this year, :( I saw you speak last year. Thanks, Patrick --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: The rule for fonts in Flex is that whatever TextField or subclass of TextFIeld (like DataGridItemRenderer) is displaying the font must be created in the module containing the font. I haven't used pureMVC so I don't know how it could break that. Most Flex components use a lookup scheme to figure out which moduleFactory to use. Others like Charts and DataGrid need to use ContextualClassFactory instead of the default ClassFactory. Could you have changed something in there? Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of djhatrick Sent: Monday, August 31, 2009 2:32 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps Alex, My problem I think is because i accessed my modules model directly from one of my commands in my shell -- on accident... (using puremvc) Is kind of thing normal? Any reason to why this would make one of my fonts disappear. I want to prevent accidents like this in the future, Link reports are next on my hit-list with this project. Thanks for responding, Patrick --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: Most common scenario: you switched to using a bold font, but didn't embed the bold font, just the normal font. Second: The font didn't get embedded. Use -keep-generated-actionscript or -link-report to see if the font is really there Third: If fonts are in modules, make sure they are loaded and didn't get unloaded Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of djhatrick Sent: Monday, August 31, 2009 9:59 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps All of a sudden this happened again, to my modules, all my fonts are missing? I don't know how to restore my previous changes and see what simple change could have caused this. Other than replacing about 5 hours work and trying to re-add each change one at a time. On a scale of 1-10 for annoying problems this off the chart. I am not doing anything unusual here. I just made a few changes to some properties and collections and now I don't see any fonts. Any suggestions here? Thanks, Patrick --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: Not sure I understood the problem, but the first thing to know about sub-modules is that by default they load into sibling applicationdomains. This is due to the way applicationdomains work. You can look at the diagrams in the modules presentation on my blog to help visualize it. The main Flex app almost always has ModuleManager in it to support CSS and Resource Modules. When you load a module, the main app's appDom is the parent and the module gets loaded as a child of that appdom. That's what we want, right? But the problem is that when that module tries to load a sub-module, it is going to use the main apps' ModuleManager and thus the sub-module loads as a child of the main app's appdom and not the module's appdom and then sub-module can't see the module's classes. I'm guessing that's your problem. The solution is to explicitly set the
[flexcoders] Sealed Classes and how to debug
I am using the method findDatapoints with some mouse action, and a lot of the time, I get a findDataPoints error. Although, since the class is sealed any suggestions on how to debug this type of thing? Thanks, patrick
[flexcoders] Stopping double-click of a button 'bubble' to the datagrid row
Hello, I've got an advancedDataGrid (AvDG) and the first column has an item renderer which has a button on it. The button has a click handler. There is also a itemDoubleClick handler on the AvDG. Users are double-clicking the button so this is firing the click of the button handler but the doubleClick event is also being fired on the AvDG row item. I'm guessing this is related to event bubbling or capturing? I'm trying to stop the AvDG.row doubleClick event being fired if the user double clicks on the button. Anyone got any ideas? I've tried to put a doubleClick on the button in hope that it would handle it and therefore stop the row event from being fired but ti didn't work. Now I think i need to capture the doubleClick cancel event in the button object and prevent it from bubbling from the button to the AvDG. Where do I set event.cancelable = true? Thanks, Nick
[flexcoders] title Window added to the sytemManager breaks tabIndex
I can't seem to tab through my form with Application.application.systemManager.addChild(value) Any suggestions how to re-implement this functionality? Thanks, Patrick
RE: [flexcoders] title Window added to the sytemManager breaks tabIndex
Try using PopUpManager. It will install a focusManager for the popup for you. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of djhatrick Sent: Tuesday, September 01, 2009 10:00 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] title Window added to the sytemManager breaks tabIndex I can't seem to tab through my form with Application.application.systemManager.addChild(value) Any suggestions how to re-implement this functionality? Thanks, Patrick
RE: [flexcoders] Stopping double-click of a button 'bubble' to the datagrid row
MouseEvents are not cancelable. You can kill them via stopImmediatePropagation. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Nick Middleweek Sent: Tuesday, September 01, 2009 9:56 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Stopping double-click of a button 'bubble' to the datagrid row Hello, I've got an advancedDataGrid (AvDG) and the first column has an item renderer which has a button on it. The button has a click handler. There is also a itemDoubleClick handler on the AvDG. Users are double-clicking the button so this is firing the click of the button handler but the doubleClick event is also being fired on the AvDG row item. I'm guessing this is related to event bubbling or capturing? I'm trying to stop the AvDG.row doubleClick event being fired if the user double clicks on the button. Anyone got any ideas? I've tried to put a doubleClick on the button in hope that it would handle it and therefore stop the row event from being fired but ti didn't work. Now I think i need to capture the doubleClick cancel event in the button object and prevent it from bubbling from the button to the AvDG. Where do I set event.cancelable = true? Thanks, Nick
Re: [flexcoders] Stopping double-click of a button 'bubble' to the datagrid row
Event.stopPropagation() or stopImmediatePropagation() (depending on whether you want events on the current node to be executed before the event stops or not: ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=horizontal xmlns:local=* mx:Script ![CDATA[ [Bindable] public var dp:Array = [ {foo: button 1}, {foo: button 2}, {foo: button 3}, {foo: button 4}, {foo: button 5}, {foo: button 6}, ]; private function dg_doubleClickHandler(event:Event):void { trace('dg double click'); } ]] /mx:Script mx:AdvancedDataGrid id=dg doubleClickEnabled=true doubleClick=dg_doubleClickHandler(event) dataProvider={dp} mx:columns mx:AdvancedDataGridColumn dataField=foo mx:itemRenderer mx:Component mx:Button doubleClickEnabled=true label={listData.label} doubleClick=trace(listData.label + ' double click'); event.stopImmediatePropagation(); / /mx:Component /mx:itemRenderer /mx:AdvancedDataGridColumn /mx:columns /mx:AdvancedDataGrid /mx:Application Beau On Tue, Sep 1, 2009 at 10:55 AM, Nick Middleweek n...@middleweek.co.ukwrote: Hello, I've got an advancedDataGrid (AvDG) and the first column has an item renderer which has a button on it. The button has a click handler. There is also a itemDoubleClick handler on the AvDG. Users are double-clicking the button so this is firing the click of the button handler but the doubleClick event is also being fired on the AvDG row item. I'm guessing this is related to event bubbling or capturing? I'm trying to stop the AvDG.row doubleClick event being fired if the user double clicks on the button. Anyone got any ideas? I've tried to put a doubleClick on the button in hope that it would handle it and therefore stop the row event from being fired but ti didn't work. Now I think i need to capture the doubleClick cancel event in the button object and prevent it from bubbling from the button to the AvDG. Where do I set event.cancelable = true? Thanks, Nick -- Beau D. Scott Software Engineer
RE: [flexcoders] Sealed Classes and how to debug
'Sealed' in AS just means that the class is not dynamic. If you have the source you can step in and debug. If you mean that you don't have the source, there isn't much you can do other than make sure you are passing in valid inputs. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of djhatrick Sent: Tuesday, September 01, 2009 9:50 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Sealed Classes and how to debug I am using the method findDatapoints with some mouse action, and a lot of the time, I get a findDataPoints error. Although, since the class is sealed any suggestions on how to debug this type of thing? Thanks, patrick
RE: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps
Actually, we don't recommend doing that. It will solve lots of class definition problems, but the module will no longer unload. If you don't care about unloading modules then that's fine. Maybe the decoupling allowed the module to be unloaded. Make sure something is keep a strong reference to something in the module otherwise it can go away. It is hard to say how much a module can be optimized. The only thing that matters is how many classes it has compared to the main app. If you are using the framework RSL in the main app (which you should), then when you extern the framework RSL agains the module (don't use RSL linkage in modules) it should really shrink the SWF unless you've got tons of custom business logic or assets in the module. I'm not going to Max this year. LA isn't high on my list of places to go. Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of djhatrick Sent: Tuesday, September 01, 2009 9:41 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps Very doubtful that I did that. To be on the safe side, is having this inside my creationComplete event of every module a good idea? Yes. var myLoaderContext:LoaderContext = new LoaderContext(); myLoaderContext.applicationDomain = ApplicationDomain.currentDomain; I always make sure that my visual components for whatever module I am creating are only inside my module. It was really weird, the puremvc, issue, it was just a reference to my model with with retrieveProxy inside of one of my shell commands. All I did was remove that reference and my fonts reapeared. What I do is put all my commands in my shell, and use the puremvc shellModuleJuction paradigm, which cleanly, decouples any references to the modules directly through a nice event mechanism. This is a pretty intense flex project. Off hand, say you have a module that checks in at 1.2 megs with out doing the link reports. When I do all the link stuff with a build script, what can I expect that to be reduced to? Any ideas, mostly it's datagrids and charts inside. Also, looks like I am not going to make Adobe Max this year, :( I saw you speak last year. Thanks, Patrick --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aha...@... wrote: The rule for fonts in Flex is that whatever TextField or subclass of TextFIeld (like DataGridItemRenderer) is displaying the font must be created in the module containing the font. I haven't used pureMVC so I don't know how it could break that. Most Flex components use a lookup scheme to figure out which moduleFactory to use. Others like Charts and DataGrid need to use ContextualClassFactory instead of the default ClassFactory. Could you have changed something in there? Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of djhatrick Sent: Monday, August 31, 2009 2:32 PM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps Alex, My problem I think is because i accessed my modules model directly from one of my commands in my shell -- on accident... (using puremvc) Is kind of thing normal? Any reason to why this would make one of my fonts disappear. I want to prevent accidents like this in the future, Link reports are next on my hit-list with this project. Thanks for responding, Patrick --- In flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com, Alex Harui aharui@ wrote: Most common scenario: you switched to using a bold font, but didn't embed the bold font, just the normal font. Second: The font didn't get embedded. Use -keep-generated-actionscript or -link-report to see if the font is really there Third: If fonts are in modules, make sure they are loaded and didn't get unloaded Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com] On Behalf Of djhatrick Sent: Monday, August 31, 2009 9:59 AM To: flexcoders@yahoogroups.commailto:flexcoders%40yahoogroups.commailto:flexcoders%40yahoogroups.com Subject: [flexcoders] Re: Modules and fonts vanishing is giving me the cramps All of a sudden this happened again, to my modules, all my fonts are missing? I don't know how to restore my previous changes and
[flexcoders] Re: Stopping double-click of a button 'bubble' to the datagrid row
Beau + Alex! Thank you! I've used event.stopPropagation(); //This is exactly what I needed! Chers, Nick 2009/9/1 Nick Middleweek n...@middleweek.co.uk Hello, I've got an advancedDataGrid (AvDG) and the first column has an item renderer which has a button on it. The button has a click handler. There is also a itemDoubleClick handler on the AvDG. Users are double-clicking the button so this is firing the click of the button handler but the doubleClick event is also being fired on the AvDG row item. I'm guessing this is related to event bubbling or capturing? I'm trying to stop the AvDG.row doubleClick event being fired if the user double clicks on the button. Anyone got any ideas? I've tried to put a doubleClick on the button in hope that it would handle it and therefore stop the row event from being fired but ti didn't work. Now I think i need to capture the doubleClick cancel event in the button object and prevent it from bubbling from the button to the AvDG. Where do I set event.cancelable = true? Thanks, Nick
[flexcoders] RE: CSV file: Coldfusion to Flex/Air
Easy - using either HTTPService or RemoteObject. Jeff From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Monday, August 31, 2009 5:46 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] CSV file: Coldfusion to Flex/Air Has anyone created a dynamic query to csv through Coldfusion and been able to receive it through Flex or Air? When I was doing straight Coldfusion code I could create a CSV file on the fly without dumping it on the webserver first. I can't see anyway to pass that back through to Air, does anyone know if a way? sj
[flexcoders] creationcomplete firing when a component is disabled
I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott
[flexcoders] RE: creationcomplete firing when a component is disabled
Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% enabled=false creationComplete=init() Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean.
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
I think you misunderstood. Where is the code that sets enable=true on the tabnavigator? Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% enabled=false creationComplete=init() nb! sp; Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by MailScannerhttp://www.mailscanner.info/, and is believed to be clean.
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
That's in the parent component... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 2:00 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled I think you misunderstood. Where is the code that sets enable=true on the tabnavigator? Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% enabled=false creationComplete=init() n bsp; nb! sp; Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean.
Re: [flexcoders] RE: creationcomplete firing when a component is disabled
No, you misunderstood. Alex meant that you need to call init when you 'manually' enable the canvas. Ie: you have a button where you do: buttonClick(..) { myCanvas.enabled = true ; //Here is the place to put init() } On Tue, Sep 1, 2009 at 9:01 PM, Scott h...@netprof.us wrote: Makes sense, but I tried that already… mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% enabled=false creationComplete=init() Still causes the init() to fire… Is this a bug? sj -- *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Alex Harui *Sent:* Tuesday, September 01, 2009 1:49 PM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *Scott *Sent:* Tuesday, September 01, 2009 11:01 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] creationcomplete firing when a component is disabled I’ve got a troubling issue… On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn’t been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it’s creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by *MailScanner* http://www.mailscanner.info/, and is believed to be clean. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
[flexcoders] Re: Apply filterFunction to datagrid XMLListCollection dataprovider question
Ah this makes total sense - thanks Tracy will try that now --- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: This returns ans XMLList: lstRepRankDrill[0].record You need a collection to use filter. Assign that XMLList to an XMLListCollection and use that as the data provider. Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of chigwell23 Sent: Friday, August 28, 2009 12:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Apply filterFunction to datagrid XMLListCollection dataprovider question I wish :-( That was the original code and gives a runtime error of: lstRepRankDrill[0].record.filterFunction = filterRepRankDtlChnl; TypeError: Error #1089: Assignment to lists with more than one item is not supported. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tracy@ wrote: Ok ,you are not applying the filter to the dataProvider but rather to the parent that contains it. Put lstRepRankDrill[0].record and filter that. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of chigwell23 Sent: Friday, August 28, 2009 2:53 AM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] Re: Apply filterFunction to datagrid XMLListCollection dataprovider question 1. Datagrid displays fine 2. Datagrid dataprovider = lstRepRankDrill[0].record which is _inside_ the lstRepRankDrill XMLListCollection. This XML hierarchy format is returned by myFlexSQL web service against SQLServer2005. 3. trace(lstRepRankDrill[0].record.toXMLString()) gives the 60 rows of data that appear in the datagrid. 4. The XMLListCollection format: lstRepRankDrill (mx.collections.XMLListCollection) ...[0] (XML) ..results .record chnl_cd rep_nm .record .record etc Code: - Datagrid declaration mx:DataGrid dataProvider={lstRepRank[0].record} /mx:DataGrid - load XMLListCollection with back end result set lstRepRankDrill = new XMLListCollection(myFlexsql.xmlData.results); - add filter lstRepRankDrill.filterFunction = filterRepRankDtlChnl; - filter code private function filterRepRankDtlChnl(item:XML):Boolean{ ...trace(item.toXMLString()); ...if(item.results.record.chnl_cd == PREM) return true; ..else return false; } NOTE: trace(item.toXMLString()); in filter code prints all the data, not just one row. Trace= item (XML) ...results ..record ..record etc all 60 of them. So even though the grid data is fine, the filter is getting passed all the data, and the filter gets called once. I wonder if it is because the data is hierarchical and there is a discrepancy between the dataprovider and the filter owner. The dataprovider is _inside_ the lstRepRankDrill XMLListCollection as lstRepRankDrill[0].record. The filter is placed on the outside XMLListCollection : lstRepRankDrill.filterFunction = filterRepRankDtlChnl; Its almost like where the filter is placed (XMLListCollection rather than dataprovider subnode lstRepRankDrill[0].record) is causing all the data to be forwarded into filter param item, and passed only once. --- In flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com, Tracy Spratt tracy@ wrote: Lets clarify terminology. dataProvider must always be a list of some kind, like an array, and XMLList an ArrayCollection or an XMLListCollection. It can not be a single XML node. This expression should return an XMLList: lstRepRankDrill[0].record If you trace(lstRepRankDrill[0].record.toXMLString()); //what do you see? Does your DG display correctly without the filter? Post the declaration for the dataGrid. Tracy Spratt, Lariat Services, development services available _ From: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com [mailto:flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com] On Behalf Of chigwell23 Sent: Thursday, August 27, 2009 2:09 PM To: flexcod...@yahoogro mailto:flexcoders%40yahoogroups.com ups.com Subject: [flexcoders] Re: Apply filterFunction to datagrid XMLListCollection dataprovider question thanks for your time Tracy, yes absolutely the whole shooting match is sent to the _one_ call to the function i.e. lstRepRankDrill, which is actually more than the dataprovider which is {lstRepRankDrill[0].record}. I know that the fact there is only one call to the filter is
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
Unfortunately, it's not a manual process... mx:TabNavigator x=66 y=128 width=899 height=566 enabled={GlobalVars.instance.bLoggedIn} I just have it watch the variable that tells the application the user is logged in... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Fotis Chatzinikos Sent: Tuesday, September 01, 2009 2:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RE: creationcomplete firing when a component is disabled No, you misunderstood. Alex meant that you need to call init when you 'manually' enable the canvas. Ie: you have a button where you do: buttonClick(..) { myCanvas.enabled = true ; //Here is the place to put init() } On Tue, Sep 1, 2009 at 9:01 PM, Scott h...@netprof.us mailto:h...@netprof.us wrote: Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=100% enabled=false creationComplete=init() Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com mailto:fotis.chatzini...@gmail.com , -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean.
[flexcoders] Chart Annotation Headaces
I'm attempting to add annotation items to a LineChart via CartesianDataCanvas,addDataChild(); There are two steps involved - one where the chart data is returned, immediately followed by my attempt at annotation. The results are inconsistent. Sometimes the annotation items (graphics) render properly, and sometimes some are dropped. I've been trying to find the correct event to listen to, thinking that perhaps the chart has to finish rendering with it's new ArrayCollection, but so far it's a mystery. updateComplete does not work as it creates an infinite loop as new updateComplete events are fired when new annotation items are added. Any advice appreciated! Jeff Battershall Application Architect Dow Jones Indexes jeff.battersh...@dowjones.com (609) 520-5637 (p) (484) 477-9900 (c)
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
If I were writing the code, GlobalVars would look like: Class GlobalVars [Bindable(bLoggedInChanged)] Public function get bLoggedIn():Boolean { Return _bLoggedIn; } Public function set bLoggedIn(value:Boolean):void { If (_bLoggedIn != value) { _bLoggedIn = value; dispatchEvent(new Event(bLoggedInChanged); } } And somewhere in the app I would do: GlobalVars.instance.addEventListener(bLoggedInChanged, init); Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Unfortunately, it's not a manual process... mx:TabNavigator x=66 y=128 width=899 height=566 enabled={GlobalVars.instance.bLoggedIn} I just have it watch the variable that tells the application the user is logged in... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Fotis Chatzinikos Sent: Tuesday, September 01, 2009 2:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RE: creationcomplete firing when a component is disabled No, you misunderstood. Alex meant that you need to call init when you 'manually' enable the canvas. Ie: you have a button where you do: buttonClick(..) { myCanvas.enabled = true ; //Here is the place to put init() } On Tue, Sep 1, 2009 at 9:01 PM, Scott h...@netprof.usmailto:h...@netprof.us wrote: Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% enabled=false creationComplete=init() ! Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by MailScannerhttp://www.mailscanner.info/, and is believed to be clean. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.commailto:fotis.chatzini...@gmail.com, -- This message has been scanned for viruses and dangerous content by MailScannerhttp://www.mailscanner.info/, and is believed to be clean.
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
Ok. Great. Thanks much. sj From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 2:23 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled If I were writing the code, GlobalVars would look like: Class GlobalVars [Bindable(bLoggedInChanged)] Public function get bLoggedIn():Boolean { Return _bLoggedIn; } Public function set bLoggedIn(value:Boolean):void { If (_bLoggedIn != value) { _bLoggedIn = value; dispatchEvent(new Event(bLoggedInChanged); } } And somewhere in the app I would do: GlobalVars.instance.addEventListener(bLoggedInChanged, init); Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Unfortunately, it's not a manual process... mx:TabNavigator x=66 y=128 width=899 height=566 enabled={GlobalVars.instance.bLoggedIn} I just have it watch the variable that tells the application the user is logged in... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Fotis Chatzinikos Sent: Tuesday, September 01, 2009 2:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RE: creationcomplete firing when a component is disabled No, you misunderstood. Alex meant that you need to call init when you 'manually' enable the canvas. Ie: you have a button where you do: buttonClick(..) { myCanvas.enabled = true ; //Here is the place to put init() } On Tue, Sep 1, 2009 at 9:01 PM, Scott h...@netprof.us mailto:h...@netprof.us wrote: Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=100% enabled=false creationComplete=init() ! Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com mailto:fotis.chatzini...@gmail.com , -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean.
[flexcoders] custom components destroy Flex design mode ....
This one is starting to really drive me crazy ... placing any one of a multitude of custom components on the mxml stops design mode from opening. Just grabbed the SteelPotato footerdatagrid to see if it can be seen if it is used. Nope - stops design mode. Wanted to try it because our implementation of Alex's solution also stops design mode from opening. The FlexLib buttons do the same thing - code them into source view and no more design view. How do you deal with this? Our corporate dashboards are starting to get very detailed and we need a WYSIWYG view to adjust things. Do we really have to compile, run application, view in browser, check, and then go back to source mode to increase the width of a button if needed? Any info really appreciated. TIA, Mic.
[flexcoders] RE: Chart Annotation Headaces
OK, callLater() seems to do the trick. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Battershall, Jeff Sent: Tuesday, September 01, 2009 3:19 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Chart Annotation Headaces I'm attempting to add annotation items to a LineChart via CartesianDataCanvas,addDataChild(); There are two steps involved - one where the chart data is returned, immediately followed by my attempt at annotation. The results are inconsistent. Sometimes the annotation items (graphics) render properly, and sometimes some are dropped. I've been trying to find the correct event to listen to, thinking that perhaps the chart has to finish rendering with it's new ArrayCollection, but so far it's a mystery. updateComplete does not work as it creates an infinite loop as new updateComplete events are fired when new annotation items are added. Any advice appreciated! Jeff Battershall Application Architect Dow Jones Indexes jeff.battersh...@dowjones.com (609) 520-5637 (p) (484) 477-9900 (c)
[flexcoders] Antbuild errors
Hi, I am getting these errors while building the Flex projects. Please help! [compc] C:\AlntBuild\build\Root\ProjectFx\Resources\css\flexcss.css(1600): Error: Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = assets/icon_popclose.png)'. [compc] [compc] closeButtonUpSkin: Embed(source=assets/icon_popclose.png); [compc] [compc] C:\AlntBuild\build\Root\ProjectFx\Resources\css\flexcss.css(1602): Error: Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = assets/icon_popclose.png)'. [compc] [compc] closeButtonOverSkin: Embed(source=assets/icon_popclose.png); [compc] [compc] C:\AlntBuild\build\Root\ProjectFx\Resources\css\flexcss.css(1603): Error: Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = assets/icon_popclose.png)'. [compc] [compc] closeButtonDownSkin: Embed(source=assets/icon_popclose.png); [compc] [compc] C:\AlntBuild\build\Root\ProjectFx\Resources\css\flexcss.css(1604): Error: Invalid Embed directive in stylesheet - can't resolve source 'Embed(source = assets/icon_popclose.png)'. [compc] [compc] closeButtonDisabledSkin: Embed(source=assets/icon_popclose.png); [compc]
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
I've been playing around with this... I added in the line GlobalVars.instance.addEventListener(bLoggedInChanged), init); And I got the error: Access of undefined property init I then tried: init() and got: Call to a possibly undefined method init I even selected it from the . auto selection which gave it the () after init. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 2:23 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled If I were writing the code, GlobalVars would look like: Class GlobalVars [Bindable(bLoggedInChanged)] Public function get bLoggedIn():Boolean { Return _bLoggedIn; } Public function set bLoggedIn(value:Boolean):void { If (_bLoggedIn != value) { _bLoggedIn = value; dispatchEvent(new Event(bLoggedInChanged); } } And somewhere in the app I would do: GlobalVars.instance.addEventListener(bLoggedInChanged, init); Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Unfortunately, it's not a manual process... mx:TabNavigator x=66 y=128 width=899 height=566 enabled={GlobalVars.instance.bLoggedIn} I just have it watch the variable that tells the application the user is logged in... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Fotis Chatzinikos Sent: Tuesday, September 01, 2009 2:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RE: creationcomplete firing when a component is disabled No, you misunderstood. Alex meant that you need to call init when you 'manually' enable the canvas. Ie: you have a button where you do: buttonClick(..) { myCanvas.enabled = true ; //Here is the place to put init() } On Tue, Sep 1, 2009 at 9:01 PM, Scott h...@netprof.us mailto:h...@netprof.us wrote: Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=100% enabled=false creationComplete=init() ! Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com mailto:fotis.chatzini...@gmail.com , -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean.
[flexcoders] Context Menu mouseTarget Issue
I have a canvas container with several custom containers added to it. I have a context menu so that when you right click on the containers, you can remove it from the canvas container. When I go to remove a child, I get an error, below. Code: private function menuSelectHandler(event:ContextMenuEvent):void { var remChild:Number; var target:String = event.mouseTarget.toString(); trace (target); if (target.match(UIComponent) == null target.match(resizeBar) == null) { trace ( True 1); trace (+event.mouseTarget); remChild = cal0Day.getChildIndex(event.mouseTarget); } else { trace ( True 2); trace (+event.mouseTarget.parent); remChild = myCanvas.getChildIndex(event.mouseTarget.parent); } trace (remChild); trace (myCanvas.getChildAt(remChild)); myCanvas.removeChildAt(remChild); myAC.removeChildAt(remChild); updateLayout(); } TestApp0.canvasShell.myCanvas.myContainer592 True 1 TestApp0.canvasShell.myCanvas.myContainer592 12 TestApp0.canvasShell.myCanvas.myContainer592 Then I get the following error: ArgumentError: Error #2025: The supplied DisplayObject must be a child of the caller. at flash.display::DisplayObjectContainer/getChildIndex() How do I do this?
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
I assume you mis-typed the first one? There are too many )'s. The params to addEventListener take a method reference, not a call to a method, so addEventListener(bLoggedInChagned, init) is correct. Do you have a function init()? Is it in the same file as this code? Otherwise, you'll need to make it public and get access to it. BTW, the init() must now take an event as its parameter public function init(event:Event):void { // call webservice or something like that } Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 1:50 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled I've been playing around with this... I added in the line GlobalVars.instance.addEventListener(bLoggedInChanged), init); And I got the error: Access of undefined property init I then tried: init() and got: Call to a possibly undefined method init I even selected it from the . auto selection which gave it the () after init. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 2:23 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled If I were writing the code, GlobalVars would look like: Class GlobalVars [Bindable(bLoggedInChanged)] Public function get bLoggedIn():Boolean { Return _bLoggedIn; } Public function set bLoggedIn(value:Boolean):void { If (_bLoggedIn != value) { _bLoggedIn = value; dispatchEvent(new Event(bLoggedInChanged); } } And somewhere in the app I would do: GlobalVars.instance.addEventListener(bLoggedInChanged, init); Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Unfortunately, it's not a manual process... mx:TabNavigator x=66 y=128 width=899 height=566 enabled={GlobalVars.instance.bLoggedIn} I just have it watch the variable that tells the application the user is logged in... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Fotis Chatzinikos Sent: Tuesday, September 01, 2009 2:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RE: creationcomplete firing when a component is disabled No, you misunderstood. Alex meant that you need to call init when you 'manually' enable the canvas. Ie: you have a button where you do: buttonClick(..) { myCanvas.enabled = true ; //Here is the place to put init() } On Tue, Sep 1, 2009 at 9:01 PM, Scott h...@netprof.usmailto:h...@netprof.us wrote: Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml; width=100% height=100% enabled=false creationComplete=init() ! Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc.http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.commailto:flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
Nevermind. I needed to create a new function and add that within that function's body. It's still not firing the init() function right but I'll play around with it. sj From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 3:50 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled I've been playing around with this... I added in the line GlobalVars.instance.addEventListener(bLoggedInChanged), init); And I got the error: Access of undefined property init I then tried: init() and got: Call to a possibly undefined method init I even selected it from the . auto selection which gave it the () after init. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 2:23 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled If I were writing the code, GlobalVars would look like: Class GlobalVars [Bindable(bLoggedInChanged)] Public function get bLoggedIn():Boolean { Return _bLoggedIn; } Public function set bLoggedIn(value:Boolean):void { If (_bLoggedIn != value) { _bLoggedIn = value; dispatchEvent(new Event(bLoggedInChanged); } } And somewhere in the app I would do: GlobalVars.instance.addEventListener(bLoggedInChanged, init); Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:22 AM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Unfortunately, it's not a manual process... mx:TabNavigator x=66 y=128 width=899 height=566 enabled={GlobalVars.instance.bLoggedIn} I just have it watch the variable that tells the application the user is logged in... From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Fotis Chatzinikos Sent: Tuesday, September 01, 2009 2:06 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] RE: creationcomplete firing when a component is disabled No, you misunderstood. Alex meant that you need to call init when you 'manually' enable the canvas. Ie: you have a button where you do: buttonClick(..) { myCanvas.enabled = true ; //Here is the place to put init() } On Tue, Sep 1, 2009 at 9:01 PM, Scott h...@netprof.us mailto:h...@netprof.us wrote: Makes sense, but I tried that already... mx:Canvas xmlns:mx=http://www.adobe.com/2006/mxml http://www.adobe.com/2006/mxml width=100% height=100% enabled=false creationComplete=init() ! Still causes the init() to fire... Is this a bug? sj From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 1:49 PM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] RE: creationcomplete firing when a component is disabled Disabling is about interactivity, not creation, which is why creationComplete fires. Somewhere you probably have code that sets enabled=true, and that code can call init(). Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui From: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com [mailto:flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com ] On Behalf Of Scott Sent: Tuesday, September 01, 2009 11:01 AM To: flexcoders@yahoogroups.com mailto:flexcoders@yahoogroups.com Subject: [flexcoders] creationcomplete firing when a component is disabled I've got a troubling issue... On my main page I have a tabNavigator that has several different pages for my app. This navigator is disabled until the user logs in. However, even though the navigator is disabled; it still fires off the creationcomplete which is giving me grief because the data connection hasn't been built yet. Falling short of creating a custom event, is there a way to fire off the init() function when the component is enabled instead of when it's creationComplete? Thanks Scott -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. -- Fotis
[flexcoders] Re: Popup Help Bubble?
Tooltips are useful for showing info when a single component is rolled over, but as far as I know, they don't do what I'm asking. I need a way to annotate multiple components at the same time (several help bubbles visible across the screen simultaneously, regardless of mouse hover.) Thanks --- In flexcoders@yahoogroups.com, Tracy Spratt tr...@... wrote: Tooltip? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of dfalling Sent: Monday, August 31, 2009 12:39 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Popup Help Bubble? I could have sworn I saw a flex component to do this, but I can't find it. Is there a good component/method of showing multiple help popups all over the screen? I want a way to annotate numerous controls and buttons at the same time, to point out new features in an application.
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
Yeah, that got me next... I had to add in the event into the init(evt::Event):void. With all the work, I've got the same issue... It's trying to initialize the remoteobject before it has the required information provided after the login. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 4:59 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled I assume you mis-typed the first one? There are too many )'s. The params to addEventListener take a method reference, not a call to a method, so addEventListener(bLoggedInChagned, init) is correct. Do you have a function init()? Is it in the same file as this code? Otherwise, you'll need to make it public and get access to it. BTW, the init() must now take an event as its parameter public function init(event:Event):void { // call webservice or something like that } Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean.
Re: [flexcoders] custom components destroy Flex design mode ....
Something wrong probably with your install... I do not know what, but here, I 75% of my app is custom and i never had this problem (Vista, AND XP) Hopefully somebody else can provide some real help thought, and not just 'it plays here :-)' On Tue, Sep 1, 2009 at 10:30 PM, chigwell23 chigwel...@yahoo.com wrote: This one is starting to really drive me crazy ... placing any one of a multitude of custom components on the mxml stops design mode from opening. Just grabbed the SteelPotato footerdatagrid to see if it can be seen if it is used. Nope - stops design mode. Wanted to try it because our implementation of Alex's solution also stops design mode from opening. The FlexLib buttons do the same thing - code them into source view and no more design view. How do you deal with this? Our corporate dashboards are starting to get very detailed and we need a WYSIWYG view to adjust things. Do we really have to compile, run application, view in browser, check, and then go back to source mode to increase the width of a button if needed? Any info really appreciated. TIA, Mic. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
Re: [flexcoders] Re: Popup Help Bubble?
Have a look at popupmanager, but if you need them to stay at the same place when the user scrolls the screen you might need more work... On Wed, Sep 2, 2009 at 1:12 AM, dfalling dfall...@gmail.com wrote: Tooltips are useful for showing info when a single component is rolled over, but as far as I know, they don't do what I'm asking. I need a way to annotate multiple components at the same time (several help bubbles visible across the screen simultaneously, regardless of mouse hover.) Thanks --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Tracy Spratt tr...@... wrote: Tooltip? Tracy Spratt, Lariat Services, development services available _ From: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com [mailto: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com] On Behalf Of dfalling Sent: Monday, August 31, 2009 12:39 PM To: flexcoders@yahoogroups.com flexcoders%40yahoogroups.com Subject: [flexcoders] Popup Help Bubble? I could have sworn I saw a flex component to do this, but I can't find it. Is there a good component/method of showing multiple help popups all over the screen? I want a way to annotate numerous controls and buttons at the same time, to point out new features in an application. -- Fotis Chatzinikos, Ph.D. Founder, Phinnovation fotis.chatzini...@gmail.com,
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
Ok, it's been one of those days... Perhaps I shouldn't program when I'm ill. I finally figured out what the heck was going on and want to post this in case someone else runs into it. I'm building an Air application that connected to a CF server. I created a process to pull an XML file with the server information to set up the remote object. This file was populated into the GlobalVars. The problem was the first screen initialized (including the remote object call) before the XML file was read. I stumbled on the answer by accident when I went to see what was in the GlobalVars.instance.strServer variable. Incidentally, why doesn't the debugger see this variable? If I do the following: Private var strTemp:string; strTemp = GlobalVars.instance.strServer I can then watch the variable in the debugger. Anyway, I set the original variable to [Bindable] and my problem went away. It was then I realized that the remote object with the endpoint variable was initialized in a non-configured state. GRR. Thanks for your help anyway, Alex. I learned something new about overloading variables in flex which I'm sure will come in handy later on. Scott From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 4:20 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Yeah, that got me next... I had to add in the event into the init(evt::Event):void. With all the work, I've got the same issue... It's trying to initialize the remoteobject before it has the required information provided after the login. From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 4:59 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled I assume you mis-typed the first one? There are too many )'s. The params to addEventListener take a method reference, not a call to a method, so addEventListener(bLoggedInChagned, init) is correct. Do you have a function init()? Is it in the same file as this code? Otherwise, you'll need to make it public and get access to it. BTW, the init() must now take an event as its parameter public function init(event:Event):void { // call webservice or something like that } Alex Harui Flex SDK Developer Adobe Systems Inc. http://www.adobe.com/ Blog: http://blogs.adobe.com/aharui http://blogs.adobe.com/aharui -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean. -- This message has been scanned for viruses and dangerous content by MailScanner http://www.mailscanner.info/ , and is believed to be clean.
RE: [flexcoders] RE: creationcomplete firing when a component is disabled
You can't see GlobalVars because it's a Singleton. Models are often used that way. Try var g:GlobalVars = GlobalVars.instance; I do that a lot when using a Model and when I'm done debugging, I remove it. Jake Churchill CF Webtools 11204 Davenport, Ste. 100 Omaha, NE 68154 http://www.cfwebtools.com 402-408-3733 x103 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 5:36 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Ok, it's been one of those days. Perhaps I shouldn't program when I'm ill. I finally figured out what the heck was going on and want to post this in case someone else runs into it. I'm building an Air application that connected to a CF server. I created a process to pull an XML file with the server information to set up the remote object. This file was populated into the GlobalVars. The problem was the first screen initialized (including the remote object call) before the XML file was read. I stumbled on the answer by accident when I went to see what was in the GlobalVars.instance.strServer variable. Incidentally, why doesn't the debugger see this variable? If I do the following: Private var strTemp:string; strTemp = GlobalVars.instance.strServer I can then watch the variable in the debugger. Anyway, I set the original variable to [Bindable] and my problem went away. It was then I realized that the remote object with the endpoint variable was initialized in a non-configured state. GRR. Thanks for your help anyway, Alex. I learned something new about overloading variables in flex which I'm sure will come in handy later on. Scott _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Scott Sent: Tuesday, September 01, 2009 4:20 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled Yeah, that got me next. I had to add in the event into the init(evt::Event):void. With all the work, I've got the same issue. It's trying to initialize the remoteobject before it has the required information provided after the login. _ From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Tuesday, September 01, 2009 4:59 PM To: flexcoders@yahoogroups.com Subject: RE: [flexcoders] RE: creationcomplete firing when a component is disabled I assume you mis-typed the first one? There are too many )'s. The params to addEventListener take a method reference, not a call to a method, so addEventListener(bLoggedInChagned, init) is correct. Do you have a function init()? Is it in the same file as this code? Otherwise, you'll need to make it public and get access to it. BTW, the init() must now take an event as its parameter public function init(event:Event):void { // call webservice or something like that } Alex Harui Flex SDK Developer Adobe http://www.adobe.com/ Systems Inc. Blog: http://blogs.adobe.com/aharui -- This message has been scanned for viruses and dangerous content by http://www.mailscanner.info/ MailScanner, and is believed to be clean. -- This message has been scanned for viruses and dangerous content by http://www.mailscanner.info/ MailScanner, and is believed to be clean.
[flexcoders] Detecting ResizeEvent Complete
How do I determine when a ResizeEvent has completed? I'm doing some measuring of a container when the application is resized, however, if I measure the container when the ResizeEvent is triggered, I don't get the final container width.