Re: [flexcoders] Re: Switching Item Renderers
Yeah thats the way I've done it previously. I thought that this way would cut out on some additional computation. On Tue, Aug 31, 2010 at 6:04 PM, valdhor valdhorli...@embarqmail.comwrote: That seems overly complicated to me. What I would try is create two custom components then instantiate the appropriate one based on the data and add it in the updateDisplayList method. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Since nobody has replied I'm continueing to try this. I currently think I may need to override all methods in UI component. Is it clear what I'm trying to do? Is this the wrong way of doing it? I think its probably lighter than wrapping to components in a fully fledged UI component? * Some Thoughts* Also a comment on ListItemRenderer, theres an awful lot of methods that need to be implemented to make this work. I doubt all of them are used in a List Senario. Even implementing them all theres still a dependency on DisplayObject (who's methods seem to be implemented). It does feel to me like the architecture seems a bit off. I mean if all of those methods are implemented why is there still a dependency on DisplayObject. Its not just enough to implement IListRenderer which seems to defeat the purpose of an interace On Wed, Aug 18, 2010 at 11:42 PM, Wesley Acheson wesley.ache...@...wrote: *Disclaimer:* This is a cross post with Stack Overflow. I know at least one person on this list saw it there. http://stackoverflow.com/questions/3507313/flex-switch-item-renderer Hi I was wondering if anyone had any luck with the following senario in flex. I'd like to be able to have a custom item renderer which delegates to another renderer inside. The reason for this would be in a datagrid for instance displaying a checkbox if the dataprovider for the row had a boolean value. Using the default item renderer when the value was a non boolean. Basically I was hoping to use a proxy object (though not necessarily the proxy class) so that I could a renderer which delegated all of its responsibilties to a sub renderer. Hard to explain. *Edit 1* I think the following gives a clearer idea of what I had in mind. This is only knocked up quickly for the purpose of showing the idea. *SwitchingRenderer.as* package com.example { import mx.controls.CheckBox; import mx.controls.dataGridClasses.DataGridItemRenderer; import mx.controls.listClasses.BaseListData; import mx.controls.listClasses.IDropInListItemRenderer; import mx.core.IDataRenderer; import mx.core.UIComponent; public class SwitchingRenderer extends UIComponent implements IDataRenderer, IDropInListItemRenderer { private var checkboxRenderer:CheckBox; private var defaultRenderer:DataGridItemRenderer; private var currentRenderer:IDataRenderer; public function SwitchingRenderer() { this.checkboxRenderer = new CheckBox(); this.defaultRenderer = new DataGridItemRenderer(); this.currentRenderer = defaultRenderer(); super(); } public function get data():Object { //If the data for this cell is a boolean // currentRender = checkBoxRenderer // otherwise // currentRenderer = defaultRenderer } public function set data(value:Object):void { currentRenderer.data = value; } public function get listData():BaseListData { return currentRenderer.listData; } public function set listData(value:BaseListData):void { currentRenderer.listData = value; } } }
Re: [flexcoders] separate flex apps in same webroot folder
Hi , Is there any RSL setting for this app? if yes what is it? Thanks Regards, Pravin Uttarwar | Perennial Systems pravin.uttar...@perennialsys.com | Cell: +91 9371288080 | Tel: +91 (020) 2421 1286 Ext:2007 On 1 September 2010 11:31, ZIONIST stinas...@yahoo.com wrote: Hi guys i recently developed a website flex for a client and was asked to make it editable. so i developed a content management system in flex so that my client could be able to edit the content on the site. i uploaded the main site onto a shared server of my hosting company in the wwwroot folder and i created another folder within the wwwroot folder called admin where i put the administrative site. here is the problem, the main site can be accessed using this url http://www.afriquesuites.com and when i try accessing the admin site i use http://www.afriquesuites.com/admin/afriquesuitesAdmin.html which does not load the page. My question is how to access the admin site.
[flexcoders] Re: separate flex apps in same webroot folder
am not sure i understand your question... all i did is develop the two apps separately and deployed the release build version of the site to the wwwroot folder on the host server and the release build version of the admin site to the admin folder in the wwwroot folder.
Re: [flexcoders] Re: separate flex apps in same webroot folder
As I have seen your swf it is not loading completely and its size is less than 200 kb, so it must be loading framework as RSL. Also it might load if you out it in same folder ,if it is so,then problem is that the framework setting is wrong, try putting framework_.xx in admin folder and try again. Thanks Regards, Pravin Uttarwar | Perennial Systems pravin.uttar...@perennialsys.com | Cell: +91 9371288080 | Tel: +91 (020) 2421 1286 Ext:2007 On 1 September 2010 11:57, ZIONIST stinas...@yahoo.com wrote: am not sure i understand your question... all i did is develop the two apps separately and deployed the release build version of the site to the wwwroot folder on the host server and the release build version of the admin site to the admin folder in the wwwroot folder.
[flexcoders] Re: separate flex apps in same webroot folder
i already have framework_.xx in the admin folder.
Re: [flexcoders] Re: separate flex apps in same webroot folder
ok As i have seen your main site i saw firebug that it is loading framework swf of 500+ kb. So i thought it is might not loading the same for admin. Also is it working if putted in main folder? Thanks Regards, Pravin Uttarwar | Perennial Systems pravin.uttar...@perennialsys.com | Cell: +91 9371288080 | Tel: +91 (020) 2421 1286 Ext:2007 On 1 September 2010 12:04, ZIONIST stinas...@yahoo.com wrote: i already have framework_.xx in the admin folder.
[flexcoders] Re: separate flex apps in same webroot folder
when i put the afriquesuitesAdmin.swf and afriquesuitesAdmin.html in the main folder, it still doesn't work.
Re: [flexcoders] Re: separate flex apps in same webroot folder
:( is it working on locally? Thanks Regards, Pravin Uttarwar | Perennial Systems pravin.uttar...@perennialsys.com | Cell: +91 9371288080 | Tel: +91 (020) 2421 1286 Ext:2007 On 1 September 2010 12:11, ZIONIST stinas...@yahoo.com wrote: when i put the afriquesuitesAdmin.swf and afriquesuitesAdmin.html in the main folder, it still doesn't work.
Re: [flexcoders] Re: separate flex apps in same webroot folder
Its working now. Thanks Regards, Pravin Uttarwar | Perennial Systems pravin.uttar...@perennialsys.com | Cell: +91 9371288080 | Tel: +91 (020) 2421 1286 Ext:2007 On 1 September 2010 12:13, p...@vin Uttarwar pravinuttar...@gmail.com wrote: :( is it working on locally? Thanks Regards, Pravin Uttarwar | Perennial Systems pravin.uttar...@perennialsys.com | Cell: +91 9371288080 | Tel: +91 (020) 2421 1286 Ext:2007 On 1 September 2010 12:11, ZIONIST stinas...@yahoo.com wrote: when i put the afriquesuitesAdmin.swf and afriquesuitesAdmin.html in the main folder, it still doesn't work.
[flexcoders] Re: separate flex apps in same webroot folder
on my development pc the two apps work perfectly.
[flexcoders] Re: separate flex apps in same webroot folder
NO its still not working on mine.
[flexcoders] Re: separate flex apps in same webroot folder
Am using vista so i can't find the assetcache, but i cleared all cache and cookies from google chrome but still the app doesn't load. Are you sure it's loading on yours?
[flexcoders] Re: separate flex apps in same webroot folder
i have cleared the assetcache of flash player but still cant load the site.
[flexcoders] Re: separate flex apps in same webroot folder
trying now. will let you know how it goes
[flexcoders] Proper way to ensure components in a different state are created
When I try to access components that are in a different state on the line after I set the current state I get this error, TypeError: Error #1009: Cannot access a property or method of a null object reference. // code currentState = NOTES; noteComponent.text = value; // noteComponent exists in NOTES state and is not created yet I know this is because of the Flex invalidation cycle and I'm aware I could use databinding and I know I could use callLater. But if I needed to create the components immediately for only the state I'm going to how would I do that? Custom Component: Group states State 1 State 2 State 3 /states imageComponent includeIn=State 1/ videoComponent includeIn=State 2/ noteComponent includeIn=State 3/ /Group JP
RE: [flexcoders] Proper way to ensure components in a different state are created
If you use includeIn or excludeFrom, then itemCreationPolicy becomes available and you can set it to immediate - imageComponent includeIn=State 1 itemCreationPolicy=immediate id=imcomp / Then in code you could in imcomp.currentState = myDesiredState, even before State 1 has been used. Hope this helps, Derek From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of dorkie dork from dorktown Sent: Wednesday, September 01, 2010 5:15 AM To: flexcoders@yahoogroups.com Subject: [flexcoders] Proper way to ensure components in a different state are created When I try to access components that are in a different state on the line after I set the current state I get this error, TypeError: Error #1009: Cannot access a property or method of a null object reference. // code currentState = NOTES; noteComponent.text = value; // noteComponent exists in NOTES state and is not created yet I know this is because of the Flex invalidation cycle and I'm aware I could use databinding and I know I could use callLater. But if I needed to create the components immediately for only the state I'm going to how would I do that? Custom Component: Group states State 1 State 2 State 3 /states imageComponent includeIn=State 1/ videoComponent includeIn=State 2/ noteComponent includeIn=State 3/ /Group JP __ Information from ESET NOD32 Antivirus, version of virus signature database 5414 (20100901) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com image001.jpgimage002.jpg
RE: [flexcoders] Re: AIR and Printing...
You won't have any problem accessing the data. It's actually a bit easier in AIR than the Flash Player as the security model is a bit more permissive (in places). From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Laurence Sent: 01 September 2010 00:42 To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: AIR and Printing... It does seem, from reading that document, that you can choose the printer to send the print-job to, and set the parameters for that printer, and skip all the dialog boxes... I'll have to play with that... Thanks! My next question, then, is accessing remote data -- my Flex app using the Flash Player has no problem calling a remote ColdFusion function to grab data from the SQL server, and send data back there... How much does that change in AIR? Or is it pretty much the same thing? L.
[flexcoders] Flex application convert stage object to an image
Below is the link of my first application. Please give me more suggestions. http://www.gupshup.isgreat.org/fun/Oracle DBA, PHP, Flex, Actionscript 3, XML,jquery Software Developer Ravi Kumar Pundir.
[flexcoders] *** Security Sandbox Violation ***
I am building a Flex portal. Which has main application and several sub-applications. I am using sandboxed application. I do have crossdomain.xml defined in both main application and sub applications. And in the main application, I used the swfloader like : mx:SWFLoader id=couponApp width=100% height=100% loadForCompatibility=true trustContent=false complete=allowLoading() / But when I tried to loading the sub application, it always give Security Sandbox Violation error. The error is *** Security Sandbox Violation *** SecurityDomain 'http://localhost:8080/isw/Applications.html?debug=true' tried to access incompatible context 'http://127.0.0.1:8080/coupon/Coupon.swf' Anybody has any idea and suggestion? Where did I go wrong?
[flexcoders] Re: separate flex apps in same webroot folder
Works for me. Brings up a login screen. --- In flexcoders@yahoogroups.com, ZIONIST stinas...@... wrote: on my development pc the two apps work perfectly.
[flexcoders] Re: Switching Item Renderers
The only computation I see is determining which component to use. With your original idea you would still need the same computation to figure out which (sub) item renderer to use. I still think you are trying to hide the woods using more trees. --- In flexcoders@yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Yeah thats the way I've done it previously. I thought that this way would cut out on some additional computation. On Tue, Aug 31, 2010 at 6:04 PM, valdhor valdhorli...@...wrote: That seems overly complicated to me. What I would try is create two custom components then instantiate the appropriate one based on the data and add it in the updateDisplayList method. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Wesley Acheson wesley.acheson@ wrote: Since nobody has replied I'm continueing to try this. I currently think I may need to override all methods in UI component. Is it clear what I'm trying to do? Is this the wrong way of doing it? I think its probably lighter than wrapping to components in a fully fledged UI component? * Some Thoughts* Also a comment on ListItemRenderer, theres an awful lot of methods that need to be implemented to make this work. I doubt all of them are used in a List Senario. Even implementing them all theres still a dependency on DisplayObject (who's methods seem to be implemented). It does feel to me like the architecture seems a bit off. I mean if all of those methods are implemented why is there still a dependency on DisplayObject. Its not just enough to implement IListRenderer which seems to defeat the purpose of an interace On Wed, Aug 18, 2010 at 11:42 PM, Wesley Acheson wesley.acheson@wrote: *Disclaimer:* This is a cross post with Stack Overflow. I know at least one person on this list saw it there. http://stackoverflow.com/questions/3507313/flex-switch-item-renderer Hi I was wondering if anyone had any luck with the following senario in flex. I'd like to be able to have a custom item renderer which delegates to another renderer inside. The reason for this would be in a datagrid for instance displaying a checkbox if the dataprovider for the row had a boolean value. Using the default item renderer when the value was a non boolean. Basically I was hoping to use a proxy object (though not necessarily the proxy class) so that I could a renderer which delegated all of its responsibilties to a sub renderer. Hard to explain. *Edit 1* I think the following gives a clearer idea of what I had in mind. This is only knocked up quickly for the purpose of showing the idea. *SwitchingRenderer.as* package com.example { import mx.controls.CheckBox; import mx.controls.dataGridClasses.DataGridItemRenderer; import mx.controls.listClasses.BaseListData; import mx.controls.listClasses.IDropInListItemRenderer; import mx.core.IDataRenderer; import mx.core.UIComponent; public class SwitchingRenderer extends UIComponent implements IDataRenderer, IDropInListItemRenderer { private var checkboxRenderer:CheckBox; private var defaultRenderer:DataGridItemRenderer; private var currentRenderer:IDataRenderer; public function SwitchingRenderer() { this.checkboxRenderer = new CheckBox(); this.defaultRenderer = new DataGridItemRenderer(); this.currentRenderer = defaultRenderer(); super(); } public function get data():Object { //If the data for this cell is a boolean // currentRender = checkBoxRenderer // otherwise // currentRenderer = defaultRenderer } public function set data(value:Object):void { currentRenderer.data = value; } public function get listData():BaseListData { return currentRenderer.listData; } public function set listData(value:BaseListData):void { currentRenderer.listData = value; } } }
Re: [flexcoders] Re: Switching Item Renderers
set your renderer to an IFactory. this is a pretty standard way of doing things. On Wed, Sep 1, 2010 at 1:19 PM, valdhor valdhorli...@embarqmail.com wrote: The only computation I see is determining which component to use. With your original idea you would still need the same computation to figure out which (sub) item renderer to use. I still think you are trying to hide the woods using more trees. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Yeah thats the way I've done it previously. I thought that this way would cut out on some additional computation. On Tue, Aug 31, 2010 at 6:04 PM, valdhor valdhorli...@...wrote: That seems overly complicated to me. What I would try is create two custom components then instantiate the appropriate one based on the data and add it in the updateDisplayList method. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Wesley Acheson wesley.acheson@ wrote: Since nobody has replied I'm continueing to try this. I currently think I may need to override all methods in UI component. Is it clear what I'm trying to do? Is this the wrong way of doing it? I think its probably lighter than wrapping to components in a fully fledged UI component? * Some Thoughts* Also a comment on ListItemRenderer, theres an awful lot of methods that need to be implemented to make this work. I doubt all of them are used in a List Senario. Even implementing them all theres still a dependency on DisplayObject (who's methods seem to be implemented). It does feel to me like the architecture seems a bit off. I mean if all of those methods are implemented why is there still a dependency on DisplayObject. Its not just enough to implement IListRenderer which seems to defeat the purpose of an interace On Wed, Aug 18, 2010 at 11:42 PM, Wesley Acheson wesley.acheson@wrote: *Disclaimer:* This is a cross post with Stack Overflow. I know at least one person on this list saw it there. http://stackoverflow.com/questions/3507313/flex-switch-item-renderer Hi I was wondering if anyone had any luck with the following senario in flex. I'd like to be able to have a custom item renderer which delegates to another renderer inside. The reason for this would be in a datagrid for instance displaying a checkbox if the dataprovider for the row had a boolean value. Using the default item renderer when the value was a non boolean. Basically I was hoping to use a proxy object (though not necessarily the proxy class) so that I could a renderer which delegated all of its responsibilties to a sub renderer. Hard to explain. *Edit 1* I think the following gives a clearer idea of what I had in mind. This is only knocked up quickly for the purpose of showing the idea. *SwitchingRenderer.as* package com.example { import mx.controls.CheckBox; import mx.controls.dataGridClasses.DataGridItemRenderer; import mx.controls.listClasses.BaseListData; import mx.controls.listClasses.IDropInListItemRenderer; import mx.core.IDataRenderer; import mx.core.UIComponent; public class SwitchingRenderer extends UIComponent implements IDataRenderer, IDropInListItemRenderer { private var checkboxRenderer:CheckBox; private var defaultRenderer:DataGridItemRenderer; private var currentRenderer:IDataRenderer; public function SwitchingRenderer() { this.checkboxRenderer = new CheckBox(); this.defaultRenderer = new DataGridItemRenderer(); this.currentRenderer = defaultRenderer(); super(); } public function get data():Object { //If the data for this cell is a boolean // currentRender = checkBoxRenderer // otherwise // currentRenderer = defaultRenderer } public function set data(value:Object):void { currentRenderer.data = value; } public function get listData():BaseListData { return currentRenderer.listData; } public function set listData(value:BaseListData):void { currentRenderer.listData = value; } } } -- j:pn \\no comment
Re: [flexcoders] Re: FABridge Problem - Please help!
Alex, I think thats (the swfobject) probably getting pretty close to the right line of thinking, and its something that I'd considered briefly myself, but I am not savvy enough yet to make heads or tails of the issue. -- Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 -- On Mon, Aug 30, 2010 at 11:44 PM, Alex Harui aha...@adobe.com wrote: I don’t have time to try it right now. In Flex 4, the tag goes inside the fx:Declarations tag. I took a quick look at the AS code and it uses ExternalInterface so it shouldn’t be sensitive to changes between Flex 3 and 4. Have you tried debugging from both sides? Use a JS debugger or stick a bunch of alerts in the JS code and see what sub-expressions are null (parent, parent.FABridge, parent.FABridge.foo, etc). Then put breakpoints on the AS side like FABridge.as.getRoot(). Are you using a new Flex 4 template that now uses SWFObject instead of AC_OETags.js? It shouldn’t make a difference unless you’re simply not including the right JS in the template. On 8/30/10 2:36 PM, gmbroth gmbr...@hotmail.com wrote: Hi, Was this problem resolved? I have Flex 3 MXML that defines: mx:Application ... utils:FABridge bridgeName=foo/ ... /mx:Application In Flex 4, must this statement now appear inside an fx:Declarations element? Even if there's no other fx namespace elements being used in the MXML? On the JavaScript side, I've been referencing the bridge as: FABridge.foo.root() which works fine in Flex 3 but doesn't resolve the bridge in Flex 4. How is the bridge referenced? Thanks, Garry --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com , Brian J. Ackermann brian.ackerm...@... wrote: http://code.google.com/p/flex-iframe/source/browse/trunk/examples/IFrameCommTest/src/com/google/code/flexiframe/examples/IFrameCommTest.mxml lines 80 81 in the original example, there was no ID Thanks -- Brian J. Ackermann brian.ackerm...@... 952.373.1626 -- On Thu, Aug 26, 2010 at 3:27 PM, Alex Harui aha...@... wrote: I just noticed you didn't specify an id=FABridge in your fx:Declarations What was the equivalent statement in Flex 3? On 8/26/10 10:45 AM, Brian J. Ackermann brian.ackerm...@... wrote: From my testing, I believe the problem is on the JS side of thing, and that the FABridge doesn't 'live' in the same location in the DOM in flex4, as compared with flex3. But we're both reasonably novice flex developers, so we could be mis-interpreting what we're seeing. In another version of the project, I have added some debugging to a text area on screen, and this.parent.FABridge and parent.FABridge and FABridge all return 'undefined'. Since that used to work just fine in flex3, it seems like maybe I just need to find the new 'path' in the DOM for example: this.parent.foo.bar.blah.FABridge Thanks, Brian -- Brian J. Ackermann brian.ackerm...@... 952.373.1626 -- On Thu, Aug 26, 2010 at 12:38 PM, Alex Harui aha...@... wrote: I don't have time right now to look and I don't deal much with FABridge, but are you now saying that parent.FABridge is now the issue? The OP said it was FABridge.flex. Is this on the JS side or AS side? In Flex 4, a child component's parent is not the main app, they get shoveled down into the skin. It think the document or parentDocument properties or FlexGlobals.topLevelApplication can access the main app. On 8/26/10 9:10 AM, Brian J. Ackermann brian.ackerm...@... http://brian.ackerm...@... wrote: I'm trying to get the IFrameCommTest example (from http://code.google.com/p/flex-iframe/) to work in Flex 4, and, while the IFrame itself works, the communication does not. In particular, I need to get the included HTML page to call functions from the flex app (I already have a way to get the Flex app to talk to the HTML). I've exported the project to facilitate your help. http://www.mediafire.com/file/172448jkkgva4ki/iframeCommTest.fxp The problem, is that the parent.FABridge doesn't exist. My guess is that something in flex4 changed with regard to how things are located in the DOM. (This post is directly related to the original. I just thought this would be a clearer example of the problem. ) Thanks, -- Brian J. Ackermann brian.ackerm...@... http://brian.ackerm...@... 952.373.1626 -- -- Alex Harui Flex SDK Team Adobe System, Inc.
Re: [flexcoders] Re: FABridge Problem - Please help!
Yes, I've tried debugging on the JS side of things, exactly as you mentioned (See my email in this thread from Thu, Aug 26, 2010 at 12:45 PM). Nothing. I simply can't find the object. I used a javascript object dump function, to 'scan' the objects I could think of, looking for an occurrence of this object that we need for FABridge to work, but its tucked away somewhere, in a place which is non-trivial to locate. -- Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 -- On Wed, Sep 1, 2010 at 8:22 AM, Brian J. Ackermann brian.ackerm...@gmail.com wrote: Alex, I think thats (the swfobject) probably getting pretty close to the right line of thinking, and its something that I'd considered briefly myself, but I am not savvy enough yet to make heads or tails of the issue. -- Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 -- On Mon, Aug 30, 2010 at 11:44 PM, Alex Harui aha...@adobe.com wrote: I don’t have time to try it right now. In Flex 4, the tag goes inside the fx:Declarations tag. I took a quick look at the AS code and it uses ExternalInterface so it shouldn’t be sensitive to changes between Flex 3 and 4. Have you tried debugging from both sides? Use a JS debugger or stick a bunch of alerts in the JS code and see what sub-expressions are null (parent, parent.FABridge, parent.FABridge.foo, etc). Then put breakpoints on the AS side like FABridge.as.getRoot(). Are you using a new Flex 4 template that now uses SWFObject instead of AC_OETags.js? It shouldn’t make a difference unless you’re simply not including the right JS in the template. On 8/30/10 2:36 PM, gmbroth gmbr...@hotmail.com wrote: Hi, Was this problem resolved? I have Flex 3 MXML that defines: mx:Application ... utils:FABridge bridgeName=foo/ ... /mx:Application In Flex 4, must this statement now appear inside an fx:Declarations element? Even if there's no other fx namespace elements being used in the MXML? On the JavaScript side, I've been referencing the bridge as: FABridge.foo.root() which works fine in Flex 3 but doesn't resolve the bridge in Flex 4. How is the bridge referenced? Thanks, Garry --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.comflexcoders%40yahoogroups.com , Brian J. Ackermann brian.ackerm...@... wrote: http://code.google.com/p/flex-iframe/source/browse/trunk/examples/IFrameCommTest/src/com/google/code/flexiframe/examples/IFrameCommTest.mxml lines 80 81 in the original example, there was no ID Thanks -- Brian J. Ackermann brian.ackerm...@... 952.373.1626 -- On Thu, Aug 26, 2010 at 3:27 PM, Alex Harui aha...@... wrote: I just noticed you didn't specify an id=FABridge in your fx:Declarations What was the equivalent statement in Flex 3? On 8/26/10 10:45 AM, Brian J. Ackermann brian.ackerm...@... wrote: From my testing, I believe the problem is on the JS side of thing, and that the FABridge doesn't 'live' in the same location in the DOM in flex4, as compared with flex3. But we're both reasonably novice flex developers, so we could be mis-interpreting what we're seeing. In another version of the project, I have added some debugging to a text area on screen, and this.parent.FABridge and parent.FABridge and FABridge all return 'undefined'. Since that used to work just fine in flex3, it seems like maybe I just need to find the new 'path' in the DOM for example: this.parent.foo.bar.blah.FABridge Thanks, Brian -- Brian J. Ackermann brian.ackerm...@... 952.373.1626 -- On Thu, Aug 26, 2010 at 12:38 PM, Alex Harui aha...@... wrote: I don't have time right now to look and I don't deal much with FABridge, but are you now saying that parent.FABridge is now the issue? The OP said it was FABridge.flex. Is this on the JS side or AS side? In Flex 4, a child component's parent is not the main app, they get shoveled down into the skin. It think the document or parentDocument properties or FlexGlobals.topLevelApplication can access the main app. On 8/26/10 9:10 AM, Brian J. Ackermann brian.ackerm...@... http://brian.ackerm...@... wrote: I'm trying to get the IFrameCommTest example (from http://code.google.com/p/flex-iframe/) to work in Flex 4, and, while the IFrame itself works, the communication does not. In particular, I need to get the included HTML page to call functions from the flex app (I already have a way to get the Flex app to talk to the HTML). I've exported the project to facilitate your
[flexcoders] Re: How to tell if I am a popup.
Thanks for the info, I used; this.isPopUp and it worked great. --- In flexcoders@yahoogroups.com, Haykel BEN JEMIA hayke...@... wrote: http://livedocs.adobe.com/flex/3/langref/mx/core/IUIComponent.html#isPopUp Le 2010 8 30 22:44, aceoohay pa...@... a écrit : I have a mx:module component that I sometimes call with a moduleloader, and sometimes call with a popupManager. In order to close the item properly I need to know how I was instantiated (popup manager or module loader). Is there a property that I can check that will tell me this? Obviously I can set my own property, but I would prefer using one that already exists. Paul
Re: [flexcoders] Re: FABridge Problem - Please help!
So from my perspective, you aren’t being specific enough. You are saying that parent.FABridge doesn’t exist, the OP said something else. There are two DOMs, the JS DOM and the AS DOM. You are now saying you can’t find the object, but you aren’t saying which object. If parent.FABridge is null, then it sounds like a JS setup issue. Either FABridge.js isn’t being loaded or isn’t loaded in the right place. You might try your own test js file to see if you can find objects from your test file. On 9/1/10 6:27 AM, Brian J. Ackermann brian.ackerm...@gmail.com wrote: Yes, I've tried debugging on the JS side of things, exactly as you mentioned (See my email in this thread from Thu, Aug 26, 2010 at 12:45 PM). Nothing. I simply can't find the object. I used a javascript object dump function, to 'scan' the objects I could think of, looking for an occurrence of this object that we need for FABridge to work, but its tucked away somewhere, in a place which is non-trivial to locate. Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 On Wed, Sep 1, 2010 at 8:22 AM, Brian J. Ackermann brian.ackerm...@gmail.com wrote: Alex, I think thats (the swfobject) probably getting pretty close to the right line of thinking, and its something that I'd considered briefly myself, but I am not savvy enough yet to make heads or tails of the issue. Brian J. Ackermann brian.ackerm...@gmail.com 952.373.1626 On Mon, Aug 30, 2010 at 11:44 PM, Alex Harui aha...@adobe.com wrote: I don’t have time to try it right now. In Flex 4, the tag goes inside the fx:Declarations tag. I took a quick look at the AS code and it uses ExternalInterface so it shouldn’t be sensitive to changes between Flex 3 and 4. Have you tried debugging from both sides? Use a JS debugger or stick a bunch of alerts in the JS code and see what sub-expressions are null (parent, parent.FABridge, parent.FABridge.foo, etc). Then put breakpoints on the AS side like FABridge.as.getRoot(). Are you using a new Flex 4 template that now uses SWFObject instead of AC_OETags.js? It shouldn’t make a difference unless you’re simply not including the right JS in the template. On 8/30/10 2:36 PM, gmbroth gmbr...@hotmail.com http://gmbr...@hotmail.com wrote: Hi, Was this problem resolved? I have Flex 3 MXML that defines: mx:Application ... utils:FABridge bridgeName=foo/ ... /mx:Application In Flex 4, must this statement now appear inside an fx:Declarations element? Even if there's no other fx namespace elements being used in the MXML? On the JavaScript side, I've been referencing the bridge as: FABridge.foo.root() which works fine in Flex 3 but doesn't resolve the bridge in Flex 4. How is the bridge referenced? Thanks, Garry --- In flexcoders@yahoogroups.com http://flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Brian J. Ackermann brian.ackerm...@... wrote: http://code.google.com/p/flex-iframe/source/browse/trunk/examples/IFrameCommTest/src/com/google/code/flexiframe/examples/IFrameCommTest.mxml lines 80 81 in the original example, there was no ID Thanks -- Brian J. Ackermann brian.ackerm...@... 952.373.1626 -- On Thu, Aug 26, 2010 at 3:27 PM, Alex Harui aha...@... wrote: I just noticed you didn't specify an id=FABridge in your fx:Declarations What was the equivalent statement in Flex 3? On 8/26/10 10:45 AM, Brian J. Ackermann brian.ackerm...@... wrote: From my testing, I believe the problem is on the JS side of thing, and that the FABridge doesn't 'live' in the same location in the DOM in flex4, as compared with flex3. But we're both reasonably novice flex developers, so we could be mis-interpreting what we're seeing. In another version of the project, I have added some debugging to a text area on screen, and this.parent.FABridge and parent.FABridge and FABridge all return 'undefined'. Since that used to work just fine in flex3, it seems like maybe I just need to find the new 'path' in the DOM for example: this.parent.foo.bar.blah.FABridge Thanks, Brian -- Brian J. Ackermann brian.ackerm...@... 952.373.1626 -- On Thu, Aug 26, 2010 at 12:38 PM, Alex Harui aha...@... wrote: I don't have time right now to look and I don't deal much with FABridge, but are you now saying that parent.FABridge is now the issue? The OP said it was FABridge.flex. Is this on the JS side or AS side? In Flex 4, a child component's parent is not the main app, they get shoveled down into the skin. It think the document or parentDocument properties or FlexGlobals.topLevelApplication can access the main app.
Re: [flexcoders] *** Security Sandbox Violation ***
If you get that output but the application does not halt, then you can ignore it. If you want it to be sandboxed, then you can’t access things in it. You would not need a crossdomain.xml file. If you are using Flex 4, make sure you added the option –includes=mx.managers.systemClasses.MarshallingSupport On 8/31/10 10:34 PM, Yu, Deyang deyang...@citi.com wrote: I am building a Flex portal. Which has main application and several sub-applications. I am using sandboxed application. I do have crossdomain.xml defined in both main application and sub applications. And in the main application, I used the swfloader like : mx:SWFLoader id=couponApp width=100% height=100% loadForCompatibility=true trustContent=false complete=allowLoading() / But when I tried to loading the sub application, it always give Security Sandbox Violation error. The error is *** Security Sandbox Violation *** SecurityDomain 'http://localhost:8080/isw/Applications.html?debug=true' tried to access incompatible context 'http://127.0.0.1:8080/coupon/Coupon.swf' Anybody has any idea and suggestion? Where did I go wrong? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Re: memory leaks and activation-objects
Looks like I need to focus on those functions. Many thanks! --- In flexcoders@yahoogroups.com, Alex Harui aha...@... wrote: I don't like anonymous functions, nested functions or whatever you want to call function instances. Everything on the callstack is referenced by the scope-chain/activation object until the function instance can be GC'd. Once you call removeEventLIstener, then the scope-chain goes away, but until then, lots of things are kept around. It is generallyl more efficient to make doSomething a member method on the class. Or create a helper class that handles the dialog and stores the x,y,z values. When you originally posted I thought you were saying that an activation object that should go away wasn't or was blocking other things from going away. AFAIK, that isn't true, but activation objects are kept around by references to function instances and can lead to unexpected memory usage. On 8/31/10 7:53 AM, lew.miller lew.mil...@... wrote: Yes. That's precisely what I'm doing. Only, looking at the code now I realize most of the time I'm using nested functions (with names) rather than anonymous functions. I'm not sure what the implications are of using one over another are but, regardless, I gather you're suggesting this is a potential problem? A typical example of what I'm doing would be something like: private function showDialog(x,y,z):void { var dialog:SomeDialog = new SomeDialog(); dialog.addEventListener(ok, function doSomething(e:DialogEvent):void { someMethod(x,y,z); } dialog.show(); } I'm using the nested function because I need some way to get the x,y,z values into someMethod. Does this code look problematic? Thanks much for your help! Lew --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: Could you be registering anonymous functions as event listeners and other callbacks? On 8/30/10 12:52 PM, lew.miller lew.miller@ wrote: Thanks Alex. I don't have any simple test case indicating that they leak, I'm just struggling to understand what is causing certain leaks in a large application where the profiler points me to activation objects. So when tracking memory leaks with the FB4 profiler you're saying one can/should simply ignore any object reference paths that start with activation objects? (If so, it would be nice if they weren't reported--but that's a separate issue.) Can you tell me what it means when the profiler lists activation objects? Does that imply some corresponding function is executing at the time the memory snapshot was taken? If I understood why I'm getting all these references from activation objects I'd feel a bit more comfortable about ignoring them. :-) My application makes use of anonymous functions in places and I read an old Adobe Developer Connection article that says: Defining functions on the fly causes an arcane memory leak in Flash Player because the activation object sent to the function can never be recovered by the garbage collector. So the bottom line is to avoid dynamic classes and explicitly define all the properties and functions used in your classes. It doesn't elaborate and was written in 2006 so it may be irrelevant but makes me wonder. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com mailto:flexcoders%40yahoogroups.com , Alex Harui aharui@ wrote: AFAIK, they do not cause leaks. If you show some data or a simple test case that indicates that they are, I will try to take a look. On 8/30/10 8:36 AM, lew.miller lew.miller@ wrote: I've been wrestling with memory leaks and the FB4 profiler and lately have been trying to understand activation-objects and their relationship to GC because the vast majority (often all) of the references the profiler tells me an object has keeping it in memory come from activation objects. While researching this I came across a note from Alex Harui saying I've never seen an activation object cause a leak but other things I've read seem to suggest they can. (Certainly the profiler would lead me to believe it.) Can anybody enlighten me? Or just point me to the place to read documentation on the subject that is up-to-date? Half of what I've read about activation objects appears to be from earlier versions of ActionScript so I'm not sure what to believe. If an activation object can cause a memory leak, I'd like to understand how. I may not have a firm grasp of the lifecycle of an activation object but I thought it would no longer be accessible from the GC root after the function it's created for finishes executing. Any help or pointers would be greatly appreciated. Lew -- Alex Harui Flex SDK Team Adobe System, Inc.
RE: [flexcoders] *** Security Sandbox Violation ***
Alex, Thanks. In my local tomcat server, the application does not halt. But once I deployed it to Websphere in Solaris, the sub application cannot be loaded. All main application and sub applications are in the same domain, but with different context root. Server.com ip is 152.60.xxx.xxx Server.com/main/mainApp.swf Server.com/sub1/subApp1.swf Server.com/sub2/subApp2.swf User login from Server.com/main/mainApp, it will load subApp1.swf by using URL with ip 152.60.xxx.xxx/sub1/subApp1.swf Then this sub application cannot be loaded. But if user login from 152.60.xxx.xxx/main/mainApp.swf, then try to loading 152.60.xxx.xxx/sub1/subApp1.swf, then the sub app can be loaded. Any idea any where I should look into? Thanks and regards, Deyang From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, September 01, 2010 12:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] *** Security Sandbox Violation *** If you get that output but the application does not halt, then you can ignore it. If you want it to be sandboxed, then you can't access things in it. You would not need a crossdomain.xml file. If you are using Flex 4, make sure you added the option -includes=mx.managers.systemClasses.MarshallingSupport On 8/31/10 10:34 PM, Yu, Deyang deyang...@citi.com wrote: I am building a Flex portal. Which has main application and several sub-applications. I am using sandboxed application. I do have crossdomain.xml defined in both main application and sub applications. And in the main application, I used the swfloader like : mx:SWFLoader id=couponApp width=100% height=100% loadForCompatibility=true trustContent=false complete=allowLoading() / But when I tried to loading the sub application, it always give Security Sandbox Violation error. The error is *** Security Sandbox Violation *** SecurityDomain 'http://localhost:8080/isw/Applications.html?debug=true' tried to access incompatible context 'http://127.0.0.1:8080/coupon/Coupon.swf' Anybody has any idea and suggestion? Where did I go wrong? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Re: Switching Item Renderers
True. I'm not sure if that recycles well though? On Wed, Sep 1, 2010 at 3:01 PM, Johannes Nel johannes@gmail.com wrote: set your renderer to an IFactory. this is a pretty standard way of doing things. On Wed, Sep 1, 2010 at 1:19 PM, valdhor valdhorli...@embarqmail.comwrote: The only computation I see is determining which component to use. With your original idea you would still need the same computation to figure out which (sub) item renderer to use. I still think you are trying to hide the woods using more trees. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.com, Wesley Acheson wesley.ache...@... wrote: Yeah thats the way I've done it previously. I thought that this way would cut out on some additional computation. On Tue, Aug 31, 2010 at 6:04 PM, valdhor valdhorli...@...wrote: That seems overly complicated to me. What I would try is create two custom components then instantiate the appropriate one based on the data and add it in the updateDisplayList method. --- In flexcoders@yahoogroups.com flexcoders%40yahoogroups.comflexcoders% 40yahoogroups.com, Wesley Acheson wesley.acheson@ wrote: Since nobody has replied I'm continueing to try this. I currently think I may need to override all methods in UI component. Is it clear what I'm trying to do? Is this the wrong way of doing it? I think its probably lighter than wrapping to components in a fully fledged UI component? * Some Thoughts* Also a comment on ListItemRenderer, theres an awful lot of methods that need to be implemented to make this work. I doubt all of them are used in a List Senario. Even implementing them all theres still a dependency on DisplayObject (who's methods seem to be implemented). It does feel to me like the architecture seems a bit off. I mean if all of those methods are implemented why is there still a dependency on DisplayObject. Its not just enough to implement IListRenderer which seems to defeat the purpose of an interace On Wed, Aug 18, 2010 at 11:42 PM, Wesley Acheson wesley.acheson@wrote: *Disclaimer:* This is a cross post with Stack Overflow. I know at least one person on this list saw it there. http://stackoverflow.com/questions/3507313/flex-switch-item-renderer Hi I was wondering if anyone had any luck with the following senario in flex. I'd like to be able to have a custom item renderer which delegates to another renderer inside. The reason for this would be in a datagrid for instance displaying a checkbox if the dataprovider for the row had a boolean value. Using the default item renderer when the value was a non boolean. Basically I was hoping to use a proxy object (though not necessarily the proxy class) so that I could a renderer which delegated all of its responsibilties to a sub renderer. Hard to explain. *Edit 1* I think the following gives a clearer idea of what I had in mind. This is only knocked up quickly for the purpose of showing the idea. *SwitchingRenderer.as* package com.example { import mx.controls.CheckBox; import mx.controls.dataGridClasses.DataGridItemRenderer; import mx.controls.listClasses.BaseListData; import mx.controls.listClasses.IDropInListItemRenderer; import mx.core.IDataRenderer; import mx.core.UIComponent; public class SwitchingRenderer extends UIComponent implements IDataRenderer, IDropInListItemRenderer { private var checkboxRenderer:CheckBox; private var defaultRenderer:DataGridItemRenderer; private var currentRenderer:IDataRenderer; public function SwitchingRenderer() { this.checkboxRenderer = new CheckBox(); this.defaultRenderer = new DataGridItemRenderer(); this.currentRenderer = defaultRenderer(); super(); } public function get data():Object { //If the data for this cell is a boolean // currentRender = checkBoxRenderer // otherwise // currentRenderer = defaultRenderer } public function set data(value:Object):void { currentRenderer.data = value; } public function get listData():BaseListData { return currentRenderer.listData; } public function set listData(value:BaseListData):void { currentRenderer.listData = value; } } } -- j:pn \\no comment
Re: [flexcoders] Re: Flashbuilder 4.0.1 debugger issue?
Can I ask you how you created the splash screen? Currently I am trying to add a splash screen or image right after logging in and before the main screens appears. But I have no idea how to do that. Can you help? Thanks, Pat From: Richard Rodseth rrods...@gmail.com To: flexcoders@yahoogroups.com Sent: Mon, July 12, 2010 2:51:32 PM Subject: [flexcoders] Re: Flashbuilder 4.0.1 debugger issue? He's also on Flash Player 10.1 and after deleting shared objects used by our splash screen, the app is locking up earlier (i.e. before dismissing the splash screen. Are there some changes I should know about relating to 10.1, security sandboxes, Shared Objects and the 4.0.1 debugger? On Mon, Jul 12, 2010 at 2:41 PM, Richard Rodseth rrods...@gmail. com wrote: A colleague is experiencing a problem where our app hangs the browser when run in the debugger, but not when launched in non-debug mode (from Flashbuilder) . He's the only one on the team who started Flex work since the release of 4.0.1 so I'm wondering if there are any known problems that could explain this.
Re: [flexcoders] Re: Flashbuilder 4.0.1 debugger issue?
Hi, Happened to me and still happens from time to time, just pops out of the blue at 57%. There are some solutions if you google for them, but none of them seemed to work for me. In the end I fixed it all the time by creating a new project and taking from there the contents of the html-template dir and overwrite the ones from my project. Sometimes restart was needed also. HTH, Claudiu From: Patricia Han flex...@yahoo.com To: flexcoders@yahoogroups.com Sent: Wed, September 1, 2010 10:46:21 PM Subject: Re: [flexcoders] Re: Flashbuilder 4.0.1 debugger issue? Can I ask you how you created the splash screen? Currently I am trying to add a splash screen or image right after logging in and before the main screens appears. But I have no idea how to do that. Can you help? Thanks, Pat From: Richard Rodseth rrods...@gmail.com To: flexcoders@yahoogroups.com Sent: Mon, July 12, 2010 2:51:32 PM Subject: [flexcoders] Re: Flashbuilder 4.0.1 debugger issue? He's also on Flash Player 10.1 and after deleting shared objects used by our splash screen, the app is locking up earlier (i.e. before dismissing the splash screen. Are there some changes I should know about relating to 10.1, security sandboxes, Shared Objects and the 4.0.1 debugger? On Mon, Jul 12, 2010 at 2:41 PM, Richard Rodseth rrods...@gmail. com wrote: A colleague is experiencing a problem where our app hangs the browser when run in the debugger, but not when launched in non-debug mode (from Flashbuilder) . He's the only one on the team who started Flex work since the release of 4.0.1 so I'm wondering if there are any known problems that could explain this.
Re: [flexcoders] *** Security Sandbox Violation ***
Which version of Flex are you using? On 9/1/10 9:50 AM, Yu, Deyang deyang...@citi.com wrote: Alex, Thanks. In my local tomcat server, the application does not halt. But once I deployed it to Websphere in Solaris, the sub application cannot be loaded. All main application and sub applications are in the same domain, but with different context root. Server.com ip is 152.60.xxx.xxx Server.com/main/mainApp.swf Server.com/sub1/subApp1.swf Server.com/sub2/subApp2.swf User login from Server.com/main/mainApp, it will load subApp1.swf by using URL with ip 152.60.xxx.xxx/sub1/subApp1.swf Then this sub application cannot be loaded. But if user login from 152.60.xxx.xxx/main/mainApp.swf, then try to loading 152.60.xxx.xxx/sub1/subApp1.swf, then the sub app can be loaded. Any idea any where I should look into? Thanks and regards, Deyang From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, September 01, 2010 12:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] *** Security Sandbox Violation *** If you get that output but the application does not halt, then you can ignore it. If you want it to be sandboxed, then you can’t access things in it. You would not need a crossdomain.xml file. If you are using Flex 4, make sure you added the option –includes=mx.managers.systemClasses.MarshallingSupport On 8/31/10 10:34 PM, Yu, Deyang deyang...@citi.com wrote: I am building a Flex portal. Which has main application and several sub-applications. I am using sandboxed application. I do have crossdomain.xml defined in both main application and sub applications. And in the main application, I used the swfloader like : mx:SWFLoader id=couponApp width=100% height=100% loadForCompatibility=true trustContent=false complete=allowLoading() / But when I tried to loading the sub application, it always give Security Sandbox Violation error. The error is *** Security Sandbox Violation *** SecurityDomain 'http://localhost:8080/isw/Applications.html?debug=true' tried to access incompatible context 'http://127.0.0.1:8080/coupon/Coupon.swf' Anybody has any idea and suggestion? Where did I go wrong? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Proper way to ensure components in a different state are created
Yeah, I created a test project and itemCreationPolicy immediate and deferred both work. But in my application only immediate works. It seems like currentState is deferring creating the components for some odd reason. On Wed, Sep 1, 2010 at 5:43 AM, f...@guitar-learning.com wrote: If you use includeIn or excludeFrom, then itemCreationPolicy becomes available and you can set it to “immediate” – imageComponent includeIn=State 1 itemCreationPolicy=immediate id=”imcomp” / Then in code you could in imcomp.currentState = “myDesiredState”, even before State 1 has been used. Hope this helps, Derek *From:* flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] *On Behalf Of *dorkie dork from dorktown *Sent:* Wednesday, September 01, 2010 5:15 AM *To:* flexcoders@yahoogroups.com *Subject:* [flexcoders] Proper way to ensure components in a different state are created When I try to access components that are in a different state on the line after I set the current state I get this error, TypeError: Error #1009: Cannot access a property or method of a null object reference. // code currentState = NOTES; noteComponent.text = value; // noteComponent exists in NOTES state and is not created yet I know this is because of the Flex invalidation cycle and I'm aware I could use databinding and I know I could use callLater. But if I needed to create the components immediately for only the state I'm going to how would I do that? Custom Component: Group states State 1 State 2 State 3 /states imageComponent includeIn=State 1/ videoComponent includeIn=State 2/ noteComponent includeIn=State 3/ /Group JP __ Information from ESET NOD32 Antivirus, version of virus signature database 5414 (20100901) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com __ Information from ESET NOD32 Antivirus, version of virus signature database 5414 (20100901) __ The message was checked by ESET NOD32 Antivirus. http://www.eset.com
[flexcoders] Working with null data in a Tree
I have a tree component that has 40 numbers in an array collection. The 36th index is null. (idx 0-35 are numbers, 36 is null, 37-39 are numbers.) The values are equal to the index+1, so index 1=2, and index 35=36. As soon as I hit the null value at idx 36, all values afterward are shown as blank. Then if I scroll back up the list, all the previous values are null too! So as soon as the null value is loaded into the tree renderers, all previous and future data is nullified. I have tried hiding the null data by implementing a custom data descriptor, as well as extending the tree class itself to override the isVisible and isEnabled methods, but nothing is having any effect. How can I hide these null values, or at least protect the data around the null values?
[flexcoders] Re: Border Thickness On ComboBox?
Sorry to recover this old email. I found this message in the Google, but when I used this skin the arrow wasn't showed. Can someone can help me? --- In flexcoders@yahoogroups.com, rueter007 rueter...@... wrote: This is a completely stripped down version. --- ComboTest.mxml --- ?xml version=1.0 encoding=utf-8? mx:Application xmlns:mx=http://www.adobe.com/2006/mxml; layout=absolute mx:Style .comboStyle { border-style: solid; border-thickness: 4; down-skin: ClassReference('ComboBoxSkin'); over-skin: ClassReference('ComboBoxSkin'); up-skin: ClassReference('ComboBoxSkin'); } /mx:Style mx:ComboBox id=myCombo x=128 y=122 width=402 height=45 styleName=comboStyle borderColor=0x00 mx:dataProvider mx:Array mx:StringItem 1/mx:String mx:StringItem 2/mx:String mx:StringItem 3/mx:String mx:StringItem 4/mx:String /mx:Array /mx:dataProvider /mx:ComboBox /mx:Application -- ComboBoxSkin.as - package { import flash.display.Graphics; import mx.skins.Border; public class ComboBoxSkin extends Border { override public function get measuredWidth():Number { return 22; } override public function get measuredHeight():Number { return 22; } override protected function updateDisplayList(w:Number, h:Number):void { super.updateDisplayList(w, h); var color:uint; var borderColor:uint = getStyle(borderColor); var g:Graphics = graphics; g.clear(); // Draw the border and fill. switch (name) { case upSkin: case editableUpSkin: case overSkin: case editableOverSkin: case downSkin: case editableDownSkin: color = borderColor; break; case disabledSkin: case editableDisabledSkin: { // border color = 0x99; break; } } // draw the border var borderThickness:int = getStyle(borderThickness); g.lineStyle(borderThickness, color); g.drawRect(0, 0, w, h); // draw the fill g.beginFill(0x00, 0); g.drawRect(0, 0, w, h); g.endFill(); g.moveTo(w - 22, 4); g.lineTo(w - 22, h - 8); } } } --- In flexcoders@yahoogroups.com, Ethan Miller flexcoders@ wrote: Can you provide a code sample of what you did inside ComboBoxSkin? I see the various routines in there, but didn't see the lineStyle which is where, I presume, you'd increase the thickness?? cheers, ethan Ok, I was wrong. Setting the borderStyle and borderThickness on the combo box does not do anything. Instead, I set a custom skin on the combobox and it works. border-style: solid; border-color: #00ff00; border-thickness: 5; down-skin: ClassReference('ComboBoxSkin'); over-skin: ClassReference('ComboBoxSkin'); up-skin: ClassReference('ComboBoxSkin'); In the ComboBoxSkin, get the borderThickness and borderColor style properties and draw the borders for all the states. - venkat http://www.venkatj.com --- In flexcoders@yahoogroups.com, Sherif Abdou sherif626@ wrote: If i had to guess i think it may have something to do with the scale9Grid but I am relatively new to flex Flex examines the scale9Grid property to determine the value of the borderMetrics style. - Original Message From: Ethan Miller flexcoders@ To: flexcoders@yahoogroups.com Sent: Friday, January 18, 2008 6:56:35 PM Subject: [flexcoders] Re: Border Thickness On ComboBox? --- In
Re: [flexcoders] Proper way to ensure components in a different state are created
You could add a bindable var, e.g. noteText, and set the text property in the mxml tag to {noteText}. Then you only have to assign the value to the noteText variable. Le 2010 9 1 10:48, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com a écrit : When I try to access components that are in a different state on the line after I set the current state I get this error, TypeError: Error #1009: Cannot access a property or method of a null object reference. // code currentState = NOTES; noteComponent.text = value; // noteComponent exists in NOTES state and is not created yet I know this is because of the Flex invalidation cycle and I'm aware I could use databinding and I know I could use callLater. But if I needed to create the components immediately for only the state I'm going to how would I do that? Custom Component: Group states State 1 State 2 State 3 /states imageComponent includeIn=State 1/ videoComponent includeIn=State 2/ noteComponent includeIn=State 3/ /Group JP
Re: [flexcoders] Working with null data in a Tree
Sounds like there might be an issue with the renderer. What does your index handling code look like? On 9/1/10 12:58 PM, mbkairyt mba...@kairyt.com wrote: I have a tree component that has 40 numbers in an array collection. The 36th index is null. (idx 0-35 are numbers, 36 is null, 37-39 are numbers.) The values are equal to the index+1, so index 1=2, and index 35=36. As soon as I hit the null value at idx 36, all values afterward are shown as blank. Then if I scroll back up the list, all the previous values are null too! So as soon as the null value is loaded into the tree renderers, all previous and future data is nullified. I have tried hiding the null data by implementing a custom data descriptor, as well as extending the tree class itself to override the isVisible and isEnabled methods, but nothing is having any effect. How can I hide these null values, or at least protect the data around the null values? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Image component not resizing correctly
Currently experiencing an Image component resizing issue: An Image component (inside an ItemRenderer/Spark List, with a fixed width/height of '100') resizes incorrectly when it's source changes. The Image components source is initially set to an embedded placeholder graphic (while the new source loads), and the Image width/height is correct. However when the new source loads, the Image component does not resize to the Image width/height set dimensions, and the background of the item renderer is visible. Any ideas how to fix this? Thanks, Philip
Re: [flexcoders] Image component not resizing correctly
mx:Image width=”100” height=”100” isn’t sizing at 100x100? What does the renderer look like? On 9/1/10 5:56 PM, method_air loudj...@hotmail.com wrote: Currently experiencing an Image component resizing issue: An Image component (inside an ItemRenderer/Spark List, with a fixed width/height of '100') resizes incorrectly when it's source changes. The Image components source is initially set to an embedded placeholder graphic (while the new source loads), and the Image width/height is correct. However when the new source loads, the Image component does not resize to the Image width/height set dimensions, and the background of the item renderer is visible. Any ideas how to fix this? Thanks, Philip -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
RE: [flexcoders] *** Security Sandbox Violation ***
SDK 3.3 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, September 01, 2010 6:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] *** Security Sandbox Violation *** Which version of Flex are you using? On 9/1/10 9:50 AM, Yu, Deyang deyang...@citi.com wrote: Alex, Thanks. In my local tomcat server, the application does not halt. But once I deployed it to Websphere in Solaris, the sub application cannot be loaded. All main application and sub applications are in the same domain, but with different context root. Server.com ip is 152.60.xxx.xxx Server.com/main/mainApp.swf Server.com/sub1/subApp1.swf Server.com/sub2/subApp2.swf User login from Server.com/main/mainApp, it will load subApp1.swf by using URL with ip 152.60.xxx.xxx/sub1/subApp1.swf Then this sub application cannot be loaded. But if user login from 152.60.xxx.xxx/main/mainApp.swf, then try to loading 152.60.xxx.xxx/sub1/subApp1.swf, then the sub app can be loaded. Any idea any where I should look into? Thanks and regards, Deyang From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, September 01, 2010 12:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] *** Security Sandbox Violation *** If you get that output but the application does not halt, then you can ignore it. If you want it to be sandboxed, then you can't access things in it. You would not need a crossdomain.xml file. If you are using Flex 4, make sure you added the option -includes=mx.managers.systemClasses.MarshallingSupport On 8/31/10 10:34 PM, Yu, Deyang deyang...@citi.com wrote: I am building a Flex portal. Which has main application and several sub-applications. I am using sandboxed application. I do have crossdomain.xml defined in both main application and sub applications. And in the main application, I used the swfloader like : mx:SWFLoader id=couponApp width=100% height=100% loadForCompatibility=true trustContent=false complete=allowLoading() / But when I tried to loading the sub application, it always give Security Sandbox Violation error. The error is *** Security Sandbox Violation *** SecurityDomain 'http://localhost:8080/isw/Applications.html?debug=true' tried to access incompatible context 'http://127.0.0.1:8080/coupon/Coupon.swf' Anybody has any idea and suggestion? Where did I go wrong? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
Re: [flexcoders] Proper way to ensure components in a different state are created
Thanks, I'll do that. My main quest was trying to find the equivalent of createComponentFromDescriptors in Flex 4 spark components. If I find anything I'll post back. On Wed, Sep 1, 2010 at 6:19 PM, Haykel BEN JEMIA hayke...@gmail.com wrote: You could add a bindable var, e.g. noteText, and set the text property in the mxml tag to {noteText}. Then you only have to assign the value to the noteText variable. Le 2010 9 1 10:48, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com a écrit : When I try to access components that are in a different state on the line after I set the current state I get this error, TypeError: Error #1009: Cannot access a property or method of a null object reference. // code currentState = NOTES; noteComponent.text = value; // noteComponent exists in NOTES state and is not created yet I know this is because of the Flex invalidation cycle and I'm aware I could use databinding and I know I could use callLater. But if I needed to create the components immediately for only the state I'm going to how would I do that? Custom Component: Group states State 1 State 2 State 3 /states imageComponent includeIn=State 1/ videoComponent includeIn=State 2/ noteComponent includeIn=State 3/ /Group JP
Re: [flexcoders] Proper way to ensure components in a different state are created
Arggh I forgot I have to set certain components visible, currentState = note; source = note.text; // databinding note.visible = true; border.visible = true; border.y = note.y; border.width = note.width; I think this is impossible in Flex 4. I'm think my only option is to set every component creation policy to immediate. On Wed, Sep 1, 2010 at 10:44 PM, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com wrote: Thanks, I'll do that. My main quest was trying to find the equivalent of createComponentFromDescriptors in Flex 4 spark components. If I find anything I'll post back. On Wed, Sep 1, 2010 at 6:19 PM, Haykel BEN JEMIA hayke...@gmail.comwrote: You could add a bindable var, e.g. noteText, and set the text property in the mxml tag to {noteText}. Then you only have to assign the value to the noteText variable. Le 2010 9 1 10:48, dorkie dork from dorktown dorkiedorkfromdorkt...@gmail.com a écrit : When I try to access components that are in a different state on the line after I set the current state I get this error, TypeError: Error #1009: Cannot access a property or method of a null object reference. // code currentState = NOTES; noteComponent.text = value; // noteComponent exists in NOTES state and is not created yet I know this is because of the Flex invalidation cycle and I'm aware I could use databinding and I know I could use callLater. But if I needed to create the components immediately for only the state I'm going to how would I do that? Custom Component: Group states State 1 State 2 State 3 /states imageComponent includeIn=State 1/ videoComponent includeIn=State 2/ noteComponent includeIn=State 3/ /Group JP
Re: [flexcoders] *** Security Sandbox Violation ***
I just noticed it is the HTML wrapper trying to talk to the child SWF. The child SWF should not be using BrowserManager, HistoryManager and ExternalInterface APIs. Try setting historyManagementEnabled=false on the application. On 9/1/10 5:44 PM, Yu, Deyang deyang...@citi.com wrote: SDK 3.3 From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, September 01, 2010 6:28 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] *** Security Sandbox Violation *** Which version of Flex are you using? On 9/1/10 9:50 AM, Yu, Deyang deyang...@citi.com wrote: Alex, Thanks. In my local tomcat server, the application does not halt. But once I deployed it to Websphere in Solaris, the sub application cannot be loaded. All main application and sub applications are in the same domain, but with different context root. Server.com ip is 152.60.xxx.xxx Server.com/main/mainApp.swf Server.com/sub1/subApp1.swf Server.com/sub2/subApp2.swf User login from Server.com/main/mainApp, it will load subApp1.swf by using URL with ip 152.60.xxx.xxx/sub1/subApp1.swf Then this sub application cannot be loaded. But if user login from 152.60.xxx.xxx/main/mainApp.swf, then try to loading 152.60.xxx.xxx/sub1/subApp1.swf, then the sub app can be loaded. Any idea any where I should look into? Thanks and regards, Deyang From: flexcoders@yahoogroups.com [mailto:flexcod...@yahoogroups.com] On Behalf Of Alex Harui Sent: Wednesday, September 01, 2010 12:40 PM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] *** Security Sandbox Violation *** If you get that output but the application does not halt, then you can ignore it. If you want it to be sandboxed, then you can’t access things in it. You would not need a crossdomain.xml file. If you are using Flex 4, make sure you added the option –includes=mx.managers.systemClasses.MarshallingSupport On 8/31/10 10:34 PM, Yu, Deyang deyang...@citi.com wrote: I am building a Flex portal. Which has main application and several sub-applications. I am using sandboxed application. I do have crossdomain.xml defined in both main application and sub applications. And in the main application, I used the swfloader like : mx:SWFLoader id=couponApp width=100% height=100% loadForCompatibility=true trustContent=false complete=allowLoading() / But when I tried to loading the sub application, it always give Security Sandbox Violation error. The error is *** Security Sandbox Violation *** SecurityDomain 'http://localhost:8080/isw/Applications.html?debug=true' tried to access incompatible context 'http://127.0.0.1:8080/coupon/Coupon.swf' Anybody has any idea and suggestion? Where did I go wrong? -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui