Flex :: ArgumentError: Undefined State 'normalAndInactive'?
Oct 29, 2011
I have a webapp that works great. I am now trying to make a desktop version for our internal use. I've converted it and changed the tag to a "WindowedApplication". When I try to run the Air app I get the error:
ArgumentError: Undefined state 'normalAndInactive'.
at mx.core::UIComponent/getState()[E:dev4.5.1frameworksprojectsframeworksrcmxcoreUIComponent.as:10596]
It's my understanding that view states can be useful when switching the layout of design elements. Such as, a loading page as one state and the main application design in another state. Is this the correct use of them? Additionally, I have a label in State1 and I cannot figure out how to access that label via actionscript. labelID.text = "New Text"; is not working.
I'm using Flex 4.5 and trying to take advantage of the new state groups feature. I have two States (call them readType1 and readType2) that both belong to the same stateGroup (call it readOnly). There are several places where I'd like to do something based on the current state, and it would be the same thing for the two read states. [code]...
In my air project i used current state size is width="441" height="358" . i have link button like Singin then move to singin state (currentstate='singin')
So application resize into 616,919 . After that function finished move to current state like(currentstate='') But size not be changed . How can i set the size for current state?
I want to fade all the elements of the next state when transitioning from any state.I tried different things but I can't get it to work. And I don't want to manually add transitions for every state.
Which is a pretty small component and I have panelContainer:
[Code]...
Whilst the user is reading the warm and fuzzy welcome note in the welcome state I want to be creating the big expensive panels state so taht when we switch there is no delay. Before the panels state is set panelView is null but I presume there must be an IDefferredInstance floating around somewhere that I can use to kick off the creation of the view. How can I get hold of it?
I've got a problem in an ItemRenderer in Flex 3.5. I've looked at the other posts regarding this error but still can't figure it out. The ItemRenderer is part of an AdvancedDataGrid who's data provider is HierarchicalData. I'm getting the ArgumentError but the trace doesn't go to any of my code. I've gone through in debug mode tons of times but it looks like it doesn't happen until after my code runs. Quite strange.
The item renderer has a couple different parts. It figures out what row it should be drawing for based on the xml data and then adds labels and sprites appropriately.
Here is one of the methods that gets called if the itemrenderer is on a certain row.
private function addLabels(planList:ArrayCollection):void { height = 0; var sprite:Sprite = new Sprite(); var curX:Number = (width / planList.length);
i curious how to access state in flex "Current State" from flash movie clip??..so far i make movie clip in flash and it has button inside with name " button" and i put this flash file into flex in "state 1" flex application..i want to make event handler for "button" that trigger changing state from "state 1" to "state 2" in flex application..and in flex application i do not write anything because i have no idea how to deal with this stuff..
I need to add a rollover effect to the disabled state of a Spark button. This way, users can rollover the button and know why the button is disabled.I think I would have to override ButtonBase's getCurrentSkinState. Is there anyway to test if a mouse cursor is over a disabled button?
I am trying to get converted to Actionscript 3 from AS2.In old versions of flash, you simply placed the sound in a keyframe inside the button on the over or down state. Worked fine, but not anymore.I guess the sound must be set up with actionscript and a listener.I understand linkage. how to make one sound on the over state and a different one on the down state?
I've had a good rummage around the interweb and can't seem to find any examples of a tri-state checkbox. It doesn't look to be supported in the SDK and I can't find any examples online. I would imagine this is a common problem, before I embark on writing my own does anyone know of a good flex tri-state checkbox component somewhere I can use :)
I have a button with a click event of "currentState='someState'". Is there a way to tell component to do some function like for example "Function()" when the state changes to "someState"? So execute a function when the state is changed.
in my case I click a button. it calls changeTabState() ; it changes the state and then needs to select a tab using selectedIndex. but that does not work properly. If i go back go the main state and click the button again, it works as it should.Button:
I'm trying to create a button skin, where i can set fillColors like in a Flex 3 button, using CSS. It was easy to set the color of the gradients, by reading them from the CSS: adding a few lines in updateDisplayList: fillGradient1.color = fillColors[0]; ...
How can i set the colors for the other states, from script? I tried adding fillGradient1.color.down = fillColors[2] and it's not working...
I currently use: Flexglobals.toplevelapplication.component1.compnent2.currentState = 'something';is there a better way of doing do? Can I bind the state of a components to variable in my model?
Latest_News_Display is under the Latest_News state. I want to set Latest_News_Display's x property even if the currentState is set to Intro. However, when I try to use Latest_News.Latest_News_Display.x = 10,it returns an error that says 1120: Access of undefined property Latest_News
I can do this: <s:Button id="Btn" enabled.State1="false" /> But the following code is giving me an error. private function enableDisable():void{ Btn.enabled.State1="false"; //Error: Access of undefined property State1 } How to code enabled.State1 in ActionScript?
I was modifying the layout of a Flex application in Flex Builder. What I didn't realize was that the changes I made, were made for a particular state. There are around 6-7 states in my application. Now, I need those changes to be made to all of those states. How do I do it? As of now there are multiple lines like this in one state :
I've hit a very strange issue in adobe flex and I'm not sure how to solve it. I have a popup box that is called on creationComplete before startup of my main application. The popup simply asks for an email address and then the application is enabled showing the email address in a label component.
However, when I try to access the email address from the label component called UserID.text in the application, it is always null even though it is visually present in the label box...It seems like it loses state somehow...so HOW in earth can I keep it from losing state? I need to access the label or some variable throughout the use of the application and everything I try always ends up in a null variable?The main part of the application that sets the label is here:
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns:controls="com.iwobanas.controls.*" xmlns:local="*" creationComplete="showWindow(true)"> private function showWindow(modal:Boolean):void
I want to implement this script: [URL]...that is doing this "magic [URL]
...but I want to tweak it a little on InfoWindowTabbedComponent. To be more precisely I`m trying to insert links in that tabs, and when you click one the state will change.
You can see my custom InfoWindowTabbedComponent at the end of the post As you can see, right now I have 2 functions that open url`s.
What I`m trying to do is to change this:
var adobeURL:URLRequest = new URLRequest("http://www.microsoft.com" ); navigateToURL(adobeURL, "_self");
I have instantiated a class (class1) that loads some data via PHP in an AS3 Flex project.I instantiate class1, which is asynchronous and utilizes a URLLoader() to obtain its data.Then I would like to instantiate class2, which needs to USE the data from class1, but when I simply instantiate it I find that class1's instance variable is not populated yet because I am calling class2 too quickly.How can I create such a dependency that will link correctly?I am really new to using listeners, but I am imagining a listener in class2 might be what I need?Or maybe I can pass a reference to the listener in class1 into class2?I also know nothing about dispatching events... is this the key?Here's an example in pseudo code:
var class1:myC1 = new myC1("http://some/url/to/utilize"); //this never shows up because it hasn't loaded at the time i request it trace("the stuff from class1 is: ", class1.myXMLList);
My itemrenderer has 2 custom states, no hovered state, and no normal state[code]...
When I initialize it, I force it to go to state2. The problem is that when the mouse rolls out away from the item, it relapses back to the first state state1. It's kind of weird since I don't really have a hovered/unhover state.