Re: [flexcoders] Flash Player may be not creating Shared Object on Mac
Thanks Guy Morton. I have resolved my problem and the solution is as below. I got the latest flash player from the Adobe. I have Flash Builder 4.5 installed on My mac machine and when i launch the application via Flash Builder(standalone), it uses the internal Flash Player(debugger version) that was embedded with Flash Builder on Mac which fails to create the shared objects. I clicked project - properties, Flex compiler - checked HTML wrapper (at bottom) and then the shared objects were created. Thanks, with Regards, Jitendra Jain Software Engineer 91-9979960798 From: Guy Morton g...@alchemy.com.au To: flexcoders@yahoogroups.com flexcoders@yahoogroups.com Sent: Mon, 29 August, 2011 12:37:59 PM Subject: Re: [flexcoders] Flash Player may be not creating Shared Object on Mac Shared objects work fine on the mac. You need to give us more details if you want help. On 29/08/2011, at 5:00 PM, jitendra jain jitendra_jain_2...@yahoo.com wrote: Hi Guys, Today I have installed Flash Builder on Mac Machine. The code doesn't work .. I am using Shared Objects for storing the cookie.. In windows it is working (same code). I changed the settings via Globel Setting Panel on Adobe site. Please revert asap. Thanks for help in advance Thanks, with Regards, Jitendra Jain Software Engineer 91-9979960798
[flexcoders] Module issue
I try load new module when previous one has been unloaded. So I let the moduler load module in the unload event handler. But the module can't be loaded ? moduler.unloadModule(); // actually it has not been unload moduler.loadModule(...); // the new one load moduler.unloadModule(); // When It has been unloaded modulerUnloadedHandler(e:ModuleEvent):void{ moduler.loadModule(...); // the new one load // but the new one can't load with no error ~~~ }
Re: [flexcoders] Re: Best Practice for Subclassed UIComponent and DataProvider
Use the –keep-generated-actionscript MXMLC options and see the pile of code it generates. On 8/29/11 7:31 AM, hanzo55 shawn.a.hol...@gmail.com wrote: I actually did a bit of research on the COLLECTION_CHANGE event as well as the setter prior to posting here, and neither seemed to apply, since my initial tests of working with a plain ComboBox were completely fine: mx:ComboBox dataProvider={model.facilities} / caused the combobox to be populated correctly. What I was really looking for was what was going on under-the-hood for the code above when it is processed during compilation into AS3. Does this MXML mean that there is assignment going on in the constructor? (current results seem to point to 'no'), or does the Flex compiler look at binding related attributes (surrounded by curly braces) and translate those into a series of calls to BindingUtils.bindProperty() I suppose I could have just downloaded the flex source and looked. :\ --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , turbo_vb TimHoff@... wrote: Back to your problem. If you're not seeing the combo box's dataProvider populate or update, then it's a binding problem. Good idea to try the BindingUtils, but it's easier to fix the binding events in the model. If you're using a getter / setter in the model, for the facilities collection, make sure that the binding event is dispatched in the setter. If you're not seeing the collection update, when existing items have been changed elsewhere, then listen for the COLLECTION_CHANGE event on the facilities collection, and in the listener function, manually dispatch the collection's binding event (same as the one in the setter). If this doesn't work, look further upstream; in the service, delegate or controller. You'll find the short. -TH --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , turbo_vb TimHoff@ wrote: You have the right idea; to encapsulate the dataProvider, validation and change event handler. But, instead of putting them inside the control, wrap all of that into a common facilities model, that gets used anywhere it's needed in the application. I stopped using Cairngorm a long time ago, but hopefully the newest version supports dependency injection; so you can just inject a reference to the facilities model where needed, and hook it up to the combo box. That would be best practice. But, at the end of the day, the goal is to make it work, so... -TH --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , hanzo55 shawn.a.holmes@ wrote: I very much appreciate the help! Any chance I can take to improve the design would be greatly beneficial, from a maintenance standpoint. My feeling originally was if I have two comboboxes that are in entirely different parts of the app, but that will always be populated by the same data provider, always have the same validation and always utilize the same change function (while being different from other comboboxes in the site), it made sense to encapsulate the dataprovider/validation/change events into the box itself so it could be added to a view without having to specify all of the various attributes a combobox needs--since they are not changing. Initially, it seemed a bit pointless to write: components:FacilityComboBox dataProvider={model.facilities} / everywhere I implemented the Facility ComboBox since everywhere the Facility ComboBox is implemented...the dataProvider is *going* to be model.facilities and will never change. If you think that there is a good example somewhere that demonstrates a better design for this type of class hierachy, please point me to it and I'll have a look. As the subject states, I'm very much looking for the best practice here. --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , turbo_vb TimHoff@ wrote: Validation can be abstracted just like dataProviders. For a combo box, you only need to validate the selectedItem; from the view, presentation model, or a common utility class. Most other stuff happens in itemRenderers; that have a little more freedom. It may be that you're locked into a structure that was handed to you, but hardcoding a reference to a singleton model, from which you set the data provider of a combo box from within the combo box, breaks the rules. If you're having problems with binding the dataProvider to the model's property, the binding problem is probably upstream from the combo box. Good luck Shawn, just trying to help. -TH --- In flexcoders@yahoogroups.com mailto:flexcoders%40yahoogroups.com , hanzo55 shawn.a.holmes@ wrote: There's more to the story in regards to the class design than what's provided here; The
Re: [flexcoders] Basic Doubt - Flex Module
I would have the button listen for events from the module. On 8/29/11 4:12 PM, Venkat M venkat_...@yahoo.com wrote: Hi Group, I have a basic question on modules and module loader in flex. Can some on help out please? I have a main application that loads up any one of the available 4 (A,B,C,D) modules from a dropdown. The module loader in the main application is binded to the combobox of choice and the particular module loads up.For example if user selects A from combobox, module A.swf loads up. When the user changes the option to B in dropdown, the module loader unloads module A and loads Module B. This is the scenario. How can I control a logout button (activate/deactivate) in main application with the value of flag variable provided in all the modules. All the modules has a flag variable in them, when some action is being performed within the module the flag is set to 1, other wise 0; So my button on main application should be active only when the flag in the currently loaded module is 0. How do I deal with this. Thanks in advance!! Best Regards, Venkat Maddali. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Image Flickering
Hi Guys, When i click any item on the Button bar the image flickers and below is my code for the first time. /s:ArrayCollection id=arrayCollection mx:Object label=Events selectedImage=@Embed('images/abc.png') unselectedImage=@Embed('images/abc1.png') selectedImageOver=@Embed('images/abc2.png') unselectedImageOver=@Embed('abc3.png')/ mx:Object label=Events selectedImage=@Embed('images/xyz.png') unselectedImage=@Embed('images/xyz1.png') selectedImageOver=@Embed('images/xyz2.png') unselectedImageOver=@Embed('images/xyz3.png')/ /s:ArrayCollection s:ButtonBar id=navigationBar dataProvider={arrayCollection} selectedIndex=0 requireSelection=true click=change(event) / Thanks, with Regards, Jitendra Jain Software Engineer 91-9979960798
[flexcoders] Re: Basic Doubt - Flex Module
Just to be different, I would use an interface between the Application and all the modules. --- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote: I would have the button listen for events from the module. On 8/29/11 4:12 PM, Venkat M venkat_yum@... wrote: Hi Group, I have a basic question on modules and module loader in flex. Can some on help out please? I have a main application that loads up any one of the available 4 (A,B,C,D) modules from a dropdown. The module loader in the main application is binded to the combobox of choice and the particular module loads up.For example if user selects A from combobox, module A.swf loads up. When the user changes the option to B in dropdown, the module loader unloads module A and loads Module B. This is the scenario. How can I control a logout button (activate/deactivate) in main application with the value of flag variable provided in all the modules. All the modules has a flag variable in them, when some action is being performed within the module the flag is set to 1, other wise 0; So my button on main application should be active only when the flag in the currently loaded module is 0. How do I deal with this. Thanks in advance!! Best Regards, Venkat Maddali. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] adding and managing children dynamically - accordion
I was trying to build a component that would dynamically add NavigatorContent as children to an Accordion based on how many items were in an ArrayCollection. That worked I got the expected number of accordion tabs labeled correctly. I now want to add a DataGrid to each NavigatorContent. When I set a break point I do not see a reference to the NavigatorContent by the id that I set when they were added to the Accordion or anywhere in the component. How can I work with the DataGrid and set its DataProvider, etc? I will want to work with data in the DataGrid - crud I was trying to mimic what I had done using JQueryMobile with header tag and queries return to the cfm page. They have a collapsible content block that worked well on the small screen, but I need to be able to do more when a larger screen is available. Any suggestion?
Re: [flexcoders] Why don't horizontalCenter and verticalCenter work with Spark ColumnConstraints?
Can't do it. Boxes must be constrained via ConstraintColumns. The boxes switch sides, resize, appear and disappear, etc. via different states and there are transitions on those states to ease the boxes in as they move and resize. Picture a reverse button upper right that when clicked reverses the position of the boxes. When the boxes reverse, they smoothly transition to their new reversed positions. Those transitions won't work if the components are in different groups. They have to be horizontally centered on a ColumnConstraint, not a Group container. This isn't a new app. It's an existing app with a well designed UI. I'm just transitioning to Spark so as to take advantage of the new skinning model and facilitate parallel browser and mobile skins. Can't change the app's behavior in the process. In any event, I heard back from Adobe on this. They said, we didn't have enough time to implement horizontal/verticalCenter in the last release (hopefully coming in the next!).. I asked if they meant for all Spark containers or what. They responded, Yes, basically, they are not implemented in ConstraintLayout. ConstraintLayout handles all of the ConstraintColumns/ConstraintRows layout logic. So that leaves me stuck until the next release unless I can find a workaround. turbo_vb wrote: Constraints are designed to be used to constrain other components for things like alignment and size. For your app, just add a group around each of your containers and you're fine. -TH ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx backgroundColor=blue s:SkinnableContainer id=mainContentArea backgroundColor=red bottom=100 top=100 s:layout s:ConstraintLayout s:constraintColumns s:ConstraintColumn id=col1 width={ width / 2 } / s:ConstraintColumn id=col2 width={ width / 2 } / /s:constraintColumns /s:ConstraintLayout /s:layout s:Group height=100% left=col1:0 right=col1:0 s:BorderContainer id=greenContainer width=400 height=300 backgroundColor=green horizontalCenter=0 verticalCenter=0 / /s:Group s:Group height=100% left=col2:0 right=col2:0 s:BorderContainer id=yellowContainer width=200 height=150 backgroundColor=yellow horizontalCenter=0 verticalCenter=0 / /s:Group /s:SkinnableContainer /s:Application --- In flexcoders@yahoogroups.com, RobertTr rexdtripod@... wrote: Here's code that splits the screen into two columns, left and right. Then it puts a box in each column and attempts to center them. The horizontalCenter and verticalCenter properties are ignored: ?xml version=1.0 encoding=utf-8? s:Application xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx backgroundColor=blue fx:Declarations !-- Place non-visual elements (e.g., services, value objects) here -- /fx:Declarations s:SkinnableContainer id=mainContentArea top=100 bottom=100 backgroundColor=red s:layout s:ConstraintLayout s:constraintColumns s:ConstraintColumn id=col1 width={width/2} / s:ConstraintColumn id=col2 width={width/2} / /s:constraintColumns /s:ConstraintLayout /s:layout s:BorderContainer id=greenContainer backgroundColor=green width=400 height=300 horizontalCenter=col1:0 verticalCenter=0 /s:BorderContainer s:BorderContainer
Re: [flexcoders] Re: Basic Doubt - Flex Module
Looks like I will have to have an interface that should be implemented by my all individual modules! I will give it a try!. Also I read an article just now to create modules is to make app modular, if we link the modules data to and fro it creates tight coupling and to avoid it we have to use interface. Best Regards, Venkat Maddali. From: valdhor valdhorli...@embarqmail.com To: flexcoders@yahoogroups.com Sent: Tuesday, August 30, 2011 5:37 AM Subject: [flexcoders] Re: Basic Doubt - Flex Module Just to be different, I would use an interface between the Application and all the modules. --- In flexcoders@yahoogroups.com, Alex Harui aharui@... wrote: I would have the button listen for events from the module. On 8/29/11 4:12 PM, Venkat M venkat_yum@... wrote: Hi Group, I have a basic question on modules and module loader in flex. Can some on help out please? I have a main application that loads up any one of the available 4 (A,B,C,D) modules from a dropdown. The module loader in the main application is binded to the combobox of choice and the particular module loads up.For example if user selects A from combobox, module A.swf loads up. When the user changes the option to B in dropdown, the module loader unloads module A and loads Module B. This is the scenario. How can I control a logout button (activate/deactivate) in main application with the value of flag variable provided in all the modules. All the modules has a flag variable in them, when some action is being performed within the module the flag is set to 1, other wise 0; So my button on main application should be active only when the flag in the currently loaded module is 0. How do I deal with this. Thanks in advance!! Best Regards, Venkat Maddali. -- Alex Harui Flex SDK Team Adobe System, Inc. http://blogs.adobe.com/aharui
[flexcoders] Axis Scale problem on Dual Axis Chart
I have a simply dual axis chart similar to the samples found all over the internet. The chart has a line series on one Linear vertical axis and a column series on another Linear vertical axis. The problem is that when certain events in the application happen, the min and max of one of the axis is reset to 0, 100. To avoid this I can set the min and max values, but I would like to avoid this as the axis should auto scale just like it does when it is first created. Here is some sample code to show the problem. The code is basically a chart with a button. When the button is clicked a new styleSheet is loaded and it is then that the axis is set to 0, 100. code ?xml version=1.0 encoding=utf-8? s:WindowedApplication xmlns:fx=http://ns.adobe.com/mxml/2009; xmlns:s=library://ns.adobe.com/flex/spark xmlns:mx=library://ns.adobe.com/flex/mx showStatusBar=false fx:Script ![CDATA[ import mx.collections.ArrayCollection; import mx.core.FlexGlobals; [Bindable] public var SMITH:ArrayCollection = new ArrayCollection([ {date:22-Aug-05, close:41.87}, {date:23-Aug-05, close:45.25}, {date:24-Aug-05, close:42.77}, {date:25-Aug-05, close:48.02}, ]); [Bindable] public var DECKER:ArrayCollection = new ArrayCollection([ {date:22-Aug-05, close:157.59}, {date:23-Aug-05, close:160.3}, {date:24-Aug-05, close:150.71}, {date:25-Aug-05, close:156.88}, ]); private function onButtonClick():void { StyleManager.getStyleManager(FlexGlobals.topLevelApplication.moduleFacto\ ry).loadStyleDeclarations(style01.swf,true); } ]] /fx:Script s:VGroup width=100% height=100% horizontalAlign=center s:Button label=Click click=onButtonClick() / mx:ColumnChart id=myChart width=100% height=100% showDataTips=true mx:horizontalAxis mx:CategoryAxis id=h1 categoryField=date/ /mx:horizontalAxis mx:verticalAxis mx:LinearAxis id=v1 / /mx:verticalAxis mx:verticalAxisRenderers mx:AxisRenderer placement=left axis={v1} / mx:AxisRenderer placement=right axis={v2} / /mx:verticalAxisRenderers mx:series mx:ColumnSeries id=cs1 horizontalAxis={h1} dataProvider={SMITH} displayName=Smith yField=close mx:verticalAxis mx:LinearAxis id=v2 / /mx:verticalAxis /mx:ColumnSeries mx:LineSeries id=cs2 horizontalAxis={h1} verticalAxis={v1} dataProvider={DECKER} displayName=Decker yField=close / /mx:series /mx:ColumnChart mx:Legend dataProvider={myChart} direction=horizontal/ /s:VGroup /s:WindowedApplication /code The style sheet which is loaded is basically a blank stylesheet which is compiled to swf. /* CSS file */ @namespace s library://ns.adobe.com/flex/spark; @namespace mx library://ns.adobe.com/flex/mx; global { font-family: Verdana; }
[flexcoders] Array to XML?
Hi group, Can some one please help me in converting an array into an xml file or a similar hierarchical data structure to be used for a tree component! Imagine a case I have an array A with values A1,A2,A3,A4, B1,B2,B3,B4, ….. Z1,Z2,Z3,Z4. Can I have an XML like A A1/A1 .. .. /A . . . . . . . . Z Z1/Z1 .. .. /Z So that I can directly link it to a tree component? Kindly help out!! Best Regards, Venkat Maddali.
Re: [flexcoders] adding and managing children dynamically - accordion
R u adding the datagrid after the accordian layout been created. Might be you have to check the sequence of events for the same. Sent from my iPhone On Aug 31, 2011, at 1:07 AM, Michael Sumner msum...@nationsbestsports.com wrote: I was trying to build a component that would dynamically add NavigatorContent as children to an Accordion based on how many items were in an ArrayCollection. That worked I got the expected number of accordion tabs labeled correctly. I now want to add a DataGrid to each NavigatorContent. When I set a break point I do not see a reference to the NavigatorContent by the id that I set when they were added to the Accordion or anywhere in the component. How can I work with the DataGrid and set its DataProvider, etc? I will want to work with data in the DataGrid - crud I was trying to mimic what I had done using JQueryMobile with header tag and queries return to the cfm page. They have a collapsible content block that worked well on the small screen, but I need to be able to do more when a larger screen is available. Any suggestion?