State change/transition fires addedToStage/removedFromStage events

Hi,
Not sure if this is intended behaviour, but I noticed that a state transition in my components actually triggers addedToStage/removeFromStage events for objects in that component.
i.e. I've got an application with two components and two states.
Changing states (in the application) has move transitions for both components (one component is like a drawer sliding out and the other makes way for it, but both components were already on the stage before the state change).
When switching between the two states the components that are moved actually also fire the addedToStage/removedFromState events.
Cheers
Skip

Hi Chet,
I just tried setting up a new project to demo this, but (surprise surprise) it seems to work fine now.
I still see it firing in my original project, but I guess that's got to be something I'm doing wrong there.
It'll probably take me some time to plough through it though as the project is pretty large, but will post if I find it (or if i can isolate to a demo project).
Thanks
Skip

Similar Messages

  • X Control Exec State Change with Panel Close

    I have an X Control that launches VIs dynamically and loads them into subpanels. If I put this X Control on a VI front panel and that VI has its panel closed, but that panel close event is unhandled so LabVIEW takes the default panel close behavior, the exec state change never fires. If I reopen the VI however, it is stopped. Because of this, my shutdown user event which is sent in the Exec State Change event case never sends and my VI is left running in the background. 
    Of course, I know the panel event should be handled, but this is about robustness of my X Control, not the panel close event handling. Is there any way I can capture this specific case?
    CLA, LabVIEW Versions 2010-2013

    DevonR wrote:
    Hi,
    Thanks for sending in the code.  Have you tried implementing an event structure?  With an event structure, you can set the event to, “Application Instance Close”, so that you can execute some code when a user executes the Quit LabVIEW function.  Please see attached screenshots.
    Devon R.
    Applications Engineer
    National Instruments
    This doesn't work because if you close an owning project but not LabVIEW, the refnum goes invalid. However, I got an answer from here that lets me know what I needed to.
    CLA, LabVIEW Versions 2010-2013

  • Item state change events - notification not recd when run on nokia phone

    I have a Form which implements ItemStateListener and its registered to receive item state change events. The Form has a text field which needs to be enabled/disabled based on certain ChoiceGroup element being selected. The code works fine on emulator, however I don't receive event notification in itemStateChanged() on series 60 nokia devices when a new ChoiceGroup element gets selected. Has anyone faced a similar problem? Is there any solution for this? The profile used in my project is CLDC 1.1 and MIDP 2.0.

    I faced a similar problem on Motorola ROKR E6. Turned out that ItemStateListener was working only as long as the first form to be displayed remained current -- once I setCurrent another Form, the app stopped responding to itemStateChanged.
    The workaround I adopted was to remove Items from the Form and add new Items, giving the illusion of the next form being displayed. It would be interesting to know whether that works for you and whether anyone has faced the same problem with any other handset.
    I have subsequently come to know that Motorola have marked my bug report as "solved" -- but have not offered me any option to update my handset with a bug-free version.
    btw, calling setConstraints on a TextField can throw a NullPointerException. My workaround for that was to setText("") in the itemStateChanged in lieu of setConstraints (TextField.UNEDITABLE).
    luck, db

  • [FB4/AIR] Resize transition not working during state change

    I am using a resize transition between two states.  The first time the state is changed the resize transition doesn't seem to execute, but merely jumps to the new size. The issue I am experiencing is similar to this  post - http://aralbalkan.com/2177. This is somewhat different as it's a title window and explicitWidth and explicitHeight are not available. Each subsequent time I change states during the same session, the transition plays fine, it's just that first initial state change.
    Any suggestions?
    Thanks.

    Moving to Flex forum http://forums.adobe.com/community/flex/flex_general_discussion

  • When the state change, my StyleableTextField html formatting is lost

    Hello,
    When the state change, my StyleableTextField html formatting is lost (mobile project)
    <?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"
              addedToStage="ats(event)">
              <fx:Script>
                        <![CDATA[
                        import spark.components.supportClasses.StyleableTextField;
                        protected function ats(event:Event):void
                                  StyleableTextField(txt.textDisplay).htmlText="<i>test</i>";
                        public function ok(e:Event):void{
                                  currentState = "state2";
                        ]]>
              </fx:Script>
              <s:states>
                        <s:State name="initialState" />
                        <s:State name="state2" />
              </s:states>
              <s:VGroup>
                        <s:TextArea width="100%" id="txt" includeIn="initialState, state2" skinClass="spark.skins.mobile.TextAreaSkin"/>
                        <s:Button label="add" click="ok(event);" includeIn="initialState, state2"/>
                        <s:TextArea width="100%" text="state2" includeIn="state2"/>
              </s:VGroup>
    </s:Application>
    Thanks

    How are you doing this?
    The text area of a web app has HTML encoding and is all fine.
    If you make a multiline custom text field the encoding remains.
    You need to provide a bit more information because the above do keep their encoding.

  • State Change causing tree item to loss selected item highlight

    I'm looking for some guidance on a situation i'm encountering. I've an application with a tree component which will be used as a report selector in all view states. The parent nodes are not selectable but the children are. Each child has a for a lack of a better term parameter classification. When a report item is selected in the tree then a state change occurs and displays the appropriate parameter selection view.
    My issue is this. Upon clicking an item and displaying the new state for the first time, the selected item in the tree losses the visual representation or highlight around the selected item. But within the debugger it still shows which item is the selectedItem.  Once the state has been displayed at least once...i.e. I select other items and then eventually back to initial tree item when the state changes it does not loss the highlight on the selected tree item.
    Couple things I've tried to see if i'm in the right neck of the woods is use the currentStateChange and currentStateChanging handlers to do a bit of tracing and found that the tree item remains selected all the way through both currentStateChanging and then even in the currentStateChange...the redraw occurs just after which is when the tree item losses its highlight.
    Does anyone have any ideas or even encounter this?

    Good question. Well you're right in asking. Just using a spark Label to show me the label of the selectedItem, upon the first time I click on the selection nothing populates the label's text BUT the state changes as its suppose to. Took me clicking on it a second time to get the item to be highlighted and the label to show me what had been selected.
    My question here is...is there another event which is occurring after the changeState?

  • Can I use the awesome  s:AnimateTransitionShader  in things other than state changes

    It possible to use  the  <s:AnimateTransitionShader  in things other than state changes as theres some cool pb stuff you can do like here: http://www.justsuppose.com/getting-fancy-with-flex-4/
    <s:transitions>
            <s:Transition fromState="*" toState="log_in">
                <s:AnimateTransitionShader target="{this}" duration="1000"
                                           shaderByteCode="@Embed(source='nikos/pixelBlender/HexCells.pbj',
                                           mimeType='application/octet-stream')"/>
            </s:Transition>
            <s:Transition fromState="*" toState="*">
                <s:AnimateTransitionShader target="{logo}" duration="3000"
                                           shaderByteCode="@Embed(source='nikos/pixelBlender/Twist.pbj',
                                           mimeType='application/octet-stream')"/>
            </s:Transition>
        </s:transitions>

    Firgured it:
    <?xml version="1.0"?>
    <!-- behaviors\SparkCustomPBTransform.mxml -->
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:mx="library://ns.adobe.com/flex/mx"
        xmlns:s="library://ns.adobe.com/flex/spark">
         <fx:Script>
              <![CDATA[
                // Embed the .pbj file.
                [Embed(source="assets/twist.pbj", mimeType="application/octet-stream")]
                private static var CustomShaderClass:Class;
                [Bindable]
                private static var customShaderCode:ByteArray = new CustomShaderClass();
              ]]>
         </fx:Script>
         <fx:Declarations>
            <!-- Use the custom pixel shader with an effect. -->
            <s:AnimateTransitionShader  id="shadeAnim"
                shaderByteCode="{customShaderCode}"
                target="{btn2}"
                repeatCount="2"
                repeatBehavior="reverse"/>
         </fx:Declarations>
         <mx:Button id="btn2" label="Click Me"
              click="shadeAnim.play();">
         </mx:Button>
    </s:Application>

  • Please help - states and transitions

    Hi there,
    I am confused as to how transitions really work with states.
    I understand how I can identify states and then define transitions
    specifying fromState and toState. But it kinda ends there...
    What I have is an application with 3 states. The base state
    has elements that are not on the second state I created etc... When
    I define transitions for components that are in BOTH states there
    are no issues... BUT when the component is not there in the second
    state how can I apply a transition to it, for example fade out when
    the state changes?? Do you know what I mean? I read about actions,
    but that only confused me...
    Anyone know of any good tutorials or can explain in plain
    english how to do this?
    In the code below, "thumbs" and "filterNav" are not on the
    second state....
    Thank-you very much, much appreciated..

    Littleprinces wrote:
    Thanks before Allen to help me, this is my problem. When I am trying to purchase anything in iTunes store, I always have the answer please contact iTunes support....?
    Then contact itunes support as Dave and the error message say.

  • ACE Syslog message for State change

    Hi,
    Is there a syslog message for a state-change for rservers, if so how could we enable this?
    e.g. when probe fails state changes to 'probe-failed'
    when all probes are successful state is 'operational'
    Thank you
    Bilal

    Hi,
    There is a syslog message something like below:
    %ACE-3-251006: Health probe failed for server 10.80.10.10 on port 80 internal error: failed to setup a socket.
    First enable logging on ACE.
    ACE/Admin(config)# logging enable
    http://www.cisco.com/en/US/docs/app_ntwk_services/data_center_app_services/ace_appliances/vA1_7_/configuration/system/message/guide/config.html#wp1063750
    read the section:  Specifying Syslog Output Locations
    logging buffered 3 should generate syslog in event of probe failure.
    You can also set snmp to monitor it.
    cesRealServerStateChange
    CISCO-ENHANCED-
    SLB-MIB
    State of a real server configured in a server farm changed to a new  state as a result of something other than a user intervention. This  notification is sent for situations such as ARP failures, probe  failures, and so on.
    Hope that helps.
    regards,
    Ajay Kumar

  • 2 Vertical Axis Chart & State Change Bug

    When a column or line chart has 2 vertical axis (one on the left and one  on the right), the additional vertical axis must be defined at the series level  as the definition at the chart level only allows for one vertical axis.
    When you define the additional vertical axis at the series level, it will populate on the chart when the chart is first rendered.  But, it fails to populate after a state change.
    This problem does not occur if the data provider uses static data defined in Action Script as an array collection.  But, the problem always occurs if the data provider uses a web service.
    This is a Flex 4 problem.  Flex 3 does not have this problem.
    Below is an example that will demonstrate the problem.  It uses the Flex Grocer web service that comes on the CD with Jeff Tapper’s book “Adobe FLEX 3 Training from the Source” (an Adobe Press book).  However, this example can be easily modified to use any web service.
    The example is currently pointing to static data defined in Action Script.
    You can switch from static data to web service data by commenting the instruction on line 32 ( dp = dpStatic; ) and un-commenting the instruction on line 33 ( dp = (event.result as ArrayCollection); ).
    The example first presents a chart with Gross Sales plotted as columns using the left axis and Net Sales plotted as a line using the right axis.  Note, the vertical axis for Net Sales is defined at the series level.
    When you click the “Data” button a state change occurs and a data grid is presented showing Gross Sales and Net Sales.  When you click the “Chart” button another state change occurs and the chart is presented again.  If you are pointing to static data, both Gross Sales and Net Sales will populate on the chart.  If you are pointing to web service data, Gross Sales will still populate, but Net Sales fails to populate.  This is the problem.
    Does anyone have a solution or work around for this problem?
    <?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"
                   creationComplete="init()">
      <fx:Script>
        <![CDATA[
          import mx.rpc.events.ResultEvent;
          import mx.rpc.events.FaultEvent;
          import mx.collections.ArrayCollection;
          [Bindable]
          public var selectedType:String = "All";
          [Bindable]
          public var startDate:Date = new Date(2006, 4, 1);
          [Bindable]
          public var endDate:Date = new Date(2006, 4, 5);
          [Bindable]
          public var dp:ArrayCollection;
          public var dpStatic:ArrayCollection = new ArrayCollection([
            {DTSALE:"11-Nov-07", NET:41.87, GROSS:63.34},
            {DTSALE:"12-Nov-07", NET:45.74, GROSS:58.56},
            {DTSALE:"13-Nov-07", NET:42.77, GROSS:62.34},
            {DTSALE:"14-Nov-07", NET:48.06, GROSS:75.65},
          private function init():void {
            getData();
          private function getData():void {
            dashboardWS.getSalesData.send();
          private function salesRPCResult(event:ResultEvent):void {
            dp = dpStatic;                                        // Line on chart always populates with static data
            // dp = (event.result as ArrayCollection);   // Line on chart does not populate with WebService data after state change
          private function showFault(event:FaultEvent):void {
            trace(event.fault.faultCode + ":" + event.fault.faultString);
        ]]>
      </fx:Script>
      <fx:Declarations>
        <mx:WebService id="dashboardWS" fault="showFault(event)"
                       wsdl="http://localhost:8300/flexGrocer/cfcs/aggregate.cfc?wsdl">
          <mx:operation name="getSalesData" result="salesRPCResult(event)">
            <mx:request>
              <startDate>{startDate}</startDate>
              <endDate>{endDate}</endDate>
              <category>{selectedType}</category>
            </mx:request>
          </mx:operation>
        </mx:WebService>
      </fx:Declarations>
      <s:states>
        <s:State name="chart"/>
        <s:State name="data"/>
      </s:states>
      <s:controlBarContent>
        <s:Button label="Chart" click="this.currentState='chart'"/>
        <s:Button label="Data" click="this.currentState='data'"/>
      </s:controlBarContent>
      <s:HGroup width="100%" height="100%">
        <mx:ColumnChart includeIn="chart"
                        width="100%" height="100%" dataProvider="{dp}">
          <mx:horizontalAxis>
            <mx:CategoryAxis categoryField="DTSALE"/>
          </mx:horizontalAxis>
          <mx:verticalAxis>
            <mx:LinearAxis id="vLeft" title="Gross Sales Columns"/>
          </mx:verticalAxis>
          <mx:series>
            <mx:ColumnSeries yField="GROSS" verticalAxis="{vLeft}"/>
            <mx:LineSeries yField="NET">
              <mx:verticalAxis>
                <mx:LinearAxis id="vRight" title="Net Sales Line"/>
              </mx:verticalAxis>
            </mx:LineSeries>
          </mx:series>
          <mx:verticalAxisRenderers>
            <mx:AxisRenderer axis="{vLeft}" placement="left"/>
            <mx:AxisRenderer axis="{vRight}" placement="right"/>
          </mx:verticalAxisRenderers>
        </mx:ColumnChart>
        <mx:DataGrid dataProvider="{dp}" width="100%" height="100%" includeIn="data">
          <mx:columns>
            <mx:DataGridColumn dataField="DTSALE"/>
            <mx:DataGridColumn dataField="NET"/>
            <mx:DataGridColumn dataField="GROSS"/>       
          </mx:columns>
        </mx:DataGrid>
      </s:HGroup>
    </s:Application>

    I found a workaround.
    When the chart goes through a state change, the “maximum” property on the additional vertical axis defined at the series level defaults to 100 causing the line not to render as the data values are greater than 100.  Setting this to a higher value (maximum="10000" ) forces the line to appear consistently after a state change.
    I still believe this is a bug.
    The downside is that I will have to dynamically determine the maximum vale to use at runtime, but at least I can still use state changes on two vertical axis charts.

  • CSS-11503 ISC State Change:DOWN

    I'm curious what kind of network errors caused my CSS to have a ISC State Change. Appears all services went down/suspended. Running 8.10.4.01 back to Catalyst 6509.
    After a couple days of running my CSS stops, troubleshooting what's going on.
    show
    02/03/2010 13:37:21:Enterprise:ISC State Change:DOWN, port-1 fail = No Physical Link, port-2 fail = No Interface Assigned
    02/03/2010 13:37:21:Generic:Virtual Router 9 down on interface 10.0.2.238
    02/03/2010 13:37:21:Generic:Virtual Router 100 down on interface 10.0.35.3
    02/03/2010 13:37:22:Enterprise:Service Transition:MATRIXPORTALQA_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:MATRIXPORTALQA_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf135 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf135 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf31 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf31 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf47 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf47 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_1350 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_1350 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_1354 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_1354 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_HOD_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_HOD_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_HOD_8999 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_HOD_8999 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_cmed -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_cmed -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_1350 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_1350 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_1354 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_1354 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_cmed -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_cmed -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws134 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws134 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_1350 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_1350 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_1354 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_1354 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_HOD_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_HOD_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_HOD_8999 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_HOD_8999 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_cmed -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_cmed -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_1350 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_1350 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_1354 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_1354 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_cmed -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:us00hqws150_cmed -> down
    02/03/2010 13:37:23:Enterprise:Service Transition:us0999web135_80 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:us999web41_80 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:us999web46 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:us999web47_80 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:web110 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:web110 -> down
    02/03/2010 13:37:23:Enterprise:Service Transition:web111 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:web111 -> down
    02/03/2010 13:37:23:Enterprise:Service Transition:webface_ssl -> suspended
    02/03/2010 13:37:24:Generic:LINK UP for  1/1
    02/03/2010 13:37:25:Generic:COLD START
    02/03/2010 13:37:32:Generic:Virtual Router 9 idle on interface 10.0.2.238
    02/03/2010 13:37:32:Generic:Virtual Router 100 idle on interface 10.0.35.3
    02/03/2010 13:37:32:Generic:Virtual Router 9 backup on interface 10.0.2.238
    02/03/2010 13:37:32:Generic:Virtual Router 100 backup on interface 10.0.35.3
    02/03/2010 13:37:52:Generic:Virtual Router 9 master on interface 10.0.2.238
    02/03/2010 13:37:52:Generic:Virtual Router 100 master on interface 10.0.35.3
    02/03/2010 20:46:18:Enterprise:ISC State Change:DOWN, port-1 fail = No Physical Link, port-2 fail = No Interface Assigned

    I'm curious what kind of network errors caused my CSS to have a ISC State Change. Appears all services went down/suspended. Running 8.10.4.01 back to Catalyst 6509.
    After a couple days of running my CSS stops, troubleshooting what's going on.
    show
    02/03/2010 13:37:21:Enterprise:ISC State Change:DOWN, port-1 fail = No Physical Link, port-2 fail = No Interface Assigned
    02/03/2010 13:37:21:Generic:Virtual Router 9 down on interface 10.0.2.238
    02/03/2010 13:37:21:Generic:Virtual Router 100 down on interface 10.0.35.3
    02/03/2010 13:37:22:Enterprise:Service Transition:MATRIXPORTALQA_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:MATRIXPORTALQA_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf135 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf135 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf31 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf31 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf47 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:newwf47 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_1350 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_1350 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_1354 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_1354 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_HOD_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_HOD_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_HOD_8999 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_HOD_8999 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_cmed -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws157_cmed -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_1350 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_1350 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_1354 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_1354 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_cmed -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00drws158_cmed -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws134 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws134 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_1350 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_1350 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_1354 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_1354 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_HOD_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_HOD_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_HOD_8999 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_HOD_8999 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_cmed -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws149_cmed -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_1350 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_1350 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_1354 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_1354 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_80 -> suspended
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_80 -> down
    02/03/2010 13:37:22:Enterprise:Service Transition:us00hqws150_cmed -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:us00hqws150_cmed -> down
    02/03/2010 13:37:23:Enterprise:Service Transition:us0999web135_80 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:us999web41_80 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:us999web46 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:us999web47_80 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:web110 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:web110 -> down
    02/03/2010 13:37:23:Enterprise:Service Transition:web111 -> suspended
    02/03/2010 13:37:23:Enterprise:Service Transition:web111 -> down
    02/03/2010 13:37:23:Enterprise:Service Transition:webface_ssl -> suspended
    02/03/2010 13:37:24:Generic:LINK UP for  1/1
    02/03/2010 13:37:25:Generic:COLD START
    02/03/2010 13:37:32:Generic:Virtual Router 9 idle on interface 10.0.2.238
    02/03/2010 13:37:32:Generic:Virtual Router 100 idle on interface 10.0.35.3
    02/03/2010 13:37:32:Generic:Virtual Router 9 backup on interface 10.0.2.238
    02/03/2010 13:37:32:Generic:Virtual Router 100 backup on interface 10.0.35.3
    02/03/2010 13:37:52:Generic:Virtual Router 9 master on interface 10.0.2.238
    02/03/2010 13:37:52:Generic:Virtual Router 100 master on interface 10.0.35.3
    02/03/2010 20:46:18:Enterprise:ISC State Change:DOWN, port-1 fail = No Physical Link, port-2 fail = No Interface Assigned

  • JTree - How do I fire a valueChange Event from a keyPressed Event?

    Hi,
    I have been stumped trying to figure out how to fire a valueChange event in my JTree from a keyPressed event.
    When a user changes tree node using the mouse a valueChange event fires. In my program the valueChange executes some code that must be done. I want to get my JTree to work, so that if a user is nagivating the tree using the keyboard, the code is only executed if they press the enter key.
    Below is a little demo program of what I am attempting to accomplish. Any suggestions would be greating appriciated.
    Thanks,
    Corey
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.KeyEvent;
    import java.awt.event.KeyListener;
    import java.awt.event.MouseAdapter;
    import java.awt.event.MouseEvent;
    import javax.swing.tree.*;
    import javax.swing.event.*;
    public class SimpleTreeDemo extends JFrame  {
      public SimpleTreeDemo() {
      public static void main(String args[]) {
        JFrame j = new SimpleTreeDemo();
        DefaultMutableTreeNode category = new DefaultMutableTreeNode("Top of JTree");
        DefaultMutableTreeNode leaf1 = new DefaultMutableTreeNode("leaf1");
        DefaultMutableTreeNode leaf2 = new DefaultMutableTreeNode("leaf2");
        category.add(leaf1); category.add(leaf2);
        final JTree jtree = new JTree(category);
        boolean bflag = false;
        jtree.addTreeSelectionListener(new TreeSelectionListener() {
             public void valueChanged(TreeSelectionEvent e) {
                  System.out.println("valueChanged");
                  if (bflag)
                       // Execute Code
        jtree.addKeyListener(new KeyListener() {
            public void keyTyped(KeyEvent ke) {
              System.out.println("keyTyped");
            public void keyPressed(KeyEvent ke) {
                 System.out.println("keyPressed");
                 if (ke.getKeyCode() == KeyEvent.VK_ENTER)
                      bflag = true;
                    // Fire valueChanged here!
            public void keyReleased(KeyEvent ke) {
                 System.out.println("keyReleased");}
        Container c = j.getContentPane();
        c.add(jtree);
        j.setSize(200,200);
        j.show();

    Try this, it works for me.
    // Tree Key Listener
          tree.addKeyListener(new java.awt.event.KeyAdapter() {
             public void keyPressed(KeyEvent e) {
                tree_KeyReleased(e);
    private void tree_KeyReleased(KeyEvent e) {
          try {
          int keyCode = e.getKeyCode();
          // Get the Tree Path
          TreePath selPath = tree.getSelectionPath();
          if (keyCode == e.VK_DELETE) { //KeyCode - 127
             removeSelectedNode(); // Remove the node
          else if (keyCode == e.VK_ADD) { // Key Code - 107
             tree.expandPath(selPath); // Expand the Node
          else if (keyCode == e.VK_SUBTRACT) { // Key Code 109
             tree.collapsePath(selPath); // Collapse the Node
          else if (keyCode == e.VK_ENTER) {
              // What Ever you want to do here
          else {
          } catch (NullPointerException ex) {
          //System.out.println("Null");
    [/code                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Catching a state change (enterState/exitState confusion)

    So I have an app with very clearly defined states, each represented by a custom component. All the main mxml file does is show the component pertaining to the current state. Each custom component can successfully dispatch a state change event. I have no problems (so far) actually changing between states. The problem is executing particular code inside of the custom component when the state changes. For example, I have a chat lobby component. Each and every time I enter that state, it needs to log in to the server. Whenever I leave that state, it needs to disconnect. I have tried enterState, exitState, hide, show, and nothing seems to work. creationComplete works for logging in, but obviously only the first time. Can somebody please help me understand how to accomplish this? I assume the problem has to do with a misunderstanding of how states and events work. Perhaps the enterState/exitState isn't working in the custom component because the actual state change is taking place in the root application. If that is so, then what can I do inside of the component to catch the entering and exiting? I realize that I could attach code to specific controls that do something specific before emitting the stateChange event, but I would really prefer a global solution if at all possible.
    This Flex n00b sincerely appreciates your time and assistance.
    Aaron

    Hey,
               Try to listen the this.addEventListener(StateChangeEvent.CURRENT_STATE_CHANGE,onStateChange) (Do this in the creation complete of the component which is changing the state)event, on handling this find out the current state something like
    function onStateChange(evt:StateChangeEvent):void{
    if(currentState == 'logoff'){
    //do logic
    }else if(currentState == 'login'){
    //do logic

  • Looking for on-run and automatic state change methods

    trying to get the mock application to run when you start it, no need to click or interact with it, also hoping to be able to jump to the next state when transitions are completed without needing any user interaction as well.
    Thanks
    -1k

    On Load is a global event on the whole application, as you discovered.  We don't currently expose an event for "timeline done playing."
    Here's an alternative to the workaround you came up with.  This is also not perfect, but more options never hurts :-)
    1) Put everything into a custom component
    2) Create states inside the custom component, with whatever animated transitions between them you want
    3) Back in the main app, add an On Load event that plays an Action Sequence
    4) In the Action Sequence's timeline, add Set Component State actions to walk the custom component through its various states
    5) Space these out far enough so that the component's animated state transitions finish playing before you jump to the next state
    - Peter

  • Receiving email notification of port state changes

    Hello
    I have a small SAN comprising 4 x MDS9509's and a Fabric Manager Server.
    The FMS is set to email fabric events, but it doesn't email on port state changes i.e. IF_DOWN_LINK_FAILURE and IF_UP. I'm assuming this is because they are not actual fabric changes.
    What is the best way for me to be able to receive email notification of these changes?
    Thanks
    Steven

    You can use callhome
    MDS(config)# ip domain-lookup
    MDS(config)# ip name-server
    MDS(config)# snmp-server contact
    MDS(config)# callhome
    MDS(config-callhome)# email-contact <[email protected]>
    MDS(config-callhome)# phone-contact
    MDS(config-callhome)# streetaddress
    MDS(config-callhome)# enable
    MDS(config-callhome)# transport email from <[email protected]>
    MDS(config-callhome)# transport email smtp-server
    MDS(config-callhome)# no destination-profile short-txt-destination alert-group All
    MDS(config-callhome)# destination-profile short-txt-destination alert-group Syslog-group-port
    MDS(config-callhome)# destination-profile short-txt-destination email-addr <[email protected]
    MDS(config-callhome)# no duplicate-message throttle
    Regards,
    Roman

Maybe you are looking for