[Laszlo-dev] For Review: Change 20080919-ptw-i Summary: Arr. Some tasty bits for the debugger
André Bargull
andre.bargull at udo.edu
Mon Sep 22 10:41:10 PDT 2008
>>> Some other changes (update for __StringDescription(), fix for
>>> IE-debugger, boolean coercion in isObjectLike() and some more tiny
>>> things) are here:
>>>
"http://svn.openlaszlo.org/openlaszlo/patches/20080920-bargull-sLz.tar".
>>>
>
> Did I miss a review request?
No, you didn't. I just packed the other changes into a tar, so it's
easier to inspect them and the mail isn't flooded too much.
>>>> Debug.__typeof(lz.canvas.prototype) prints:
>>>>> '<view>'
>>
>> That's actually correct. The prototype of most classes is going to
>> actually be an instance of the superclass.
Just noted that because in 4.1, that expression prints "'lz.canvas'" and ...
>>>> ´lz.canvas.prototype´ prints:
>>>>> «<view>#0| <canvas>.prototype»
>>>>
>>
>> Correct, this is saying that the prototype of canvas is a <view>
>> object. The average user should not really care about this, but someone
>> working in the class system does.
this prints "«lz.canvas#0| .prototype»".
On 9/22/2008 7:18 PM, P T Withington wrote:
> I'll try to address all these today.
>
> On 2008-09-20, at 12:50EDT, André Bargull wrote:
>
>> And another issue I've still have in mind - we need decide what to
>> about ´null´.
>>
>> Debug.__String(null, true, 100, true):
>> swf8: 'null'
>> dhtml: '«object| null»'
>> swf9: '«object| null»'
>>
>> because typeof(null):
>> swf8: 'null'
>> dhtml: 'object'
>> swf9: 'object'
>>
>> Especially this piece of code in __String() works differently in swf8
>> compared to dhtml/swf9:
>>> if (d.pretty &&
>>> ((! unique) || (typeof(thing) != 'object')) &&
>>> (s != "") && (s.length < limit)) {
>>> return s;
>>> }
>>
>> I think in the ES4 proposal, they said they're going to change
>> ´typeof(null)´ to return "null".
>
> Since `null` is essentially a keyword, I mean to have it always just
> print as `null`. The code is clearly broken if it is not. Same for
> `true` and `false`, `1`, `2`, etc. You shouldn't need to see their type
> to know what they are.
>
>> On 9/20/2008 6:30 PM, André Bargull wrote:
>>> "prototype"-objects and mixins don't work properly:
>>>
>>> Debug.__typeof(lz.canvas.prototype) prints:
>>>> '<view>'
>
> That's actually correct. The prototype of most classes is going to
> actually be an instance of the superclass.
>
>>> ´lz.canvas.prototype´ prints:
>>>> «<view>#0| <canvas>.prototype»
>>>
>
> Correct, this is saying that the prototype of canvas is a <view>
> object. The average user should not really care about this, but someone
> working in the class system does.
>
>>>> + // _dbg_name not needed because functionName computes class
>>>> + // names now
>>> But not for mixins: Debug.functionName(LzFormatter) == null
>
> That's a bug that I'll need to fix.
>
>>> Also type into the debugger ´LzFormatter´:
>>>> «Trait#8| {…, classname: LzFormatter, _dbg_typename: Trait,
>>>> prototype: [object Object], instanceProperties: formatToString,[type
>>>> Function],pad,[type Function], implementations: [object Object]}»
>>>
>
> bug
>
>>> Some other changes (update for __StringDescription(), fix for
>>> IE-debugger, boolean coercion in isObjectLike() and some more tiny
>>> things) are here:
>>> "http://svn.openlaszlo.org/openlaszlo/patches/20080920-bargull-sLz.tar".
>>>
>
> Did I miss a review request?
>
>>> BTW, why do the CSS-classes "span.DEBUG, span.INFO, span.WARNING,
>>> span.ERROR, span.TRACE, span.MONITOR span.INSPECT" have got "cursor:
>>> pointer"?
>>> 1) a comma is missing in front of "span.INSPECT", that'll break a lot
>>> of things..
>>> 2) only "span.INSPECT" should be inspectable, shouldn't it?
>>>
>
> I mean for all of the debug messages to be inspectable, but this may be
> the wrong way to do it. The issue is that you can't nest <a> elements,
> so I switched to using <span> with onclick, which works for DHTML, but
> swf is still a problem.
>
> The thing is, the various debug/info/warning/error/etc. want to be
> inspectable since that is how you get the backtrace out of them. But
> they are messages, which may have inspectable sub-strings too. I
> probably want to re-work this so that either just the 'location' part of
> those messages is inspectable, and that is how you get to the backtrace,
> or, any part of the message that is not already inspectable is made so.
> And do that in the generic code, so the platform code does not have to
> handle nested links.
>
>>> On 9/20/2008 4:45 AM, P T Withington wrote:
>>>> [Addressing André's review comments. Checking in because this
>>>> improves the debugger in all platforms...]
>>>>
>>>> Change 20080919-ptw-i by ptw at dueling-banjos.local on 2008-09-19
>>>> 08:19:53 EDT
>>>> in /Users/ptw/OpenLaszlo/honey-dew-3
>>>> for http://svn.openlaszlo.org/openlaszlo/trunk
>>>>
>>>> Summary: Arr. Some tasty bits for the debugger
>>>>
>>>> Bugs Fixed:
>>>> LPP-6880 tagnames of anonymous classes (review comments)
>>>>
>>>> Technical Reviewer: a.bargull at intensis.de (pending)
>>>> QA Reviewer: hminsky (pending)
>>>>
>>>> Details:
>>>> lzunit-test: type-oh discovered by the flex compiler
>>>>
>>>> LzInit, LzDebug.js: Remove old naming of singletons code, now that
>>>> the debugger handles them better.
>>>>
>>>> LzDebug*: trust functionName for names of classes, make
>>>> functionName more accurate for class names for each platform by
>>>> refactoring.
>>>>
>>>> swf9/LzDebug: refine isObjectLike to not confuse auto-wrapped
>>>> primitives with Object.
>>>>
>>>> Class: Remove custom _dbg_name now that debugger handles Class
>>>> more uniformly, add _dbg_prototype_for so the debugger can decode
>>>> prototypes appropriately.
>>>>
>>>> lzunit: Instead of inheriting from text, delegate formatting to a
>>>> text node -- because you don't actually contain any text.
>>>>
>>>> Tests:
>>>> Poked at various things in the debugger in swf8/9 and dhtml, and
>>>> they look reasonable
>>>>
>>>> Files:
>>>> M test/smoke/lzunit-test.lzl
>>>> M WEB-INF/lps/lfc/debugger/LzInit.lzs
>>>> M WEB-INF/lps/lfc/debugger/LzDebug.lzs
>>>> M WEB-INF/lps/lfc/debugger/platform/swf/LzDebug.as
>>>> M WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js
>>>> M WEB-INF/lps/lfc/debugger/platform/swf9/LzDebug.as
>>>> M WEB-INF/lps/lfc/compiler/Class.lzs
>>>> M lps/components/lzunit/lzunit.lzx
>>>>
>>>> Changeset:
>>>> http://svn.openlaszlo.org/openlaszlo/patches/20080919-ptw-i.tar
>>>
>>
>
>
More information about the Laszlo-dev
mailing list