Re: [Fxruby-users] Treelist -- can't add new items with data.
Status: Inactive
Brought to you by:
lyle
From: Hugh S. S. E. E. <hg...@dm...> - 2003-08-14 10:36:02
|
On Wed, 13 Aug 2003, Lyle Johnson wrote: > Hugh Sasse Staff Elec Eng wrote: > > > expressed as base 36 codes. When I add a name on its own, I can add > > to the tree, but if I put the data in, the item doesn't get added to > > the tree. I've missed something, but I've been staring at this so > > <snip> > > > OK, so you are /sure/ that it's getting inside the if-check inside the > SEL_COMMAND handler for @add_cat_btn? Yes, I added the puts just before your recalc suggestion. > > If we've confirmed that, please see what happens if you add a call to > FXTreeList#recalc immediately following that: > > @treeview[path] = treelist.addItemLast(...) > treelist.recalc > > Calling recalc() marks a widget's layout as "dirty", meaning it nudges > the parent layout manager to recalculate the layout for that widget and > its siblings. At first glance, I don't see why this should be necessary, Agreed: I think additem should trigger that.... > and so I'm skeptical that it's going to make a difference. But I've been > wrong before ;) Well you're right this time, it didn't result in any items getting added to the tree. :-( > > If that doesn't work, let me know if you'd like me to take a closer look > at the code. Thank you, but before I trouble you with that, is there any way to get Fox to produce lots of logging? [If only one could ask it things, like SHRDLU!] > > Hope this helps, > > Lyle Hugh |