Designer issue

Welcome to Wisej Support.
Questions, suggestions and plain old bugs - are all welcome here!
0
0

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)

  • Frank (ITG)
    Hi Alex, can you narrow down when this problems occurs ? Is it a specific item or a number of items ? TIA, Frank
  • Luca (ITG)
    Or attach the project please? Looks like wisej fails to parse a JSON string coming from the theme mixins. Did you use mixins by any chance?
  • You must to post comments
0
0

Hi Alex,

we can’t reproduce. Did you see the comments we posted earlier?

 

  • You must to post comments
0
0

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: http://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”
}
}
}
}
}
}

 

 

  • You must to post comments
0
0

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

  • You must to post comments
Showing 3 results
Your Answer
Post as a guest by filling out the fields below or if you already have an account.
Name*
E-mail*
Attachment
File Name Size
There are currently no files uploaded.
Maximum number of files 1, maximum file size 3.9MB.
Supported file formats: zip pdf gif jpg bmp png cs vb theme json