"dynamic" keyword with v1.x

Please post public support tickets here. Note: for private support tickets, please send an email to support@cshtml5.com instead.
Nick
Posts: 84
Joined: Tue May 30, 2017 9:44 am
Contact:

"dynamic" keyword with v1.x

Postby Nick » Wed Jan 30, 2019 7:38 pm

App work OK in Simulator, but in Chrome next error occure:
:!:
Uncaught Error: The function 'System.Collections.Generic.List`1<Tehnolog.IMenuItemAction> AppSections.ThemeWorkSection1_MainMenu_MainMenu_AreaMenu_Base::get_ExecuteActionsFor_MainMenu_ItemMenu_0()' could not be translated.
at AppSections_ThemeWorkSection1_MainMenu_MainMenu_AreaMenu_Menu.UntranslatableFunctionInvoked (JSIL.Core.js?20191310529:1228)
at AppSections_ThemeWorkSection1_MainMenu_MainMenu_AreaMenu_Menu.ThemeWorkSection1_MainMenu_MainMenu_AreaMenu_Base_SetMenuActions (AllInOne.js?20191310529:988)
at Function.ThemeWorkSection1_MainMenu_MainMenu_AreaMenu_Menu_GetInstance (AllInOne.js?20191310529:1174)
at AppSections_ThemeWorkSection1.BaseThemeWorkSection1_SetMenuToContainer (AllInOne.js?20191310529:294)
at AppSections_ThemeWorkSection1.BaseThemeWorkSection1_Theme_SectionEvents (AllInOne.js?20191310529:307)
at AppSections_ThemeWorkSection1.Delegate_Invoke (JSIL.Core.js?20191310529:9346)
at AppSections_ThemeWorkSection1.MulticastDelegate_Invoke [as SectionEvents] (JSIL.Bootstrap.js?20191310529:535)
at AppSections_ThemeWorkSection1.ThemeSection_CallSectionEvent (Tehnolog.js?20191310529:1149)
at JSIL.InterfaceMethod.InterfaceMethod_CallInterface_I418$CallSectionEvent$30$cm412$eqvoid [as Call] (InterfaceMethod.CallInterface_I418$CallSectionEvent$30,412=void:9)
at TstG6_Theme.BaseTheme_SectionCurrentEvent (Tehnolog.js?20191310529:6713)

C# code is if helps,

/// <summary>
/// Get menu item MainMenu_ItemMenu_0
/// </summary>
private IItemMenu MainMenu_ItemMenu_0
{
get
{
if(this._MainMenu_ItemMenu_0 == null)
{
this._MainMenu_ItemMenu_0 = new ItemMenu(Guid.Parse("c9c8089a-209a-4bc6-b91e-72360ee160c1"),
"MainMenu CMD1", null, null,
null, Visibility.Visible, true,
null, null, null
);
}
return this._MainMenu_ItemMenu_0;
}
}
and

/// <summary>
/// Create actions for menu MainMenu_ItemMenu_0
/// </summary>
/// <returns>A list of <see cref="ContainerAction"/></returns>
private System.Collections.Generic.List<IMenuItemAction> ExecuteActionsFor_MainMenu_ItemMenu_0
{
get
{
ContainerAction action = null;
// Before menu actions
dynamic parentMenu = Convert.ChangeType(this.MenuContainer, this.MenuContainerType);
var data = parentMenu.Action8eab0a6b22564cbc98126014089ecfdb();
// Start menu actions
System.Collections.Generic.List<IMenuItemAction> actions = new System.Collections.Generic.List<IMenuItemAction>();
// Menu action id Action8eab0a6b22564cbc98126014089ecfdb
action = new ContainerAction();
// Execute an application command
Tehnolog.IAppCommandData appCommandData = Tehnolog.Business.Commands.NewAppCommandData(null, "CMD2");
action.AddAction(appCommandData);
actions.Add(action);
//
return actions;
}
}

Error posible source from dynamic parentMenu?

JS-Support @Userware
Site Admin
Posts: 1142
Joined: Tue Apr 08, 2014 3:42 pm

Re: strange error

Postby JS-Support @Userware » Thu Jan 31, 2019 3:20 am

Hi Nick,

The "dynamic" keyword is indeed not supported in version 1.x.

It will be supported soon in version 2.0 (Bridge.NET-based version).

Thanks
Regards


Return to “Technical Support”

Who is online

Users browsing this forum: No registered users and 48 guests

 

 

cron