[tekui-devel] tekui: Class, Object: Improved documentation

Timm S. Mueller tmueller at neoscientists.org
Sat Mar 29 05:06:39 CET 2008


details:   http://hg.teklib.org/tekui/rev/a9ab58ca0f5a
changeset: 390:a9ab58ca0f5a
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Thu Mar 27 20:46:27 2008 +0100
description:
Class, Object: Improved documentation

diffs (truncated from 154 to 100 lines):

diff -r 0d3b40454be3 -r a9ab58ca0f5a tek/class.lua
--- a/tek/class.lua	Thu Mar 27 16:37:37 2008 +0100
+++ b/tek/class.lua	Thu Mar 27 20:46:27 2008 +0100
@@ -9,11 +9,13 @@
 --		Class - implements inheritance and the creation of objects from classes
 --
 --	FUNCTIONS::
---	- Class:checkDescend() - Checks if object descends from a class
+--	- Class:checkDescend() - Checks if an object descends from a class
 --	- Class:getClass() - Returns class of an object or superclass of a class
 --	- Class:getClassName() - Returns class name of an object or class
+--	- Class:getPrivate() - Gets an object's private data
 --	- Class.new() - Creates and returns a new object
---	- Class.newClass() - Creates a childclass from a superclass
+--	- Class.newClass() - Creates a child class from a superclass
+--	- Class:setClass() - Changes class of an object or superclass of a class
 --
 -------------------------------------------------------------------------------
 
@@ -26,7 +28,7 @@ local DEBUG = true
 local DEBUG = true
 
 module "tek.class"
-_VERSION = "Class 4.1"
+_VERSION = "Class 4.2"
 
 local Class = _M
 
@@ -75,7 +77,7 @@ end
 end
 
 -------------------------------------------------------------------------------
---	private = object:getPrivate(): Gets an object's private data
+--	private = object:getPrivate(): Gets an object's private data.
 -------------------------------------------------------------------------------
 
 if DEBUG then
@@ -95,12 +97,12 @@ end
 -------------------------------------------------------------------------------
 --	class = Class.newClass(superclass[, class]):
 --	Derives a new class from the specified {{superclass}}. Optionally,
---	an existing table can be used for {{class}}. In this case, if a
---	{{_NAME}} attribute exists in the class table, it will be used.
---	Otherwise, or if a new class is created, {{class._NAME}} will be
---	composed from {{superclass._NAME}} and an unique identifier. The same
---	functionality can be achieved by calling a class like a function, so
---	these invocations are equivalent:
+--	an existing class table can be used. In this case, if a {{_NAME}}
+--	attribute exists in the class table, it will be used. Otherwise, or if
+--	a new class is being created, {{class._NAME}} will be composed from
+--	{{superclass._NAME}} and an unique identifier. The same functionality
+--	can be achieved by calling a class like a function, so these invocations
+--	are equivalent:
 --			class = Class.newClass(superclass)
 --			class = superclass()
 --	The second notation allows a superclass to be passed as the second
@@ -141,7 +143,7 @@ end
 
 -------------------------------------------------------------------------------
 --	name = object:getClassName(): This function returns the {{_NAME}}
---	attribute of the specified object (or class).
+--	attribute of the specified class or object's class.
 -------------------------------------------------------------------------------
 
 function Class:getClassName()
@@ -167,7 +169,8 @@ end
 end
 
 -------------------------------------------------------------------------------
---	setClass(class): Changes class of an object or superclass of a class.
+--	object:setClass(class): Changes the class of an object
+--	or the superclass of a class.
 -------------------------------------------------------------------------------
 
 if DEBUG then
diff -r 0d3b40454be3 -r a9ab58ca0f5a tek/class/ui/object.lua
--- a/tek/class/ui/object.lua	Thu Mar 27 16:37:37 2008 +0100
+++ b/tek/class/ui/object.lua	Thu Mar 27 20:46:27 2008 +0100
@@ -29,7 +29,7 @@ local unpack = unpack
 local unpack = unpack
 
 module("tek.class.ui.object", tek.class)
-_VERSION = "Object 4.4"
+_VERSION = "Object 4.5"
 local Object = _M
 
 -------------------------------------------------------------------------------
@@ -58,7 +58,7 @@ end
 end
 
 -------------------------------------------------------------------------------
---	destobj = Object:resolveNotify(dest, val) [internal] - Resolves the
+--	destobj = object:resolveNotify(dest, val) [internal] - Resolves the
 --	destination object of a notification. The object class supports
 --	{{NOTIFY_SELF}}, {{NOTIFY_VALUE}}, {{NOTIFY_TOGGLE}}, {{NOTIFY_FORMAT}}.
 --	(This method is overriden in [[#tek.class.ui.element : Element]] to
@@ -104,11 +104,11 @@ end
 end
 
 -------------------------------------------------------------------------------


More information about the tekui-devel mailing list