Skip to main content


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: 854
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: Fri Apr 26 18:22:37 GMT 2024

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

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

Back to the top