User Events Generation - TicTacToe

Hey everybody,
In order to get a better understanding of how the event structures are used, I have been playing around with making a tic tac toe game (ironically, i did not know that was a coding challenge until I just started this thread). 
Anyways, the way I'm doing it is by dynamically registering a mouse move event during mouse down on a boolean control (your game 'marker').  Then when the control is moved overtop of an activex container the boolean lights up.  Right now, however, it only works for one of the game pieces ('Dot 8').
My question is this, can someone please show me how to create a user event?  I want to create an event where when any boolean control's position is within the bounds of the activex containers it will light up.  I could do this manually with a whole lot of logic (you'll get the idea if you check out the code) but that is rediculous and wouldn't help my learning exercise at all.
Thanks so much for the help!
Jonathan
(Code is attached)
Attachments:
events.vi ‏107 KB

If you want to look at the code of my interface posted HERE, See attached (LabVIEW 7.1). It uses simple mouse-down events on the array indicator to determine where to place the correct piece.
Enjoy!
(Disclaimer: The code is not fully tested and documented. There could be bugs There is also room for improvements)
LabVIEW Champion . Do more with less code and in less time .
Attachments:
TTT-Trainer3.zip ‏2139 KB

Similar Messages

  • Steps to develope user name generation event handler in OIM 11gR2

    Friends,
    Can you please provide me steps to develop user name generation event handler in oim 11gR2?
    Thanks,
    Chakri

    Thanks for providing the detailed steps. This is waht i was looking for.
    I will follow these steps and let you know the results.
    Thanks for your support.

  • How to use "User Events" in different parts of an application

    Hi,
    "You programmatically can create and name your own events, called user events, to carry user-defined data. Like queues and notifiers, user events allow different parts of an application to communicate asynchronously. You can handle both user interface and programmatically generated user events in the same Event structure."
    What you read was part of labview 7.1 user manual ( Chapter 9 - pg.12 ). I've some problems with the underlined sentence. I hope someone can help me.
    When using Queues, the programmer may use a named queue everywhere in the application. there is no need to wire queue reference among VIs or using global variables to store queue reference. the name of the queue will be all that you need. I wonder if it is also possible with a event refnum that is the output of "Register for Event" node. As far as I've tested. the answer is Negative! I tried to copy-paste refnum in front panels and using the same name. but there is no connection between event refnums.
    LV User manual claims that user events can be used like queues, but it doesn't seem so.
    Does anybody have an idea?
    Best Regards.

    I didn't look at Damien Gray's presentation recently, but if I remember it correctly, it is on a much higher level than what I meant, because it refers to LARGE application. This is a very simple one.
    Using a functional global is not problematic CPU-wise, nor memory wise (unless you get into really big data structures, like hundreds of MBs), so you shouldn't be afraid to use it. I'm also not sure why you're afraid of the loop. The loop is only there to "hold" the USR. It only runs once. If you want, you can replace it with a for loop that runs once. I've recently learned that apparently, you can also get rid of the loop and use a local variable (look at the example called XY chart) instead of a USR. I don't think a local variable should have any more impact than a USR, but that needs to be tested. It can definitely be more convenient for some VIs where you don't have to wire the SR through the entire VI.
    Anyway, you will need to have an "obtain ref" VI which will hold a 1D array of names and a corresponding array of refs. Then, you search the array for the name, and if it finds the name, it extracts the correct reference. You will also need a way to input references and names into the array and possibly a way to empty the array. You may need to have 2 levels - the inner VI will be the LV2 VI and the parent will be the obtain ref\fill array\close VI. You will need some error handling as well - what happens if you search for a name and it can't be found and so on...
    Hope this helps.
    Try to take over the world!

  • How to Trigger SY-UCOMM User Event  in ALV

    Hi Folks,
    Currently I have a classic ALV report where I need to remove all the standard ALV buttons and replace it with one custom button.  Given that, there is a parameter in REUSE_ALV_GRID_DISPLAY that deals with the user command event.  But during the debug/execution of the custom button, the value of sy-ucomm(R_UCOMM in my example below), is always blank.
    Moreover, I did some relevant search here in SDN also before I paste my F1 here.  If you're going to take a look at my code below, it's exactly the same as what the other relevant topic in user event in ALV.
      PERFORM pf_status_kanban  USING rt_extab.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
        EXPORTING
          i_callback_program       = w_repid
          i_callback_top_of_page   = 'F_TOPOF_PAGE'
          i_callback_pf_status_set = 'PF_STATUS_KANBAN'  "Exclude ALV standard buttons      
          i_callback_user_command  = 'F_USER_COMMAND'     "Subroutine for SY-UCOMM
    *      i_callback_top_of_page   = 'TOP_OF_PAGE'
          is_layout                = t_alv_layout
          it_fieldcat              = t_alv_fcat[]
          it_sort                  = t_alv_sort
          is_variant               = t_gs_variant
          it_events                = t_events            "Events for AT USER-COMMAND
    *      IT_EVENT_EXIT            = 'AT USER-COMMAND'
        TABLES
          t_outtab                 = t_output.
    FORM F_USER_COMMAND  USING    p_r_ucomm   LIKE sy-ucomm
                                  rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
        WHEN 'DOWNLOAD'.
          PERFORM f_generate_col USING t_output.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    " F_USER_COMMAND
    FORM F_USER_COMMAND  USING    p_r_ucomm   LIKE sy-ucomm
                                  rs_selfield TYPE slis_selfield.
      CASE r_ucomm.
    *    WHEN 'EXCEL'.
    *      PERFORM f_generate_col USING t_output.
        WHEN 'DOWNLOAD'.
          PERFORM f_generate_col USING t_output.
        WHEN OTHERS.
      ENDCASE.
    ENDFORM.                    " F_USER_COMMAND
    Thanks and regards,
    Jaime

    Hi Martin,
    Yes, I ensure that the function code in my custom button is exactly the same as the condition for the sy-ucomm.
    The call routine for the PF_STATUS_KANBAN is just a test since it seems like Iu2019m chasing a phantom issue here.
    Yes, w_repid is set correctly.
    DATA:
    w_repid LIKE sy-repid.                                              "Report ID.
    INITIALIZATION.
      w_repid = sy-repid.
    It seems like the documentation im reading
    Parameter R_UCOMM contains the function code triggered. is not happening as expected...
    Thanks.
    Jaime
    Edited by: Jaime Cabanban on May 7, 2009 10:16 AM

  • Event Handler/Cr​eate User Event bug

    This is a problem I've run into a few times on my system (Win2k) so I finally went back and reproduced it step by step since it wasn't too hard. It causes LabVIEW to crash and exit without saving.
    - Create an Event Handler
    - Place 'Register Events', wire output to dynamic event terminal
    - Place 'Create User Event', wire output to 'Register Events'/User Event
    - Place an Empty String Constant [""], wire to input of 'Create User Event'
    - Set empty string property -> Visible Items > Label = True
    - Rename label from "Empty String Constant" to other such as "Event"
    OR
    - Create a cluster constant with something in it
    OR
    - Place a boolean constant
    - Set boolean property -> Visible Items > Label = True
    - Name label something su
    ch as "Event"
    - 'Add Event Case...' to the Event Handler, select Dynamic / : User Event
    - Delete the constant wired to 'Create User Event'.
    - Place a constant of a different data type and wire it to the input of 'Create User Event'
    LabVIEW immediately disappears (all changes are lost) and this error is displayed:
    ================================
    LabVIEW.exe has generated errors and will be closed by
    Windows. You wlil need to restart the program.
    An error log is being created.
    ================================
    If there is a more appropriate place to post things of this nature that don’t really add to the discussion group, but need to be brought to the attention of NI, please post a URL or submittal method. Thanks...

    Thanks for the detailed request. We are aware of this exact issue, and the problem was actually fixed for LabVIEW 7.0 for Mac/Unix. Unfortunately, it did not get fixed for the initial release of LabVIEW 7.0 for Windows, but we have plans to include the fix in the first LabVIEW patch for 7.0.
    Also, the Discussion Forum is great for notifications of this kind. For future reference, you also have the options of emailing NI engineers directly, or calling us with suspected bug fixes, if you would like more direct communication.
    Thanks again, and have a great day!
    Liz Fausak
    Applications Engineer
    National Instruments
    www.ni.com/support

  • Jobs are going to released state after the PC triggers with user event.

    HI BI experts,
    We are facing issue with event scheduler using user event in the process chains. Some Jobs are not starting immediately with the event and reaching release state. These released jobs are never starts in near future. Also cannot start manually due to event periodic jobs.
    No log is availble in SM61 due to settings.
    Please let me know your suggestions and this issue.
    Regards,
    Mohan.

    HI BI experts,
    We are facing issue with event scheduler using user event in the process chains. Some Jobs are not starting immediately with the event and reaching release state. These released jobs are never starts in near future. Also cannot start manually due to event periodic jobs.
    No log is availble in SM61 due to settings.
    Please let me know your suggestions and this issue.
    Regards,
    Mohan.

  • Responding to two user events with same name

    LV 2013, Win 7, & LVRT 2013, PharLap OS
    I have a situation where I create an ARRAY of User Events, one for each "domain" .  
    A "domain" is an area of DAQ: there is a SCXI domain, a CDAQ domain, an EtherCAT domain, several domains dealing with TCP instruments etc., about 25 domains all told. The name of the event is "New Channels This Domain".
    When a new configuration comes to the PXI from the host, I sort out the channels by their domain and generate a user event for whichever domains have channels that have changed: more channels, fewer channels, differences. If a domain has no channels that have changed, I do not generate an event for it.
    There is a handler for each domain: in that handler, I pick out the event for this domain from the array, and register to receive it.  I have an event structure that responds to the NEW CHANNELS THIS DOMAIN event.  Since it is an array, then no matter which domain I select, the name of the array is "New Channels This Domain".
    All this works fine.
    Now I have a situation where it makes sense to have one handler for TWO domains.
    I can pick out TWO elements of the array just fine, and register them both.   (See attached pic)  But now, in the EDIT EVENTS FOR THIS CASE list, I have TWO events called "New Channels This Domain".  I can select one for one case, and the other for the other case and it seems to work.
    --- Is there any heartache ahead with this scheme?  
    --- If I change the events in the clusters before, is it going to confuse LabVIEW?  
    --- Is there something I can do to change the name of the event after I pick it out of the array?  
    --- Is there something I SHOULD do at that point?
    Like I said, it seems to work, but I'm leery of it staying that way - I've had event structures disturbed before (LV2010) when changing cluster order.
    Steve Bird
    Culverson Software - Elegant software that is a pleasure to use.
    Culverson.com
    Blog for (mostly LabVIEW) programmers: Tips And Tricks

    CoastalMaineBird wrote:
    Thanks, Greg for that link.  I gave kudos to the idea of the COERCE TO TYPE function, and it seems like it would do the trick, but as of LV2014 it's still not on the palette.
    My question still remains: is it necessary?  Will the event structure remember that it's supposed to use the SECOND event named "X", through all edits and recompiles?  My guess is no, but I'll listen to alternative stories.
    I've been using the Coerce to type for this and enums in versions 2011 through 2014 since learning about it.  I've seen no issue using it in these cases.  I'm guessing it doesn't behave in an expected way for extreame uses which is why NI doesn't release it yet.
    As for would it always know to go to the second event if they are named the same?  My guess is yes.  They maybe named the same but they have different references.  I would think it would be just like having two controls with the same label.  You should never do this, but if you did, and made a local variables on one and wrote to it, it would always write to the correct control.  It would never write to the different control with the same name.  Now even if this is the case it could be confusing to a developer looking at the code, which is why I strongly suggest having unique names.  But if you don't I suspect every thing would work fine, just have a bold comment or something explaining what each case actually is handling.
    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.

  • Updating data in User Event doesn't propogate to uses of the User Event type

    So I have a user event which is seeded with a cluster in which there are a few typedefs. Now, as you might expect, I have to pass the user event to different VIs so that they can trigger the events which are interpretted by a main vi. Pretty simple and all is happy. There's one rub though: one of my vis which is passed the user event is called by reference. The call by reference vi requires a certain vi pattern when you create the reference for the vi (namely, a strictly typed vi reference), which includes the user event type. Now, sometimes, I update the typedefs in the data type of the user event. This means that user event type changes. Now, what's maybe not too surprising, is that either the user event type doesn't update with the type def or that the type specifier vi constant doesn't update with the change in user event type. This means that every time I have to go back and create a type specifier based on the updated pattern for the vi which takes the user event as an input.
    Is there a way for labview to automatically do this? One way to fix it, I'm sure, is to change the user event input into the vi I call by reference to a variant. Then inside the vi I call, to type cast the variant with the output of a Create User Event vi that has been seeded with the appropriate cluster of typdefs. But that seems pretty silly (like, why not just make EVERYTHING a variant). Any ideas?
    - Chris

    Take a static VI reference (from the app control palette), drag your subVI into it, right click it and make it strict and wire it into the type input for the Open VI Reference primitive. Now it should always update.
    Two more advantages you get from this is that now the VI is in memory, so it will automatically be included in your build and that you can use the VI Name (or VI Path) property from the static reference to get the name for the Open VI Reference primitive and it will always work correctly.
    Try to take over the world!

  • User event for array of waveforms with attribute

    I have been transferring data in a Producer/Consumer architecture via User Events.  The data consisted of an array of waveforms. When I added an attribute to the waveforms the code breaks with two errors about Create User Event: User event data type is unnamed or has elements with no names or duplicate names, and Contains unwired or bad terminal.
    From reading the help on user events it is not clear that arrays are even allowed: "user event data type is a cluster of elements or an individual element whose data type and label define the data type and name of the user event."
    From experimentation it seems that arrays of numerics and arrays of wavefroms without attributes work. A single waveform with an attribute can also be used. But an array of the same waveform with attribute leads to a broken run arrow. It also appears that I can put the array of waveforms with attributes inside a cluster and then create the user event.
    Is this a bug, an undocumented corner case, or some "feature" that I do not understand?
    Searching for User Event for Array of Waveforms generates some interesting, but mostly irrelevant results.
    Lynn

    tst wrote:
    Another option would be typecasting, but it looks like you can't typecast a waveform. Variant to Data or Coerce to Type might also work, but I haven't tried.
    I have also done the Flatten To String and Unflatten From String to send data around.  It would be preferable to not need to do that though.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines

  • Producer Consumer Subpanels, User events and DAQ

    Hello All,
    I am working on a Producer Consumer application and have beed looking at subpanels for user navigation. The application needs to be capable of responding to user generated events but also manage data received from attached data acquisition and control hardware. This is a 2 part question.
    I need to implement about 15 screens in this application and have started integrating subpanels. I need to be able to navigate from one subpanel vi to another using subvi buttons but dont understand how to build this functionality. Can I build functionlaity so that when I click on a subpanel loaded vi's button it will load the vi referenced by that button and the original dissappears.
    I have a 3 loop producer event template consisting of (1)data acquisition producer, (2) user event producer and (3) consumer loop but theres not much detail, are there any reasonable templates out there? I have seen the data- consumer and user-consumer but no mix of all 3.
    Advice appreciated
    Chris

    I use subpanels to host my display vi's and control them dynamically.  I would have a loop or vi process that manages your subpanel.  You could use user events, queues or notifiers to send messages to this subpanel manager to perform the basic functions such as loading a vi into a subpanel, removing a vi from subpanel (you can remove and stop the vi or keep the vi running in the background or even make it a floating vi.)  A subpanel button can create a local event which in turn could trigger a user event or message to the subpanel manager.  I have attached my subpanel manager to give you some ideas...
    Attachments:
    Subpanel Manager.vi ‏39 KB

  • How to use postlv user event in labview

    Hi sir 
     I am sending data labwindow cvi dll call to labview,for that we need postlv user event.please any one knows to use postlv user evenet in labview.
    Below will  be the  structureand i need to update in labview .
    typedef struct
    unsigned
    uDSPIO,
    // uDAQMode,
    // bControllerActive,
    bShutDown,
    bPowerOn,
    bPowerHi,
    bPowerFault,
    bSGIdle,
    bSGHold,
    uBitsIn,
    uBitsOut,
    uCycleCount,
    uCycResidue,
    uBlockCount,
    uLogChannels,
    uCurrentMode,
    uAsigndPhysCh[LOG_CHANNELS];
    float
    fSetPoint,
    fDAQRate,
    fRange[LOG_CHANNELS],
    fReadout[LOG_CHANNELS],
    fMax[LOG_CHANNELS],
    fMin[LOG_CHANNELS];
    char
    sChID[LOG_CHANNELS][32],
    sChUnits[LOG_CHANNELS][16];
    CTRL_CHANNEL_STATUS;
    Attachments:
    GDSCallback.vi ‏12 KB

    AThe fixed size arrays in your structure are inlined byt the C compiler. This means they are not an array pointer (and definitely never a LabVIEW array handle) but rather LOG_CHANNELS amount of unsigned ints and floats directly embedded in the structure. In LabVIEW terms this is most easily represented as a cluster with LOG_CHANNELS elements inside the main cluster.
    So basically your uAsigndPhysCh needs to be a cluster with LOG_CHANNELS elements of unsigned ints and  fRange,  fReadout, fMax and fin are clusters with LOG_CHANNELS single precision float values, and then sChID is a cluster with 32 * LOG_CHANNELS chars and sChUnits one with 16 * LOG_CHANNELS chars.
    However I would personally rethink this strategy. This huge cluster monster is passed into PostLVUserEvent() each time and copied into the event data on every event, causing quite a bit of overhead that way. Is it really necessary to post all this data every time?
    Also you have commented out uDAQMode and bControllerActive in your C structure but included it in the LabVIEW cluster which will certainly throw off your data. Last but not least the b prefix would probably indicate that you are only using that element as a boolean value, so why not consider to use bit fields there? In LabVIEW you can easily seperate those bitfields by either translating the resulting uInt32 into a boolean array or even more efficiently use boolean logic to detect the bits.
    And in order to let LabVIEW react on a user event you have to create that user event with the correct datatype (your cluster monster) and then pass the user event refnum to your DLL. This DLL then calls PostLVUserEvent() with the user event refnum as first parameter and a pointer to a data structure that matches the LabVIEW user event datatype EXACTLY whenever it wants to post an event to LabVIEW. The user event is also registered in an event structure in LabVIEW which will then get triggered everytime your DLL posts an event by correctly calling PostLVUserEvent().
    Rolf Kalbermatter
    CIT Engineering Netherlands
    a division of Test & Measurement Solutions

  • How to display a desktop file via a user event ?

    Hello All,
    Can anyone please suggest of a function module or any other method to display a desktop flat file through ABAP code on a user event.
    Thank you.
    Regards,
    Gaurav.

    Do you mean open a text file?  Take a look at this sample.  Point the parameter to some text file on your PC and click execute.  It should fire NotePad
    report zrich_0001
           no standard page heading
           line-size 300.
    data:
               ifile_table type table of file_table,
               xfile_table type file_table,
                return type i..
    parameters: p_file type file_table-filename
              default 'C:'.
    at selection-screen on value-request for p_file.
      clear ifile_table.  refresh ifile_table.
      call method cl_gui_frontend_services=>file_open_dialog
       exporting
          window_title       = 'Get File'
          multiselection     = space
       changing
          file_table         = ifile_table
          rc                 = return
       exceptions
          file_open_dialog_failed = 1
          cntl_error              = 2
          error_no_gui            = 3
          others                  = 4.
      read table ifile_table into xfile_table index 1.
      if sy-subrc  = 0.
        p_file = xfile_table.
      endif.
    start-of-selection.
      data: file type string.
      file  = p_file.
      call method cl_gui_frontend_services=>execute
        exporting
          document            =  file.
    Please remember to award points for helpful answers. Thanks.
    Regards,
    Rich Heilman

  • User event or event structure time-out

    Hi,
    I have two VIs one is a producer, one consumer.
    The consumer VI is called programatically (i.e. not wired) when the producer VI is run
    Both have user interfaces using an event structure.
    I have a control on the producer that i wish to use to trigger an event in/pass a value to the consumer VI. I have implemented this in two ways, but am not sure which is the 'preffered solution'.
    Solution 1:
    Detect  control activation in the producer VI using event structure, load new value in to a global variable.
    Use the time out event case in the consumer VI to load the value from the global variable.
    Solution 2:
    Set up a user event in the producer VI, load the Event Registration Refnum in to a global variable, use the event structure to create a new event when the control value is changed by the user.
    Use  Event Registration Refnum global variable in the consumer VI to trigger the event structure (loaded once, when the VI is first loaded).
    Solution two means the time-out event case does not need to be active, meaning the consumer VI will be doing nothing except waiting for either the user event, or direct user interaction. It will also not have the potential time delay of up to 1 x the time-out value of the event structure. It does require a sequenced start of each VI for the Event Registration Refnum to be loaded in to the global variable before the global variable is read by the consumer VI.
    My end application will be utilising a number of consumer VIs and will require user interaction information from the producer to be passed to them. Which proposed structure would be the generally accepted better practice? 
    ...or if i've missed the best solution, where should i be looking? 
    Thanks,
    Blue 
    (xp, LV 8.6) 

    Example of Queue based function Globals.To store the events and data.
    http://forums.ni.com/ni/board/message?board.id=170&message.id=240328#M240328
    Balaji PK (CLA)
    Ever tried. Ever failed. No matter. Try again. Fail again. Fail better
    Don't forget Kudos for Good Answers, and Mark a solution if your problem is solved.
    Attachments:
    AI Queue.vi ‏30 KB
    DAQmx AI.vi ‏59 KB

  • RE: (forte-users) Events in Interface

    I know, I've implemented similar structures in other locations as well,
    always without problems. I've even recreated the whole interface, building
    it completely from dragging and dropping methods and events from the class
    to the interface. Then I did a force compile of the whole workspace. It
    still doesn't solve the problem. There must be some combination of things
    that were different in the other circumstances, but I don't seem to be able
    to find it. It's definately not an error in the code. There something wrong
    in Forte internally, but I don't know which combination of factors causes
    it.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    -----Original Message-----
    From: Moris_Mihaildis/AUST/CSCcsc.com
    [mailto:Moris_Mihaildis/AUST/CSCcsc.com]
    Sent: Tuesday, April 03, 2001 5:00 AM
    To: Rottier, Pascal
    Cc: forte-userslists.xpedior.com
    Subject: Re: (forte-users) Events in Interface
    FYI. We are using Forte 3.0.J.4 and NT4.0 SP6, and have had no problems
    implementing your pattern.
    There should be no need for a fix (cast). There is something wrong with
    your interface.
    Regards,
    Moris Mihailidis
    Consulting
    CSC
    Level 4, 570 St. Kilda Road, Melbourne VIC 3004
    Ph: 61-3-95364675 Fax: 61-3-95364633 Email: mmihailicsc.com.au
    "Rottier, Pascal" <Rottier.Pascalpmintl.ch> on 04/02/2001 09:52:46 PM
    To: "'Forte Users'" <forte-userslists.xpedior.com>
    cc:
    Subject: (forte-users) Events in Interface
    We have the following scenario:
    There is a Service Object that acts as a Facade (Facade pattern) for 3
    manager classes that implement some business functions. Each of these three
    managers are stored as private attributes on this Service Object.
    For the sake of flexibility, these three private attributes are defined by
    their Interface, not their class. When the Service Object opens an Event
    Loop and registers for the events of one of these interfaces, the whole
    partition crashes. Even when using the running man in the development
    workshop, the whole partition crashes. The only way to fix that is to cast
    the Interface to a class that implements the interface before registering
    for the event.
    I know it's possible to register for events using an Interface that
    contains
    these events, rather then a class that implements the events. Of course, at
    runtime you do need a real instance of a class that implements the
    interface, otherwise you get a NIL-exception.
    Does anyone have any experience registering for events from Interfaces? Are
    there unexpected circumstances where it should work semantically, but still
    causes Forte to crash. We're using Forte 3.j.1 on NT 4.0 SP 6.
    Any help is appreciated.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

    I know, I've implemented similar structures in other locations as well,
    always without problems. I've even recreated the whole interface, building
    it completely from dragging and dropping methods and events from the class
    to the interface. Then I did a force compile of the whole workspace. It
    still doesn't solve the problem. There must be some combination of things
    that were different in the other circumstances, but I don't seem to be able
    to find it. It's definately not an error in the code. There something wrong
    in Forte internally, but I don't know which combination of factors causes
    it.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    -----Original Message-----
    From: Moris_Mihaildis/AUST/CSCcsc.com
    [mailto:Moris_Mihaildis/AUST/CSCcsc.com]
    Sent: Tuesday, April 03, 2001 5:00 AM
    To: Rottier, Pascal
    Cc: forte-userslists.xpedior.com
    Subject: Re: (forte-users) Events in Interface
    FYI. We are using Forte 3.0.J.4 and NT4.0 SP6, and have had no problems
    implementing your pattern.
    There should be no need for a fix (cast). There is something wrong with
    your interface.
    Regards,
    Moris Mihailidis
    Consulting
    CSC
    Level 4, 570 St. Kilda Road, Melbourne VIC 3004
    Ph: 61-3-95364675 Fax: 61-3-95364633 Email: mmihailicsc.com.au
    "Rottier, Pascal" <Rottier.Pascalpmintl.ch> on 04/02/2001 09:52:46 PM
    To: "'Forte Users'" <forte-userslists.xpedior.com>
    cc:
    Subject: (forte-users) Events in Interface
    We have the following scenario:
    There is a Service Object that acts as a Facade (Facade pattern) for 3
    manager classes that implement some business functions. Each of these three
    managers are stored as private attributes on this Service Object.
    For the sake of flexibility, these three private attributes are defined by
    their Interface, not their class. When the Service Object opens an Event
    Loop and registers for the events of one of these interfaces, the whole
    partition crashes. Even when using the running man in the development
    workshop, the whole partition crashes. The only way to fix that is to cast
    the Interface to a class that implements the interface before registering
    for the event.
    I know it's possible to register for events using an Interface that
    contains
    these events, rather then a class that implements the events. Of course, at
    runtime you do need a real instance of a class that implements the
    interface, otherwise you get a NIL-exception.
    Does anyone have any experience registering for events from Interfaces? Are
    there unexpected circumstances where it should work semantically, but still
    causes Forte to crash. We're using Forte 3.j.1 on NT 4.0 SP 6.
    Any help is appreciated.
    Pascal Rottier
    Atos Origin Nederland (BAS/West End User Computing)
    Tel. +31 (0)10-2661223
    Fax. +31 (0)10-2661199
    E-mail: Pascal.Rottiernl.origin-it.com
    ++++++++++++++++++++++++++++
    Philip Morris (Afd. MIS)
    Tel. +31 (0)164-295149
    Fax. +31 (0)164-294444
    E-mail: Rottier.Pascalpmintl.ch
    For the archives, go to: http://lists.xpedior.com/forte-users and use
    the login: forte and the password: archive. To unsubscribe, send in a new
    email the word: 'Unsubscribe' to: forte-users-requestlists.xpedior.com

  • Handling User Events in sub panel vis and main vis with same Event reference Number.

    Hi All, Iam trying to work to handle events in both subpanel vi and main vi.
    I have a main program, and 2 sub vi. I will load the sub VI in 2 sub panels in main vi. Each sub pael vi has controls on it.
    I have created 2 User events for 2 sub panels vi. One user event consits of a Cluster with 2 Booleans (x & Y) and Other User Event consists of cluster of 2 unsigned 8 Numbers (a & b). These are created and registered in the main Vi and event register refnum is passed to the subpanel vi from the main panel vi.
    I have Event structure in main panel and sub panel vis.
    In one sub panel vi, When the value of one boolean(i.e. X) in the clusters changes, the Events structure in sub panel vi should perform some operation in sub panel vi only. When the value of other boolean (i.e. Y) changes it should perform some operation in main vi. I will try to Generate user event with the x value and Y value changed based on the control clicks in the sub panel vi.
    The OTher panel vi should behave in the smae way when the a & b value changes.
    The "Generate User Event" is working fine some times and sometimes there in no event triggered in the sub panel vi or main vi.
    Please let me know what is the problem Ramesh.

    There is a lot of talking, but not much understanding.  It'd be better if you posted some example VI's of what you are trying to do so that the words will make sense.
    One thing I can tell you is that you don't want to have two event structures handle the same event reference number.  You want to have two event registrations with each one going to its own event structure.

Maybe you are looking for