Glad to hear that there is a relatively painless workaround for now. On 20 April 2011 17:22, Brent Atkinson <[email protected]> wrote:
> Chris, > > I'll definitely create a JIRA issue. It looks like the branch handlers > are not installed on the empty branches. I looked at when these are > installed (in monitorBranches(), which is called during > setBranchExpanded). So, I found a work-around. I call > setBranchExpanded on the empty branches before I add the first item. > This causes the BranchHandler to be installed which means that the > insertion is picked up by the TreeView (and the Skin). > > Brent > > On Wed, Apr 20, 2011 at 12:27 PM, Chris Bartlett <[email protected]> > wrote: > > > > Brent, > > It sounds like you have found the problem. > > > > Thanks for checking the repaint side of things. That certainly seems to > suggest that it is a problem with the internal state rather than merely a > painting / invalidation issue as you say. > > If you open a JIRA ticket, please include the info from your > investigation for completeness. Alternatively, find this thread on the > Nabble archive and include a link to it. > > http://apache-pivot-users.399431.n3.nabble.com/ > > If you are willing and able to fix this yourself, bear in mind that we > welcome patch submissions! > > Chris > > On 20 April 2011 16:17, Brent Atkinson <[email protected]> wrote: > >> > >> Yes, > >> > >> I just tried that, and it appears that it's not just a invalidation > problem. It appears that the empty branch isn't treated like a branch at > all. From what I can tell, the tree doesn't install a BranchHandler as a > listener on an empty list. I tested this by dragging and dropping the node > (which results in a remove/add at the same Path). I am able to see the tree > call the removal and insert event handlers. In the insert event handler it > installs the BranchHandler in the node's listener list... after which > everything works normally. > >> > >> Brent > >> > >> On Wed, Apr 20, 2011 at 12:08 PM, Chris Bartlett <[email protected]> > wrote: > >>> > >>> That sounds like a bug, but I am not in a position to check at the > moment. > >>> Did you try resizing the OS window to force a complete repaint? > >>> Could you put together a simple example that demonstrates the issue, > and then create a JIRA ticket with the example as an attachment? > >>> https://issues.apache.org/jira/browse/PIVOT > >>> Chris > >>> On 20 April 2011 15:55, Brent Atkinson <[email protected]> > wrote: > >>>> > >>>> The exact behavior is that nothing happens when something is added to > the branch. I expected that the events would cause the branch node to be > rendered as a branch node with controls when something was added. > >>>> > >>>> I'm stepping through it, and it actually looks like the listener list > is empty for the empty branch. > >>>> > >>>> Brent > >>>> > >>>> On Wed, Apr 20, 2011 at 11:49 AM, Chris Bartlett < > [email protected]> wrote: > >>>>> > >>>>> Brent, > >>>>> > >>>>> What happens exactly? Are you getting exceptions thrown? > >>>>> > >>>>> Is it that the TreeView doesn't render the branch control for the > branch that used to be 'empty; but now has a child? If so, does the > TreeView update correctly later on if the native OS window housing Pivot is > repainted? (Perhaps when the window is resized or loses & regains focus) > >>>>> Chris > >>>>> On 20 April 2011 15:27, Brent Atkinson <[email protected]> > wrote: > >>>>>> > >>>>>> Hi, > >>>>>> > >>>>>> I'm having an issue with a TreeView updating the branch controls > when an element is added to an empty branch. The problem occurs when using > the following style definition. The style renders properly initially, but > appears to fail to update when adding elements to the treeData. > >>>>>> > >>>>>> <TreeView bxml:id="aTree" styles="{showEmptyBranchControls:false}"> > >>>>>> ... > >>>>>> </TreeView> > >>>>>> > >>>>>> The branches appear to be notifying on insertion and removal > properly because the tree works fine without the above style definition. > >>>>>> > >>>>>> Any ideas why this would be happening? > >>>>>> > >>>>>> Brent > >>>>>> > >>>>> > >>>> > >>> > >> > > >
