[tekui-devel] tekui: Gadget: Fixed notification leak on "Pressed", disabled no...

Timm S. Mueller tmueller at schulze-mueller.de
Thu Sep 11 17:23:32 CEST 2008


details:   http://hg.teklib.org/tekui/rev/f051d241a7e1
changeset: 18:f051d241a7e1
user:      Timm S. Mueller <tmueller at schulze-mueller.de>
date:      Thu Sep 11 17:22:59 2008 +0200
description:
Gadget: Fixed notification leak on "Pressed", disabled notifications in
"inert" mode; Application, Group: removed checkMember(); Numeric: Fixed two
notification leaks; Window: Notification on "closing" should no longer occur
if the window is already closedM; Improved debugging facilities; Checkmarks
are now vertically aligned in their grid cells; List, ListGadget: added
clear() function

diffs (truncated from 589 to 100 lines):

diff -r ef686a0f90b6 -r f051d241a7e1 bin/demo.lua
--- a/bin/demo.lua	Wed Sep 10 17:24:59 2008 +0200
+++ b/bin/demo.lua	Thu Sep 11 17:22:59 2008 +0200
@@ -361,20 +361,44 @@ app = ui.Application:new
 													Class = "caption",
 													Style = "width: fill; text-align: right",
 												},
-												ui.CheckMark:new
-												{
-													Selected = ui.DEBUG,
-													Text = L.SLOW_RENDERING,
-													Notifications =
-													{
-														["Selected"] =
+												ui.Group:new
+												{
+													Children =
+													{
+														ui.CheckMark:new
 														{
-															[ui.NOTIFY_CHANGE] =
+															Selected = ui.DEBUG,
+															Text = L.SLOW_RENDERING,
+															Notifications =
 															{
-																{ ui.NOTIFY_SELF, ui.NOTIFY_FUNCTION, function(self, value)
-																	ui.DEBUG = value
-																	ui.Drawable.enableDebug(value)
-																end, ui.NOTIFY_VALUE }
+																["Selected"] =
+																{
+																	[ui.NOTIFY_CHANGE] =
+																	{
+																		{ ui.NOTIFY_SELF, ui.NOTIFY_FUNCTION, function(self, value)
+																			ui.DEBUG = value
+																			ui.Drawable.enableDebug(value)
+																		end, ui.NOTIFY_VALUE }
+																	}
+																}
+															}
+														},
+														ui.Text:new
+														{
+															Mode = "button",
+															Class = "button",
+															Text = "Debug Console",
+															Notifications =
+															{
+																["Pressed"] =
+																{
+																	[false] =
+																	{
+																		{ ui.NOTIFY_SELF, ui.NOTIFY_FUNCTION, function(self)
+																			db.console()
+																		end }
+																	}
+																}
 															}
 														}
 													}
diff -r ef686a0f90b6 -r f051d241a7e1 tek/class/list.lua
--- a/tek/class/list.lua	Wed Sep 10 17:24:59 2008 +0200
+++ b/tek/class/list.lua	Thu Sep 11 17:22:59 2008 +0200
@@ -16,6 +16,7 @@
 --		- List:addItem() - Adds an item to the list
 --		- List:changeItem() - Replaces an item in the list
 --		- List:checkPosition() - Verify position in the list
+--		- List:clear() - Removes all items from the list
 --		- List:getN() - Returns the number of items in the list
 --		- List:getItem() - Returns the item at the specified position
 --		- List:remItem() - Removes an item from the list
@@ -32,7 +33,7 @@ local remove = table.remove
 local remove = table.remove
 
 module("tek.class.list", tek.class)
-_VERSION = "List 1.3"
+_VERSION = "List 2.0"
 local List = _M
 
 -------------------------------------------------------------------------------
@@ -126,3 +127,11 @@ function List:checkPosition(lnr, null_va
 	end
 	return true, lnr
 end
+
+-------------------------------------------------------------------------------
+--	List:clear(): Remove all items from the list.
+-------------------------------------------------------------------------------
+
+function List:clear()
+	self.Items = { }
+end
diff -r ef686a0f90b6 -r f051d241a7e1 tek/class/object.lua
--- a/tek/class/object.lua	Wed Sep 10 17:24:59 2008 +0200
+++ b/tek/class/object.lua	Thu Sep 11 17:22:59 2008 +0200
@@ -63,7 +63,7 @@ local unpack = unpack
 local unpack = unpack
 
 module("tek.class.object", tek.class)
-_VERSION = "Object 8.0"


More information about the tekui-devel mailing list