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.

Similar Messages

  • Two soa domain with same name "TestSOADomain" sharing same SOA schema ?

    I tried creating two soa domain with same name "TestSOADomain" (different path) sharing same SOA schema .However one domain came UP to Running mode and other domain going to AdminMode and "soa-infra" application of that domain is not active.
    I do want to understand can this be possible with SOA ,ie. two soa domain sharing same SOA schema ?
    If possible what are all the problems might come
    1. While executing soa composites with asyncronous behaviour ?
    2. How the polling services will work ?
    3. will the XREF_DATA table ROW_NUMBER column inserted uniquely while inserting data from two different domain into same SOA schema ?
    4. Other issues ?
    Thanks

    Each domain is expected to refer to its own unique database schema. Same SOA schema should not be shared by multiple SOA clusters/domains. It is technically possible though, I suppose, and still can run fine any one SOA environment at any given time with the other SOA environments/domains (sharing the same SOA schema) shutdown. It is not the general/recommended practice to share SOA schema across domains and there could be potential implications and unexpected behavior, particularly when the SOA environments pointing to the same schema are all running at a time.

  • Can I have two Aperture projects with same name?

    Hi. I'm new to Aperture and an advanced iPhoto user. I started using Aperture sharing the same library with iPhoto (that new functionallity).
    I've read lots of manuals and tutorials (Apple's and others) as well as this support topics. I understand iPhoto Events are now Aperture Projects and I've read a lot about how should it be organized and so on.
    My problem is: I got, for example, 4 iPhoto Events with the name "Friends". The appear in Apperture as 4 Projects named "Friends". I decided to rename one of them and the I came back to "Friends" name. Aperture won't let me: it appends "(1)". It seems I cannot name to Projects the same way, although I have that.
    Before: Friends, Friends, Friends, Friends
    After renaming one of them and trying to get back to original name: Friends, Friends, Friends, Friends (1)
    I have that duplicated name because it is like a title, photos of my friends in different time (one Friends is from 2005, other from 2010, and so on, for example).
    It seems pretty bad I have to come up with a new name for each new Project, considering I have hundreds of them today. Any tips? Thanks.

    If there is nothing separating the images then put them all in the same project. If you have a project Friends you know all your friends images are in there and you can find the ones you want by date or keyword or even Face.
    There is no requirement to have the images from different times at the bar to be in different projects. I personally wouldn't work that way but if having a project called Friends at Bar works for you then place all the images of your friends at the bar in that project.
    Of course another way to look at this is to use albums to pull all the images of your Friends at Bars together. Don't have the name of the project organize your library, create albums and/or smart albums to collect the images into meaningful groupings.
    regards

  • Reflection - Two packages/classes with same name

    Hi There !
    I am in a situation and I need some help, if anyone can help me.
    I have two tools to work with different version of a server application. Now, the admin wants to have only one tool to work with both server app.
    The problem is that the server app has a jar file with the API to be used to access it. One jar for each version.
    Inside those jars files I have the same package and the same class ! But the implementation is diferent. So I will need to access one jar when accessing the old server app and another jar to access the new server app.
    I have no idea how to do it.
    I search arround google and I found that I can load a class at runtime and then with Reflection call its methods.
    I made a test app (simple, just 2 different jars with same package and class name just printing a Hello World and Bye World) and it worked very well.
    But when I tried to apply this to my code, I realize that one class need the reference of the other class...
    For example, I have a class named Server and other called ServerStatus.
    The Server class do the connection to the server and the ServerStatus get some server information. But the method that give me this information has a argument asking for an object of Server... like this:
    Server serv = new Server();
    serv.connect();
    ServerStatus servStat = new ServerStatus();
    servStat.getServerStatus(serv);I tried to do this with reflection but in the part that I need to invoke the method getServerStatus, I do not have the name of the class that is the argument (in this case Server).
    Something like this:
       Method  m = serverClass.getMethod("getServerStatus", new Class[] {?????.class});
             result = (Boolean)m.invoke(server, new Object[] {serverStatus});Do you have any ideiias to resolve this ?
    Or something different from reflection to access two different implementations with same package and class name ?
    If you need any other information, please ask me..
    Thank you so much !
    Regards,
    Thiago

    Thiago wrote:
    Hi.
    But now, how can I handle the object (because the newInstance() return a Object object.... not the class that I want (Server, for example)).
    When you declare a reference to be something more narrow than "Object" you're telling the compiler what methods and fields the referenced object supports. With a dynamically loaded class you can't do that at compile time, because the nature of the class isn't known until you load it at runtime.
    That's why it's very handy if you know that the class you are to load implements some interface which is known at compile time. Then you can access the object through a reference to that interface.
    Otherwise there's really no option but to handle the object through reflection. Find methods with getMethod() on the Class object and invoke them with Method.invoke().
    There are tricks to impose an interface onto a dynamically loaded class at runtime, but they are just neat ways of working through reflection.

  • Problem in importing two different classes with same name...

    I have to import two different classes in my program with the same name....
    import org.apache.lucene.document.Document;
    import org.w3c.dom.Document;
    //    I AM USING THE DOCUMENT FROM W3C PACKAGE HERE....
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                     DocumentBuilder builder = factory.newDocumentBuilder();
                     InputSource is = new InputSource( new StringReader( tempString ) );
                     d = builder.parse( is );
                     NodeList images = d.getElementsByTagName("img");
                     int length = images.getLength();
                     for(int i = 0;i<length;i++)
                         Node image = images.item(i);
                         String tempAltText = image.getAttributes().getNamedItem("alt").getNodeValue();
                         altText = altText.concat(" ").concat(tempAltText);
                     }and the error i am getting is
    [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:20: org.apache.lucene.document.Document is already defined in a single-type import
        [javac] import org.w3c.dom.Document;
        [javac] ^
        [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:132: incompatible types
        [javac] found   : org.w3c.dom.Document
        [javac] required: org.apache.lucene.document.Document
        [javac] d = builder.parse( is );
        [javac] ^
        [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:133: cannot find symbol
        [javac] symbol  : method getElementsByTagName(java.lang.String)
        [javac] location: class org.apache.lucene.document.Document
        [javac] NodeList images = d.getElementsByTagName("img");
        [javac] ^
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 3 errorsany idea ..how to resolve it
    Edited by: ping.sumit on Jul 16, 2008 3:39 PM
    Edited by: ping.sumit on Jul 16, 2008 3:40 PM

    now i changed the code to
    import org.apache.lucene.document.Document;
    import org.w3c.dom.Document;
    org.w3c.dom.Document d = null;
    try{
         System.out.println("in author");
                   URL url = new java.net.URL(urlString);
                   java.net.URLConnection conn = url.openConnection();
                   BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));
                   while ((in.readLine()) != null)
                        //tempString = tempString.concat(in.readLine());
                        String temp = in.readLine();
                        tempString = tempString + " " + temp;
                   System.out.println("the string in author" + tempString);
                    in.close();
                    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
                     DocumentBuilder builder = factory.newDocumentBuilder();
                     InputSource is = new InputSource( new StringReader( tempString ) );
                     d = builder.parse( is );
                     NodeList images = d.getElementsByTagName("img");and their is only one error i am getting ...and that is
    [javac] C:\Documents and Settings\sumit-i\WolframWorkspaces\Base\WolframNutch\src\java\com\wolfram\nutch\indexer\InfoCenterFilter.java:20: org.apache.lucene.document.Document is already defined in a single-type import
        [javac] import org.w3c.dom.Document;
        [javac] ^
        [javac] Note: Some input files use unchecked or unsafe operations.
        [javac] Note: Recompile with -Xlint:unchecked for details.
        [javac] 1 error

  • Two mail accounts with same name and SSL not allowed?!

    Dear Common Wisdom:
    I have two accounts in my Mail program with the same web host. That means the outgoing mail server has the same name.
    If I put on SSL, though, it is not allowed to save two servers with the same name in two different accounts.
    Can I get around this and still use SSL for both accounts?
    Thanks!
    Kostas

    Each domain is expected to refer to its own unique database schema. Same SOA schema should not be shared by multiple SOA clusters/domains. It is technically possible though, I suppose, and still can run fine any one SOA environment at any given time with the other SOA environments/domains (sharing the same SOA schema) shutdown. It is not the general/recommended practice to share SOA schema across domains and there could be potential implications and unexpected behavior, particularly when the SOA environments pointing to the same schema are all running at a time.

  • Batch Rename - Two File Formats with Same Name

    Hi everyone!
    I'm having troubles using the batch rename function i Bridge CS5.
    I've got several pictures that I've captured in both jpeg and raw. When importing the pics with windows photo import they get the same name. This means that I've got one JPG and one RAW file which contains the "same" picture, and have same name as shown below:
    What I would like to do is to rename the pictures, but still have Bridge name the same pictures with the same name as shown below:
         IMG_1268.CR2          ->          Picture 2011 - 0001
         IMG_1268.JPG          ->          Picture 2011 - 0001
         IMG_1269.CR2          ->          Picture 2011 - 0002
         IMG_1269.JPG          ->          Picture 2011 - 0002
    Is this even possible? And if possible, how?
    Thanks in advance
    Martin

    Most things are possible and so is this..
    Make sure you do a test first by copying the files to a temp folder!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    First copy the script below and paste it into ExtendScript Toolkit (this gets installed with Photoshop)
    #target bridge
    var sels = app.document.selections;
    for(var a in sels){
    var f = decodeURI(sels[a].spec.name);
    var newName = "Picture 2011 - "+ zeroPad((f.match(/\d{4}/)[0]-1267).toString(),4)+ f.match(/\....$/);
    sels[a].spec.rename(newName);
    function zeroPad(n, s) {
       n = n.toString();
       while (n.length < s)  n = '0' + n;
       return n;
    Now open Bridge and select the files you want to rename, then run the above script from ExtendScript Toolkit.

  • Is it OK to have two SBS Servers with same name, on different subnets but connected over a VPN?

    Hi Everyone,
                       I'm just about to connect up two SBS 2011 Servers with the same server name but on different subnets & domains over a VPN.
    So for example both servers will have the name Server01, one would have an ip address of 192.168.85.5, the other 192.168.86.5, they both then would be connected over a VPN.
    Can anyone foresee any issues with this configuration, like DNS & DHCP requests, adding new machines to the domain, mapping drives etc.
    Many thanks,
    Nick

    Hi Larry & Strike First,
                      Thank you for your responses. I understand that this is an unusual situation. Basically I've recently taken over the IT support for this client. The client has just had a new phone system installed
    & are asking if they can speak to each office internally, which can easily be done once I setup the VPN.
    However I noticed whilst looking at this further that the Server names are the same, hence my question?
    Am I right in saying that providing the workstations  have a trust relationship with their own domain controllers through their individual domains on separate subnets, that hopefully there shouldn't be any DNS issues between the two domains and Servers?
    I could build a new VM if you feel it would be better practice to do so?
    Many thanks for your assistance,
    Nick

  • Two virtual disks with same name - how to safely delete one of them

    I mistakenly created a disk in a repository that uses the same friendly name as an existing disk that is in use by a virtual machine.
    Can I safely remove the second disk with out OVM trying to delete the original disk as well?
    Thanks

    Yes, you will be safe, bacause OVM uses the disk ID to identify the disk.
    You can also use the little triangle just to the left of the virtual disk name. It will open a message saying if disk is in use by a Virtual machine.
    Also, the GUI will not let you delete a disk which is in use.
    If you want another way, you can "edit" the disk in the OVMM GUI, read its ID, cancel the edit, and go delete it from a root command shell on the VM server.
    br.

  • Can't create calendar event with same name

    Hi everyone,
    I'm trying to track how often something happens using my calendar and having problems.  When I craete an event and call it star. The next time it happens I create a new event and call it the same thing but it erases the last star event. Even if I modify the name slightly and call the first one star 1 then the next event star 2, it will keep star 2 but erase star 1. The events are usually across different calendar months. Does anyone know why this is or how I can get round it? It's very annoying!
    I'm using an iPhone 4 iOS 7.1.2.
    thanks muchly

    Found solution, so simple...duh!  When I did the iOS8 update, it set the
    Calendar to default for Sync to "Events 1 Month Back".  Surprised it didn't set to default when I
    upgraded my iPad. 
    I searched and searched the web and forums for this problem
    and was surprised that I couldn't get any results.  Searched some more this a.m. and the answer
    was provided by Jesse Hollington 7/4/2012 on the iLounge forum. Thanks so much!

  • Two folder locations with same name

    I have Two "Local Disk (D:)" in the folders section of lightroom.  I have no idea how it got this way. When I expand each "Local Disk (D:)", there are unique subdirectories.  I would like to have everything under "Local Disk (D:)", how do I merge the two?  When I try to grab a subfolder and move it to the first "Local Disk (D:)", it tells me that the subfolder already exists.  See screenshot..

    This happens to me some times too. I'm on a Mac and my photos are on a Drobo S connected via FireWire.
    It seems that Lightroom doesn't like the Drobo as I frequently have problems locating it, having to re-link the catalogue, sometimes resulting with the problem above.
    Now I re-installed the OS the see whether that solves anything. But overall I'm finding Lightroom 3 to be a bit problematic compared to LR1 and 2, at least on a Mac.

  • How to separate two contact with same name

    Hi, anyone knows how to separate two contacts with same name in Contacts?  Actually they are two persons from two gmail contacts with same name but different contact numbers, different emails....etc, but Contacts assume they are same person and merge them as one!

    FG,
    In Lion, you have the File > Duplicate option. You will then have two copies of your document open, and the one on top will have the temporary filename "OriginalFileName copy", and your next responsibility is to File > Save (or Command-S) and rename the duplicate. At this point, you edit the copy's name, to perhaps ...copy 1, or whatever you wish. The document you had open when you initiated the File > Duplicate will still be there on your screen, waiting for you to Close it or continue editing.
    Jerry

  • Can i have xml elements with same name but one is having attrbt..?

    Hi all,
    I am suppose to take input from one system into BPEL.That system is auto gererating xml file. But that file is strange. It has two xml element with
    same name but with completely different sequence. First one is having two comlexTypes while second is having 5 simple types.
    Now the difference is First element is having attribute while second is not.
    So is that file is correct.?
    thanks a lot.
    /mishit

    can you post the file? or load the file into JDeveloper and check the syntax or use XMLSpy for validation of the XML.

  • How to get Unique calid for users with same name in multiple domain env..

    I found we need to use "-k legacy" option for creating users in non-hosted setup..
    I had two domains default as xxxx.com and the one that I created as yyyy.com
    When I have users with same name in two of the domains as user1..
    The calid for both of them is... user1 ....so they share the same calendar
    When Im in valid SSO of yyyy.com I get the mail account for user1 as [email protected] .....but the calid .. common as user1
    How I can get unique calid for users under two domains..
    whether I need to set Hosted domain support...Then how the mailid's differ with out using hosted domain support..
    And I need to login UWC without using @domain.com...
    Help me on this...
    Ashik

    Do you have UWC and Cal configured at least for virtual domain support?
    basically.. for discussion.. let's say you have three domains on your server.. 1st domain is the default domain. other 2 domains are virtual domains.
    if all domains were created with mail and cal support (-S mail,cal).. you would use the following options when creating users:
    1) for the default domain.. you must use the "-k legacy" option when adding users.
    2) for the other two domains.. when you create the user.. do NOT use a "-k" option.
    If you do not use the "-k" option.. it defaults to "hosted" which will cause the user's calid to be [email protected]
    If you Do use the "-k legacy" option.. it will create the calid as just "userid"
    With regard to logging into UWC without the @domain.com part of a username in a hosted domain.. the easiest way to avoid this.. is to point a host name under the hosted domain to the server.
    if you point webmail.xxxx.com to the server... and then access it via:
    http://webmail.xxxx.com/uwc/
    any users in the xxxx.com hosted domain will NOT need to use @xxxx.com when logging in... they can just use "userid"
    This feature does not take any special configuration (aside from adding a DNS entry for the hosted domain)
    Hopefully that helps.

  • Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Hello there - how can I share my iTunes library between two users on the same computer? I put the library in a shared folder between both and have selected this library on both as well, but when I update iTunes with music etc it only appears on one?

    Thank you Joe - I tried this but it's only showing a teensy amount of music - the stuff on the second users account as opposed to the giagntic library on the 'main' account. I actually went to a Genius Bar and they said that apple doesn't really want you to share music between accounts - parents don't want to hear their kids music etc. Which seemed strange, but it might be the case sadly   Thanks anyway!

Maybe you are looking for

  • How can I delete an iTunes account that has been deactivated?

    I deleted an old Apple ID with the help of a call to Apple Support.  However, my iphone is still trying to use the old ID.  How do I log out of the old ID and into the new?  Or, how can I delete the old ID when it has already been deactivated?  (Cann

  • How to connect an infocus projector LP530 to MacBook Pro

    We are trying to run slide show using an older IN focus projector (LP 530). .  Our lab top is a 3 year mac book pro . It's not recognizing. 

  • Excel cant find this file when double clicking to open

    Hi, Our Imacs 10.8.2 and 10.7.3 joined to windows 2008 domain cant open certain excel files from the network share. When double clicking the file or opening from excel -> file open it says it cant find the file. If I drag the file to the desktop then

  • Error when processing bapi_salesorder_createfromdata2

    Hi all,      when i am processing bapi  bapi_salesorder_createfromdata2 , i am getting an error that please enter sold to party or ship to party.In which parameter i need to assign these fields Thanks in advance Regards Jinesh

  • Camera raw not responding cs6?

    I am unable to open any jpegs in adobe camera raw. I have tried to open the camera raw preferences in bridge however it is unresponsive? I find this weird as I was previously able to open up any jpegs by right clicking on the selected image and openi