Donald Anderson | 1 Nov 13:17
Favicon
Gravatar

For Review: Change 20081031-dda-X Summary: Fix/remove most warnings from schema builder

Change 20081031-dda-X by dda <at> lester.local on 2008-10-31 13:10:24 EDT

    in /Users/dda/laszlo/src/svn/openlaszlo/trunk-doc5

    for http://svn.openlaszlo.org/openlaszlo/trunk


Summary: Fix/remove most warnings from schema builder


New Features:


Bugs Fixed: LPP-3508


Technical Reviewer: ptw (pending)

QA Reviewer: (pending)

Doc Reviewer: (pending)


Documentation:


Release Notes:


Details:

   Several kinds of warnings have been produced by the schema builder.

   1) Many were not real:


     [java] Warning: attribute LzHTTPDataProvider.prototype has no <at> lzxtype or <at> type in javadoc, needed for schema

     [java] Warning: attribute LzHTTPDataRequest.__ivars__ has no <at> lzxtype or <at> type in javadoc, needed for schema


   __ivars__ and prototype are used as names internally in the doc and never represent attributes that

   need to be documented for the schema.  So these messages are now repressed.


   2) Two sets of messages like so:

     [java] WARNING: ignoring unknown initializer type: org.openlaszlo.sc.parser.ASTAssignmentExpression

     [java] node: (0>>0) org.openlaszlo.sc.parser.ASTAssignmentExpression  (null: 167, 18)

     [java] node: (1>>0) org.openlaszlo.sc.parser.ASTPropertyIdentifierReference  (null: 167, 20)

     [java] node: (2>>0) org.openlaszlo.sc.parser.ASTIdentifier ii (null: 167, 18)

     [java] node: (2>>1) org.openlaszlo.sc.parser.ASTIdentifier name (null: 167, 21)

     [java] node: (1>>1) org.openlaszlo.sc.parser.ASTOperator  (null: 167, 26)

     [java] node: (1>>2) org.openlaszlo.sc.parser.ASTLiteral Instance (null: 167, 28)


   Represent a global var statement that was initialized:

    if ($profile) {

       var ii = Instance.initialize;

       ii._dbg_name = ii.name = 'Instance.initialize';

    }

   Whether or not globals could be initialized without warning was not addressed.  In this

   case, it seemed clear that the introduction of the global 'ii' was a mistake, so

   these lines were rewritten without using a variable.


   3) A larger number of errors represent variable names misnamed in the documentation, or

      when <at> param name type:   was used instead of <at> param type name:


     [java] Oct 31, 2008 1:04:59 PM org.openlaszlo.js2doc.ReprocessComments$ParamFieldFilter handleField

     [java] WARNING: Couldn't find parameter named view in LzSelectionManager.prototype.construct

    

     These have been corrected by preferring the names actually used in the code.



   These changes expose a much smaller set of warnings about missing type information in javadoc

   that is actually needed for a correct schema.


Tests:

   smokecheck (swf8, dhtml)

   weather (all)

   lzpix (all)

   hello (swf9)


Files:

M      WEB-INF/lps/lfc/kernel/swf/LzMakeLoadSprite.as

M      WEB-INF/lps/lfc/kernel/swf9/LzBrowserKernel.lzs

M      WEB-INF/lps/lfc/services/LzBrowser.lzs

M      WEB-INF/lps/lfc/debugger/LzDebug.lzs

M      WEB-INF/lps/lfc/debugger/platform/dhtml/LzDebug.js

M      WEB-INF/lps/lfc/debugger/LzMemory.lzs

M      WEB-INF/lps/lfc/helpers/LzSelectionManager.lzs

M      WEB-INF/lps/lfc/data/LzReplicationManager.lzs

M      WEB-INF/lps/lfc/data/LzDataset.lzs

M      WEB-INF/lps/lfc/compiler/LzBootstrapDebugService.lzs

M      WEB-INF/lps/lfc/compiler/Class.lzs

M      WEB-INF/lps/server/src/org/openlaszlo/js2doc/SchemaBuilder.java


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081031-dda-X.tar




--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
email: dda <at> ddanderson.com
www: http://www.ddanderson.com



André Bargull | 1 Nov 15:41

Bracket syntax notation in AS3

Can anyone explain to me, why `++(o['count'])` fails to compile for AS3? 
Thanks!

> <canvas>
>   <handler name="oninit" >
>     var o = {count:0};
>     if (++(o.count) == 1) Debug.write("it's one");
> //Error: Implicit coercion of a value of type String to an unrelated 
> type Number, in line: if (++$2["count"] == 2) {
> //Error: Comparison between a value with static type String and a 
> possibly unrelated type int, in line: if (++$2["count"] == 2) {
> //    if (++(o['count']) == 2) Debug.write("it's two");
> //Error: Operand of increment must be a reference, in line: if 
> (++(o["count"] as int) == 3) {
> //    if (++(o['count'] cast int) == 3) Debug.write("it's three");
> //Error: Operand of increment must be a reference, in line: if 
> (++int(o["count"]) == 4) {
> //    if (++(int(o['count'])) == 4) Debug.write("it's four");
>   </handler>
> </canvas>

André Bargull | 1 Nov 16:01

Re: OpenLaszlo Event Model

I've just implemented this "new event-system" locally, and amazon-demo 
start-time was before my change by about 1350-1450ms [1], with my 
changes it was dropped to 980-1050ms. And I didn't even updated anything 
of the LFC to use the new, more effective methods...

[1] FF3 + FP10 (debug-player), demo compiled for swf9 non-debug, time 
measured with <inittimer>

On 10/29/2008 1:14 AM, André Bargull wrote:
> I've started to reconcile with that idea and made up a some code 
> snippets. IMO, there is at least one thing we definitely need to 
> change: the current for API for LzDelegate#unregisterFrom(..). At the 
> moment, the method signature is "function unregisterFrom 
> (event:LzEvent)", this needs to be parallel to 
> LzDelegate#register(..), so "function unregisterFrom 
> (target:LzEventTarget, type:String)".
> (The attached code is neither complete nor fast, I just wanted to be 
> minimalistic, but also not too abstract.)
>
>> We have an (improvement 
>> suggestion)[http://jira.openlaszlo.org/jira/browse/LPP-6034 ] to 
>> change the structure of the event system to be more efficient and  
>> more DOM-like.  I recently added a comment:
>>
>>  
>>> > What we really want to do is get more in line with 
>>> http://www.w3.org/TR/DOM-Level-2-Events/
>>> >
>>> > This would mean that LzEventable would become EventTarget, and  > 
>>> LzDelegatable [LPP-7037] would become EventListener.
>>> >
>>> > The major impact on our system is that LzEvents would no longer 
>>> be  > objects in themselves, but simply names (event types). This 
>>> could  > reduce the overhead of events, but would mean a big 
>>> incompatibility.  > Instead of:
>>> >
>>> >   <target>.<event>.sendEvent(<value>);
>>> >
>>> > you would have to say:
>>> >
>>> >   <target>.dispatchEvent(<event>, <value>);
>>> >
>>> > [In DOM2, dispatchEvent takes only an Event as its argument, the  
>>> > event is an object that has attributes such as the event name  > 
>>> (type), state, and depending on the type of the event, additional  > 
>>> information -- what we usually pass as the single <value>. If we  > 
>>> want to be more compatible, perhaps we should implement the  > 
>>> `dispatchEvent` interface and another `dispatchSimpleEvent`  > 
>>> interface that handles most of our events. Otherwise the overhead 
>>> we  > save by not having LzEvent objects to attach listeners to will 
>>> be  > replaced by allocating an Event object every time you want to 
>>> send  > an event.]
>>>     
>>
>> I'd be interested in other ideas and opinions.

Lou Iorio | 1 Nov 18:51

Re: For Review: Change 20081030-laszlo-2 Summary: Color example 3 gives warnings.

not approved (I know, you didn't ask)

The example still prints:

3=styled by 0x0000FF

I think the second declaration should be deleted, not repeated.

  #vRGB {
     bgcolorRGB : "#0000FF";
     }

     #tRGB {
     fgcolorRGB : "#0000FF";
     }

     #vHex {
     bgcolorHex : "#0000FF";
     }

     #tHex {
     fgcolorHex : "#0000FF";
     }

On Oct 30, 2008, at 5:11 AM, J Crowley wrote:

> Change 20081030-laszlo-2 by laszlo <at> T43-L3XEXMW on 2008-10-30  
> 04:58:01 EDT
> in /home/laszlo/src/svn/openlaszlo/trunk-liquid
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: Color example 3 gives warnings.
>
> New Features:
>
> Bugs Fixed: LPP-7193 - Color example 3 gives warnings.
>
> Technical Reviewer: max
> QA Reviewer: promanik
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details: Fixed the example as the warnings dictated.
> (CSS colors can't be of the format 0x000000.)
>
> Tests: Run the affected file. There should be no
> warnings about invalid color formats.
>
> Files:
> M docs/src/developers/programs/color-$3.lzx
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081030-laszlo-2.tar
>
>

P T Withington | 1 Nov 19:32
Picon
Favicon
Gravatar

Re: For Review: Change 20081030-laszlo-2 Summary: Color example 3 gives warnings.

I agree.  There are 2 ways to specify a color in CSS:  a color name  
(where the name is one of the 16 css color names), or RGB.  RGB has 3  
forms:  hex (#0000ff), percent (rgb(0,0,100%)), or numbers in the  
range 0-255 (rgb(0,0,255)).  It would be nice to show all those  
possibilities.

We used to allow the kludge of specifying the color as a string that  
could be parsed as a number ('0x0000ff'), but that is not true CSS, so  
we have deprecated it.  It was really only a work-around for our  
incomplete CSS parser.

On 2008-11-01, at 13:51EDT, Lou Iorio wrote:

> not approved (I know, you didn't ask)
>
> The example still prints:
>
> 3=styled by 0x0000FF
>
> I think the second declaration should be deleted, not repeated.
>
> #vRGB {
>    bgcolorRGB : "#0000FF";
>    }
>
>    #tRGB {
>    fgcolorRGB : "#0000FF";
>    }
>
>    #vHex {
>    bgcolorHex : "#0000FF";
>    }
>
>    #tHex {
>    fgcolorHex : "#0000FF";
>    }
>
>
> On Oct 30, 2008, at 5:11 AM, J Crowley wrote:
>
>> Change 20081030-laszlo-2 by laszlo <at> T43-L3XEXMW on 2008-10-30  
>> 04:58:01 EDT
>> in /home/laszlo/src/svn/openlaszlo/trunk-liquid
>> for http://svn.openlaszlo.org/openlaszlo/trunk
>>
>> Summary: Color example 3 gives warnings.
>>
>> New Features:
>>
>> Bugs Fixed: LPP-7193 - Color example 3 gives warnings.
>>
>> Technical Reviewer: max
>> QA Reviewer: promanik
>> Doc Reviewer: (pending)
>>
>> Documentation:
>>
>> Release Notes:
>>
>> Details: Fixed the example as the warnings dictated.
>> (CSS colors can't be of the format 0x000000.)
>>
>> Tests: Run the affected file. There should be no
>> warnings about invalid color formats.
>>
>> Files:
>> M docs/src/developers/programs/color-$3.lzx
>>
>> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081030-laszlo-2.tar
>>
>>
>

J Crowley | 2 Nov 04:29
Favicon

Re: For Review: Change 20081030-laszlo-2 Summary: Color example 3 gives warnings.

Sounds good.  I've already checked this in, but I'll revise as 
recommended and check that in.

P T Withington wrote:
> I agree.  There are 2 ways to specify a color in CSS:  a color name 
> (where the name is one of the 16 css color names), or RGB.  RGB has 3 
> forms:  hex (#0000ff), percent (rgb(0,0,100%)), or numbers in the 
> range 0-255 (rgb(0,0,255)).  It would be nice to show all those 
> possibilities.
>
> We used to allow the kludge of specifying the color as a string that 
> could be parsed as a number ('0x0000ff'), but that is not true CSS, so 
> we have deprecated it.  It was really only a work-around for our 
> incomplete CSS parser.
>
>
> On 2008-11-01, at 13:51EDT, Lou Iorio wrote:
>
>> not approved (I know, you didn't ask)
>>
>> The example still prints:
>>
>> 3=styled by 0x0000FF
>>
>> I think the second declaration should be deleted, not repeated.
>>
>> #vRGB {
>>    bgcolorRGB : "#0000FF";
>>    }
>>
>>    #tRGB {
>>    fgcolorRGB : "#0000FF";
>>    }
>>
>>    #vHex {
>>    bgcolorHex : "#0000FF";
>>    }
>>
>>    #tHex {
>>    fgcolorHex : "#0000FF";
>>    }
>>
>>
>> On Oct 30, 2008, at 5:11 AM, J Crowley wrote:
>>
>>> Change 20081030-laszlo-2 by laszlo <at> T43-L3XEXMW on 2008-10-30 
>>> 04:58:01 EDT
>>> in /home/laszlo/src/svn/openlaszlo/trunk-liquid
>>> for http://svn.openlaszlo.org/openlaszlo/trunk
>>>
>>> Summary: Color example 3 gives warnings.
>>>
>>> New Features:
>>>
>>> Bugs Fixed: LPP-7193 - Color example 3 gives warnings.
>>>
>>> Technical Reviewer: max
>>> QA Reviewer: promanik
>>> Doc Reviewer: (pending)
>>>
>>> Documentation:
>>>
>>> Release Notes:
>>>
>>> Details: Fixed the example as the warnings dictated.
>>> (CSS colors can't be of the format 0x000000.)
>>>
>>> Tests: Run the affected file. There should be no
>>> warnings about invalid color formats.
>>>
>>> Files:
>>> M docs/src/developers/programs/color-$3.lzx
>>>
>>> Changeset: 
>>> http://svn.openlaszlo.org/openlaszlo/patches/20081030-laszlo-2.tar
>>>
>>>
>>
>
>

Lou Iorio | 3 Nov 16:27

For Review: Change 20081103-lou-B Summary: dguide, Understanding Instantiation chapter: fix typo, remove constraints restriction.

Change 20081103-lou-B by lou <at> loumac.local on 2008-11-03 11:23:07 AST
     in /Users/lou/src/svn/openlaszlo/trunk
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: dguide, Understanding Instantiation chapter: fix typo, remove  
constraints restriction.

Bugs Fixed: http://www.openlaszlo.org/jira/browse/LPP-7260

Technical Reviewer: (pending)
QA Reviewer: (pending)
Doc Reviewer: abargull

Details: remove: (does not include expressions, such width="$ 
{parent.width}")

Tests: visual verify

Files:
M      docs/src/developers/initialization-and-instantiation.dbk

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081103-lou-B.tar

André Bargull | 3 Nov 16:46

Re: For Review: Change 20081103-lou-B Summary: dguide, Understanding Instantiation chapter: fix typo, remove constraints restriction.

Approved.

On 11/3/2008 4:27 PM, Lou Iorio wrote:
> Change 20081103-lou-B by lou <at> loumac.local on 2008-11-03 11:23:07 AST
>     in /Users/lou/src/svn/openlaszlo/trunk
>     for http://svn.openlaszlo.org/openlaszlo/trunk
> 
> Summary: dguide, Understanding Instantiation chapter: fix typo, remove 
> constraints restriction.
> 
> Bugs Fixed: http://www.openlaszlo.org/jira/browse/LPP-7260
> 
> Technical Reviewer: (pending)
> QA Reviewer: (pending)
> Doc Reviewer: abargull
> 
> Details: remove: (does not include expressions, such 
> width="${parent.width}")
> 
> Tests: visual verify
> 
> Files:
> M      docs/src/developers/initialization-and-instantiation.dbk
> 
> 
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081103-lou-B.tar
> 

P T Withington | 3 Nov 16:53
Picon
Favicon
Gravatar

Re: Bracket syntax notation in AS3

I would say it is a Flex bug.  I bet their expander for ++ is just  
screwing up somehow, probably incorrectly trying to increment 'count'  
or something.  I would file a bug with Adobe.

On 2008-11-01, at 10:41EDT, André Bargull wrote:

> Can anyone explain to me, why `++(o['count'])` fails to compile for  
> AS3? Thanks!
>
>> <canvas>
>>  <handler name="oninit" >
>>    var o = {count:0};
>>    if (++(o.count) == 1) Debug.write("it's one");
>> //Error: Implicit coercion of a value of type String to an  
>> unrelated type Number, in line: if (++$2["count"] == 2) {
>> //Error: Comparison between a value with static type String and a  
>> possibly unrelated type int, in line: if (++$2["count"] == 2) {
>> //    if (++(o['count']) == 2) Debug.write("it's two");
>> //Error: Operand of increment must be a reference, in line: if (++ 
>> (o["count"] as int) == 3) {
>> //    if (++(o['count'] cast int) == 3) Debug.write("it's three");
>> //Error: Operand of increment must be a reference, in line: if (+ 
>> +int(o["count"]) == 4) {
>> //    if (++(int(o['count'])) == 4) Debug.write("it's four");
>>  </handler>
>> </canvas>
>

André Bargull | 3 Nov 18:33

Re: Bracket syntax notation in AS3

Ok, I've created "http://bugs.adobe.com/jira/browse/ASC-3574".

On 11/3/2008 4:53 PM, P T Withington wrote:
> I would say it is a Flex bug.  I bet their expander for ++ is just 
> screwing up somehow, probably incorrectly trying to increment 'count' or 
> something.  I would file a bug with Adobe.
> 
> On 2008-11-01, at 10:41EDT, André Bargull wrote:
> 
>> Can anyone explain to me, why `++(o['count'])` fails to compile for 
>> AS3? Thanks!
>>
>>> <canvas>
>>>  <handler name="oninit" >
>>>    var o = {count:0};
>>>    if (++(o.count) == 1) Debug.write("it's one");
>>> //Error: Implicit coercion of a value of type String to an unrelated 
>>> type Number, in line: if (++$2["count"] == 2) {
>>> //Error: Comparison between a value with static type String and a 
>>> possibly unrelated type int, in line: if (++$2["count"] == 2) {
>>> //    if (++(o['count']) == 2) Debug.write("it's two");
>>> //Error: Operand of increment must be a reference, in line: if 
>>> (++(o["count"] as int) == 3) {
>>> //    if (++(o['count'] cast int) == 3) Debug.write("it's three");
>>> //Error: Operand of increment must be a reference, in line: if 
>>> (++int(o["count"]) == 4) {
>>> //    if (++(int(o['count'])) == 4) Debug.write("it's four");
>>>  </handler>
>>> </canvas>
>>
> 
> 


Gmane