These are chat archives for AvaloniaUI/Avalonia

21st
Nov 2016
José Manuel Nieto
@SuperJMN
Nov 21 2016 17:01
Wow! I've managed to fully load the XAML application with OmniXAML v2!
you can see it for yourself :D
please, clone this branch and tell me if it works for you: https://github.com/SuperJMN/Avalonia-JMN/tree/omnixamlv2-integration
run Samples\OmniXamlV2App and you should see the Window with the elements from the original XAML demo
danwalmsley
@danwalmsley
Nov 21 2016 19:04
Awesome
Is there any performance improvement? Faster load time perhaps?
José Manuel Nieto
@SuperJMN
Nov 21 2016 19:11
maybe the opposite :P but it's very "optimizable"
have you tried to run the code?
Steven Kirk
@grokys
Nov 21 2016 21:34
@SuperJMN just tried it, works great!
José Manuel Nieto
@SuperJMN
Nov 21 2016 21:36
thank you! I'm having a problem with Bindings, though. I don't know what's happening, it seems the DataContext is not set :(
the lists section doesn't show OK
I'm debugging ATM
I remember it worked before, so I checked out an old branch to see what's the deal
I have isolated the ListBox with the Binding to the Items, but it's the same
Steven Kirk
@grokys
Nov 21 2016 21:46
i didn't check in-depth but the BindingTest sample seemed to work
let me take another look
José Manuel Nieto
@SuperJMN
Nov 21 2016 21:49
The app I'm working with is the OmniXAMLV2App
I hope you can figure out what's wrong
I have just synced the branch that was working. I had problems with the submodules
Steven Kirk
@grokys
Nov 21 2016 21:51
oh you know what i was running on master :) that's why i didn't see it
José Manuel Nieto
@SuperJMN
Nov 21 2016 21:51
haha, you haven't discovered the truth, then!
the problem is happening under the omnixamlv2_integration branch
Steven Kirk
@grokys
Nov 21 2016 21:52
yeah checking it out now
you seem to have changed some of the solutions to use .net 4.6.2?
José Manuel Nieto
@SuperJMN
Nov 21 2016 21:57
every is top-notch, haha
yes
Steven Kirk
@grokys
Nov 21 2016 21:57
i think that's causing problems
José Manuel Nieto
@SuperJMN
Nov 21 2016 21:57
really?!
Steven Kirk
@grokys
Nov 21 2016 21:57
i don't have 4.6.2 so VS had to retarget it for 4.5.2
José Manuel Nieto
@SuperJMN
Nov 21 2016 21:58
yuck
Steven Kirk
@grokys
Nov 21 2016 21:58
and now i get
José Manuel Nieto
@SuperJMN
Nov 21 2016 21:58
get it from here, it can do no harm :)
Steven Kirk
@grokys
Nov 21 2016 21:58
Severity    Code    Description    Project    File    Line    Suppression State
Error    CS0103    The name 'Disposable' does not exist in the current context    Avalonia.DotNetFrameworkRuntime    D:\projects\Avalonia-JMN\src\Shared\PlatformSupport\StandardRuntimePlatform.cs    20    Active
Error    CS0103    The name 'Disposable' does not exist in the current context    Avalonia.Win32    D:\projects\Avalonia-JMN\src\Windows\Avalonia.Win32\RenderLoop.cs    28    Active
Error    CS0103    The name 'Disposable' does not exist in the current context    Avalonia.Win32    D:\projects\Avalonia-JMN\src\Windows\Avalonia.Win32\Win32Platform.cs    116    Active
Error    CS0103    The name 'Disposable' does not exist in the current context    Avalonia.Win32    D:\projects\Avalonia-JMN\src\Windows\Avalonia.Win32\WindowImpl.cs    331    Active
Steven Kirk
@grokys
Nov 21 2016 21:59
why did you change it?
José Manuel Nieto
@SuperJMN
Nov 21 2016 21:59
because I was having a big trouble with packages and dependencies, and decided to upgrade everything
Steven Kirk
@grokys
Nov 21 2016 21:59
that and deleting the sample applications is going to make merging your changes back hard :(
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:00
No, don't worry, I want this fork only for fixing and evolving OmniXAML v2
Steven Kirk
@grokys
Nov 21 2016 22:01
ok
i still can't work out why it's saying it can't find Disposable
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:01
when everything is working OK, I will make a fresh branch with everything working
Steven Kirk
@grokys
Nov 21 2016 22:01
ok, makes sense
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:01
it should reside inside the System.Reactive packages
is it installed right away, upon building the project?
Steven Kirk
@grokys
Nov 21 2016 22:02
it says that package is installed for the project, but when looking at the solution nuget packages it says it's not!
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:03
:O really strange!
Steven Kirk
@grokys
Nov 21 2016 22:04
though intellisense can find it
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:04
@danwalmsley can you check to see if it happens the same for you?
or anybody here :)
oh, it seems I'm getting something out of the Binding
maybe I'm right on track
Steven Kirk
@grokys
Nov 21 2016 22:15
ok, got it compiling
yeah i see the lists not appearing
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:21
OK, I have discovered something interesting
OmniXAML now tries to resolve 2 types every time a type is requested: MyType and MyTypeExtension
so Binding could be Binding or BindingExtension
right now, it's messing with both
Steven Kirk
@grokys
Nov 21 2016 22:22
ahhh
that's a really good thing though: that you don't need to create a separate BindingExtension class
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:23
Yes! I took your recommendation into consideration
and it works OK, but when both are there, the one withouth "Extension" prefix is chosen
the cool thing about inline markup like "{Binding MyProperty}" is that MyProperty is injected into the constructor
Steven Kirk
@grokys
Nov 21 2016 22:24
it should only select it though if it implements IMarkupExtension
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:24
haha, that's it!
currently, it selects Binding
Steven Kirk
@grokys
Nov 21 2016 22:25
right, yeah i'd like for Binding to be an IMarkupExtension but right now it's not, so it shouldn't be selected
(and that's a different PR ;) )
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:25
the mechanism of instantiation looks for an appropriate ctor, and finds only the "parameterless" ctor
so, for example, in a binding like this "{Binding foo}", the foo is lost
Steven Kirk
@grokys
Nov 21 2016 22:27
right, that'll be what's causing it then!
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:27
it's causing it for sure!
well, at least I found something that is wrong
Steven Kirk
@grokys
Nov 21 2016 22:27
it should probably throw in that case too
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:27
I'll fix it tomorrow
Steven Kirk
@grokys
Nov 21 2016 22:28
cool! nice work anyway!
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:28
BTW, I have had some nice problems with prefix declarations
it seems like it's solved elegantly, now
thanks! hopefully, tomorrow the XAML demo is fully working
see you later and thanks for the help!
Steven Kirk
@grokys
Nov 21 2016 22:29
later!
(though i didn't really help much ;) )
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:37
Tomorrow will be too late
it's fixed!
image.png
Steven Kirk
@grokys
Nov 21 2016 22:37
:)
what about the buttons to the right of the list though?
José Manuel Nieto
@SuperJMN
Nov 21 2016 22:38
haha, another issue to look into. Funny life!
it should show: "Collapse Nodes"
"Expand Nodes"
it will be very cool to find out why it's not getting the ContentProperty :)