Handling menu selection in multi states of states machine

Hi everyone,
My application uses states machine architecture, I have to handle menu selection in two different states and the 2nd of them has to be handled by the event case structure.
The problem is that when I use event structure in the 1st state it is also handled later by the event case in the 2nd state and it is impossible to handle menu selection in the 1st state by the "Get Menu Selection" block because according to it's descripton if event structure is configured to handle the same menu as item as this block, LabVIEW ignores this function.
I would be greatful for any clue.
Greetings,
Mariusz
Solved!
Go to Solution.

Thanks for respond.
Here's a code explaining the main idea.
Attachments:
Untitled 1.vi ‏9 KB
Enum_States.ctl ‏5 KB

Similar Messages

  • How to programmatically signaling Menu selection (User)

    I have an event case handling Menu selection(User) event. Now I wish to programmatically signaling the Menu selection (User). Is that possible in LV?
    WT
    LV2013SP1

    Well then you could have a state machine, where you go to the "Menu Selected" state when the event is generated.  Or you can choose to go to that state in your application whenever you want.  Now you don't have code duplication and have once case that handles doing the work, and you can get there from multiple methods.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • VLD-1119: Unable to generate Multi-table Insert statement for some or all t

    Hi All -
    I have a map in OWB 10.2.0.4 which is ending with following error: -
    VLD-1119: Unable to generate Multi-table Insert statement for some or all targets.*
    Multi-table insert statement cannot be generated for some or all of the targets due to upstream graphs of those targets are not identical on "active operators" such as "join".*
    The map is created with following logic in mind. Let me know if you need more info. Any directions are highly appreciated and many thanks for your inputs in advance: -
    I have two source tables say T1 and T2. There are full outer joined in a joiner and output of this joined is passed to an expression to evaluate values of columns based on
    business logic i.e. If T1 is available than take T1.C1 else take T2.C1 so on.
    A flag is also evaluated in the expression because these intermediate results needs to be joined to third source table say T3 with different condition.
    Based on value taken a flag is being set in the expression which is used in a splitter to get results in three intermediate tables based on flag value evaluated earlier.
    These three intermediate tables are all truncate insert and these are unioned to fill a final target table.
    Visually it is something like this: -
    T1 -- T3 -- JOINER1
    | -->Join1 (FULL OUTER) --> Expression -->SPLITTER -- JOINER2 UNION --> Target Table
    | JOINER3
    T2 --
    Please suggest.

    I verified that their is a limitation with the splitter operator which will not let you generate a multi split having more than 999 columns in all.
    I had to use two separate splitters to achieve what I was trying to do.
    So the situation is now: -
    Siource -> Split -> Split 1 -> Insert into table -> Union1---------Final tableA
    Siource -> Split -> Split 2 -> Insert into table -> Union1

  • A top level menu item should display its active state if any of its submenu items are active

    Example case: I'm designing a Muse site which is basically a portfolio of our work. We design books, doing page layout and covers. We have numerous book categories and sub categories which I put in a horizontal menu. When a given top level category menu item doesn't have a submenu, it is a hyperlink and it displays active state when the browser displays its linked page. But when a given page is displayed from a submenu link, its top level menu item does NOT display active state. I think it should.
    For example, we have a "Nostalgia" category which has "Film" and "TV" subcategories. Because the menu item, "Nostalgia" has a submenu containing "Film" and "TV", the label "Nostalgia" is not a hyperlink. The submenu attached to it has the two hyperlinked items "Film" and "TV". When the browser is displaying either linked page, the submenu is hidden. So it would be nice if the top level item, "Nostalgia" would display in an active state.

    Hello Daniel,
    As of now this feature is not there in Adobe Muse.
    I would suggest you to please log this as a feature request in our "Ideas for features in Adobe Muse" section. (http://forums.adobe.com/community/muse/ideas)
    Hope this helps.
    Regards,
    Sachin

  • How is the address selected in the Customer Account Statement (F.27)?

    Hi expert,
    The customer account statement (transaction F.27) uses the address which is in the customer master data.
    This is the customer master data on the company code level (Street, postal code, city).
    Is it possible to select the PO address (PO box , postal code, city) in the account statepment?
    This data is also available on the company code level.
    Thank you for your feedback.
    Kind regards,
    Linda

    Hi,
    Customer Account Statement uses the below program :
    SAP13: Customer statement (single statement)
    Copy the same and change accorndingly.
    Your requirement can be done with the ABAP changes
    VVR

  • Handling cascading LOV (having Multi-Select parent LOV)

    Hi,
    I am using cascading LOV.
    P1_PARENT - Parent LOV (which is multi-select)
    P1_CHILD - Child LOV
    since Parent LOV is multi-select, so it will have the following vallues... P1_PARENT = AA:BB:CC
    and the where clause in the cascading LOV should be like
           where col1 in (:P1_PARENT)
       - So how to convert item value for P1_PARENT from AA:BB:CC to 'AA','BB','CC'
    - Is there is any other way to handle cascading LOV (for Multi-Select parent LOV).
    select list for P1_CHILD
        select d, r
      from test
    where col1 = :P1_PARENT
    where col1 in (:P1_PARENT) Thanks,
    Deepak

    Hi Deepak,
    In the where clause for the child LOV, you can use instr function as:
    (instr(':'||:P1_PARENT||':',':'||col1||':',1) > 0 ) To access the individual elements in the multi-select :P1_PARENT, you can use:
    DECLARE
    l_selected HTMLDB_APPLICATION_GLOBAL.VC_ARR2;
    BEGIN
      l_selected := HTMLDB_UTIL.STRING_TO_TABLE(:P1_PARENT);
      FOR i IN 1..l_selected.count
      LOOP
            //  your code here...access individual elements using  l_selected(i)
      END LOOP;
    END;Thanks,
    Rohit

  • Get menu selection help

    Hi I am new to the Labview world and am having a bit of an issue with the get menu selection vi.  I opened an example (Queued Message Handler.vi) and basically copied that get menu selection setup in my vi.  Yet all i get for menu selections are null strings.  I have tried to set the get menu selection timeout to -1 then selecting a menu item.  I still get a null string from it so I know it isn't some timing issue.  I have attached a copy of my vi.  The runtime menu I was using was just File with an exit option.  There are a couple sub vi's that i made that are required to run Queue.vi but they arent really needed to see what I am doing.  Thanks for any help in advance.
    Attachments:
    Queue.vi ‏59 KB

    Hi Superseadragon,
    I recommend you to use an event-driven state machine desing pattern that combines a queued state machine and event structure into a hybrid single-loop design pattern.
    I made an example with your code but as I don't have your set up I put in commentary all the communication function.
    To close the VI click on the cross on the upper right corner like for a tradionnal application.
    You can fire an event from the run time menu. I included a case in the event structure. Have a look at it. This is not the only way to do it.
    Have fun with your algae!
    Charly
    It's always sunny in California! Certified LabVIEW Associate Developer!
    Attachments:
    SuperSeaDragon.zip ‏135 KB

  • Need sample code to get handle of Selected rows from ADF Table

    Hi,
    I am new to ADF. I have an ADF table based on VO object.On some button action,I need to get handle of selected rows in application module.
    If anybody is having sample code to do this then please share with me.
    Thanks,
    ashok

    wow now link http://blogs.oracle.com/smuenchadf/examples/#134 is working.thanks a lot.
    also the link http://baigsorcl.blogspot.com/2010/06/deleting-multi-selected-rows-from-adf.html is very useful. Thanks a lot for Sameh Nassar too.He made it clear that in 11g Select column is not available for a ADF table and provided a solution to get Select column.
    Thanks,
    ashok

  • How to handle table selection

    In the uix guidelines i found the following example on how to handle table selection:
    public static EventResult doSelectionEvent(BajaContext bc, Page page,
    PageEvent event)
    DataObject tableRows = new PageEventFlattenedDataSet(event, "table1");
    int index = SelectionUtils.getSelectedIndex(tableRows);
    String name = "Nothing Selected";
    // make sure that something was selected:
    if (index>=0)
    DataObject row = TABLEDATA.getItem(index);
    name = row.selectValue(null, "name").toString();
    EventResult result = new EventResult(page);
    result.setProperty("action", event.getName());
    result.setProperty("name", name);
    return result;
    It is not clear to me what TABLEDATA is.
    I read in some other thread that it is a DataObjectList and it represents the 'stored dataObjects'.
    I suppose '_TABLE_DATA' is not real code, may i ask for an example with real code to understand what it is?
    Thanks.

    This code works for me, I hope it is useful.
    (NB: i fear you will not read correctly the line
    with the getRowAtRangeIndex instruction. It's a problem with the editor).
    Mauro
    package view;
    import javax.servlet.http.HttpServletRequest;
    import oracle.adf.controller.struts.actions.DataActionContext;
    import oracle.adf.controller.struts.actions.DataForwardAction;
    import oracle.cabo.ui.beans.table.SelectionUtils;
    import oracle.cabo.ui.data.ServletRequestDataSet;
    import oracle.jbo.ApplicationModule;
    import oracle.jbo.Row;
    import oracle.jbo.ViewObject;
    public class GestEsAction extends DataForwardAction
    // To handle an event named "yourname" add a method:
    // public void onYourname(DataActionContext ctx)
    public void onValida(DataActionContext ctx)
    ServletRequestDataSet ds = new ServletRequestDataSet(req,"ReEsamiRichView12");
    int[] indices = SelectionUtils.getSelectedIndices(ds);
    ApplicationModule am = ctx.getBindingContainer().
    getApplicationModule();
    ViewObject vo = am.findViewObject("ReEsamiRichView1");
    int len = indices.length;
    String idEsameRich, currStato;
    for(int i=0; i<len; i++)
    Row row = vo.getRowAtRangeIndex(indices);
    idEsameRich = row.getAttribute("IdEsameRich").toString();
    currStato = row.getAttribute("Stato").toString();
    if (currStato.equals("E"))
    row.setAttribute("Stato","V");
    am.getTransaction().commit();
    // To override a method of the lifecycle, go to
    // the main menu "Tools/Override Methods...".

  • Programmatically simulate the Get Menu Selection vi

    Hi,
    I'm using LabVIEW 8.5 base version (no event handling). I have created a custom RTM (Run-Time Menu) and use the Get Menu Selection vi wired to a Case structure to handle all the items. (Part of the handling it to put a check mark next to the selected menu item and clearing the check mark from all other items using the Set Menu Item Info vi. Too bad it doesn't do that automatically. Maybe it does in newer versions, but I digress.)
    My application can save and recall setups. When I recall a setup I would like to programmatically call the respective Case, as is done by the Get Menu Selection vi, even though the menu is not actually clicked by the user. I cannot find a way to do this. Is is possible?
    Thank you.
    Ed
    Solved!
    Go to Solution.

    Edjsch wrote:
    Thank you for your reply. It looks like there is no convenient way to "simulate" a Windows "event" with the base version. Duh! 
    I'd take that a step further and say there is no convenient way to write software without the event structure.  I don't know how people write code without it.  This limitation has been removed and the event structure comes with all versions of LabVIEW as of 2012.
    As for my virtual keyboard trick, here is a better one I didn't get a chance to check the link previously.
    https://decibel.ni.com/content/docs/DOC-15310
    With that you can call a subVI that will invoke the Alt+F or whatever to open menus.
    Edjsch wrote:
    Note that in the Get Menu Selection vi's Case structure, I had to actually clear each check mark and set the one for the current selection, since the RTM does not handle check marks automatically, as, for example, Visual Basic does. Again, maybe newer versions do.
    They do not, you are welcome to make an idea exchange for it, but I'm fine with toggling that bit myself.  But then again I can't think of a time when clicking on a checked item, shouldn't uncheck it so I can see your point.
    Edjsch wrote:
    Let me know if anyone would like to see screen shots of that area of my block diagram.
    Never post screenshots. 
    When posting code post the actual code not a screenshot.  You wouldn't take a screenshot of a text file and post it on a text language forum.  Upload the actual VI, or zip several files and upload the zip.  The exception to this rule is when uploading a VI Snippet.  This is an image with the VI embedded in it, so the source is still intact.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Menu selection event

    Is there any way to generate a Menu Selection Event for a menu item that has a sub-menu?

    You can handle the "Menu Activation?" (Filter) event to set the menu item info before it is displayed.
    The attached VI has a custom menu. Set the "Checked?" boolean to the desired value and then activate the menu to see the effect.
    Attachments:
    Menu_Test.zip ‏9 KB

  • How to use common event handler for selected movie clips?

    I have a 50-state map in a flash movie. Each state is a movie
    clip.
    Goal: when mouse moves over a state or is clicked in a state,
    the state will be highlighted in a bright color and a small box
    will pop up near the state and display some information about the
    state.
    Question: I know I can add mouse event handler for each state
    movie clip. But this is simply not good since this has to be done
    50 times and codes thus scattered different places. Ideally, I only
    want to have one script that determines where the mouse position is
    when events trigged and then do right things (highlight the state
    and display info. in a pop-up). How can this be implemented?
    Thanks!

    There are a number of ways. Which way is best depends on how
    you have things set up so far.
    E.g. If they have an enumerable naming convention:
    e.g. each clip is like state_0 , state_1 etc.
    Then you can loop through them and assign them all to the
    same mouse event handler via the loop. You would need properties
    other than the name of the clip to identify the state. E.g. each
    clip could contain its own data or the index could be a pointer to
    the state data (objects with state name and info properties) in a
    separate array.
    //state clips named
    for (var i=0;i<50;i++) {
    this["state_"+i].stateindex=i;
    this["state_"+i].onPress= statePressHandler;
    var stateData:Array = [{name:"StateName,info:"this state
    Info"}, name:"StateName,info:"this state Info"}, etc...]
    function statePressHandler() {
    trace(this);
    trace(stateData[this.stateindex].name+"="+stateData[this.stateindex].info);
    Other ways are possible too but the best approach depends on
    how you have named the clips and whether you're creating them with
    code or whether they're already on stage from authoring (my guess).
    If they're already on stage and they're called "Alaska" etc, then I
    would be inclined to put them all inside a container clip that
    contains nothing else other than states. It would avoid the need
    for an array of clip names or for checking some other specific
    property of each clip to determine if its a 'state' clip and not
    something else in a for..in loop.

  • Menu Selection (App) catches Menu Selection (User)

    In 2010 I would use the same case in an event structure to handle both Menu Selection (App) and Menu Selection (User) events.
    I've recently upgraded to 2012 and started seeing duplicates of my User menu events. I separated the Menu Selection (App) and Menu Selection (User) events into separate cases. I still see duplicates. The event is being caught in both the Menu Selection (App) and Menu Selection (User) cases. (App) menu items are only caught in the Menu Selection (App) case. If I use Menu Selection? (App) I don't see the duplicate events.
    I don't like that solution as I would like to only have one case in the event structure to handle all menu events. Is there a fix short of upgrading to a new version?
    Thanks,
    Jason

    Jason,
    What you have found is a known bug in LabVIEW 2012.  I was able to recreate your issue and tried to find a workaround for what you were doing, but aside from simply building in logic to reject the menu selection event if it occurrs too close to the previous event, what you have found is probably the simplest solution.
    If this is a reason you choose to upgrade to a newer version you have not yet installed I will give you a friendly warning that this bug still exists in LabVIEW 2013 SP1 but seems to be fixed as of 2014.
    Matt J
    Professional Googler and Kudo Addict
    National Instruments

  • How to handle multiple selection in the Spark List control with checkbox as itemrenderer?

    Hi All,
    I am using checkbox as an ItemRenderer in spark list.
    I have a query.
    how to handle multiple selection in the Spark List control with checkbox as itemrenderer?
    how to retrieve the selected item label?
    Thank you in advance.

    Hi there, I'll tweak your code a little bit to something like this:
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    layout="vertical">
        <mx:Script>
            <![CDATA[
                 import mx.events.ListEvent;
                 import mx.controls.CheckBox;
               [Bindable]
               private var mySelectedIndexes:ArrayCollection=new ArrayCollection();
                private function onChange(e:ListEvent):void
                   if(CheckBox(e.itemRenderer).selected){
                             mySelectedIndexes.addItem(e.rowIndex);
                   }else{
                                  mySelectedIndexes.removeItemAt(mySelectedIndexes.getItemIndex(e.rowIndex));     
                   chkList.selectedIndices=mySelectedIndexes.toArray();
            ]]>
        </mx:Script>
    <mx:ArrayCollection id="collection">
            <mx:Object label="Test A"/>
            <mx:Object label="Test B"/>
            <mx:Object label="Test C"/>
            <mx:Object label="Test D"/>
            <mx:Object label="Test E"/>
            <mx:Object label="Test F"/>
            <mx:Object label="Test G"/>
        </mx:ArrayCollection>
    <mx:List id="chkList" dataProvider="{collection}" itemRenderer="mx.controls.CheckBox"  itemClick="onChange(event);" allowMultipleSelection="true"/>
    </mx:Application>

  • Lightroom trial doesn't show complete menu selections or import button.  Also get error message on launch:  An error occurred when attempting to change modules.  I am unable to find/see the following file to try renaming the SLCache and SLStore files:  Sy

    Lightroom trial doesn't show complete menu selections or import button.  Also get error message on launch:  An error occurred when attempting to change modules.  I am unable to find/see the following file to try renaming the SLCache and SLStore files:  System Library/Application Support/Adobe.  Any ideas?  I only have 16 days left on the trial and have been unable to get it to work on my Macbook Pro.  This is all I am seeing after Lightroom opens.  Thanks!

    Thanks to both of you for attempting to help.  I finally figured out what was wrong . . . it was a Permissions problem.  Very frustrating, but after scouring the troubleshooting tips I finally found the one that solved my problem.  I had to add a User and give it Read/Write privileges to Lightroom.  The file I had to add the User to was Hidden on my Mac, so that added an even bigger challenge to the mystery.  Only a few days left on my trial version!  I hope I have time to try it out!

Maybe you are looking for

  • Help needed in .EAR deployment

    Hi , I have developed a web application(.ear) using Sun J2EE Application Server. The application is working perfectly in Sun J2EE Application Server. The application have JSPs, Servlets, Java Beans & EJBs. I want to deploy the application on Oracle A

  • Populate information when double click on the field name

    I have this tree structure with the field names as shown at this picture. <a href="http://img164.imageshack.us/img164/426/treeaf0.jpg">http://img164.imageshack.us/img164/426/treeaf0.jpg</a> When I double click on the field name, I would like to popul

  • Regarding seeburger adapter??

    Hello guys My client is going to implement EDI messages to SAP XI to SAP ERP .It would be great if you let me know the step by step proceedure ?? wht is the use seeburger  BIC mapping tool here ?? wht is the configuration should be done at sender sid

  • trans-attribute in ejb-jar.xml

    Dear All, To improve performance of my EJB's, I wish to set trans-attribute as "Supports" for all my get methods and rest of the methods as "Required". Heres the snippet from my ejb-jar.xml which I'm using to achieve the same: ======== start ejb-jar.

  • Error 50: impossible to installa adobe creative cloude desktop. any suggest? thanks

    hi, in a first instance, i tried to do the upgrade of my adobe creative cloud destop, but i received the error number: A12E1. so, i see on the support site that i've to uninstall the cc, use the cleanup tool , reboot my desktop and download again the