P T Withington wrote:
> I tried to use the browser calls, but I kept getting screwed because the 
> sprite was trying to make those calls before the browser code was 
> loaded.  Maybe we can re-organize things to make this work, but I'd vote 
> to make that an improvement, rather than re-opening this bug.

Please file an improvement.  My concern would be that animated canvas 
attributes might not update correctly...

> I made the calls static because they don't relate to any sprite 
> instance.  OTOH, maybe they don't belong on the sprite at all?  Maybe 
> there should be another kernel for talking to the app container, or 
> maybe they really belong in the browser kernel.  I think I put them in 
> the sprite just because the sprite was already talking to the app 
> container.

Fair enough - 1/2 dozen/6...

> On 2009-08-31, at 14:11, Max Carlson wrote:
> 
>> A few things for swf/swf9: you should probably use 
>> LzBrowserKernel.callJS() instead of DojoExternalInterface.call() - it 
>> has some queueing logic to keep calls from being trampled.  Also, you 
>> may want to use getAppID() rather than taking a shortcut...
>>
>> Also, why did you use static methods for setRootxxx()?
>>
>> P T Withington wrote:
>>> I'll take that as an approval.  Checking in...
>>> On 2009-08-31, at 01:38, Henry Minsky wrote:
>>>> Canvas resizing is working for me now, in DHTML and SWF,  for  FF,  
>>>> Safari,
>>>> and IE7.
>>>>
>>>>
>>>>
>>>> On Sun, Aug 30, 2009 at 11:05 PM, P T Withington <[email protected]>  
>>>> wrote:
>>>>
>>>>> Ok, I found the broken merge and updated the change set.  I made a  
>>>>> clean
>>>>> build and verified that I can set the width and height of the canvas.
>>>>>
>>>>> Wanna try again?
>>>>>
>>>>> On 2009-08-30, at 15:34, Henry Minsky wrote:
>>>>>
>>>>> Should I be able to set the canvas width with a setAttribute?  
>>>>> Because in
>>>>>> DHTML I am getting
>>>>>> this error
>>>>>>
>>>>>> lzx> canvas.setAttribute('width', 500)
>>>>>> ERROR: TypeError: this.__LZclickcontainerdiv is undefined
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Sat, Aug 29, 2009 at 5:32 PM, P T Withington <[email protected]>  
>>>>>> wrote:
>>>>>>
>>>>>> [Note this fixes both LPP-6535 (dynamic canvas) and LPP-8402  
>>>>>> (suppress
>>>>>>> scrollbars in unwrapped app).  This change reverts r14554 and  
>>>>>>> implements
>>>>>>> the
>>>>>>> clipping of the app on the application container div instead of  
>>>>>>> on the
>>>>>>> canvas.]
>>>>>>>
>>>>>>> Change 20090826-ptw-X by [email protected] on 2009-08-26  
>>>>>>> 16:45:10 EDT
>>>>>>> in /Users/ptw/OpenLaszlo/trunk-2
>>>>>>> for http://svn.openlaszlo.org/openlaszlo/trunk
>>>>>>>
>>>>>>> Summary: Allow canvas resizing
>>>>>>>
>>>>>>> Bugs Fixed:
>>>>>>> LPP-6535 Allow canvas size to be set dynamically to a new  
>>>>>>> physical size
>>>>>>> LPP-8402 DHTML: Extra scrollbar width on Safari and windows  
>>>>>>> firefox and
>>>>>>> IE
>>>>>>> 7 when wrapper has overflow: hidden removed
>>>>>>>
>>>>>>> Technical Reviewer: max (pending)
>>>>>>> QA Reviewer: hminsky (pending)
>>>>>>>
>>>>>>> Documentation:
>>>>>>> The canvas width and height values are no longer read-only.  They
>>>>>>> may be set at run time.
>>>>>>>
>>>>>>> Details:
>>>>>>> Basically, changing the canvas dimensions actually changes the
>>>>>>> dimensions of the app container div in the browser.  The canvas
>>>>>>> itself, whether a DHTML div or swf <embed> is set to follow the
>>>>>>> size of it's container div.  This allows us to set the size
>>>>>>> dynamically to either a pixel dimension or a percentage of the
>>>>>>> browser window (assuming the container app is the top div in the
>>>>>>> <body>).
>>>>>>>
>>>>>>> LzSprite.*: Add static methods setRoot{X,Y,Width,Height} which are
>>>>>>> used to position the canvas container dynamically.  In the swf
>>>>>>> runtime, this is done with the help of an ExternalInterface call
>>>>>>> to lz.embed.  In DHTML, the div can be directly manipulated.
>>>>>>>
>>>>>>> LzSprite.js, html-response, app-console:  Move the clipping of the
>>>>>>> application from the <body> of the responders to the application
>>>>>>> container div (solves LPP-8402).
>>>>>>>
>>>>>>> LzSprite.js, LzTimerKernel, LzKeyboardKernel, LzContextMenuKernel,
>>>>>>> LzTextSprite, LzScreenKernel, LzMouseKernel, LzInputTextSprite, :
>>>>>>> Made quirks a static property, and __updateQuirks a static method,
>>>>>>> so people don't get fooled again.  Create an alias for instances
>>>>>>> so they can continue to address quirks through `this`.  Removed
>>>>>>> some obsolete quirks.  Moved `CSSDimension` to LzKernelUtils,
>>>>>>> since it is needed by all runtimes now, kept an alias on instances
>>>>>>> for access through `this`.
>>>>>>>
>>>>>>> kernel/LzLibrary, LzKernelUtils: Added to hold utility functions
>>>>>>> shared by all runtimes.
>>>>>>>
>>>>>>> LaszloView: Correct fence-post error in `containsPt`.
>>>>>>>
>>>>>>> LaszloCanvas: Use the new kernel sizing features to set the size
>>>>>>> of the canvas container.  Always track __windowResize, as this is
>>>>>>> how the canvas actual size is kept in sync with the container.
>>>>>>> Allow canvas dimensions to be set dynamically.
>>>>>>>
>>>>>>> html-response, embed-body, app-console:  Move the embedding
>>>>>>> template to an include file so that html and app responders, which
>>>>>>> both need the same code, will not skew.
>>>>>>>
>>>>>>> app-console: Remove cruft that supported the old bootstrap DHTML
>>>>>>> debugger.  Share embed code with html-response (don't put DHTML
>>>>>>> apps in an unnecessary iframe).  Put the console app in an iframe,
>>>>>>> so it will not pollute the app window.
>>>>>>>
>>>>>>> embednew: Calculate appenddiv early so it can be in both swfargs
>>>>>>> and properties.  Initialize the appenddiv size to the canvas
>>>>>>> dimensions.  The canvas sizes itself to its container.  Support
>>>>>>> resizing the container from swf.
>>>>>>>
>>>>>>> dev-console.*, console.css: Remove unnecessary cruft from
>>>>>>> bootstrap-debugger days.  Add javascript to load the console that
>>>>>>> corresponds to the app runtime.  Recompile the solo deploys.
>>>>>>>
>>>>>>> Tests:
>>>>>>> Calling canvas.setAttribute('height', ...) or 'width' with various
>>>>>>> values.
>>>>>>>
>>>>>>> Files:
>>>>>>> M      WEB-INF/lps/lfc/kernel/swf/LzSprite.as
>>>>>>> M      WEB-INF/lps/lfc/kernel/dhtml/LzTimeKernel.js
>>>>>>> M      WEB-INF/lps/lfc/kernel/dhtml/LzKeyboardKernel.js
>>>>>>> M      WEB-INF/lps/lfc/kernel/dhtml/LzContextMenuKernel.lzs
>>>>>>> M      WEB-INF/lps/lfc/kernel/dhtml/LzSprite.js
>>>>>>> M      WEB-INF/lps/lfc/kernel/dhtml/LzTextSprite.js
>>>>>>> M      WEB-INF/lps/lfc/kernel/dhtml/LzScreenKernel.js
>>>>>>> M      WEB-INF/lps/lfc/kernel/dhtml/LzMouseKernel.js
>>>>>>> M      WEB-INF/lps/lfc/kernel/dhtml/LzInputTextSprite.js
>>>>>>> M      WEB-INF/lps/lfc/kernel/swf9/LzSprite.as
>>>>>>> M      WEB-INF/lps/lfc/kernel/Library.lzs
>>>>>>> A      WEB-INF/lps/lfc/kernel/LzKernelUtils.lzs
>>>>>>> M      WEB-INF/lps/lfc/views/LaszloView.lzs
>>>>>>> M      WEB-INF/lps/lfc/views/LaszloCanvas.lzs
>>>>>>> M      WEB-INF/lps/templates/html-response_jp.xslt
>>>>>>> A      WEB-INF/lps/templates/embed-body_jp.xslt
>>>>>>> M      WEB-INF/lps/templates/html-response.xslt
>>>>>>> A      WEB-INF/lps/templates/embed-body.xslt
>>>>>>> M      WEB-INF/lps/templates/app-console_jp.xslt
>>>>>>> M      WEB-INF/lps/templates/app-console.xslt
>>>>>>> M      lps/includes/console.css
>>>>>>> M      lps/includes/source/embednew.js
>>>>>>> M      lps/admin/dev-console.html
>>>>>>> M      lps/admin/dev-console.lzx.js
>>>>>>> M      lps/admin/dev-console.lzx.swf
>>>>>>> M      lps/admin/dev-console.lzx
>>>>>>>
>>>>>>> Changeset:
>>>>>>> http://svn.openlaszlo.org/openlaszlo/patches/20090826-ptw-X.tar
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> -- 
>>>>>> Henry Minsky
>>>>>> Software Architect
>>>>>> [email protected]
>>>>>> _______________________________________________
>>>>>> Laszlo-reviews mailing list
>>>>>> [email protected]
>>>>>> http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
>>>>>>
>>>>>
>>>>
>>>> -- 
>>>> Henry Minsky
>>>> Software Architect
>>>> [email protected]
>>>> _______________________________________________
>>>> Laszlo-reviews mailing list
>>>> [email protected]
>>>> http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
>>> _______________________________________________
>>> Laszlo-reviews mailing list
>>> [email protected]
>>> http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews
>>
>> -- 
>> Regards,
>> Max Carlson
>> OpenLaszlo.org
> 

-- 
Regards,
Max Carlson
OpenLaszlo.org
_______________________________________________
Laszlo-reviews mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-reviews

Reply via email to