Revision: 1954
http://svn.sourceforge.net/vexi/?rev=1954&view=rev
Author: clrg
Date: 2007-07-08 16:15:15 -0700 (Sun, 08 Jul 2007)
Log Message:
-----------
More refactoring to get rid of missing cascade/return warnings
Modified Paths:
--------------
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/draggable.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/text/word.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/body.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/list.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/scrollpane.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/slider.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/spin.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/submenu.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/tab.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/tabpane.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/textfield.t
widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/toolbar.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/cell.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/option.t
widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/radio.t
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/role/draggable.t
===================================================================
(Binary files differ)
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/text/word.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/text/word.t 2007-07-08
21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/text/word.t 2007-07-08
23:15:15 UTC (rev 1954)
@@ -86,9 +86,18 @@
}
/** set valign within word */
- static.alignFunc = function(v) { cascade = "topleft"; trapee[0].align =
(trapee.valign=="center"?"":trapee.valign) + v; }
- static.valignFunc = function(v) { trapee[0].align =
(trapee.valign=="center"?"":v) + trapee.align; }
+ static.alignFunc = function(v)
+ {
+ cascade = "topleft";
+ trapee[0].align = (trapee.valign=="center"?"":trapee.valign) + v;
+ }
+ static.valignFunc = function(v)
+ {
+ trapee[0].align = (trapee.valign=="center"?"":v) + trapee.align;
+ cascade = v;
+ }
+
/** highlight write trap */
static.highlightFunc = function(v)
{
@@ -119,6 +128,6 @@
}
/** write textcolor information to internal text-box only */
- static.textcolorFunc = function(v) { trapee[0][trapname] = v; }
+ static.textcolorFunc = function(v) { trapee[0][trapname] = v; return; }
</vexi>
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/body.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/body.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/body.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -20,7 +20,7 @@
thisbox.getColWidth = funcNotSet;
thisbox.getPortHeight = funcNotSet;
- var selectFunc = function(v) { selected = trapee; }
+ var selectFunc = function(v) { selected = trapee; cascade = v; }
/** done outside of loadData in-case data is loaded manually */
Children ++= function(v)
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/list.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/list.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/list.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -66,6 +66,7 @@
{
if (v==null) setValue(value, false);
else setValue(v, true);
+ cascade = v;
}
/** applied to items in the list */
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/scrollpane.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/scrollpane.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/scrollpane.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -28,7 +28,7 @@
// public traps
/** write trap to set autohide on scrollbars */
- autohide ++= function(v) { autohidehorizontal = v; autohidevertical =
v; }
+ autohide ++= function(v) { autohidehorizontal = v; autohidevertical =
v; return; }
/** read trap to return current autohide state */
autohide ++= function() { return autohidehorizontal and
autohidevertical; }
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/slider.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/slider.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/slider.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -95,7 +95,9 @@
/** set step based on value */
static.valueWriteFunc = function(v)
{
- if (!trapee.traplock) trapee.step = vexi.math.round((v - trapee.min) /
trapee.interval);
+ if (!trapee.traplock)
+ trapee.step = vexi.math.round((v - trapee.min) / trapee.interval);
+ return;
}
/** reset handle position when widget width changes */
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/spin.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/spin.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/spin.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -40,6 +40,7 @@
if (value != null and min != null)
value = vexi.math.max(value - interval, min);
else if (min != null) value = min;
+ return;
}
cascade = v;
}
@@ -53,6 +54,7 @@
if (value != null and max != null)
value = vexi.math.min(value + interval, max);
else if (max != null) value = max;
+ return;
}
cascade = v;
}
@@ -78,10 +80,18 @@
}
/** constrain value to min */
- static.minFunc = function(v) { cascade = v; if (trapee.value > v)
trapee.value = v; }
+ static.minFunc = function(v)
+ {
+ cascade = v;
+ if (trapee.value > v) trapee.value = v;
+ }
/** constrain value to max */
- static.maxFunc = function(v) { cascade = v; if (v > trapee.value)
trapee.value = v; }
+ static.maxFunc = function(v)
+ {
+ cascade = v;
+ if (v > trapee.value) trapee.value = v;
+ }
/** check, constrain, and display new value */
static.valueFunc = function(v)
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/submenu.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/submenu.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/submenu.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -42,7 +42,7 @@
}
/** popdown menu when a menu item is fired */
- var childActionFunc = function(v) { popdown = true; }
+ var childActionFunc = function(v) { cascade = v; popdown = true; }
/** set up submenu item list */
th_list ++= function(v)
@@ -82,6 +82,7 @@
trapee.th_popbox.popgroup = "sublevel" + v;
for (var i=0; trapee.th_list.numchildren > i; i++)
trapee.th_list[i].level = v+1;
+ cascade = v;
}
/** navigate submenu on keypress */
@@ -101,6 +102,7 @@
else trapee.itemgroup.selected.KeyPressed = v;
}
else trapee.itemgroup.selected.KeyPressed = v;
+ return;
}
}
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/tab.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/tab.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/tab.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -41,6 +41,7 @@
ns.focused = true;
}
}
+ else cascade = v;
}
</vexi>
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/tabpane.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/tabpane.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/tabpane.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -21,31 +21,45 @@
/** (un)displays the close button */
displayCloseButton ++= function(v) { th_close.display = v; cascade =
v; }
+ var closeFunc = function(v) { show.thisbox = null; return; }
+
/** sets up the close button */
th_close ++= function(v)
{
cascade = v;
- v.action ++= function(v) { show.thisbox = null; }
+ v.action ++= closeFunc;
th_close --= callee;
}
+ var nextFunc = function(v)
+ {
+ th_head.x = vexi.math.max(th_head.x-10,
th_headwrap.width-th_head.width);
+ return;
+ }
+
/** sets up the 'next' button */
th_next ++= function(v)
{
cascade = v;
v.repeats = true;
v.interval = 100;
- v.action ++= function(v) { th_head.x = vexi.math.max(th_head.x-10,
th_headwrap.width-th_head.width); }
+ v.action ++= nextFunc;
th_next --= callee;
}
+ var prevFunc = function(v)
+ {
+ th_head.x = vexi.math.min(th_head.x+10, 0);
+ return;
+ }
+
/** sets up the 'prev' button */
th_prev ++= function(v)
{
cascade = v;
v.repeats = true;
v.interval = 100;
- v.action ++= function(v) { th_head.x = vexi.math.min(th_head.x+10,
0); }
+ v.action ++= prevFunc;
th_prev --= callee;
}
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/textfield.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/textfield.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/textfield.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -155,6 +155,7 @@
var l = v.length;
for (var i=0; l>i; i++) str += '*';
trapee.th_edit.text = str;
+ return;
}
/** return the correct value */
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/toolbar.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/toolbar.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/lib/widget/toolbar.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -12,12 +12,13 @@
th_content ++= function(v)
{
+ cascade = v;
v.Children ++= function(c)
{
+ cascade = c;
if (c == null) th_content[arguments.trapname].group = null;
else if (group) c.group = group;
else group = c.group;
- cascade = c;
}
}
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/cell.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/cell.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/cell.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -24,9 +24,10 @@
static.toggleTextcolorWriteFunc = function(v)
{
+ cascade = v;
var val = trapee.value;
if (val == "TRUE" or val == "true" or (typeof(v) != "string" and val
== true))
- trapee[0].fill = v == "white" ? theme.image.check_highlighted :
theme.image.check;
+ trapee[0].fill = vexi..vexi.theme.image["check" + (v == "white" ?
"" : "_highlighted")];
}
static.toggleValueWriteFunc = function(v)
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/option.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/option.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/option.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -62,7 +62,7 @@
}
/** move proxy children to $popbox children */
- $proxy.Children ++= function(v) { $content[arguments.trapname] = v; }
+ $proxy.Children ++= function(v) { $content[arguments.trapname] = v;
return; }
$proxy.Children ++= function() { return $content[arguments.trapname]; }
</lib:option>
Modified: widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/radio.t
===================================================================
--- widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/radio.t
2007-07-08 21:05:29 UTC (rev 1953)
+++ widgets/trunk/org.vexi.widgets/src/org/vexi/theme/win2k/radio.t
2007-07-08 23:15:15 UTC (rev 1954)
@@ -27,8 +27,8 @@
static.activeFunc = function(v)
{
+ cascade = v;
trapee.th_bg.fill = vexi..org.vexi.theme.win2k.image.radiobg_active;
- cascade = v;
}
static.enableFunc = function(v)
@@ -48,11 +48,16 @@
static.normalFunc = function(v)
{
+ cascade = v;
trapee.th_bg.fill = trapee.enabled
? vexi..org.vexi.theme.win2k.image.radiobg
: vexi..org.vexi.theme.win2k.image.radiobg_active;
}
- static.selectFunc = function(v) { cascade = v; trapee.th_radio.display =
trapee.selected; }
+ static.selectFunc = function(v)
+ {
+ cascade = v;
+ trapee.th_radio.display = trapee.selected;
+ }
</vexi>
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Vexi-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/vexi-svn