[Laszlo-dev] For Review: Change 20070803-ben-D Summary: Better warning messages for nonexistent CSS property
P T Withington
ptw at openlaszlo.org
Sat Aug 4 03:48:32 PDT 2007
A few tips about debug messages:
In a format control string, %s calls .toString. If you want a more
detailed representation of an object, use %w instead of %s. And for
greater detail still, use %#w (which forces the type and a unique
identifier). No matter what the printed representation is, you can
always click on the representation to inspect the actual object, so
you don't have to give all sorts of detail about an object in a
warning message.
In this particular case, both LzNode#toString and LzNode#_dbg_name
(which is used by %w) will print the id and name of the node if they
exist, so you don't need to call that out separately in your debug
message.
On 2007-08-03, at 19:28 EDT, Benjamin Shine wrote:
> Change 20070803-ben-D by ben at slim.local on 2007-08-03 16:24:30 PDT
> in /Users/ben/src/svn/openlaszlo/branches/wafflecone
> for http://svn.openlaszlo.org/openlaszlo/branches/wafflecone
>
> Summary: Better warning messages for nonexistent CSS property
>
> New Features:
>
> Bugs Fixed: LPP-4428 Make warning on CSS value is null more
> informative
>
> Technical Reviewer: max (pending)
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
>
> Documentation:
> The warning if a developer tries to look up a CSS property which isn't
> defined now lists the node, the node's id, and the node's name --
> warnings only appear in debug mode.
>
> Release Notes:
>
> Details:
>
> Tests:
> http://localhost:8080/wafflecone/test/style/resource/main.lzx
> says
> WARNING: No CSS value found for node LzView id: gMissing with
> name "null" for property name nostyledefined
>
>
> Files:
> M WEB-INF/lps/lfc/services/LzCSSStyle.js
> M lps/components/incubator/rich-text/test/linkdialog-test.lzx
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070803-
> ben-D.tar
More information about the Laszlo-dev
mailing list