4 Replies Latest reply on Nov 10, 2015 6:05 AM by Trevorׅ

    [CC2014] TreeView add and select new node

    grg79

      Hi

       

      I have a TreeView (MBpaletteTLB.TreeStruttura).

      In the selected item add a new node.

      The new item must be selected.

       

      newNode = MBpaletteTLB.TreeStruttura.selection.add("node",nodeText);

      MBpaletteTLB.TreeStruttura.selection.expanded = false

      MBpaletteTLB.TreeStruttura.selection.expanded = true

      MBpaletteTLB.TreeStruttura.selection = newNode

       

      Executing the last row ID CC2014 crash without any error....

       

      In CS6 works.... in CC2014 crash...

       

      UIElements from CC are nightmare....

       

      Any idea?

      Workaround?

      Thanks!

        • 2. Re: [CC2014] TreeView add and select new node
          grg79 Level 1

          Thanks for tutorial

           

          ok... it's a bug serious....  and unsolved from CC to CC2015.

          In fact, even your example don't highlight item and crash selecting last item

          Adobe... has no plans to fix it?

           

          I need to highlight the item ...  the user must be able to see what's selected in the panel... is primary for correct using of panel....

           

          Any ideas?

          Tricks?

          • 3. Re: [CC2014] TreeView add and select new node
            Peter Kahrel Adobe Community Professional & MVP

            You're right, there are two problems: a non-terminal node is collapsed when you add an item to it and if you then immediately try to select the added item if you added it before the last item in the tree. The display problem can be fixed by adding these two lines to the insert_bt callback after the line that inserts the item:

             

            tree.selection.parent.expanded = false;

            tree.selection.parent.expanded = true;

             

            The tree's new selection is always the item after the inserted item, so maybe you can live with it. Do log a bug though.

            • 4. Re: [CC2014] TreeView add and select new node
              Trevorׅ Adobe Community Professional

              Hi Peter,

               

              I haven't seen an update in your guide since 2.1, nice to see one.  Page 113 makes an interesting read and is pretty relevant to this tread.

              The link there is a pretty good (or bad) preview of what to expect in the coming version of what's to come in InDesign.

              It's all very well that we can make great html5 panels with all the features you need but to need to write a extension for something that in the good old flashy world of CS is pretty pathetic.

              Just imagine having 50 or 100 extensions on your system and how that's going to be great for your ID load time.

               

              Grg79,

              2 workaround:

              1) Buy CS6

              2) Write an extension (or pay someone like me to do it for you)

               

              Trevor