Sorry, I got confused because I would expect .visibility to have the same value returned by getVisibility(). Also, since datacontrolsvisibility is deprecated, we shouldn't be adding any APIs to support it.

Please remove the new LzView.getVisibility() method. Also, please remove references to datacontrolsvisibility in basewindow and set visible to null in its place. This should be done for all the components if you can, but otherwise please file a bug.

Otherwise, approved!

Henry Minsky wrote:
I am confused, I thought (maybe I'm wrong here) that this.visible was
supposed to indicate the actual state of whether the view is visible.
But the basewindow
seems to want the flag that indicates " original intent "  of whether
you want visibility controlled by the datapath matching.

basewindow originally had this code:

basewindow.lzx:
       <method name="init">
           // Windows that are datamappped control their own visibility
            if (this.datapath != null) {
                this.datapath.setAttribute('datacontrolsvisibility',
                  this.datacontrolsvisibility);
             }


I changed that to:
datacontrolsvisibility was deprecated,
           if (this.datapath != null) {
               this.datapath.setAttribute('datacontrolsvisibility',
                   this.getVisibility() == null);
           }

Are you proposing that LZupdateShown should make this.visible the same
as this.__LZvisibleSet?

On 5/3/07, Max Carlson <[EMAIL PROTECTED]> wrote:
One comment: Method calls are expensive in swf, so it's better to check
this.visible.  Why not set LaszloView.visible in LaszloView.setVisible()
and check the .visible property, rather than adding
LaszloView.getVisibility()?  Then you can change this in
LaszloView.__LZupdateShown:

...
if ( shown != this.__LZvisibleSet ){
         this.__LZvisibleSet = shown;
...



Henry Minsky wrote:
> Forgot the ViewSchema.java file in the last changeset
>
> Change 20070503-hqm-6 by [EMAIL PROTECTED] on 2007-05-03 11:21:01 EDT
>    in /cygdrive/c/users/hqm/openlaszlo/legals
>    for http://svn.openlaszlo.org/openlaszlo/branches/legals
>
> Summary: fix for datacontrolsvisibility / visible=null bug
>
> New Features:
>
> Bugs Fixed: LPP-3643
>
> Technical Reviewer: max, jgrandy (schema change) (pending)
> QA Reviewer: (pending)
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
>
> updated schema to support three-valued logic needed by 'visible' attribute
> created new LzView.getVisibility() method to retrieve the value so
> <window> can use it
>
>
> Tests:
>
> test case from bug report, amazon, data smokecheck
>
>
> Files:
> M      WEB-INF/lps/schema/lzx.rnc
> M      WEB-INF/lps/lfc/views/LaszloView.lzs
> M      lps/components/base/basewindow.lzx
> M      WEB-INF/lps/server/src/org/openlaszlo/compiler/ViewSchema.java
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20070503-hqm-6.tar

--
Regards,
Max Carlson
OpenLaszlo.org




--
Regards,
Max Carlson
OpenLaszlo.org

Reply via email to