mirror of
https://github.com/gryf/pygtktalog.git
synced 2025-12-18 12:00:21 +01:00
* Updated pygtkmvc to 1.2.2.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Author: Roberto Cavada <cavada@irst.itc.it>
|
||||
# Author: Roberto Cavada <cavada@fbk.eu>
|
||||
#
|
||||
# Copyright (c) 2005 by Roberto Cavada
|
||||
#
|
||||
@@ -18,8 +18,8 @@
|
||||
# Boston, MA 02110, USA.
|
||||
#
|
||||
# For more information on pygtkmvc see <http://pygtkmvc.sourceforge.net>
|
||||
# or email to the author Roberto Cavada <cavada@irst.itc.it>.
|
||||
# Please report bugs to <cavada@irst.itc.it>.
|
||||
# or email to the author Roberto Cavada <cavada@fbk.eu>.
|
||||
# Please report bugs to <cavada@fbk.eu>.
|
||||
|
||||
|
||||
import new
|
||||
@@ -59,7 +59,7 @@ class PropertyMeta (type):
|
||||
Programmers can override basic behaviour for getters or setters simply by
|
||||
defining their getters and setters (see at the names convention above).
|
||||
The customized function can lie everywhere in the user classes hierarchy.
|
||||
Every overrided function will not be generated by the metaclass.
|
||||
Every overridden function will not be generated by the metaclass.
|
||||
|
||||
To supply your own methods is good for few methods, but can result in a
|
||||
very unconfortable way for many methods. In this case you can extend
|
||||
@@ -197,14 +197,14 @@ class PropertyMeta (type):
|
||||
|
||||
# Override these:
|
||||
def get_getter_source(cls, getter_name, prop_name):
|
||||
"""This must be overrided if you need a different implementation.
|
||||
"""This must be overridden if you need a different implementation.
|
||||
Simply the generated implementation returns the variable name
|
||||
_prop_name"""
|
||||
|
||||
return "def %s(self): return self._prop_%s" % (getter_name, prop_name)
|
||||
|
||||
def get_setter_source(cls, setter_name, prop_name):
|
||||
"""This must be overrided if you need a different implementation.
|
||||
"""This must be overridden if you need a different implementation.
|
||||
Simply the generated implementation sets the variable _prop_name"""
|
||||
return "def %s(self, val): self._prop_%s = val" \
|
||||
% (setter_name, prop_name)
|
||||
|
||||
Reference in New Issue
Block a user