[Laszlo-checkins] r16757 - in openlaszlo/trunk/WEB-INF/lps/lfc: kernel/swf views
max@openlaszlo.org
max at openlaszlo.org
Mon Jun 21 07:01:15 PDT 2010
Author: max
Date: 2010-06-21 07:01:13 -0700 (Mon, 21 Jun 2010)
New Revision: 16757
Modified:
openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
Log:
Change 20100618-maxcarlson-T by maxcarlson at friendly on 2010-06-18 13:02:40 PDT
in /Users/maxcarlson/openlaszlo/trunk-clean
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Prevent spurious warnings when using tintcolor
Bugs Fixed: LPP-9124 - setAttribute('tintcolor' issues a warning about fgcolor being set
Technical Reviewer: ptw
QA Reviewer: mdemmon
Details: LzSprite - Fix braino in setClickRegion.
LaszloView - Update deprecated tags, deprecate get/setColorTransform(), test for correct default fgcolor before warning about tintcolor to prevent spurious warnings, improve warning messages to show which view they're complaining about.
Tests: See LPP-9124
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2010-06-21 08:29:19 UTC (rev 16756)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/kernel/swf/LzSprite.as 2010-06-21 14:01:13 UTC (rev 16757)
@@ -878,7 +878,7 @@
* */
LzSprite.prototype.setClickRegion = function ( resource ){
if (this.clickresource === resource) return;
- clickresource = resource;
+ this.clickresource = resource;
if (resource == null) {
// clear the mask
this.__LZbuttonRef.setMask(null);
Modified: openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs
===================================================================
--- openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs 2010-06-21 08:29:19 UTC (rev 16756)
+++ openlaszlo/trunk/WEB-INF/lps/lfc/views/LaszloView.lzs 2010-06-21 14:01:13 UTC (rev 16757)
@@ -748,7 +748,7 @@
function $lzc$set_fgcolor(c) {
if ($debug) {
if (this.tintcolor != '') {
- Debug.warn('Setting fgcolor when tintcolor is already set');
+ Debug.warn('Setting fgcolor when tintcolor is already set on', this);
}
}
// This enables setting to symbolic color names, which people expect
@@ -2227,7 +2227,7 @@
* view or subview resources. Use the view method
* <method>setColorTransform</method> to tint a view.
* @param Integer c: A color in rgb format; for example, 0xff0000 is red.
- * @deprecated Use setAttribute('fgcolor', ...) instead.
+ * @deprecated Use setAttribute('tintcolor', ...) instead.
*/
final function setColor ( c ){
if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
@@ -2262,8 +2262,10 @@
*
* @runtimes as2
* @param Object o: A color transformation dictionary
+ * @deprecated Use setAttribute('tintcolor', ...) instead.
*/
function setColorTransform ( o ){
+ if ($debug) Debug.deprecated(this, arguments.callee, this.setAttribute);
if (this.capabilities.colortransform) {
this.sprite.setColorTransform(o);
// update the tintcolor attribute
@@ -2291,8 +2293,10 @@
* o.ab: overall offset (-255 to 255);
*
* @runtimes as2
+ * @deprecated
*/
function getColorTransform (){
+ if ($debug) Debug.deprecated(this, arguments.callee, this.tintcolor);
if (this.capabilities.colortransform) {
return this.sprite.getColorTransform();
} else if ($debug) {
@@ -3634,8 +3638,8 @@
function $lzc$set_tintcolor(color) {
if (this.capabilities.colortransform) {
if ($debug) {
- if (this.fgcolor != 0) {
- Debug.warn('Setting tintcolor when fgcolor is already set');
+ if (this.fgcolor != null) {
+ Debug.warn('Setting tintcolor when fgcolor is already set on', this);
}
}
More information about the Laszlo-checkins
mailing list