PDA

View Full Version : [CLOSED] Ambiguous Call when creating a button menu in a toolbar(Razor syntax)



machinableed
Feb 22, 2012, 4:37 AM
I'm just doing some experiments with the new Razor syntax and have run into the following error:


Error 3 The call is ambiguous between the following methods or properties: 'Ext.Net.ButtonBase.Builder<Ext.Net.Button,Ext.Net.Button.Builder>.Menu(System.Action<Ext.Net.MenuCollectionBuilder<Ext.Net.Button,Ext.Net.Button.Builder>>)' and 'Ext.Net.ButtonBase.Builder<Ext.Net.Button,Ext.Net.Button.Builder>.Menu(System.Action<Ext.Net.MenuCollection>)'

Not sure if it's a bug or me being an idiot :) the code snippet I'm using to add to the Items collection of my toolbar is:


tbItem4 => tbItem4.Add(Html.X().Button()
.Icon(Icon.StatusOnline)
.Text("TEST USER")
.Menu(tbMnu => tbMnu.Add(Html.X().Menu()
.Items(mnItem => mnItem.Add(Html.X().MenuItem()
.Text("Profile")
.Icon(Icon.Magnifier)

Any ideas on how to get around this?

Vladimir
Feb 22, 2012, 6:41 AM
It is known issue, we will fix it in Ext.Net 2.0 beta release
Please see the following post for workaround
http://forums.ext.net/showthread.php?17390-CLOSED-2-0-Razor-and-Panel-TopBar&p=74820&viewfull=1#post74820