These are chat archives for AvaloniaUI/Avalonia

28th
Nov 2015
Nikita Tsukanov
@kekekeks
Nov 28 2015 00:05
I'll also be able to add support for markup extension autocomplete
But everything that deals with DataContext is blocked by OmniXAML (cc: @SuperJMN )
#152 #153 #155
I need at least some support for ignored properties
Or at least for properties that don't need to have type name before them
On the other hand we can just ignore that "d:" prefix and use Designer.DataContext, Designer.DesignWidth, Designer.DesignHeight attached properties
Nikita Tsukanov
@kekekeks
Nov 28 2015 01:40
@SuperJMN how x:Static/x:Type are implemented? Are they markup extensions of something built-in?
BTW, I only see BindingExtension and TypeExtension
Nikita Tsukanov
@kekekeks
Nov 28 2015 01:46
Updated https://dl.dropboxusercontent.com/u/18301199/PerspexVS.vsix with markup extension intellisense support
Nikita Tsukanov
@kekekeks
Nov 28 2015 02:41
Well, it seems that now we can have some mock data in designer
With Design.DataContext attached property and Static markup extension
Nikita Tsukanov
@kekekeks
Nov 28 2015 02:52
Recent xaml designer/editor changes include:
  • Zoom
  • Background color configuration
  • Attached property support
  • clr-namespace support
  • Markup extension support
  • Design.DataContext, Design.Width, Design.Height
Darnell Williams
@Seeker1437
Nov 28 2015 03:24
@kekekeks I think it will work if we use the project properties service to pull the location of all the references instead of manually searching for each dll.
Nikita Tsukanov
@kekekeks
Nov 28 2015 03:25
The issue is that Perspex.Desktop is not referenced by dll
Which is the case for PCL
Darnell Williams
@Seeker1437
Nov 28 2015 03:25
Oi ah okay, but no issues with other dlls?
Nikita Tsukanov
@kekekeks
Nov 28 2015 03:26
Yep, you can reference Perspex.Desktop and dll will have everything needed in output directory
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 15:55

https://dl.dropboxusercontent.com/u/18301199/PerspexVS.vsix

I'm getting exception in designer when editing App.paml in Core2D:

OmniXaml.XamlLoadException: Error loading XAML: System.Reflection.TargetInvocationException: Obiekt docelowy wywołania zgłosił wyjątek. ---> System.InvalidOperationException: Cannot create more than one Application instance.
   w Perspex.Application..ctor()
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   w System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   w System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   w System.Activator.CreateInstance(Type type, Boolean nonPublic)
   w System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   w System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   w System.Activator.CreateInstance(Type type, Object[] args)
   w OmniXaml.TypeFactory.Create(Type type, Object[] args)
   w OmniXaml.Typing.XamlType.CreateInstance(Object[] parameters)
   w OmniXaml.ObjectAssembler.StateCommuter.MaterializeInstanceOfCurrentType()
   w OmniXaml.ObjectAssembler.StateCommuter.CreateInstanceOfCurrentXamlTypeIfNotCreatedBefore()
   w OmniXaml.ObjectAssembler.Commands.StartMemberCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
   w OmniXaml.TemplateHostingObjectAssembler.Process(XamlInstruction instruction)
   w Perspex.Markup.Xaml.Context.PerspexObjectAssembler.Process(XamlInstruction node)
   w OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes)
   w OmniXaml.XamlXmlParser.Parse(IXmlReader stream)
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser) ---> System.Reflection.TargetInvocationException: Obiekt docelowy wywołania zgłosił wyjątek. ---> System.InvalidOperationException: Cannot create more than one Application instance.
   w Perspex.Application..ctor()
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   w System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   w System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   w System.Activator.CreateInstance(Type type, Boolean nonPublic)
   w System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   w System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   w System.Activator.CreateInstance(Type type, Object[] args)
   w OmniXaml.TypeFactory.Create(Type type, Object[] args)
   w OmniXaml.Typing.XamlType.CreateInstance(Object[] parameters)
   w OmniXaml.ObjectAssembler.StateCommuter.MaterializeInstanceOfCurrentType()
   w OmniXaml.ObjectAssembler.StateCommuter.CreateInstanceOfCurrentXamlTypeIfNotCreatedBefore()
   w OmniXaml.ObjectAssembler.Commands.StartMemberCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
   w OmniXaml.TemplateHostingObjectAssembler.Process(XamlInstruction instruction)
   w Perspex.Markup.Xaml.Context.PerspexObjectAssembler.Process(XamlInstruction node)
   w OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes)
Nikita Tsukanov
@kekekeks
Nov 28 2015 15:55
Well
What did you expect to be shown in designer window?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 15:56
ok
Nikita Tsukanov
@kekekeks
Nov 28 2015 15:57
Does intellisense work there?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 15:57
In MainWindow.paml I get exception:
OmniXaml.XamlLoadException: Error loading XAML: System.Reflection.TargetInvocationException: Obiekt docelowy wywołania zgłosił wyjątek. ---> OmniXaml.XamlLoadException: Error loading XAML: System.NullReferenceException: Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w OmniXaml.ObjectAssembler.ValuePipeline.IsAlreadyCompatible(Object value, Type targetType)
   w OmniXaml.ObjectAssembler.ValuePipeline.ConvertValueIfNecessary(Object value, XamlType targetType)
   w OmniXaml.ObjectAssembler.StateCommuter.AssignChildToParentProperty()
   w OmniXaml.ObjectAssembler.StateCommuter.AssociateCurrentInstanceToParent()
   w OmniXaml.ObjectAssembler.Commands.EndObjectCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
   w OmniXaml.TemplateHostingObjectAssembler.Process(XamlInstruction instruction)
   w Perspex.Markup.Xaml.Context.PerspexObjectAssembler.Process(XamlInstruction node)
   w OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes)
   w OmniXaml.XamlXmlParser.Parse(IXmlReader stream)
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser) ---> System.NullReferenceException: Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w OmniXaml.ObjectAssembler.ValuePipeline.IsAlreadyCompatible(Object value, Type targetType)
   w OmniXaml.ObjectAssembler.ValuePipeline.ConvertValueIfNecessary(Object value, XamlType targetType)
   w OmniXaml.ObjectAssembler.StateCommuter.AssignChildToParentProperty()
   w OmniXaml.ObjectAssembler.StateCommuter.AssociateCurrentInstanceToParent()
   w OmniXaml.ObjectAssembler.Commands.EndObjectCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
   w OmniXaml.TemplateHostingObjectAssembler.Process(XamlInstruction instruction)
   w Perspex.Markup.Xaml.Context.PerspexObjectAssembler.Process(XamlInstruction node)
   w OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes)
   w OmniXaml.XamlXmlParser.Parse(IXmlReader stream)
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser)
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser)
   w Perspex.Markup.Xaml.PerspexXamlLoader.Load(Type type, Object rootInstance)
   w Perspex.Markup.Xaml.PerspexXamlLoader.Load(Object obj)
   w Core2D.Perspex.Controls.MenuControl.InitializeComponent() w C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\Controls\MenuControl.paml.cs:wiersz 34
   w Core2D.Perspex.Controls.MenuControl..ctor() w C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\Controls\MenuControl.paml.cs:wiersz 26
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   w System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   w System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   w System.Activator.CreateInstance(Type type, Boolean nonPublic)
   w System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark)
   w System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
   w System.Activator.CreateInstance(Type type, Object[] args)
   w OmniXaml.TypeFactory.Create(Type type, Object[] args)
   w OmniXaml.Typing.XamlType.CreateInstance(Object[] parameters)
   w OmniXaml.ObjectAssembler.StateCommuter.MaterializeInstanceOfCurrentType()
   w OmniXaml.ObjectAssembler.StateCommuter.CreateInstanceOfCurrentXamlTypeIfNotCreatedBefore()
   w OmniXaml.ObjectAssembler.Commands.StartMemberCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
clr-namespace works
Nikita Tsukanov
@kekekeks
Nov 28 2015 15:58
@SuperJMN it seems that we need your assistance here, since exception is thrown somewhere in OmniXAML
@wieslawsoltes it looks to be related to the fact that you are usingyour custom control in the xaml
Can you check without it?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 15:59
Probably
Nikita Tsukanov
@kekekeks
Nov 28 2015 15:59
Or check that MenuControl is loaded fine
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:00
In MenuControl.paml I get exception thrown:
OmniXaml.XamlLoadException: Error loading XAML: System.NullReferenceException: Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w OmniXaml.ObjectAssembler.ValuePipeline.IsAlreadyCompatible(Object value, Type targetType)
   w OmniXaml.ObjectAssembler.ValuePipeline.ConvertValueIfNecessary(Object value, XamlType targetType)
   w OmniXaml.ObjectAssembler.StateCommuter.AssignChildToParentProperty()
   w OmniXaml.ObjectAssembler.StateCommuter.AssociateCurrentInstanceToParent()
   w OmniXaml.ObjectAssembler.Commands.EndObjectCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
   w OmniXaml.TemplateHostingObjectAssembler.Process(XamlInstruction instruction)
   w Perspex.Markup.Xaml.Context.PerspexObjectAssembler.Process(XamlInstruction node)
   w OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes)
   w OmniXaml.XamlXmlParser.Parse(IXmlReader stream)
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser) ---> System.NullReferenceException: Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w OmniXaml.ObjectAssembler.ValuePipeline.IsAlreadyCompatible(Object value, Type targetType)
   w OmniXaml.ObjectAssembler.ValuePipeline.ConvertValueIfNecessary(Object value, XamlType targetType)
   w OmniXaml.ObjectAssembler.StateCommuter.AssignChildToParentProperty()
   w OmniXaml.ObjectAssembler.StateCommuter.AssociateCurrentInstanceToParent()
   w OmniXaml.ObjectAssembler.Commands.EndObjectCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
   w OmniXaml.TemplateHostingObjectAssembler.Process(XamlInstruction instruction)
   w Perspex.Markup.Xaml.Context.PerspexObjectAssembler.Process(XamlInstruction node)
   w OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes)
   w OmniXaml.XamlXmlParser.Parse(IXmlReader stream)
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser)
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser)
   w Perspex.DesignerSupport.DesignerAssist.UpdateXaml(String xaml)
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:01
Did it happen before the update?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:02
Before update all controls got designer exceptions thrown :)
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:02
So it's not a regression
neat
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:02
I will try to install old version and check what exception was thrown there
Is it possible to get in designer exception line and column of exception?
Old version exception in MenuControl.paml:
Unable to load Perspex:

System.Reflection.TargetInvocationException: Obiekt docelowy wywołania zgłosił wyjątek. ---> System.NullReferenceException: Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w Perspex.Markup.Xaml.Context.PerspexWiringContext.CreateXamlNamespaceRegistry()
   w Perspex.Markup.Xaml.Context.PerspexWiringContext.CreateTypeContext(ITypeFactory typeFactory, TypeFeatureProvider featureProvider)
   w Perspex.Markup.Xaml.Context.PerspexWiringContext..ctor(ITypeFactory typeFactory)
   w Perspex.Markup.Xaml.PerspexXamlLoader.Load(Object obj)
   w Perspex.Themes.Default.DefaultTheme..ctor()
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck)
   w System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   w System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark)
   w System.Activator.CreateInstance(Type type, Boolean nonPublic)
   w System.Activator.CreateInstance(Type type)
   w Perspex.Designer.AppHost.PerspexAppHost.DoInit(String targetExe, StringBuilder logger)
   w Perspex.Designer.AppHost.PerspexAppHost.Init(String targetExe)

Loading assemblies from C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\atk-sharp.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Core2D.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Core2D.Perspex.exe
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Core2D.Perspex.vshost.exe
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\CsvHelper.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\FileWriter.Dxf.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\FileWriter.Pdf-core.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\gdk-sharp.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\glib-sharp.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\gtk-sharp.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Log.Trace.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Mono.Cairo.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\netDxf.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Newtonsoft.Json.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\pango-sharp.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\PdfSharp.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Animation.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Application.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Base.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Cairo.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Controls.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Diagnostics.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Direct2D1.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Gtk.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.HtmlRenderer.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Input.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Interactivity.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Layout.dll
Trying to load C:\DOWNLOADS\GitHub\Core2D\Core2D.Perspex\bin\Debug\Perspex.Markup.dll
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:06
Well at least it got further than in the last time
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:06
This exception was thrown in all designers for old version.
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:07
Yep, it was unable to initialize stuff
Now it failes to load xaml for your menucontrol
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:07
Actually one designer for user control works
for the StatusControl.paml
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:08
Do you have some custom logic in App.cs?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:08
Yes
Also a lot of styles and templates in App.paml
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:08
It's not being executed, that might be the cause of the issue
Probably need to look for App.xaml in designer
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:09
I would be helpful to get exception line and column in designer, so I could quickly check what xaml is problematic

Probably need to look for App.xaml in designer

yep

Nikita Tsukanov
@kekekeks
Nov 28 2015 16:10
Yep, OmniXAML has some support for line reporting now, but it doesn't cover all cases
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:10
I use resources from App.xaml in MenuControl.paml
One moment I will comment out the resource and will check
@kekekeks To install PerspexVS.vsix I have to do this from admin command line :(
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:11
It doesn't require admin rights for me (gets installed to %LOCALAPPDATA%) so it's probably something wrong on your system
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:17
@kekekeks Ok I have found the source of exception in MenuControl.paml
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:17
@grokys How to detect App.paml from designer? Look for a class that's inherited from Perspex.Application?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:17
<MenuItem Header="Default is Stro_ked" HotKey="K" Command="{Static core:Commands.DefaultIsStrokedCommand}"/>
this is source of exception Command="{Static core:Commands.DefaultIsStrokedCommand}"
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:18
So {Static} doesn't work in design mode?
Weird
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:18
Commands.DefaultIsStrokedCommand this is initialized in App.cs
@SuperJMN
You aren't checking values for null
And null is perfectly valid value for Command
So it's a bug in OmniXAML
Darnell Williams
@Seeker1437
Nov 28 2015 16:21
One liner fix right?
@wieslawsoltes I just noticed, you're Russian as well?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:22
@ImaBrokeDude No
Darnell Williams
@Seeker1437
Nov 28 2015 16:22
Ah headdesk
What language is that in?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:22
its Polish
Darnell Williams
@Seeker1437
Nov 28 2015 16:23
Ah, another great language.
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:23
Not all languages with weird letters are russian, you know
Darnell Williams
@Seeker1437
Nov 28 2015 16:23
Hehe, sorry, I realize now that i look at it, it is not even close XD
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:23
The thing is that I can almost understand that exception message
Darnell Williams
@Seeker1437
Nov 28 2015 16:24
Object reference not set to an instance of an object?
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:24
Same thing with bulgarian exception messages from donandren
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:24
this works only one way, I can not understand Russian at all
different alphabet
Darnell Williams
@Seeker1437
Nov 28 2015 16:24
Ah okay
Steven Kirk
@grokys
Nov 28 2015 16:24
How to detect App.paml from designer? Look for a class that's inherited from Perspex.Application?
yeah, i'd say that would be my first choice
Darnell Williams
@Seeker1437
Nov 28 2015 16:25
Sometimes there are more than one of those.
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:25

And null is perfectly valid value for Command

I have initialized the command, still getting exception

Nikita Tsukanov
@kekekeks
Nov 28 2015 16:28
Same stack trace?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:28
OmniXaml.XamlLoadException: Error loading XAML: System.NullReferenceException: Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w OmniXaml.ObjectAssembler.ValuePipeline.IsAlreadyCompatible(Object value, Type targetType)
   w OmniXaml.ObjectAssembler.ValuePipeline.ConvertValueIfNecessary(Object value, XamlType targetType)
   w OmniXaml.ObjectAssembler.StateCommuter.AssignChildToParentProperty()
   w OmniXaml.ObjectAssembler.StateCommuter.AssociateCurrentInstanceToParent()
   w OmniXaml.ObjectAssembler.Commands.EndObjectCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
   w OmniXaml.TemplateHostingObjectAssembler.Process(XamlInstruction instruction)
   w Perspex.Markup.Xaml.Context.PerspexObjectAssembler.Process(XamlInstruction node)
   w OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes)
   w OmniXaml.XamlXmlParser.Parse(IXmlReader stream)
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser) ---> System.NullReferenceException: Odwołanie do obiektu nie zostało ustawione na wystąpienie obiektu.
   w OmniXaml.ObjectAssembler.ValuePipeline.IsAlreadyCompatible(Object value, Type targetType)
   w OmniXaml.ObjectAssembler.ValuePipeline.ConvertValueIfNecessary(Object value, XamlType targetType)
   w OmniXaml.ObjectAssembler.StateCommuter.AssignChildToParentProperty()
   w OmniXaml.ObjectAssembler.StateCommuter.AssociateCurrentInstanceToParent()
   w OmniXaml.ObjectAssembler.Commands.EndObjectCommand.Execute()
   w OmniXaml.ObjectAssembler.ObjectAssembler.Process(XamlInstruction instruction)
   w OmniXaml.TemplateHostingObjectAssembler.Process(XamlInstruction instruction)
   w Perspex.Markup.Xaml.Context.PerspexObjectAssembler.Process(XamlInstruction node)
   w OmniXaml.XamlXmlParser.Parse(IEnumerable`1 xamlNodes)
   w OmniXaml.XamlXmlParser.Parse(IXmlReader stream)
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser)
   --- Koniec śladu stosu wyjątków wewnętrznych ---
   w OmniXaml.XamlXmlLoader.Load(Stream stream, IXamlParser parser)
   w Perspex.DesignerSupport.DesignerAssist.UpdateXaml(String xaml)
   w Perspex.Designer.AppHost.PerspexAppHost.XamlUpdater()
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:28
@grokys I'm experiencing chicken and egg problem here
I need to locate application class so it will register services
To do that I need to scan for all assemblies
To do that I need to get an instance of PclPlatformWrapper which is registered by win32 platform
To do that I need to load win32 platform
And to do that I need to load application class that will register stuff
For now I'll locate that type directly, but that's not a long-term solution
We need to somehow make platforms to not depend on stuff that's registered by Application.RegisterServices
Steven Kirk
@grokys
Nov 28 2015 16:34
hmm
any ideas?
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:36
Redesign dependency graph or something
Steven Kirk
@grokys
Nov 28 2015 16:36
is it just PclPlatformWrapper that's causing the problem?
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:37
It also caused issues with initialization on mobile
Since here platform initialization needs to happen before Application class is instanciated
I've worked it around, but still
@wieslawsoltes Please check this build once it completes - https://ci.appveyor.com/project/Perspex/perspex/build/1.0.836
It should locate and load your App class
Steven Kirk
@grokys
Nov 28 2015 16:39
why do you need PclPlatformWrapper in the designer? you can just scan for assemblies diectly from there surely?
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:39
Yep
But I still think that platform initialization code shouldn't depend on anything
BTW, we are using same MouseDevice/KeyboardDevice implementations for all platforms
Steven Kirk
@grokys
Nov 28 2015 16:42
but plat.GetLoadedAssemblies() is just a wrapper around AppDomain.CurrentDomain.GetAssemblies() - can't you just use that directly?
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:42
I'm not sure that I can do that from PCL
GetType might be a bit weird on that front
Steven Kirk
@grokys
Nov 28 2015 16:43
oh - Perspex.Designer is a PCL?
no, it's not
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:43
Not perspex.designer
DesignerAssist that does initialization lives in Perspex.Application
Steven Kirk
@grokys
Nov 28 2015 16:43
ah sorry, this is Perspex.Application
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:44
And I want to keep API as simple as possible so we don't need to synchronize VS extension updates with perspex updates
Steven Kirk
@grokys
Nov 28 2015 16:44
sure
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:45
I also think that App class isn't a good place for platform initialization
It should happen somewhere in Main
Steven Kirk
@grokys
Nov 28 2015 16:46
yeah, if that makes stuff easier we could do it like that
Nikita Tsukanov
@kekekeks
Nov 28 2015 16:46
Let's keep things as they are for alpha3
Steven Kirk
@grokys
Nov 28 2015 16:47
ok, but yeah, i think what you're saying makes sense
that way the designer can set up its environment how it wants
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 16:55

@wieslawsoltes Please check this build once it completes - https://ci.appveyor.com/project/Perspex/perspex/build/1.0.836

Yeah until issues with OmniXaml is fixed not much I can do to test, I have commands evrywhere

Nikita Tsukanov
@kekekeks
Nov 28 2015 16:56
But at least it should load your app class
Which may fix some issues
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 17:04
@kekekeks The Design.DataContext works only with Window, can you add support for UserControl
Also Design.Width and Design.Height for UserControl
I was able to get working Design.DataContext="{Static local:Designer.Context}" for MainWindow.paml
Commented out some controls
Nikita Tsukanov
@kekekeks
Nov 28 2015 17:06
Perspex/Perspex@4f282cd
It might work a bit weird through
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 17:21
d0.PNG
Nikita Tsukanov
@kekekeks
Nov 28 2015 17:21
So we got designer working for you
neat
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 17:21
Yep its working
Only this remains the issue Command="{Static core:Commands.AddStyleLibraryCommand}"
Nikita Tsukanov
@kekekeks
Nov 28 2015 17:22
Which is null, right?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 17:22
Well not
Nikita Tsukanov
@kekekeks
Nov 28 2015 17:23
we need @SuperJMN's assistance here
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 17:23
I am initializing this in the same place as local:Designer.Context
@kekekeks I have found two minor issue in designer/xaml editor
  1. When I selected the attribute value and try to write new value it does not overwrite old value
Nikita Tsukanov
@kekekeks
Nov 28 2015 17:26
I think I know why that's happening
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 17:26
a1.PNG
a2.PNG
This message was deleted
and I should get this instead
a3.PNG
Try this
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 17:31
And second issue when setting Design.Width="1000" and Design.Height="26" for UserControl designer is not resized properly, this works with Window designer
uc.PNG
Nikita Tsukanov
@kekekeks
Nov 28 2015 17:33
Well, I need to rework that a bit
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 17:38

Try this

@kekekeks Its fixed!

Nikita Tsukanov
@kekekeks
Nov 28 2015 17:39
Perspex/Perspex@2c39da7
Resizing should work fine now
Nikita Tsukanov
@kekekeks
Nov 28 2015 17:46
Please also try this build - https://dl.dropboxusercontent.com/u/18301199/PerspexVS.vsix it should have a better solution
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:02
designer.PNG
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:03
wow
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:03
@kekekeks I was initializing command only valid for current control
but some command are in App.paml
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:03
It should be loaded in the latest build
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:03
now I have initialized all commands and everything works!
I am using latest build and latest designer.
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:04
Place a MessageBox in your App.cs constructor
And see if it gets called
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:08
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:08
Ahahah
We need that in our release announcement
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:10
MessageBox.PNG

Place a MessageBox in your App.cs constructor

Yeah 6 times!

Nikita Tsukanov
@kekekeks
Nov 28 2015 18:10
It gets called for each designer window
So App.xaml is loaded
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:11
Yep, I have Design.DataContext set 5 times
designer_skia.PNG
Skia version inside VS designer !
Gtk does not work
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:15
Gtk won't work until we'll implement embeddable windows
It will require some refactoring since we need to inherit from GtkPlug instead of GtkWindow to do that
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:15
Yes it throws exception
@kekekeks If I set Design.Width/Height in UserControl and use this control in MainWindow it uses this Design.Width/Height in MainWindow too
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:17
The package size is too large. The feed owner may have to upgrade the MyGet subscription to resolve this issue.'.
Seriously?
We need to find another nuget provider
Since myget is too greedy
And I was wondering why are you complaining about things I've just fixed
494.61 MB / 500 MB storage used upgrade
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:25
Well, it seems that we need our own hosting for that feed
Each build takes approximately 25MB
so we can have 20 builds in myget at most
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:37
@wieslawsoltes try to update packages
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:42
Can not update
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:42
Build 9999.0.839-nightly is in the repo
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:42
from 9999.0.838-nightly to 9999.0.839-nightly
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:44
What does it complain about?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:45
Nothing
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:45
weird
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:45
Just don't have update action
in NuGet package manager
Did you remove old myget packages ?
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:49
Yep
There was no space available
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:49
WARNING: Unable to find version '9999.0.838-nightly' of package 'Perspex'.
My CI build failed
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:50
Heh
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:50
If you are removing old version please leave at least one old build, so I can update it
If not I have to uninstall alll perspex packages in VS and install new
Or maybe builds from few days
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:51
Well, myget have an option to kees last several builds
for now I've checked it
I'll set up a proper nuget server next weekend
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:51
ok
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:51
so we won't have to worry about myget quota
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:52
I was already bitten my myget quota when using some other package
And new version have not been compatible
@kekekeks When I run my app the Design.Width="800" Design.Height="670" is also set and Width and Height properties in Window are ignored or overwritten
Nikita Tsukanov
@kekekeks
Nov 28 2015 18:57
Ehm
wat
They are just properties with no code backing them
ApplyDesignerProperties is only called from DesignerAssist.UpdateXaml
@grokys is there any scientific explanation for this phenomena?
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 18:59
The order matters
Nikita Tsukanov
@kekekeks
Nov 28 2015 19:00
May be properties with the same name have the same key in the dictionary or something
Wiesław Šoltés
@wieslawsoltes
Nov 28 2015 19:01
        Width="1324" Height="670"
        Design.Width="1000" Design.Height="670">
and this is working
        Design.Width="1000" Design.Height="670"
        Width="1324" Height="670">
Steven Kirk
@grokys
Nov 28 2015 19:01
hmm, strange
no, perspex properties shouldn't be matched by name
Nikita Tsukanov
@kekekeks
Nov 28 2015 19:03
Might be a bug in omnixaml or something
Steven Kirk
@grokys
Nov 28 2015 19:03
i'm just fixing the name scope problem right now, could someone file an issue?
Nikita Tsukanov
@kekekeks
Nov 28 2015 19:04
Yep, bug in OmniXAML
It sets Layoutable.Width in both cases
@SuperJMN
Or it's a bug in PerspexWiringContext
Steven Kirk
@grokys
Nov 28 2015 19:06
probably the latter
Nikita Tsukanov
@kekekeks
Nov 28 2015 19:08
Perspex/Perspex#334
Steven Kirk
@grokys
Nov 28 2015 19:08
thanks
Steven Kirk
@grokys
Nov 28 2015 20:52
ok, i think namescopes should be working properly now
that should have removed one source of leaks
though i suspect quite a small source of leaks
Steven Kirk
@grokys
Nov 28 2015 21:11
@kekekeks CS0108 'EmbeddedWindowImpl.Handle' hides inherited member 'WindowImpl.Handle'. Use the new keyword if hiding was intended.
Nikita Tsukanov
@kekekeks
Nov 28 2015 21:12
Hm
This message was deleted
Yep, can be safely removed
Darnell Williams
@Seeker1437
Nov 28 2015 21:43
See memory leaks are the only thing I haven't looked for yet
I've never worried about them so I never really looked for them
But you can get the resharper plugin that detects allocations and such were the meory isn't being disposed.
Nikita Tsukanov
@kekekeks
Nov 28 2015 22:28
dotMemory