Hi Pranav,

> My program works for most other widgets included, but when I use the
>  TreeItem, I get a Segfault at the end of my program. The program otherwise
>  works as desired. Do you have any suggestions to fix this?
> 
>  Even just this code causes this problem:
>  item1 = yui.YTreeItem("hello")
>  item2 = yui.YTreeItem(item1, "world")

>  I am using Python 2.6 on Sles 11.0.

Erm, looks similar to https://bugzilla.novell.com/show_bug.cgi?id=427372
which has been fixed, but no clue if the fix went to SLES11 (is this GA or 
SP1?). Please check the changelog of yast2-libyui package

I've tried myself (not really proficient in python, though) with fixed libyui 
and
 
i) I can get a simple dialog with 1 tree widget and 1 button displayed, but 
only in text-mode/ncurses (wut? :) ), GUI just shows an empty box
ii) it always segfaults on closing the dialog

The bug quoted above deals with memory ownership issues, so it seems to me 
there are still some places left where this needs to be addressed in libyui(-
bindings).

Conclusion: please file a bug, assign to yast2-maintainers and CC: kkaempf. 
Don't forget to include a code sample

B.

P.S. Here's my lame code:
import sys
sys.path.insert(0,'../../../build/bindings/python')
import yui

log = yui.YUILog.instance()
log.enableDebugLogging( True )

factory = yui.YUI.widgetFactory()
dialog = factory.createPopupDialog()

item1 = yui.YTreeItem("hello")
item2 = yui.YTreeItem( item1, "world")

vbox = factory.createVBox( dialog )
tree = factory.createTree( vbox, "Hello, World!" )
tree.addItem(item1)

factory.createPushButton( vbox, "&OK" )
event = dialog.waitForEvent()
dialog.destroy()
-- 
  \\\\\              Katarina Machalkova    
  \\\\\\\__o          OOo developer
__\\\\\\\'/_          & hedgehog painter

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to