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 07:09 Go to next message
Erdal Karaca is currently offline Erdal KaracaFriend
Messages: 756
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 22:00 Go to previous message
Yves YANG is currently offline Yves YANGFriend
Messages: 688
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: Sun Dec 21 06:15:07 GMT 2014

Powered by FUDForum. Page generated in 0.01832 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software