From: Miroslav Lichvar Date: Fri, 27 Jun 2008 11:37:23 +0000 (+0200) Subject: make sure Widget isn't used directly (#452920) (Greg Swift) X-Git-Tag: r0-52-10~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=3fd666f89646f1ba3ce9538fdc1b9829a5b2be9c;p=thirdparty%2Fnewt.git make sure Widget isn't used directly (#452920) (Greg Swift) --- diff --git a/snack.py b/snack.py index fbd6ba8..23fadcc 100644 --- a/snack.py +++ b/snack.py @@ -54,7 +54,7 @@ RIGHT = (1, 0) snackArgs = {"append":-1} class Widget: - """Base class for NEWT toolkit + """Base class for NEWT toolkit - Do not use directly methods: @@ -70,7 +70,7 @@ class Widget: self.w.setCallback(obj) def __init__(self): - self.w = None + raise NotImplementedError class Button(Widget): """Basic button class, takes button text as parameter