Flex :: Declare A Skin Inline In MXML Component?
Oct 30, 2010Is there a way to declare a skin inline in a Flex 4 MXML Component? If not inline in the component then in the declarations or library tag?
View 1 RepliesIs there a way to declare a skin inline in a Flex 4 MXML Component? If not inline in the component then in the declarations or library tag?
View 1 RepliesI've been trying to create a custom mxml component that extends another custom mxml component (i.e.MyMXMLComponent -> BaseMXMLComponent -> Group). I've been reading that trying to add visual children to MyMXMLComponent caused error with Flex 3 but that's no longer the case with Flex 4.
What I want to know is whether this is a supported/fixed/documented feature of Flex 4? or just some undefined behavior in Flex 4 that may get changed with future updates?
if this is supported and documented feature, does anyone have link pointing to adobe document stating it as such?
I would like to include an MXML file in my MXML file in the same way you can include an external file in AS3 using the include directive. Using the include directive brings the code from the external file into the original file at compile time placing it in the same scope. For example,
Application.mxml:
<Application>
<source="external.mxml"/>
[code].......
What is the difference between :
giving a function reference in the result attribute of the HTTPService class like this :
protected function httpserviceCheckUpdate_resultHandler(event:ResultEvent):void
{
var version:Number = event.result.text.version as Number;[code]....
If both of them are same then how can I provide the event parameter using the second approach (as written in the result attribute of the httpservice class)? Which one of them is the better way of doing things in FLEX.
A Flex components values are initlized by init methord. In an application flow, How to refresh a mxml component data value ; as init is callled at the start up it self only.
eg. of mxml componet may be as simple as button label or text as complex as repeater whose data provider is a web service ( means a fresh quesy should be made to pull the data and refresh the dataprovider of repeater )
I am trying to override a Button class, i have a few properties which i wish directly initialise with the mxml description of the component, like :[code]which function is triggered ( in order to override it ) when all properties with mxml description is fully initialised with their values ?
View 1 RepliesSomewhere in the internets I stumbled across some kind of inline function for setting the color of a label.Something like this:color="{data >0 ? 0x006600 : 0xFF0000}Basically, this is exactly what I need in my ItemRenderer, but in an if-else if-else way.The script above says data > 0 then set color to green, else set it to red. What I need is an additional case, that is no change set color to gray.Is that accomplishable with this sort of "inline" function?
View 2 RepliesI have a problem with inline components. I want to reach an inline component from another one.. From the first component, i want to change "enable" value of the linkbutton named "Add" which is in second component. Altough i gave "id" and "className" to second one, i could reach neither it nor its elements.. is there a way to do this?
*in first component there is a text input in "CodedDescriptionItemEditor" component. I want to validate it and according to validation enable the button that i mentioned above..These all are in a datagrid by the way. In datagrid, there is always a row that you can enter data and via the "Add" button you can save it. After save it seems as text..
Here is my code:
<mx:columns>
<mx:DataGridColumn headerText="{Problem}" wordWrap="true" textAlign="left" sortable="false">
<mx:itemRenderer>
[code]....
I am trying to turn labels red when they can no longer be added to a list because of size requirements. The renderer works but Flex creates a separate component. I can't think of any good way to get that value to the new component.[code]
View 1 RepliesI hope I have worded the question ok. I know that you can pass the 'id' of the component but I'm just wondering if there is a more generic way. I have tried using 'this' (shown in example below) but the 'this' keyword refers to the application.
[Code]...
In mxml you declare states like this[code]...
How do you acheive the same in an ActionScript class? Apparently it's the same in Flex 3 and Flex 4, whatever it is.
I have two components. One is called "InsideComp" and one is called "OutsideComp". OutsideComp has InsideComp as one piece of its component, and in my main MXML file, I have embedded an instance of OutsideComp. How do I access a public variable of InsideComp within my main MXML file?In Actionscript, I could just do something like:OutsideComp.InsideComp.valToChange = 5; But I dont know how to do it in MXML. I know this is probably an easy question.
View 4 RepliesI am trying to implement some MVC-style UI components in Flex 4. I want to further separate the visual setup (and later runtime modification) of each element. Primarily, I want to keep the overall layout of the data like such in the MXML file that will USE the skin[code]...
View 1 RepliesI'm trying to skin the Scroller in my application so that it looks like the example mentioned in [URL] This example was done in Flex 3 and images are set in CSS. I tried to create a skin for the component Scroller and saw that it uses VScrollBar and HScrollBar. I tried to put skins for these components. VScrollBar uses separate skins for the track, thumb, decrement/increment buttons. I tried to make some changes in the skin, but they were not reflected at all in the application. I just want to create a customized scroll bar in Flex 4 with custom thumbs.
View 2 RepliesI have a panel with a custom skin whose height is smaller than its hostcomponent's height. When I layout this out in a vgroup, the component's size doesn't reflect the skin's smaller size.
Is there a way to completely delegate the size of a container to the skin class?
I want to use a Spark ComboBox with numerous MX Components but the Spark ComboBox does not look the same as the MX Components. Is there a skin I can use to Skin Spark components like MX components?
[Code]...
I have a custom Flex 4+ component that I am trying to make and have the skin be aware of changes to a custom property. This property will determine the graphic on the button (and some other visual changes) but the data will change constantly as it will be updated by a timer.
I've looked at untold examples and still seem unable to get the syntax correct or discover how things should be separated. I've looked at overriding commitProperties and the PropertyChangeEvent without success. So I have two questions.
1) How can I get a skin to be notified of a bound property when it changes?
2) If the data for a bound property of the component is an object, will binding work properly if a property of the object changes (or would it be better to pass each property separately)?
[Code]...
How do you set the default value of skinClass for a custom component in Flex? I've extended the DropDownList with my custom component, but I would like to specify a default skin to go with it instead of always setting the skinClass value for each instance.
View 1 RepliesI'm trying to put my components in a window container that can be closed by "x" moved on the stage, resized and so on. And I wonder which is the best way to do it. I want to use a skin class and the component class. The "solution" that is not working looks like this
[Code]...
I have two mxml files. one is main that is application tag mxml file and another is my mxml component file. I have a viewstack in my main mxml whose id is, say, "mainViewStack". Now I want to set selectedChild property of "mainViewStack" from my mxml component file. [code]...
View 4 Replieshow to use mxml component in another mxml component actionscipt code [code]but i am getting error saying "Type was not found or was not compile time constant:warning")
View 3 RepliesHow can i click a button on an .mxml component to open a specific selectedItem on a spark List from another .mxml component!?
View 1 RepliesI have a datagrid in my mxml file, say, samp.mxml.
<mx:DataGrid id="taskDataGrid" dataProvider="{initDG}" variableRowHeight="true"
editable="true" width="100%" paddingBottom="1" paddingTop="1" height="55" >
<mx:columns>
[code].....
How do I say an MXML component is inside some package? Well, it's in a different folder... I know how to do it ActionScript... But when I do in MXML I don't declare the package explicitly because I don't know how, and when I call it to my application, it states that The prefix "package" for element "package:Component" is not bound.
View 2 RepliesI am confused with how component life cycle goes when component build in MXML. and if MXML calls methods automatically then how to call any method in life cycle explicitly.
View 1 RepliesBasically I am poping up the following component:
PopUpManager.centerPopUp(PopUpManager.createPopUp(this,RegionExperienceDetailPopUp,false));
I need to call RegionExperienceDetailPopUp.generateData(passIntArray);
What is the syntax to do this?
I am actually in the process of Architectural of our project. We have choosen Mate framework. The project is not so quite complex, but what advantages i would get over MXML when i choose Modules.
Main App - > Views - > Events - > Maps - > Services [PHP or Java]
When i come up with Modules based Architecture, it seems to be good but i doubt it should not end up with tight coupling and unwanted issues which may break the head later to solve.
Main APP - > Modules - > Module Interface -> Events - > Maps - > Services
[PHP or Java]
What advantages i do get if i choose Modules over MXML Component? What is the prefered and the best way to Architect an FlexApplication? Since the Application is going to communicate with Backend, do we need to make the frontend more complex?
In our flex application we have tabs at the main level and under it we have subview.e.g
Home / Tasks / Admin etc...
In one condition we have to click on a button and open a new tab, on this tab we have to add an existing mxml component and show it in the tab.We are using parsley as the framework. Inside the mxml component test.mxml(that is shown in the tab) i am configuring it with parsley using the tag.Now when i add the instance of this test.mxml i am getting an exception. I am deriving this test.mxml instance using teh parsley context
as
context.getObject(id of component) as DisplayObject and adding it to the tabNavigator...
But i am getting exception when i try to grab an instance of a view using parsley context. How do i get an instance of a view or component that is configure through parsley using the parslye context.Also the problem is occuring becuase of the view injection..because i get a parsley excepiton on startup of the application stating that there is some problem in the context.
i want to implement this.archive/flex/tourdeflex/web/#docIndex=1;illustIndex=0;sampleId=0)type of structure in my application.how can i display different component in differentparts.
View 3 RepliesI have my custom component and for example few Label. I want to pass to my component value which will be assign to label's id.[code]Error: {test} is not a valid identifier.
View 1 Replies