[tekui-devel] tekui: RadioButton: cleanup; PopItem: TickCount renamed to Begin...

Timm S. Mueller tmueller at neoscientists.org
Tue Apr 15 21:59:00 CEST 2008


details:   http://hg.teklib.org/tekui/rev/8ac3a97a1ba6
changeset: 426:8ac3a97a1ba6
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Mon Apr 14 17:46:20 2008 +0200
description:
RadioButton: cleanup; PopItem: TickCount renamed to BeginPopupTicks, added
recursive Application.connect() of menu children; MenuItem: no longer depends
on existance of a Parent, but instead of Parent's Style == "menubar"
attribute; CheckMark:askMinMax(): bug corrected when recalculating layout;
Examples: replaced onPress/onRelease artifacts with notifications

diffs (truncated from 871 to 100 lines):

diff -r d0e93da1f09e -r 8ac3a97a1ba6 tek/app/ui/gridalign.lua
--- a/tek/app/ui/gridalign.lua	Sat Apr 12 15:53:09 2008 +0200
+++ b/tek/app/ui/gridalign.lua	Mon Apr 14 17:46:20 2008 +0200
@@ -45,13 +45,52 @@ ui.application:new
 							Children =
 							{
 								ui.RadioButton:new { Label = "Left",
-									onPress = function(self) setouter(self, "HAlign", "left") end
-								},
-								ui.RadioButton:new { Label = "Center", Selected = true,
-									onPress = function(self) setouter(self, "HAlign", "center") end
+									Notifications =
+									{
+										["Pressed"] =
+										{
+											[true] =
+											{
+												{
+													ui.NOTIFY_SELF, function(self)
+														setouter(self, "HAlign", "left")
+													end
+												}
+											}
+										}
+									}
+								},
+								ui.RadioButton:new { Label = "Center", Selected = true,
+									Notifications =
+									{
+										["Pressed"] =
+										{
+											[true] =
+											{
+												{
+													ui.NOTIFY_SELF, function(self)
+														setouter(self, "HAlign", "center")
+													end
+												}
+											}
+										}
+									}
 								},
 								ui.RadioButton:new { Label = "Right",
-									onPress = function(self) setouter(self, "HAlign", "right") end
+									Notifications =
+									{
+										["Pressed"] =
+										{
+											[true] =
+											{
+												{
+													ui.NOTIFY_SELF, function(self)
+														setouter(self, "HAlign", "right")
+													end
+												}
+											}
+										}
+									}
 								},
 							},
 						},
@@ -63,13 +102,52 @@ ui.application:new
 							Children =
 							{
 								ui.RadioButton:new { Label = "Top",
-									onPress = function(self) setouter(self, "VAlign", "top") end
-								},
-								ui.RadioButton:new { Label = "Center", Selected = true,
-									onPress = function(self) setouter(self, "VAlign", "center") end
+									Notifications =
+									{
+										["Pressed"] =
+										{
+											[true] =
+											{
+												{
+													ui.NOTIFY_SELF, function(self)
+														setouter(self, "VAlign", "top")
+													end
+												}
+											}
+										}
+									}
+								},
+								ui.RadioButton:new { Label = "Center", Selected = true,
+									Notifications =
+									{
+										["Pressed"] =
+										{
+											[true] =
+											{
+												{
+													ui.NOTIFY_SELF, function(self)
+														setouter(self, "VAlign", "center")
+													end
+												}
+											}
+										}
+									}
 								},


More information about the tekui-devel mailing list