Hi,
Opened a new project and added one of each different item types available to check their differences.
After some point, all designer windows were replaced by an error indicating that the designer cannot be opened before an error is resolved: Unexpected token: }. Looking for :.
The stack info for the error is:
at Wisej.Core.WisejSerializer.ParseFields(TextReader reader)
at Wisej.Core.WisejSerializer.ParseObject(TextReader reader)
at Wisej.Core.WisejSerializer.ParseInternal(String json)
at Wisej.Core.ClientTheme.GetThemeMixins()
at Wisej.Core.Design.HtmlRenderingService.LoadDefaultTheme()
at Wisej.Core.Design.HtmlRenderingService..ctor(IWisejControl control)
at Wisej.Core.Design.DocumentDesigner.Initialize(IComponent component)
at Wisej.Web.Design.FormDocumentDesigner.Initialize(IComponent component)
at System.ComponentModel.Design.DesignerHost.AddToContainerPostProcess(IComponent component, String name, IContainer containerToAddTo)
at System.ComponentModel.Design.DesignerHost.PerformAdd(IComponent component, String name)
at System.ComponentModel.Design.DesignerHost.System.ComponentModel.Design.IDesignerHost.CreateComponent(Type componentType, String name)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.DesignerSerializationManager.System.ComponentModel.Design.Serialization.IDesignerSerializationManager.CreateInstance(Type type, ICollection arguments, String name, Boolean addToContainer)
at System.ComponentModel.Design.Serialization.TypeCodeDomSerializer.Deserialize(IDesignerSerializationManager manager, CodeTypeDeclaration declaration)
at System.ComponentModel.Design.Serialization.CodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager manager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.PerformLoad(IDesignerSerializationManager serializationManager)
at Microsoft.VisualStudio.Design.Serialization.CodeDom.VSCodeDomDesignerLoader.DeferredLoadHandler.Microsoft.VisualStudio.TextManager.Interop.IVsTextBufferDataEvents.OnLoadCompleted(Int32 fReload)
Hi Alex,
we can’t reproduce. Did you see the comments we posted earlier?
Thank you. The issue was probably caused by the mixin template. We’ll check and fix.
There is a short overview document about the theme system including mixins here: https://wisej.com/themes/
In general, a theme mixin uses the same concept of javascript mixins. That is basically a partial theme merged on top of the base theme. For example, if you want to modify only the appearance of buttons, or if you want to theme a specific button in your application, or if you want to theme a control of any kind in your application, or if you create a new control: with mixins you don’t have to modify the base theme, you can create a small theme file that styles only that specific control. Wisej applies all the mixins in alphabetical order on top (it’s an override merge) of the base theme.
A mixin definition can also inherit from the base theme and extend or override.
Add this file under \Themes with the name “my-button.mixin.theme” and paste in the JSON below including the curly brackets.
{
“name”: “my-button”,
“colors”: {
“activeCaption”: “red”
},
“appearances”: {
“button”: {
“inherit”: “button”,
“states”: {
“default”: {
“styles”: {
“backgroundColor”: “orange”
}
}
}
}
}
}
Hi,
I saw this issue with the older beta version, before the current (80). Unfortunately I have deleted the problematic project and haven’t tried to reproduce it either. I saw the comment about mixins, I had indeed add a “theme mixin” (what is a mixin anyway, I don’t have a clue!).
Alex