Each newcombobox has its own dataset.
So there's no sharing going on.



-----Original Message-----
From: Jim Grandy [mailto:[EMAIL PROTECTED]
Sent: Friday, January 20, 2006 3:22 PM
To: William Krick
Cc: [email protected]
Subject: Re: [Laszlo-user] combobox and newcombobox compilation errors


One way in which newcombobox differs from combobox is that instances  
of newcombobox share a pool of floatinglist instances -- this is an  
optimization to reduce instantiation time. This is a relatively  
complex and (in my opinion) fragile optimization, and we're working  
on a better solution for a future release (not Sage).

It sounds like you've ran into a bug related to this optimization,  
quite possibly LPP-361. Are the newcombobox instances sharing the  
same dataset?

I have LPP-361 on my plate for Sage, but since there's a workaround  
(don't use the same dataset) it's a P2 and may not make it in.

jim

On Jan 20, 2006, at 12:13 PM, William Krick wrote:

> I have a drill down interface that I tried to implement with standard
> combo-boxes.  The performance is ok when it is a standalone app,  
> but when we
> integrate it into our larger app, the performance degrades to the  
> point
> where it is unusable.  I suspect object creation and memory limits are
> killing us.
>
> So I've attempted to implement the same interface using the  
> newcombobox
> instead.  Using your code below, I've finally gotten it working.   
> However,
> the behaviour is strange in that making a selection in one of the  
> combos
> screws up the selection in all the other combos.  Am I doing  
> something wrong
> or is there a bug in the newcombobox?
>
> I've attached my sample code.  Note that it must be placed in "my- 
> apps" for
> the relative paths to work out correctly.
>
>
>
>
>
> -----Original Message-----
> From: Jim Grandy [mailto:[EMAIL PROTECTED]
> Sent: Thursday, January 19, 2006 6:21 PM
> To: William Krick
> Cc: [email protected]
> Subject: Re: [Laszlo-user] combobox and newcombobox compilation errors
>
>
> I'm just looking at this now... One difference from combobox is that
> newcombobox is much more like a base component -- it does less to
> define subview structure than combobox did, so you have to do more
> work to use it. When I integrate it into the components I'll include
> an "lz" class that has similar look-and-feel to combobox so that it
> is easier to use.
>
> Here's a new version of lps/components/incubator/test/newcombobox-
> test.lzx that is close to that "lz" class:
>
> <canvas>
>    <include href="../newcombobox.lzx"/>
>
>      <!-- note that currently we are only using the first frame from
> the lft and mid
>           resources. -->
>      <resource name="lzcombobox_lft_rsc">
>          <frame src="../../lz/resources/combobox/ 
> combobox_lft_up.swf" />
>          <frame src="../../lz/resources/combobox/popup_lft_up.swf" />
>          <frame src="../../lz/resources/combobox/
> combobox_lft_dsbl.swf" />
>          <frame src="../../lz/resources/combobox/ 
> popup_lft_dsbl.swf" />
>      </resource>
>
>      <resource name="lzcombobox_mid_rsc">
>          <frame src="../../lz/resources/combobox/ 
> combobox_mid_up.swf" />
>          <frame src="../../lz/resources/combobox/popup_mid_up.swf" />
>          <frame src="../../lz/resources/combobox/
> combobox_mid_dsbl.swf" />
>          <frame src="../../lz/resources/combobox/ 
> popup_mid_dsbl.swf" />
>      </resource>
>
>      <resource name="lzcombobox_rgt_rsc">
>          <frame src="../../lz/resources/combobox/popbtn_rt_up.swf" />
>          <frame src="../../lz/resources/combobox/popbtn_rt_mo.swf" />
>          <frame src="../../lz/resources/combobox/popbtn_rt_dn.swf" />
>          <frame src="../../lz/resources/combobox/ 
> popbtn_rt_dsbl.swf" />
>      </resource>
>
>    <class name="simplecombobox" extends="newcombobox" width="100">
>      <view width="100%" height="20" focusable="false"  
> bgcolor="#CCCCCC">
>          <view name="lft" resource="lzcombobox_lft_rsc"/>
>          <view name="mid" resource="lzcombobox_mid_rsc"
> stretches="width"/>
>          <basebutton name="rgt" resource="lzcombobox_rgt_rsc"
> styleable="true">
>            <method event="onclick">
>              LzFocus.setFocus(this,false);
>              classroot.toggle();
>            </method>
>          </basebutton>
>          <stableborderlayout axis="x"/>
>      </view>
>      <newcombobox_text width="${ parent.width - 19 }" x="7" />
>    </class>
>
>    <dataset name="dsHours">
>        <item value="1">1</item>
>        <item value="2">2</item>
>        <item value="3">3</item>
>        <item value="4">4</item>
>        <item value="5">5</item>
>        <item value="6">6</item>
>        <item value="7">7</item>
>        <item value="8">8</item>
>        <item value="9">9</item>
>        <item value="10">10</item>
>        <item value="11">11</item>
>        <item value="12">12</item>
>    </dataset>
>
>    <simplecombobox width="84" shownitems="3" itemdatapath="dsHours:/
> item"/>
>
> </canvas>
>
> On Jan 19, 2006, at 2:51 PM, William Krick wrote:
>
>> What do you have to do to get the newcombobox displaying properly?
>>
>> I found some examples in the forums but the only one that half
>> works is the
>> one that extends newcombobox and does something crazy that I don't
>> understand with toggling classroot.
>>
>> http://tinyurl.com/7dp7n
>>
>> If I use the newcombobox by itself, nothing shows up.
>>
>> this is the sort of code I'm trying to use...
>>
>> <newcombobox id="cbvin" width="200"
>>              itemdatapath="symbol_year:/resultset/result"
>>              textdatapath="@modelyear"
>>              valuedatapath="@id" />
>>
>>
>>
>> -----Original Message-----
>> From: Jim Grandy [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, January 19, 2006 4:03 PM
>> To: William Krick
>> Cc: [email protected]
>> Subject: Re: [Laszlo-user] combobox and newcombobox compilation  
>> errors
>>
>>
>> Deleting the incubator copy of floatinglist may do the trick. You may
>> also have to edit newcombobox to change the include path for
>> floatinglist.
>>
>> I'm going to get LPP-1389 ("Move newcombobox into components from
>> incubator") resolved for Sage, and I'll make sure the two work
>> together. So if you will be able to move to 3.2 when it comes out
>> next week, you'll have a solution then.
>>
>> jim
>>
>> On Jan 19, 2006, at 12:56 PM, William Krick wrote:
>>
>>> Hmm...  so is there any way you can think of that I can use both
>>> types of
>>> comboboxes in my app at the same time?
>>>
>>> Possibly making a copy of the files and/or renaming classes or
>>> something?
>>>
>>>
>>>
>>>
>>> -----Original Message-----
>>> From: Jim Grandy [mailto:[EMAIL PROTECTED]
>>> Sent: Thursday, January 19, 2006 2:48 PM
>>> To: William Krick
>>> Cc: [email protected]
>>> Subject: Re: [Laszlo-user] combobox and newcombobox compilation
>>> errors
>>>
>>>
>>> That's because newcombobox uses an alternate implementation of
>>> floatinglist in the incubator, and that implementation is
>>> incompatible with the one in the components (uses the same class
>>> names).
>>>
>>> I would actually like to kill this alternate implementation of
>>> floatinglist because all it does is change the look to use a square
>>> box instead of a box with an end cap.
>>>
>>> In any case, if we were to move newcombobox into the components it
>>> would use the "production" version of floatinglist and would be
>>> compatible with combobox.
>>>
>>> jim
>>>
>>> On Jan 19, 2006, at 11:13 AM, William Krick wrote:
>>>
>>>> I am unable to use combobox and newcombobox in the same app.
>>>>
>>>> If you compile the sample code below, you get a compilation  
>>>> error...
>>>>
>>>> incubator/floatinglist.lzx:16:33: duplicate class definitions for
>>>> _floatshadow; also defined at lz/floatinglist.lzx:36
>>>>
>>>> Is there a trick to doing this that I'm missing?
>>>>
>>>>
>>>>
>>>> <canvas>
>>>>   <include href="incubator/newcombobox.lzx"/>
>>>>   <simplelayout/>
>>>>   <combobox/>
>>>>   <newcomboboxex/>
>>>> </canvas>
>>>>
>>>> _______________________________________________
>>>> Laszlo-user mailing list
>>>> [email protected]
>>>> http://www.openlaszlo.org/mailman/listinfo/laszlo-user
>>>
>>>
>>>
>>
>>
>>
>
>
> <drilldown2.lzx>



_______________________________________________
Laszlo-user mailing list
[email protected]
http://www.openlaszlo.org/mailman/listinfo/laszlo-user

Reply via email to