0 Replies Latest reply on Mar 30, 2008 4:17 PM by ctzn99

    Changing to Default state doesn't resize window.

    ctzn99 Level 1
      Ok, i've got a really simple "air" application. Click the button and the state changes to "Bigger" (the window grows in size) and then click the button again the state changes to "" or the default state (the window SHOULD revert to its smaller size).

      Note the SHOULD... when you try to revert back to the default state the window size doesn't change. Anyone else seen this problem and have a workaround? Is there something i'm missing... this is about the easiest thing aside from hello world that you can do but it doesn't quite work as a WindowedApplication (but it does work if its an application in a browser window, i.e. trad flex).

      In my more complex example I've got controls that appear or disappear depending on the state and they work correctly but the size still doesn't change (hence i made this simple example because i thought i was going crazy... and maybe i still am). My more complex example also has a size transition, clasic login to register dialog transition, and I tried setting the size manually when reverting back to the default size and while this will change the size correctly, it then messes up the transition.

      <?xml version="1.0" encoding="utf-8"?>
      <mx:WindowedApplication xmlns:mx=" http://www.adobe.com/2006/mxml" layout="absolute" width="210" height="181">
      <mx:State name="Bigger">
      <mx:SetProperty name="width" value="348"/>
      <mx:SetProperty name="height" value="373"/>
      <mx:SetEventHandler target="{button1}" name="click" handler="currentState=''"/>
      <mx:Button x="10" y="10" label="Button" click="currentState='Bigger'" id="button1"/>
      <mx:Label x="10" y="40" text="Current State: {currentState}"/>