Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » [XWT] ToolItem.enabled with MultiBinding
[XWT] ToolItem.enabled with MultiBinding [message #637087] Thu, 04 November 2010 03:09 Go to next message
Erdal Karaca is currently offline Erdal Karaca
Messages: 729
Registered: July 2009
Senior Member
I need to enable a tool item only if two independent sources change:

<TableViever x:name="viewer1" >...
<TableViever x:name="viewer2" >...

<ToolItem ...
<ToolItem.enabled>
<MultiBinding updateSourceTrigger="PropertyChanged">
<Binding elementName="viewer1" path="singleSelection" />
<Binding elementName="viewer2" path="singleSelection" />
</MultiBinding>
</ToolItem.enabled>
</ToolItem>

In the log, I can see this message:
SEVERE: Binding expression has a problem with singleSelection

Is this scenario supposed to work? What do I miss?
Re: [XWT] ToolItem.enabled with MultiBinding [message #637617 is a reply to message #637087] Sun, 07 November 2010 17:00 Go to previous message
Yves YANG is currently offline Yves YANG
Messages: 687
Registered: July 2009
Senior Member
Hi Erdal ,

By now, the MultiBinding supports only the String type. It can work if you
use a local converter.

<MultiBinding updateSourceTrigger="PropertyChanged"
Converter="MyBooleanMultiConverter">
<Binding elementName="viewer1" path="singleSelection" />
<Binding elementName="viewer2" path="singleSelection" />
</MultiBinding>

MyBooleanMultiConvertershould be an classs that implements the interface
IMultiValueConverter.

Best regards
Yves YANG
"Erdal Karaca" <erdal.karaca.de@googlemail.com> wrote in message
news:iatlvt$ilf$1@news.eclipse.org...
> I need to enable a tool item only if two independent sources change:
>
> <TableViever x:name="viewer1" >...
> <TableViever x:name="viewer2" >...
>
> <ToolItem ...
> <ToolItem.enabled>
> <MultiBinding updateSourceTrigger="PropertyChanged">
> <Binding elementName="viewer1" path="singleSelection" />
> <Binding elementName="viewer2" path="singleSelection" />
> </MultiBinding>
> </ToolItem.enabled>
> </ToolItem>
>
> In the log, I can see this message:
> SEVERE: Binding expression has a problem with singleSelection
>
> Is this scenario supposed to work? What do I miss?
Previous Topic:How do I glue a 3.x plugin into e4
Next Topic:xwt Internationalization: how i can use UTF-8 encoding in XWT
Goto Forum:
  


Current Time: Tue Jul 29 10:47:48 EDT 2014

Powered by FUDForum. Page generated in 0.02691 seconds