These are chat archives for AvaloniaUI/Avalonia

4th
Apr 2017
danwalmsley
@danwalmsley
Apr 04 2017 10:06
@kekekeks can we cherry pick back in the open folder dialog win32 implementation!
its broken features I use quite regularly
danwalmsley
@danwalmsley
Apr 04 2017 12:37
@/all anyone worked out how to get the RID at runtime of a .net core app?
Wiesław Šoltés
@wieslawsoltes
Apr 04 2017 12:39
Can you pass msbuild variable to some define
danwalmsley
@danwalmsley
Apr 04 2017 12:40
I guess so
I'm surprised there doesn't seem to be anything built into the runtime
Jeremy Koritzinsky
@jkoritzinsky
Apr 04 2017 14:24
@danwalmsley It's not the most direct, but you can pull most of that info from System.Runtime.InteropServices.RuntimeInformation
danwalmsley
@danwalmsley
Apr 04 2017 14:46
@jkoritzinsky it mainly causing me issues for linux
basically I have an executable I need to call
and if I'm on RID = debian-x64 I need to call a different version from
Ubuntu-x64
the apis I found in RuntimeInformation didn't seem to be able to tell me if it was debian or ubuntu
.... or perhaps OSDescription!
hmmm will have to test
@danwalmsley something like this <AssemblyInfoLines Include="&lt;assembly:System.Reflection.AssemblyMetadata(&quot;PackageTargetRuntime&quot;, &quot;$(PackageTargetRuntime)&quot;)&gt;" />
Nikita Tsukanov
@kekekeks
Apr 04 2017 16:03
@wieslawsoltes KVM and Linux running on actual hardware
You also need to add a "tablet" device (dunno how it's called in VirtualBox), since there is no code to render the cursor
@grokys It's not like I have nothing else to do, it's just hw-rendering is postponed until retained renderer is sorted out
Steven Kirk
@grokys
Apr 04 2017 16:06
heh yeah
i don't mind - we can prioritise getting it merged now, or i can continue merging it piece by piece
merging piece by piece has the advantage that i fix things as i go, but it's slower
Nikita Tsukanov
@kekekeks
Apr 04 2017 16:07
And we can live with sw for a while, it works quite well
Steven Kirk
@grokys
Apr 04 2017 16:08
there's also still embedding native widgets that i've not even thought about yet on scenegraph
Nikita Tsukanov
@kekekeks
Apr 04 2017 16:08
I'm not sure that scenegraph has anything to do with native widget embedding
Steven Kirk
@grokys
Apr 04 2017 16:09
but anyway, the fact i can't test skia (along with moving house and VS2017) is holding things up...
Nikita Tsukanov
@kekekeks
Apr 04 2017 16:09
Are you able to run .NET Core version?
Steven Kirk
@grokys
Apr 04 2017 16:09
ah you know i've not tried that!
i've not had much time to avalonia recently
should get chance to try that later today
Nikita Tsukanov
@kekekeks
Apr 04 2017 16:17
I think that we need to add a targets to our package
So it will add EmbeddedResource rules automagically
Steven Kirk
@grokys
Apr 04 2017 16:17
yeah, that would be good
@grokys This is probably not compatible with .NET Core on non Windows machines
Unhandled Exception: System.TypeLoadException: Could not load type 'System.Runtime.InteropServices.WindowsRuntime.EventRegistrationToken' from assembly 'System.Runtime.InteropServices.WindowsRuntime, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.
   at System.Reactive.ReflectionUtils.GetEventMethods[TSender,TEventArgs](Type targetType, Object target, String eventName, MethodInfo& addMethod, MethodInfo& removeMethod, Type& delegateType, Boolean& isWinRT)
   at System.Reactive.Linq.QueryLanguage.FromEventPattern_[TSender,TEventArgs,TResult](Type targetType, Object target, String eventName, Func`3 getResult, IScheduler scheduler)
   at Avalonia.Controls.Window.ShowDialog[TResult]()
   at Draw2D.NetCore.App.Start() in /home/wiso/Projects/Draw2D/src/Draw2D.NetCore/App.xaml.cs:line 37
   at Draw2D.NetCore.Program.Main(String[] args) in /home/wiso/Projects/Draw2D/src/Draw2D.NetCore/Program.cs:line 22
Aborted (core dumped)
Wiesław Šoltés
@wieslawsoltes
Apr 04 2017 20:22
Had same issue with XamlBehaviors and had to change to other form of the FromEvent like this: https://github.com/AvaloniaUI/Avalonia/blob/7b4c10a7f8b03f767da435f052a878dc10593b41/src/Markup/Avalonia.Markup/ControlLocator.cs#L41
Steven Kirk
@grokys
Apr 04 2017 20:23
ah really? how strange!
Wiesław Šoltés
@wieslawsoltes
Apr 04 2017 20:23
took me some time to figure this out
Steven Kirk
@grokys
Apr 04 2017 20:24
do you have a link to an issue about this? can't find anything from a search
Wiesław Šoltés
@wieslawsoltes
Apr 04 2017 20:25
no just found this out
my previous issue was with XamlBehaviors project not related to Avalonia
Steven Kirk
@grokys
Apr 04 2017 20:28
i wonder if this is the bug?
Wiesław Šoltés
@wieslawsoltes
Apr 04 2017 20:28
no they just use windows specific api
                Observable.FromEventPattern<EventHandler, EventArgs>(
                    x => this.Closed += x,
                    x => this.Closed -= x)
                    .Take(1)
                    .Subscribe(_ =>
                    {
                        modal.Dispose();
                        SetIsEnabled(affectedWindows, true);
                        activated?.Activate();
                        result.SetResult((TResult)_dialogResult);
                    });
this should fix the issue
Steven Kirk
@grokys
Apr 04 2017 20:29
ok, could you submit a PR?
Wiesław Šoltés
@wieslawsoltes
Apr 04 2017 20:29
yes
Steven Kirk
@grokys
Apr 04 2017 20:29
thanks! :)
your other PR looks good - can be merged when CI passes
Wiesław Šoltés
@wieslawsoltes
Apr 04 2017 20:29
just checking if there is another occurrence
travisci went crazy today :(
internet is broken today :(
@grokys Submited AvaloniaUI/Avalonia#947
Steven Kirk
@grokys
Apr 04 2017 20:54
thanks!