Has anyone created a dynamic two or three level tree?

Hi -
If anyone has created a dynamic two or three level tree, can you please explain and/or show a code example of how you did it? The 'dynamic tree tutorial' doesn't show the child node being created dynamically, but graphically.
I can build the first level fine, but how does the child node get associated with the parent node in the next level?
Thanks in advance.

Here's a snippet that might help. I'm sure there are more elegant ways to code it but this seems to work!
Good luck,
Keith
//1st Loop - executed once per first level of tree
for (int i = 0; i <= days; i++) {
j = i+1;
TreeNode newFirstNode = new TreeNode();
newFirstNode.setId("day" + j);
newFirstNode.setText("First " + j );
itineraryNodeChildren.add(newFirstNode);
java.util.List firstNodeChildren = newFirstNode.getChildren();
// Second Loop executed once per Second level within the First loop
for (int k=0; k<rk; k++) {
secondNumber ++;
TreeNode newSecondNode = new TreeNode();
newSecondNode.setText(secondNodeText);
firstNodeChildren.add(newSecondNode);
}

Similar Messages

  • Has anyone a solution to two update having the following popup-"We could not complete your request.  There was an error in the App store.  Please try again later.?"  I've tried over 4 days without any change.

    Has anyone a solution to two update having the following popup-"We could not complete your request".  There was an error in the App store.  Please try again later.  I've tried over 4 days without any change.

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Click the Clear Display icon in the toolbar. Then try the action that you're having trouble with again. Select any messages that appear in the Console window. Copy them to the Clipboard by pressing the key combination command-C. Paste into a reply to this message by pressing command-V.
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.

  • Has anyone created a NI-VXI driver for the Ardence RTX operating system?

    Has anyone created a NI-VXI driver for the Ardence RTX operating system?
    a VXI instrument through a PCI-VXI-8335 card (in the PC) talking to a PCI-VXI-8345 card (in the VXI chassis) via MXI-3, Has anyone created a PCI-VXI-8335 card  driver for the Ardence RTX operating system?

    Now  i want  develop driver on RTX,my hard platform is similiar(PCI8335+VXI8340+1418A),and after i read the PCI baseaddress,i find PCI8335 only has memory-map,so that means if i want to driver this board ,so i take following steps list below:
    1.use Rtmapmemory() to map the baseaddress to virtual address
    2.using memset() or memcpy() to driver the 1418A board
    is this right?
    if you can give me some hints,thanks 
    or you can contact me :[email protected] 

  • Has anyone created a Visio-like VI app?

    I'm interested in creating a Visio-like app, where I can pick from a predefined set of objects (square, circle, etc.) and place them on a palette (Picture control).  I'd like to be able to use the mouse to select placed objects, either to move them, or to right click on them to look at / modify their properties.
    Has anyone done something like this?  I've created an app like this, but without any mouse interaction on the palette.  The user positions and resizes the object through a cluster control.  It works nicely, but using a mouse would be more natural.  And more user-friendly, especially for those not used to LabView.
    Bonus features that I'd like, but can't imagine that are feasible:  to use resizing boxes (e.g. at the corners of a square, to resize the square), and a ghost outline of the object when dragging it accross the pane or resizing it.
    I've played a bit with incorporating the mouse -- looking up which object is selected, drawing the ghost outline, adding the resizing boxes.  But it seems that I'm trying to make LabView do something that the OS is probably better suited to do....?
    The end goal is to be able to create a Visio-like screen made up of mostly-but-not-completely graphical objects and save its description in a proprietary format.
    I've got LV8, though I'm more familiar with LV7.1.  And I've been a proud user since LV3.0.  If this can be done, I think I can do it. ...   Help?
    Thanks!
    Tom

    "tst" <[email protected]> wrote in message news:[email protected]...
    <a href="mailto:Wiebe@CARYA" target="_blank">Wiebe@CARYA</a> wrote: Draw all the unique ID's as color values in a offscreen buffer (picture control)Use an event to get the mouse down.Lookup the pixel color in the offscreen bufferConvert it to object ID.
    That was my method until someone posted the VI shown in the attachment (I cleaned it up a little, documented it and added an example).
    If you have a series of points for your shape, then this should be a better method.
    That *is* a nice VI.
    But it's not better if you have a lot of objects. The InROI has to be called for each object, so the search time will grow with the number of objects. The offscreen buffer only doesn't have this problem. The InROI method will also be hard to use with lines. And with larger circles you have to use a lot of points, or you'll get incorrect hits or misses.
    One benefit is that you are still able to select objects even if they are totally covered by other objects. Guess a requirement specification is needed to make a choise. Switching from one to the other method will be terrible.
    Also, the picture control is just a string. If you dig into this string, you'll notice that you can make a buffer. In this buffer you can replace one single picture object. So you don't have to redraw all the entire picture. This way you can get a real performance boost. It's convenient to store object info in the same buffer.
    It would seem to me that it would be better to have a buffer of the picture itself (the blue wire) which will depend on the z ordering (i.e. everything "under" the currently selected element will be the base picture and all the other stuff would be redrawn). I haven't done any real examining of the picture control VIs, but I would rather avoid manipulating the string myself if only for the reason that NI might (please?) change the implementation to something more efficient.
    Well, the picture (blue wire) is a string with the length of the string as the first 2 bytes (perhaps 4, I'm not sure). So you can store each object's picture, and replace them one by one whenever you need to. Then, if you need the picture, remove all the sizes, concatenate the string, and put the total size before the string (then cast to picture).
    Or you can remove the size, and store the string, then concatenate, etc. and attach the total size.
    If NI changes the way it works, you only need to remake the "remove size.vi" and "concatenate.vi" (provided that concatenation is possible).
    The principle of the picture control is a virtual machine. The virtual machine itself is not that slow (unless you compare the 3d stuff to serious 3d stuff). It is slow because the subvi's that build the string are slow. Even worse, you need to call them each time anything in the picture changes. It is also slow because each time you draw anything, the pen is set (even if it hasn't changed).
    With the buffer you get a trade off. It will require more memory, but it can be much faster depending on the situation.
    With the standard picture control vi's, you are forced to build slow programs...
    Draw the ghost outline in a separate picture control. Make this picture control transparent, and set it to the same size and position as the "real" drawing. Don't forget to use the events of the top level picture control! This way, you don't have to redraw the entire picture when you move only one object.
    That's an interesting suggestion.
    Tom, if you do create something, it would be nice if you post it. Maybe we can improve it and make it into a general template.
    InROI.vi:
    http://forums.ni.com/attachments/ni/170/194933/1/InROI.vi
    ROI test.vi:
    http://forums.ni.com/attachments/ni/170/194933/2/ROI test.vi

  • Has anyone created a PICTURE BOOK in iBooks Author?

    I am coming up against an issue that I wish I had known about before investing my time in iBooks Author and that is the the apparant inability to create our picture book and not give away the plot of the entire book on the second page in the TOC that shows all the pictures (our pages) for our book. My question is, has anyone been able to eliminate the TOC with the row of pictures at the bottom of the TOC for your picture book and still get your book published? If so, can you tell me your title so I can see it? Thanks!

    We are building a video ebook, using text, filmed video clips of the characters, still pics and audio and want to have it released in this IBA format according to what we think is proper as far as presentation is, to our audience. The problem of incorrect formatting for a children's picture book in IBA is very much there. Part of this issue is creative control and the other part is unnecessarily revealing the visual storyline on the first page of the book. Thanks for your input though.
    Again, has anyone produced a children's picturebook throuh IBA that has made it through the vetting process, and is for sale in the iBookstore? Would love to see it and how you formatted it and, I  just might be a customer!

  • Has anyone created a 400Mbps firewire connection to a PC?

    Has anyone been able to successfully create a 400Mbps firewire connection (as opposed to 100Mbps) between a Mac and a PC? I've been trying to connect my G4 1.5Mhz Powerbook (bought last May) to a HP Pavillion d4100e (AMD dual core processor) running the latest Windows XP Home Edition. The Powerbook's firewire bus says it can go up to 400Mbps. The 6ft firewire cable is supposed to deliver 400Mbps. The PC's card says it handles 400Mbps. It shows 400Mbps when the firewire cable is plugged into the PC, but not into the Powerbook. Yet, the moment the cable is also plugged into the Mac, the rate goes to 100Mbps. I've looked all over the web for an explanation but have come up w/ nothing.
    Peter

    Make that 1.5Ghz Powerbook...

  • Has anyone created a file format converter from "universal file format" uff, to another format?

    I need to find or create a file converter from the different Universal formats to another ASCII format. Does anyone know where I can get formating information about UFFs? Has anyone done this? Thanks in advance.

    The UFF file info can be found at http://www.sdrl.uc.edu/uff/uff.html
    The Sound and Vibration Toolkit 5.0 and the Sound and Vibration Measurement Suite 5.0 offers LabVIEW VIs to read and write UFF58 files. 
    Feroz

  • Has Anyone Created a Successful Pre-Order Page?

    I've submitted my second book, and still, I'm unable to get the pre-order function to work. Or maybe I'm misunderstanding it?
    I assume that if I allow pre-orders when I create my package in iTunes Producer, that after I upload all my assets, etc., and they successfully import, that a pre-order page for that book should appear on iTunes.
    However, for both of my books, this has not happened. They still are pending approval, but there has never been any sort of pre-order page on iTunes in the bookstore.
    Has anyone successfully created a pre-order for one of their books titles? I've tried contacting Apple but only get a generic response that doesn't really explain anything. ; (

    There is a related thread here:
    https://discussions.apple.com/thread/3811505?start=0&tstart=0
    You can set a pre-order start date for each territory in iTunes Producer. According to the iTunes Producer 2.6 User Guide, the date must be earlier than the sales start date. If you don't want to offer pre-order, you are supposed to leave that date blank.
    The user guide says that, if you set a pre-order date, the publication will not be shown in the store until that date. It does not say that, if you set that date, the book will be shown starting on that date (or any date before it becomes available, for that matter).
    The user guide also says the following:
    Important: Pre-orders require minimal manual production work by iTunes. When you deliver a book that is
    available for pre-order, contact your iTunes Technical Account Manager. Pre-orders must conform to the
    following specifications:
    All assets (EPUB, iBooks format, cover art, and screenshot files) are due up front.
    You can only create pre-orders with the first, initial delivery of the book package.
    You cannot make any changes to the pre-order once you deliver a book package to the iBookstore with
    a Pre-Order Start Date.
    Each territory where you are sending a pre-order (each territory where you defined a pre-order start
    date) must be priced at a valid price tier.
    Do not send pre-order start dates for territory products that have been marked not cleared for sale. Only
    deliver book packages with pre-order start dates assigned for territory products that are cleared for sale.
    Given the current track record in getting books into the store, I would guess that pre-order is something that would only happen for blockbuster titles from large publishers, where actually a significant volume of pre-orders can be expected. For the pre-order to go through into the store, someone still has to review the book, which isn't worth doing for something that sells a few dozen copies a month.
    Michi.

  • Has anyone created a LabVIEW VI to do an FCS or Frame Check sequence (ISO-309)?

    Have had difficulty implementing ISO-3309 FCS or Frame Check sequence in LabVIEW. Has anyone suceeded in doing so? Is it available?

    Dear Friends,
    I'm looking for a "Frame Check Sequence" Labview VI that I will use to communicate with an E5KC OMRON thermo-controller.
    Does somebody know were to find it, possibly in LV7.1 (or previous), or were to download a FCS calculator executable program for WinXP?
    Thanks
    Stefano Gandolfi
    [email protected]

  • Has anyone created a grd, gridrow and griditem

    I am trying to create a grid dynamically with the following
    code and I'm getting errors
    TypeError: Error #1034: Type Coercion failed: cannot convert
    mx.containers::Grid@4c98479 to mx.containers.GridRow.
    var tempStr : String = arrayOfFormItems[index]..type;
    objectClass = getDefinitionByName( tempStr ) as Class;
    anObject = new objectClass();
    aDynaForm.addChild( DisplayObject( anObject ) );
    I'm reading in an xml file creating items dynamically in the
    following order
    <formItem>
    <type>mx.containers.Grid</type>
    </formItem>
    <formItem>
    <type>mx.containers.GridRow</type>
    </formItem>
    <formItem>
    <type>mx.containers.GridItem</type>
    </formItem>
    Any thoughts?

    DOH!,
    wow, thanks to all of you, will look into that, much appreciated......3 out of 3 can't be wrong :-) I desperately need to start tinkling outsie the square ;-/
    Cheers
    Rossco

  • Has anyone experienced a reset of their apps level after the update to iOS 5?

    Has anyone else experienced a reset of their apps after the update to iOS5 on your iPad2?  If so how we're you able to retrieve the information or your money back for all funds spent to advance in the game.

    You could try closing all apps completely and then do a reset and see if that helps. To close all apps : from the home screen (i.e. not with any app 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of each app to close them, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    To reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Has ANYONE created a web site from scratch with iweb 08 that is stable?

    I have tried all the tricks i have been able to find to convert my old iweb 1.2 site to the new iweb08 software. I have tried deleting plist files, and changing the themes and re-saving. I am about to give up, and have two options
    1. recreate the ENTIRE site from scratch. I am happy to do this, so long as there are people who have done it and their site domain files remain stable.
    or
    2. Go back to iweb 1.2 and save myself hassle.
    Can anyone advise on this?
    To apple : You have treated me like a sucker customer. I love you, but you have spat in my face with this terrible software. it destroys everything it touches. Shame on you for treating us all with disdain.

    Hi damoyoungsf,
    I have managed to recreate my website (www.vnlc.org is the domain name, www.studentgroups.ucla.edu/vnlc is the real address) and fixed the bugs as of yesterday, it took around 6 hours of fiddling but worth it for the new features. I used the watercolor theme, and you can visit the webpage to test its stability. The problems I encountered were:
    1. Blog/Podcast pages didn't convert correctly, the yellow/blue band is missing and the picture frames were missing also, also some of the events had incorrect formatting.
    a. Fix: You're going to have to recreate these pages, when a page has errors after a program update like this, its better to recreate the page again rather than keep stumbling with further little bugs that might pop up in the future.
    2. Links to pages with titles that include the symbols : and - and foreign characters do not work.
    a. I think this is a major area in which iweb08 digressed because I used to be able to use foreign and special characters in my links, but now I can't because it would not link appropriately.
    Every other page seemed to work well, or had minor problem like incorrect font colors which can be remedied without recreating the whole page. I did not have the photo page problems that some other people had, my photo pages rendered perfectly and now has nice new features.
    As a final word, iWeb'08 or rather the whole iLife'08 suite seems to be Beta status just like when Mac OS X first came out. Apple likes throwing at us these problematic new software and wait for the bugs to crop up to fix it. After I first got iWeb'08, I knew it would have major problems but I am hoping further updates would remedy our woes.

  • Has anyone created a COLORING BOOK in iBooks Author?

    I've seen several coloring books on the iBook store and would like to know if anyone has created one using iBooks Author?
    If so, which and how? 
    If not but have a coloring book, how?
    How does one make the interactive colore pallette to work from?  Is it a widget and if so where can I get one?
    I first thought that all the coloring books were App's until I found actual coloring books outside of the apps.
    Any help would be greatly appreciated.
    LC

    iAd Producer 4.0 has a drawing widget as one of its templates. You could start with that and put a transparent image in the layer stack to get a coloring book effect.

  • Has anyone created a lottery number generator within Labview & if so can I have a copy please?

    I would like to study the program of a lottery number generator for Labview if anyone has created or knows where I can get this.

    Wow, my vi is close to yours, but I have a different problem: I set mine up to generate a door prize-winning "powerball," but my issue is how can I get the array to show each number in a different cell in the array, rather than in every cell at the same time. I think I need an array constant somewhere, but with a while loop in the for loop, I can't seem to come up with the desired operation.
    Here's a copy of my vi and a pic of the "spaghetti"
    Also, I'm running on my version 9 student edition.
    Thanks for any help.
    Attachments:
    My Powerball.vi ‏53 KB
    Lotto code.JPG ‏117 KB

  • Has anyone created a complex navigation in Encore??

    I am authoring a DVD instructional video program and was hoping to be able to create an option for viewers to pick and choose whatever poses they wanted to practice from a menu and have their selection play back all at once. I can't seem to find any directions to do this and wondered if anyone else had attempted this? Or is Encore not capable of this level of customized menu selection? I was inspired by The Biggest Loser The Workout DVD series.
    Thank in advance for any tips!

    Let's say that you have 12 possible exercises, and you want the viewer to be able to select them individually, or in a group. Now, I edit in such a way that I have a separate Timeline for each "chapter," or scene, so I'll outline what I would do.
    First, I would have a separate Button for each individual Timeline. That would allow one to select the individual Timelines.
    This next will depend on whether you have a Widescreen Project, allowing only 18 Buttons per Menu, or a Standard Project, allowing 36 total Buttons, but other than the number of Sub-Menus, the general layout would be the same.
    On a Sub-Menu, basically a Scene Selection Menu(S), I'd then work out all the possibilities for multiple Timelines, say # 1 + #2, and so on. In that case, the Playlist would contain #1 & #2 with an End Action to return to the Menu of your choiceI would create a Playlist for each of these possibilities. Instead of having a Video Frame for each possibility, I'd instead create a graphic, to show the Poster Frame of the combo selections. These would not be linked to the Timelines (the near-by Buttons would be though), and would be static. The number of these graphics would depend on the the number of Timelines in each choice. If you absolutely have to have Motion images, you will need to create those as a Motion Background in PrPro, and those images will be little thumbnail Videos and NOT part of the Buttons themselves. Now, you can have a hidden element of the actual Button, that encompasses these images, but is not seen, so that by clicking on those Videos, they WILL activate the real Button.
    The End Action of each Playlist will be pointed to the Menu of your choice.
    Two drawbacks: you can ONLY have 1GB of ALL Menus and Assets per DVD-Video. This will be an intricate structure, so I would make sure to lay the Project out in great detail, before you even start. Plan your Menus and Sub-Menus well beforehand. Also, be sure to name your Sub-Menus and each Button, or Linking will soon become a nightmare. I use Illustrator for such a layout, and check everything on paper, prior to even starting the Project.
    For a bit of this (actually a quiz), Jeff Bellune covers similar in his great book, The Focal Easy Guide to Adobe EncoreDVD 2.0, Focal Press. Though for an earlier version, 100% of that book will apply to CS4 and CS5. The additions to En, beyond that book are covered in great detail in the Help files.
    Good luck,
    Hunt

Maybe you are looking for