Bug 452920
Summary: | Segmentation Fault when working adding Widget into Grid | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Greg Swift <gregswift> |
Component: | newt | Assignee: | Miroslav Lichvar <mlichvar> |
Status: | CLOSED NEXTRELEASE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | ||
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
URL: | http://www.wanware.com/tsgdocs/snack.html | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-07-30 13:29:59 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Greg Swift
2008-06-25 21:15:53 UTC
I'm not sure the example has ever worked. Widget just provides the setCallback function and isn't supposed to be used as a real widget. Any suggestions where the exception should be raised? Checking in all functions if w == None wouldn't be very nice. Okay.. I'll concede that checking that in every function is not nice. After your response and having browsed through the source would these 2 assumptions be true: 1: You shouldn't be using Widget directly, ever? 2: Whenever inheriting Widget you should override the __init__ method If so You could always do this: class Widget: """Base class for NEWT toolkit - Do not use directly methods: - Widget(self) - setCallback(self, obj, data = None) : The callback for when object activated. data is passed to obj. """ def setCallback(self, obj, data = None): if data: self.w.setCallback(obj, data) else: self.w.setCallback(obj) def __init__(self): raise NotImplementedError This was per the definition located at Python's Module Exception page[1], which states: "exception NotImplementedError This exception is derived from RuntimeError. In user defined base classes, abstract methods should raise this exception when they require derived classes to override the method. New in version 1.5.2. " Of course if the above 2 assumptions are not true, I'm going to have to think about it a bit more. [1]http://docs.python.org/lib/module-exceptions.html triaged Ok, I've put the fix in upstream git. Will be in the next release. Thanks. awesome. thanks. Fixed in newt-0.52.10-1.fc10. newt-0.52.10-1.fc9 has been submitted as an update for Fedora 9 newt-0.52.10-1.fc9 has been pushed to the Fedora 9 stable repository. If problems still persist, please make note of it in this bug report. |