Can a tab dialog get its contents from an enum?

Suppose you've got a simple enumeration of states ("Login", "Measure", "Save", "Logout").
You'd like to define that enum in one place and then use it as states in a state machine to keep track of what point in the process your program is in. You'd also like to use the same list of states for the pages in a tab dialog.
Now, in the world of reusable software, you'd like it if you could have the list of states defined in one place, and when you change it, it automatically updates the case statement for your state machine AND automatically adds/deletes/changes the pages on your tabs. Even if it wasn't 100% automatic, you'd at least like it to be a click on "update this object" or something, as opposed
to opening each object and changing the states that appear in a completely manual way.
As far as I can tell, I can't wire an enum to a tab control in any way. Is there a way to propagate the contents of an enum to a tab control?
The more I use LabVIEW the more I realize that resuse simply is not a real option, and this is a great tool for the quick&dirty but a terrible tool for anything that might evolve or modify over time.

It is tricky but you can have the enum to get its strings from the tab
strings.
Run the attached "TabtoEnum.vi" first to get the tab strings. Since the tab
control do not
have a Strings[] property like the menu enum, you have to get them on the
diagram where
the tab control resides.
Second you run SetEnumStrings.vi to change the enum Strings[]. Since
changing enum strings is edtiting stuff, the VI where the enum is located
must not be running.
Jean-Pierre Drolet
"Bmarsh" a écrit dans le message news:
[email protected]..
> Suppose you've got a simple enumeration of states ("Login", "Measure",
> "Save", "Logout").
>
> You'd like to define that enum in one place and then use it as states
> in a stat
e machine to keep track of what point in the process your
> program is in. You'd also like to use the same list of states for the
> pages in a tab dialog.
>
> Now, in the world of reusable software, you'd like it if you could
> have the list of states defined in one place, and when you change it,
> it automatically updates the case statement for your state machine AND
> automatically adds/deletes/changes the pages on your tabs. Even if it
> wasn't 100% automatic, you'd at least like it to be a click on "update
> this object" or something, as opposed to opening each object and
> changing the states that appear in a completely manual way.
>
> As far as I can tell, I can't wire an enum to a tab control in any
> way. Is there a way to propagate the contents of an enum to a tab
> control?
>
> The more I use LabVIEW the more I realize that resuse simply is not a
> real option, and this is a great tool for the quick&dirty but a
> terrible tool for anything that might evolve or modify over
time.
[Attachment SetEnumString.vi, see below]
[Attachment TabToEnum.vi, see below]
LabVIEW, C'est LabVIEW
Attachments:
SetEnumString.vi ‏33 KB
TabToEnum.vi ‏22 KB

Similar Messages

  • Get all content from iTouch to a new computer.

    My problem is very simple to explain, but I find no solution.
    My old computer is damaged and I cant use it anymore. So I bought a new one and I want to get all my stuff from the iTouch to iTunes on me new computer. After installing iTunes I actived in iTunes my iTouch for iTunes. In iTunes I get the massage that now two computers are actived (5 are possible).
    So I connect my iTouch with the wire to my computer and I get the massage that my iTouch is logical connected with an other iTunes libary. I get the only possibility to delete my iTouch and syncronize it with the content of the new iTunes libary.
    *My question is how can I get my content from the iPod touch to iTunes on my new computer?*

    Hi,
    Welcome to Apple discussions.
    So, in a perfect world, you would restore your library of valuable music from *your backed up files* to the library on your new PC, you know, the ones burnt to DVD/CD or on an external HD.
    This is the way iTunes works, it makes it perfectly clear and actively encourages users to *back up your music*.
    The iPod touch is not a back up device (nor is it advertised as one) it is a music player with a volatile memory that could actually disappear at anytime so it should not be trusted as a store for valuable files.
    To salvage your music you will have to use some 3rd party application on your PC/Mac (you fail to say) such as [Touch Copy|http://www.wideanglesoftware.com/touchcopy/index.html], Google for other options. This is not guaranteed to work but hopefully you will get your music back.
    Then back up.
    Good luck,
    Dud.
    *iPod touch* by the way, this an [ITOUCH|http://en.pasen.it/product_detail.php?id=36]

  • How to extract a folder (and its contents) from inside a zip file?

    There is a zip file which contains a folder inside it. The folder itself contains a few files. I would need to know how to extract the folder (with its contents) from inside a zip file.
    I have found a few unzipping code samples which show how to handle a folder inside a zip file. An example is shown below:
    public static void extract(String workingDirectory, byte[] zipFile)
    throws Exception {
    ByteArrayInputStream byteStream = new ByteArrayInputStream(zipFile);
    ByteArrayOutputStream out = new ByteArrayOutputStream();
    ZipInputStream zipStream = new ZipInputStream(byteStream);
    ZipEntry zipEntry = null;
    String nameZipEntry = null;
    byte[] contentZiphttp://forum.java.sun.com/post!default.jspa?forumID=31#
    Click for code tagsEntry = null;
    boolean isDirectory = false;
    int indexFileSeparator = -1;
    String directory = null;
    String fileName =  null;
    while ( (zipEntry = zipStream.getNextEntry()) != null )
                nameZipEntry = workingDirectory + File.separator + zipEntry.getName();
                isDirectory = zipEntry.isDirectory();
                if (isDirectory) {
    File file = new File(nameZipEntry);
    file.mkdirs();
                else
                    // read zipEntry
                    byte[] buf = new byte[1024];
                    int c = 0;
                    while ( (c = zipStream.read(buf)) != -1)
                        out.write(buf, 0, c);
                    indexFileSeparator = nameZipEntry.lastIndexOf(File.separator);
                    directory = nameZipEntry.substring(0, indexFileSeparator);
                    fileName =  nameZipEntry.substring(indexFileSeparator+1,nameZipEntry.length());
                    FileSystemTools.createFile(directory, fileName, out);
                    out.reset();
                    zipStream.closeEntry();
            zipStream.close();
            byteStream.close();
    }The code sample which deals with the part where the zipEntry is a directory creates a directory with the same path and name. (highlighted in bold)
    Another similar variation is:
    File file = new File(dirDestiny.getAbsolutePath() + File.separator + zipEntry.getName() );
    if(zipEntry.isDirectory())
          file.mkdirs();When the code creates a directory for the folder, does it unzip the contents inside the folder as well?
    If not, how do I extract the files inside the folder?

    Have you already tried to see if the sample code you downloaded works or not? Maybe if you try out the code yourself you can see if it extracts files from a directory within a zip file?
    I like to use pkzip. It is a command line compression/uncompression tool that can be used from a batch file. If you assignment involves unzipping large amount of zip files on a regular basis, I recommend taking a look at pkzip.

  • Get the content from the PDF file IN WD ABAP View

    Hi all,
    I have a offline interactive form with data filled in that and save in my desktop. I want to upload the PDF content ( data ) into Web dynpro view.
    Currently i have the view designed with all the input box bound with the respective fields in the context and these fields are same as Adobe form fields.
    I have a UI element to browse and pick the file from the desktop. I have the upload button to upload the data into it.
    When i click the upload button it goes for dump. " No Enough Information for processing or Output"
    *Get the content from the file
      WD_CONTEXT->GET_ATTRIBUTE( EXPORTING NAME = 'PDFSOURCE'  IMPORTING VALUE = CONTENT ).
    In the above statement CONTENT is initial.  Hence dump. I have take this source from SDN Blog.
    Kindly help me where i went wrong.
    Thanks in advance.I

    Hi,
    try my solution (reading dunamic table, but you can read any data from pdf xml) described here:
    Dynamic Table data cannot be Read.
    Regards Jiri

  • How can i download ANIS/ISA-95  contents from SAP for Xi/PI

    Hi forum,
    How can i download ANIS/ISA-95  contents from SAP for XI/PI,
    i tried searching it in SAP service market place,  but could not find,
    please help me locate that

    what is the exact scenario you are looking for...
    you can download from the market place once you have the access to the seeburger related contents...actually its a part of the seeburger contents...
    I hope you are looking for the XSD formats of ANSIX12 right?..if not then the above will not apply..
    HTH
    Rajesh

  • How to get UCM content from Java class?

    Hello,
    I need to get UCM content from backend I mean from the Java class. Is there any way to do that? If anybody please give any resources it will be very helpful.
    Thanks and regards.

    Hi
    You mean to say that with JAVA API you want to search and retrieve the contents ? If yes , then you should use RIDC API for the same and that way you can use to do all the operations on UCM from the JAVA Api .
    Search this forum and you will get sample codes for the checkin , search , checkout operations .
    Documentation is available at : http://docs.oracle.com/cd/E14571_01/doc.1111/e16819/toc.htm
    Thanks
    Srinath

  • I've been running Windows XP over bootcamp on an iMac for a few years now and I can't seem to get any sound from external devices into the machine. Any ideas?

    I've been running Windows XP over Bootcamp on iMac for a few years and I can't seem to get any sound from external devices into the machine. Any ideas?

    O.K. fgonoz98
    I would do 1 thing at a time:"now the micropohone is not working in facetime"
    Here is what you can check to get your mike working in facetime:
    1. Hold down option while you click on the speaker next to time a. date,
    under input Device see if your mic is marked. If not: ✔️
    2. Click the apple top left/System Prefs./click on the Sound speaker:
    under Input highlight microphone.
    3. When you have factime on go to video above scroll and see if your mic is marked ✔️
    If that does not get it to work there is more you can check:
    (Utilities/Audio, midi setup)
    For any other audio device you do this for input and output.
    If you get stock post back

  • How can I generate a table of contents from bookmarks

    How can I generate a Table of Contents from bookmarks in Adobe Acrobat XI?

    Something to try.
    Rick Bostein  provided a "Create Bookmark Report" Acrobat Action.
    With this report as a PDF you could insert it at the start of your PDF document to serve as a "TOC". 
    Go here:
    https://acrobatusers.com/actions-exchange 
    Scroll down some.
    Be well...

  • My windows laptop suffered a serious crash. How can I transfer all music and content from iPhone to iTunes on new windows 8 laptop?

    My windows laptop suffered a serious crash. How can I transfer all music and content from iPhone to iTunes on new windows 8 laptop?

    See Recover your iTunes library from your iPod or iOS device.
    tt2

  • HT1349 how can I get the contents from my I pod on to my  new computer apple library

    My old computer broke down with everything on it. Now having a new one I don't know how to get my music and photos on my new apple library on my current computer. I would appreciate any ideas how to achieve this without loosing anything from my I pod. Thanks

    Music is intended to go one way: from your computer to the iPod. Going the other way is contrary to the design and is not trivial.
    If you had a Mac and its hard disk failed, you would use Time Machine to restore its contents to a replacement disk. A disk failure would be a non-event. If you replaced your Windows computer with another Windows computer another failure is just a matter of time.
    See this old post: https://discussions.apple.com/thread/2452022
    Since it is so dated some of the links may not work.
    iTunes will only give you the option to copy your iTunes Store purchases directly from an iPod to the computer, you'll find details in this article: Copying iTunes Store purchases from your iPod or iPhone to a computer
    For everything else (music from CDs, other downloads etc) there are a number of third party utilities that you can use to retrieve the music files and playlists from your iPod. You'll find that they have varying degrees of functionality and some will transfer movies, videos, photos, podcasts and games as well. You can read reviews and comparisons of some of them here:
    iTunes & iPod software
    Wired News - Rescue Your Stranded Tunes
    Comparison of iPod managers
    A selection of iPod to iTunes utilities:
    TuneJack Windows Only (iPhone and iPod Touch compatible)
    SharePod Windows Only (iPhone and iPod Touch compatible)
    iPod2PC Windows Only
    iDump Windows Only
    YamiPod Mac and Windows
    iPod Music Liberator Mac & Windows
    Floola Mac & Windows
    iPodRip Mac & Windows (iPhone and iPod Touch compatible)
    iPod Music Liberator Mac & Windows (iPhone and iPod Touch compatible)
    Music Rescue Mac & Windows (iPhone and iPod Touch compatible)
    iGadget Mac & Windows (iPhone and iPod Touch compatible)
    iRepo Mac & Windows (iPhone and iPod Touch compatible)
    iPod Access Mac & Windows (iPhone and iPod Touch compatible)
    TouchCopy Mac & Windows (iPhone and iPod Touch compatible)
    There's also a manual method of copying songs from your iPod to a Mac or PC. The procedure is a bit involved and won't recover playlists but if you're interested it's available on page 2 at this link: Copying Content from your iPod to your Computer - The Definitive Guide
    How to use your iPod to move your music to a new computer (does not apply to the iPod Touch)

  • PSE9: How do I move/copy an Album and its contents from my PC to my laptop?

    I am using Windows 7 and PSE 9 on my PC and want to get a copy of the album and its contents to my Vista laptop running PSE 9 without changing anything on the source PC. Anyone know how to do this? I know I can move the files through Windows Explorer on my network but I have already gone through the trouble of putting the best photos into an Album and would like to simply move the Album over and not have to go through the trouble of recreating it.

    You will need to copy the files.
    1. Make a new folder on your laptop
    2. Open Organizer, select your Album then press Ctrl+A to select all photos
    3. Click the Fix tab and choose Full Photo Edit to open the album contents in the editor
    4. Click File >>Process Multiple Files
    5. From the drop down menu (Process files From) choose Opened Files
    6. For destination click the browse button and navigate to your new folder on your network and click OK
    7. Make sure Rename and Resize is unchecked but check Convert files To and choose Jpeg Max quality or whatever you prefer then click OK and wait for Elements to finish.
    8. Go to your laptop folder to see your images.

  • Can automation plug-in gets error notification from Photoshop ?

    Hi All,
    Suppose I open the photoshop file(.psd) and font is missing in the layer. Photoshop shows error dialog box. Can automation plug-in get any kind of notification regarding this font missing in layer ?
    I want to do some stuff if font is missing in the layer.
    Any idea/logic ?
    Thanks,
    Amar

    Hi,
    Thanks Tom for the response and idea. I can now check whether the font used in text layer is present or not by checking in font list for photoshop.
    Now I am stuck in another point: load font (saved in local folder) in the photoshop in runtime. Can we update the font list of the photoshop by automation plug-in ?
    I can get font list from descriptor using "kfontListStr", update the lists like "keyFontName", "fontPostScriptName",  "fontFamilyName" and call
    "sPSActionControl->Play(&result, eventSet, descSet, plugInDialogSilent);".
    But at the moment its returning error code and I don't really know if these are enough to update font list in photoshop.
    If this can't be done by automation plug-in then let me know some idea on how to solve loading font in photoshop in runtime.
    Thanks,
    Amar

  • Could not get exact contents from pdf using adobe acrobat professional

    Hi,
    I am using acrobat professional to extract contents from a pdf into HTML. During extraction of pdf into HTML some contents are getting rendered as images. But with pdf to xml extraction i can get the exact contents. But i need HTML file from pdf. Any suggestions. Thanks in advance.

    You might want to see if you can select the background with the object touchup tool. If so, can you then just delete the selected object. May take a while to go through the document, but if it solves the problem you are ahead. You may be able to select it with JavaScript and repeat the process. My point of using the object touchup tool is that it may not be a background set by Acrobat, but something that is simply labeled as an image from the Acrobat viewpoint.

  • How can my java application get its own PID?

    My java application runs under AIX?
    The application needs to get its own PID.
    There is a possibility to get it by
    Runtime.exec("ps -ef | grep <user.name>");
    But is there any other alternate possibility?
    Any idea would be great appreciated
    kind regards

    Hello! I found several ways for this in a blog from someone called Igor Minar on
    http://net3x.blogspot.com/2007/03/how-java-application-can-discover-its.html
    He found several ways:
    * Use Java management and monitoring API
    ManagementFactory.getRuntimeMXBean().getName();returns something like
    1826@localhost
    where 1826 is the PID of the JVM process, i.e. my application's process. But this hack is JVM dependent and may not work on JVM's other than Sun's
    * Use a shell script to put a property in place that is set to the PID:
    exec java -Dpid=$$ -jar myapp.jar* Java Native Interface - cumbersome and platform dependent solution
    * Use procfs (Linux solution: read /proc/self, nifty nifty, posted in the comments of the resp. post!)
    int pid = Integer.parseInt( ( new File("/proc/self")).getCanonicalFile().getName() );* From another comment: Reflection will work (on Unix): The Process class has a field called pid which can be queried:
    static int getPID(Process process) throws IllegalAccessException, IllegalArgumentException,
                                                                      NoSuchFieldException, SecurityException
         Field field = process.getClass().getDeclaredField("pid");
         field.setAccessible(true);
         return field.getInt(process);
    }But this solution looks a bit of a kludge to me. I think the /proc/self solution is best - it definitely rox my sox!
    Hope this helps!

  • I can't erase all data and content from my iPhone 4s. It says iCloud account not verified, when it only asks for my Apple ID to erase all data and content.

    It's really been puzzling me, I've never logged in the Apple site on a laptop before - I have been getting the same message 'Unable to verify iCloud account' every time I try and erase all data and content from my iPhone 4s. When I go to iCloud on my laptop and sign in using my Apple ID it signs me in. These are the same log in details I am prompted for when trying to erase all data/content from the phone. If anybody could point me in the direction that would be really appreciated. Thanks

    Hi.
    Yes, I recently changed my Apple ID password - around 2 weeks ago when I bought the phone.
    Does anyone know if you need to do the IOS update to be able to restore all data and content? I have not installed the new update on either of my iPhone 4S's yet.
    The phone I am trying to reset was sold to me by a friend and when it was it had already been reset and it was on the language selection screen.

Maybe you are looking for

  • Error in info type 0001

    Hi all when hired an employee, while saving 0001 info type inpa40 system shows one error " Define a fiscal year variant first for company code 9369" anyone solve prob thanks and regards Seenu

  • Icloud v 4.0 does not install on windows 7 64 bit

    I tried everything. I de-installed the previous version, I really don't know what is wrong. I install it and the last section of the installation fails. Then it de-installs and tells me to contact the person who controls the installation!

  • The file name img 1234 is missing or offline is on all images on screen

    all my images have a bar accross the top which says 'the file name is missing or offline' this is on the screen, does anybody know what is going on here. Thankyou peter...

  • Trouble with a bindVar function in the reflection

    Hello everybody! I have some trouble with using FXObjectValue.bindVar(...) function. I'm getting java.lang.UnsupportedOperationException: unimplemented: bindVar exceprion :( I loked up to source code of JavaFX and I can't find implementation this fun

  • Getting json path

    I have the following JSON snippet quote: "navigation": [ "section": [ "name": "activities" "menus": [ "menuitem": [ "id": "91632" "order": "9" "parent": "0" "text": "News Items" "target": "_self" "link": " http://192.168.0.1:90/news/index.php" "subme