Same code for every state in event

Hello.
In my front panel there are some buttons that will give the same result each time they are pressed.
Exactly like menu items.
In every state of my FSM there is an event structure. Is it efficient to add a case for every menu item and buttons for every state?
Is there a way to add this functionality in just one case structure and then make it global somehow?
Thanks.

duplicate, continue here!
Best regards,
GerdW
CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
Kudos are welcome

Similar Messages

  • How to add add the code for the MouseEvent.CLICK event

    Could anyone help me who is a beginner please?
    I'd like to know step by step how to do the following
    instruction.
    I am trying to add a link to my flash.
    I drew a shape on the stage, select it and transform it to
    movie clip (hit F8 or right-click on it and select "Convert to
    symbol" from the popup menu or use the main menu: Modify ->
    Convert to symbol). I resized it as the same size as my stage, then
    make it transparent.
    Then I am supposed to do the following in order to create a
    link.
    "add the code for the MouseEvent.CLICK event that would open
    a url using the navigateToURL() function."
    But I just don't know how to. Could anyone tell me step by
    step approach please?
    Thanks in advance.

    Yes, click the frame where you have the button on stage and
    open the actions panel. paste the script in, and make sure whatever
    instance name you gave the button, you plug into the script. Also,
    the function declaration should be like so:
    function callFunction(e:MouseEvent):void{ <-- 'e' can be
    anything you want, it could be 'kfjeiwajfkd' for that
    matter.

  • To use the same code for many movieclips

    Dear all.
    I am using the flash to build my personal book online. I need zoom  many movieclip, my images.
    i make the code and function perfectly. But I want to find a way to use the same function for all movieclips and so, mantaining my code clean.
    mc_01.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, Drag);
    mc_01.addEventListener(MouseEvent.MIDDLE_MOUSE_UP, unDrag);
    mc_02.addEventListener(MouseEvent.MIDDLE_MOUSE_DOWN, Drag);
    mc_02.addEventListener(MouseEvent.MIDDLE_MOUSE_UP, unDrag);
    and many others....
    function Zoom(e:MouseEvent):void
            mc_01.x = 0;  //I try here for this.x but the previews movie, called "Books" is who have changed your x value.
            mc_01.y = 0;
    I
    EDIT: For untangle, the previews movie is called MyAllPhotos and then, contain all movieclips that are each movie clip is one my images

    Hi Mr Kglad.
    And when I call a property like a X position I use this["mc_"+padF(i)].x = 0;  for substitute the mc_01.x = 0 ?
    My problem realy is inside the function. Your loop add an event to my clips and direction to function Drag and UnDrag.
    But inside in this functions, I need get some informations for the clip.
    Here the code:
    function Zoom(e:MouseEvent):void  //Sorry, but the correct name my functions is Zoom and not Drag and unDrag
               var mod:Number = 50;
               mc_01.scaleX += e.delta / mod; //in this name mc what I need to use? this, parent? I try and not function.
               mc_01.scaleY += e.delta / mod;

  • Error handling return code for Provide Statement

    Hi Experts,
    For select statement we have error handling return code sy-subrc.
    What is the error handling return code for provide.. end provide statement.
    Thanks,
    Ragu

    Ragu,
    Same thing.
    Check sy-subrc.
    sy-subrc is the return code for all ABAP statements as far as I know.
    Regards,
    Dilek

  • Replacement code for Translate statement in latest version

    Replacement code for
    TABLES XXXX  USING <r> LIKE <r>
    TRANSLATE <r>-<fieldname> TO UPPER CASE.
    <r> is a structure

    Hi,
    TRANSLATE ... TO UPPER/LOWER CASE
    TRANSLATE ... USING
    The arguments of these instructions must be single fields of type C, N, D, T or STRING or purely character-type structures. There is a syntax or runtime error if arguments of a different type are passed. A subset of this function is provided with the addition IN BYTE MODE for processing byte strings – that is, operands of type X or XSTRING. A statement such as CONCATENATE a x b INTO c is thus no longer possible when a, b, and c are all character-type, but x is of type X.
    TRANSLATE ... CODEPAGE ...
    TRANSLATE ... NUMBER FORMAT ...
    The above statements are not allowed in Unicode programs
    <b>Reward points</b>
    Regards

  • Run same code for didSelectRowAtIndexPath & accessoryButtonTappedForRowWith

    Is there a way to call the other method from one of this even so that I do not have to duplicate the same code in both these events?
    Basically if the user taps the row or the cheveron button the same code should run,
    so is there a way to trigger an event of accessoryButtonTappedForRowWithIndexPath from inside didSelectRowAtIndexPath?
    TIA
    Raj

    The following should work:
    - (void)tableView:(UITableView *)tableView accessoryButtonTappedForRowWithIndexPath:(NSIndexPath *)indexPath {
    [self tableView:tableView didSelectRowAtIndexPath:indexPath];
    Andreas

  • Code for select statements needed

    Hi Please give the code for this
    Code (BUKRS), Vendor (LIFNR), Vendor Name (ZNAME1), PO_Date (AEDAT), PO Creator (ERNAM) from EKKO table
    2. For the corresponding PO number (EBELN) from EKKO table, get PO Item Text (TXZ01) from EKPO table
    3. For the corresponding PO number (EBELN) from EKKO table, get PO_Iten_No(EBELP), from EKPO table
    4. For the corresponding PO number (EBELN) from EKKO table get the GR_Posting Dt(BUDAT) from EKBE table when PO History cat (HCT-EKBE) is equal to “E” .
    a) For getting the first GR Posting date and first Invoice posting date, sort the column (BUDAT) of table, get the 1st GR_Posting_dt(BUDAT) when PO History cat (HCT-EKBE) is equal to “E” AND get the 1st Inv_Posting_Dt(BUDAT) when PO when PO History cat (HCT-EKBE) is equal to “Q” For this corresponding invoice date (when when PO History cat (HCT-EKBE) is equal to “Q” ) get the invoice number (BELNR) .
    b) IF 1ST GR_POSTING_DATE < 1ST INVOICE_POSTING_DATE, DO NOT DISPLAY THE RESULT
    5. For the corresponding PO number (EBELN) from EKKO table and Invoice_No (BELNR) (from step4,a),get Inv_Creator (ERNAM), Inv_Amount(REEWR), Currency (WAERS) from EKBE table when PO History cat (Hct-EKBE) is equal to “Q”

    You might try reading the docs. There's a method selectAll() in JTextComponent

  • Using auto exposure give the same settings for every picture

    for some reason, aperture 3.0 has been giving me the same settings when using the auto exposure on raw files. i swear it wasn't that way when i first started using the program. regardless of the image, it always sets an exposure of 1.0 and a recovery of 0.0.

    GLITCHY GIMMICKS Just imported 2 raw & 2 Jpegs, Adj WB & Exp. on a raw. Then went to Library & turned on Quick Preview, went back to Adjustments and could still carry out adjustments. Went to another image and it still allows adjustments but the adjustments are being applied to the previous image. Typical Aperture Glitches. Apple would do better to get the stuff they have; working proper, before producing more and more GLICHY GIMMICKS Allan

  • When I record midi there are three layers of the same note for every note?

    Hi guys,
    Using Logic Pro 9. Mac OS X 10.6.8
    This is a problem that strangely goes away and comes back every so often so I want to be able to fix it permanently.
    My midi notes on the piano roll are being duplicated and sometimes tripled. I have to go through every note and delete the layers of notes to just get the one original layer.
    Can anyone suggest a fix?
    Kind regards,
    Max

    ok, just want to correct.  it appears that moving the region 4 beats to the right corrects the issue but only if I start playback from the beginning, If I drag the cursor to the start of the region then it must wait 4 beats till sound starts coming out of the speakers.  I also tried unchecking the 24 bit option in advanced preferences but that did not help either.  so it appears it is simply some kind of playback lag bug of some sort.  hoping it gets sorted since this makes it kind of aggravating to work with.  I tried opening the older 6.0.5 Garageband and it does not have this issue but for some reason I cannot create a new guitar track, i have to create a software instrument track then change it to a guitar track.  Also all my guitar amps are missing so it appears the older version is being slowly crippled with each new version of OS X.

  • How to make a US map with interactive buttons for every state ...

    I have a photoshop map of the unitedstates with the states seperated. what I would like to do is put this map in dreamweaver so that each state is a button....any ideas?

    imagemap
    best,
    Shocker

  • Same album for every song, HELP ME PLE

    No matter what song i play, it has this one papa roach album next to the song playing. I have no Papa Roach songs on my MP3. Its really making me angry that I can't fix it. Can some one help?

    If you rip the tracks off a cd the organizer will get the tags automatically. if you get the music from another source you are stuck with the tags that they put on it and yes you will have to change them one by one. unless someone else here knows a better way. I hope so cause i would sure like to know how to do it automatically, because most people dont know how to tag them properly (imho).

  • Results not updating for every row in BIpublisher

    Hi all I have a Bi publisher report that is updating the results for the first row and in the second row to update the results it is picking the values from the first column itself and using the same values for all the other rows.
    Here is my report format
    Month saves Total, for 30,60,90,120
    Jan
    feb
    Mar
    Total are the enrolls by each month and days shows after 30,60,90,120 how many are still active. Following eg should give an idea of exactly whats happening
    Eg:
    Total 30days 60days 90days 120days 150days 180days 210days
    ------------------------------------------------------------------------------------------------------------------------------------------------------------ Jan saves 330 287 274 270 263 262 259 257
    Feb saves 298 255 242 238 231 230 227 225
    Mar saves 291 248 235 231 224 223 220 218
    So what is happening is lets say for example there are a total of 330 enrolls in january and after 30days 287 are still active and after 60days 274 are still active after 90 270...... etc
    Am getting the January active values correctly.
    BUt going forward when I see the values for february The total enrolls for february is 298 and after 30 days which are active is not giving me the correct.
    It is substracting the same amount as jan. looking at the numbers it is substracting
    -43, -13,-4,-7,-1,-3,-2 for Jan which are the cancels after the consecutive days
    It is substracting the same amount for feb also but my actual cancels for feb are different it should be 45,12,8,9,2,2,
    It is doing the same for all the months.
    There should be a change in the code. Following is the XSL code am using in
    <?xdoxslt:set_variable($_XDOCTX, 'v_SavesCanceled', SAVES_CANCELED_COUNT)?>
    <?xdoxslt:set_variable($_XDOCTX, 'v_RtSaves', xdoxslt:get_variable($_XDOCTX, 'v_RtSaves') - xdoxslt:get_variable($_XDOCTX, 'v_SavesCanceled'))?>
    <?xdoxslt:get_variable($_XDOCTX, 'v_RtSaves')?>
    Actually the cancels should be updated for each row but its picking the same cancels for every month.
    Hope it is clear let me know if you need any further info
    Any help is appreciated.
    Thanks

    Thank you very much for your help. The rtf file sent worked and updating results as required.Thank you
    Thanks

  • Regular Expression Search for Case Statement in VBA

    Hi,
    I'm having trouble trying to use regular expressions in a case statement. I have a CSV spreadsheet of a server's netstat output and am trying to plot everything into Visio. I have been able to do that, however I'm not trying to expand this capability and
    resuse the same code for many different servers. 
    I have the mainServer variable set as a Variant and in my current example it is set as "INTPXY001" (internal proxy server 001). I have tried different regex statements for the potential to have INTPXY001 - INTPXY999, EXTPXY001 - EXTPXY999, and
    SVCPXY001 - SVCPXY999 in place of the Case "INTPXY001", but nothing I have tried seems to work.
    '========================================
    Set mainServer As Variant
    Set AppVisio = CreateObject("visio.application")
    AppVisio.Visible = True
    AppVisio.Documents.AddEx "", visMSDefault, 0
    AppVisio.Documents.OpenEx "server_u.vss", visOpenRO + visOpenDocked
    mainServer = ActiveSheet.Cells(1, 2) 'sets mainServer to INTPXY001
    With AppVisio.ActiveWindow.Page
    Select Case mainServer
    Case "INTPXY001"
    .Drop AppVisio.Documents.Item("SERVER_U.VSS").Masters.ItemU("Proxy server"), 2.25, 9.25
    Case Else
    .Drop AppVisio.Documents.Item("SERVER_U.VSS").Masters.Item(("Server"), 2.25, 9.25
    End Select
    End With
    '========================================

    You cannot declare variables As Variant in VBScript. All variables in VBScript are implicitly variants.
    If you are asking about VBA (Visual Basic for Applications), then you're not asking in the correct forum.
    -- Bill Stewart [Bill_Stewart]

  • Java SAX parser. How to get raw XML code of the currently parsing event?

    Java SAX parser, please need a clue how to get the raw XML code of the currently parsing event... needed for logging, debugging purposes.
    Here's and example, letting me clarify exactly what i need: (see the comments in source)
    public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
         //..Here... or maybe somewhere elsewhere I need on my disposal the raw XML code of
         //..every XML tags received from the XML stream. I need simply to write it down
         //..in a log file, for debugging purposes, while parsing. Can anyone give me a suggestion
         //..how can i implement such logging while the SAX parser only returns me the tagname and
         //..attributes. While parsing I want to log the XML code for every tag in
         //..its 'pure form', like it is comming from the server directly on the
         //..socket's input reader.
         if ("p".equals(qName)) {
              etc...
    }Than you in advance.

    YES!
    I've solved my problem using class RecordingInputStream that wraps the InputStream
    here is the class source code:
    import java.io.ByteArrayOutputStream;
    import java.io.FilterInputStream;
    import java.io.InputStream;
    import java.io.IOException;
    * @author Unknown
    class RecordingInputStream  extends  FilterInputStream {
         protected ByteArrayOutputStream sink;
        RecordingInputStream(InputStream in) {
            this(in, new ByteArrayOutputStream());
        RecordingInputStream(InputStream in, ByteArrayOutputStream sink) {
            super(in);
            this.sink = sink;
        public synchronized int read() throws IOException {
            int i = in.read();
            sink.write(i);
            return i;
        public synchronized int read(byte[] buf, int off, int len) throws IOException {
            int l = in.read(buf, off, len);
            sink.write(buf, off, l);
            return l;
        public synchronized int read(byte[] buf) throws IOException {
            return read(buf, 0, buf.length);
        public synchronized long skip(long len) throws IOException {
            long l = 0;
            int i = 0;
            byte[] buf = new byte[1024];
            while (l < len) {
                i = read(buf, 0, (int)Math.min((long)buf.length, len - l));
                if (i == -1) break;
                l += i;
            return l;
        byte[] getBytes() {
            return sink.toByteArray();
        void resetSink() {
            sink.reset();
    } Then here is the initialization before use with SAX:
    this.psock = new Socket(this.profile.httpServer, Integer.parseInt(this.profile.httpPort));
    this.out = new PrintWriter(this.psock.getOutputStream(), true);
    this.ris=new RecordingInputStream(this.psock.getInputStream());
    this.in=new BufferedReader(new InputStreamReader(this.ris));
    try {
         this.parser = SAXParserFactory.newInstance().newSAXParser();
         this.parser.parse(new InputSource(this.in),new XMLCommandsHandler());
    catch (IOException ioex) {  }
    catch (Exception ex) {  }Then the handler class looks like this (it will be an inner class, so you can access ris, from the parent class):
    class XMLCommandsHandler extends DefaultHandler {
         public void startDocument() throws SAXException {
              //...nothing
         public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
              // BEGIN - Synchronized logging of raw XML source code in parallel with SAX parsing :)
              byte[] bs=ris.getBytes();
              logger.warn(new String(bs));
              ris.resetSink();
              // End logging
              if ("expectedTagThatTriggersMeToDoSomething".equals(qName)) {
                   //...Do smth.
    }Edited by: patladj on Jul 3, 2008 12:30 PM

  • Compiling code for LPC2378 Target using LV Embedded

    Hi
    I am using LabVIEW embedded for ARM 10 and using MCB2370 evaluation board. I did my evaluation successfully but now when I tried to compile the same code for an lpc2378 target (tier 2), I am getting "Error: Application is too large for target memory. Status: Build failed."
    I am only doing serial communication using com 0 and using no other peripherals that are custumized for MCB2300 target.
    what should I do to resolve this issue?
    thanks and regards!
    Mani

    Hi scg,
    I took a look at your file and researched a little bit about your issue, I have not been so lucky with the research since most of the doceuments are related to previous versions of the software, nevertheless it is also what makes me think that the file might be corrupted or some issue related to it so and I have found some tests that you could try:
    1. Create a new FPGA file with your code on it and compile it again.
    2. Turn off the firewall and compile again 
    3. Restart the compiler Services
    Hope you might find this information helpful!
    Regards,
    S.Jimenez

Maybe you are looking for

  • File Adapter - Error creating archive directory adapter file

    Hello, I've a interfase File to RFC. In sender CC i have Archive Directory. It occurs the follow error: Error creating archive directory adapter file The archive directory exists. any idea? thanks very much

  • Can't set netsh int tcp set supplemental

    Hello! Seems like I can't operate within netsh int tcp set supplemental preferences. When I try to set congestion provider the 'old way' with "netsh int tcp set global congestionprovider=ctcp" in elevated command prompt, Windows 8 saying that I must

  • Can't get menu items to be displayed

    Hello, The answer to my problem is probably quite simple but I can't see it and its driving me crazy, basically I can't get my menu items to be displayed like file, create and search. But what ever I add to the file menu items like open or save isn't

  • Execute unix shell script using DBMS_SCHEDULER

    Hi, I am trying run to shell script using DBMS_SCHEDULER. 1) I check..nobody user exist on my HP-UX. 2) I check externaljob.ora on (10.2.0.2.0) also..It has an entry.. run_user = nobody run_group = nobody 3) I created job successfully and enabled it.

  • My Macbook Pro (bought in 2013) function keys are not working

    My Macbook Pro (bought in 2013) function keys are not working. The function keys ie the volume and brightness are not working at all both with one single tap and with the function button. I have checked the settings for the keyboard but nothing seems