These are chat archives for AvaloniaUI/Avalonia

14th
Dec 2015
danwalmsley
@danwalmsley
Dec 14 2015 09:39
guys im thinking of adding perspex as a submodule to my project rather than using nuget, that way its easier for me to work on perspex controls in the context of my app... are there any disadvantages to this?
Nikita Tsukanov
@kekekeks
Dec 14 2015 09:46
Yep, you'll have to merge stuff
danwalmsley
@danwalmsley
Dec 14 2015 09:47
thats ok...
im thinking of this to make it easier for me to do fixes in perspex...
I can fix them then do a PR
merge is not a problem... its just best way to integrate it in my project.
im thinking keep the perspex solution seperate... and make fixes...
then reference the assemblies manually
or just add my project to the perspex one like a test application...
which ever way its not so simple?
Nikita Tsukanov
@kekekeks
Dec 14 2015 09:49

or just add my project to the perspex one like a test application...

Bad idea

danwalmsley
@danwalmsley
Dec 14 2015 09:49
why?
Nikita Tsukanov
@kekekeks
Dec 14 2015 09:49
you'll get a lot of problems with PRs
danwalmsley
@danwalmsley
Dec 14 2015 09:49
ah yeh
it will want to remove it everythime i pull in new stuff
adding all the perspex projects manually is not going to be nice either.
to my solution
it would be nice if my project could just build the entire perspex solution first...
then i dont have to import anything
im going to stick with nuget...
it would have made it easier for me to contibute thats all
Steven Kirk
@grokys
Dec 14 2015 10:07
i'd say try adding perspex as a submodule.
see how it goes
danwalmsley
@danwalmsley
Dec 14 2015 10:07
iv pulled it in as a sub module...
but then I guess id need to add quite a few project to my solution?
is that the way to go?
Steven Kirk
@grokys
Dec 14 2015 10:08
tbh though i'd advise pulling in a fork as a submodule
yeah, that'd be the way to go
or write a script to copy the binaries between solutions
danwalmsley
@danwalmsley
Dec 14 2015 10:08
yeh im adding in my fork... that way I can control when to get updates..
and just send the odd fix to you guys as a PR
ok i'll have a go...
fingers crossed...
which is the main Perspex project, where if I build that it references all the required dlls?
i.e. Perspex.Base?
Nikita Tsukanov
@kekekeks
Dec 14 2015 10:10
There is no "main project"
Gutemberg Ribeiro
@galvesribeiro
Dec 14 2015 10:10
@kekekeks any docs on build skia for ARM?
Nikita Tsukanov
@kekekeks
Dec 14 2015 10:10
@galvesribeiro no idea
Gutemberg Ribeiro
@galvesribeiro
Dec 14 2015 10:11
ok, thanks. their site only show android and iOS but nothing for general arm :(
Nikita Tsukanov
@kekekeks
Dec 14 2015 10:11
Try to build it in a scratchbox or something
Gutemberg Ribeiro
@galvesribeiro
Dec 14 2015 10:13
yes I use that to build Mono... but you still have to set flags to compile to arm
will look on that, thanks
Nikita Tsukanov
@kekekeks
Dec 14 2015 10:13
try that arch=arm flag in gyp
Gutemberg Ribeiro
@galvesribeiro
Dec 14 2015 10:14
will check that, thanks
danwalmsley
@danwalmsley
Dec 14 2015 10:15
Perspex.HtmlRender is complaining lots of missing files
is there a submodule to import?
[Failure] Could not find file 'G:\development\repos\AvalonStudio\Perspex\src\Perspex.HtmlRenderer\external\Source\HtmlRenderer\Core\Parse\HtmlParser.cs'.
[Failure] Could not find file 'G:\development\repos\AvalonStudio\Perspex\src\Perspex.HtmlRenderer\external\Source\HtmlRenderer\Core\Handlers\SelectionHandler.cs'.
[Failure] Could not find file 'G:\development\repos\AvalonStudio\Perspex\src\Perspex.HtmlRenderer\external\Source\HtmlRenderer\Core\Entities\HtmlStylesheetLoadEventArgs.cs'.
[Failure] Could not find file 'G:\development\repos\AvalonStudio\Perspex\src\Perspex.HtmlRenderer\external\Source\HtmlRenderer\Core\Entities\CssBlock.cs'.
[Failure] Could not find file 'G:\development\repos\AvalonStudio\Perspex\src\Perspex.HtmlRenderer\external\Source\HtmlRenderer\Adapters\RFont.cs'.
same with Perspex.ReactiveUI
Nikita Tsukanov
@kekekeks
Dec 14 2015 10:18
git submodule update --recursive --init
danwalmsley
@danwalmsley
Dec 14 2015 10:19
@kekekeks thanks
danwalmsley
@danwalmsley
Dec 14 2015 10:27
man its slow... only getting 30kb/sec from github!
danwalmsley
@danwalmsley
Dec 14 2015 10:42
woohooo finally
ok right thats worked adding as submodule...
expects some PRs coming your way with minor fixes!
danwalmsley
@danwalmsley
Dec 14 2015 11:40
trying to work out why menuitem doesnt inherit bg colour
#364 I thought maybe background wasnt set
in template
but seems to be
Steven Kirk
@grokys
Dec 14 2015 11:59
i wouldnt worry too much about inheritance etc for the moment as i'm currently changing all that
as it needs to work on the logical tree rather than the visual
danwalmsley
@danwalmsley
Dec 14 2015 11:59
ah ok.. will leave that one for now..
danwalmsley
@danwalmsley
Dec 14 2015 12:52
im having trouble with onkeydown event
in my UserControl I have overridden the event
and in certain cases I set handled to true... to prevent my editor control responding...
problem is the editor control gets the event first... could this be an error?
Steven Kirk
@grokys
Dec 14 2015 14:05
the key down event should bubble - i.e. the child control should receive the event first
is the editor control a parent of the UserControl?
danwalmsley
@danwalmsley
Dec 14 2015 14:06
hey
ok my setup is like this
TextEditor = Real Control
Editor = User Control
Editor contains a TextEditor
in Editor code behind I override OnKeyDown
but TextEditor also overrides this and gets it first
Steven Kirk
@grokys
Dec 14 2015 14:07
ok, so TextEditor is the child
yeah, so everything is working as expected
you'll have to listen for the event in its tunnelling stage instead of in it bubbling stage
in WPF these would be the PreviewKeyDown event, but I got rid of those as they clutter stuff up
danwalmsley
@danwalmsley
Dec 14 2015 14:08
ah ok makes sense..
how can I do that?
Steven Kirk
@grokys
Dec 14 2015 14:09
control.AddHandler(InputElement.KeyDownEvent, KeyDownHandler, RoutingStrategies.Tunnel);
where KeyDownHandler is your event handler
danwalmsley
@danwalmsley
Dec 14 2015 14:21
@grokys will give that a go
José Manuel Nieto
@SuperJMN
Dec 14 2015 20:13
Hey guys! first of all, I want to tell you that I'm very proud of the work you're doing with Perspex!
It's becoming more and more powerful :)
thanks for all your efforts!
BTW, I have fixed some issues in OmniXAML
Thanks, @grokys and @wieslawsoltes for your issue reports!
José Manuel Nieto
@SuperJMN
Dec 14 2015 20:20
Nested attached properties should now work
danwalmsley
@danwalmsley
Dec 14 2015 21:41
@grokys Im trying the add handler...
 protected override void OnKeyDown(KeyEventArgs e)
        {}

AddHandler(InputElement.KeyDownEvent, OnKeyDown, RoutingStrategies.Tunnel);
gives me cannot convert from 'method group' to 'Delegate'
ok changed signature to
protected void OnKeyDown(object sender, KeyEventArgs e)
that works :D
danwalmsley
@danwalmsley
Dec 14 2015 21:49
although the texteditor still gets the event first :(
the actual control
using Tunnel or Bubble doesnt change the order in which the OnKeyDown handlers are executed.
Steven Kirk
@grokys
Dec 14 2015 21:55
oh really?
hmm, that may be a bug
danwalmsley
@danwalmsley
Dec 14 2015 21:55
iv assumed that I only had to make the change in the Real control
and not the user control?
im just adding same change to user control
to see if that helps
ah that works... as long as they both register via AddHandler...
Steven Kirk
@grokys
Dec 14 2015 21:58
hmm, handling a tunnelling event should cancel the bubbling event
danwalmsley
@danwalmsley
Dec 14 2015 21:59
I think I might have found another bug in ListView
for some reason the first time I set SelectedItem in my ViewModel
it doesnt select anything...
then I change the selection a second time.. it does
its when changing from null to a value
Steven Kirk
@grokys
Dec 14 2015 22:00
if you could create a minimal repro and file a bug that would be really handy
danwalmsley
@danwalmsley
Dec 14 2015 22:01
I can give you a commit on my project and instructions how to repro...
I will file an issue.. later on
just need to make sure code is definately doing what I think it is
Steven Kirk
@grokys
Dec 14 2015 22:01
i'm right in the middle of something now so probably won't get chance to look at it for a bit
danwalmsley
@danwalmsley
Dec 14 2015 22:28
@grokys if your there.. I wasnt able to change listbox selected item background color do you know what the style selector would have to be for that?
Steven Kirk
@grokys
Dec 14 2015 22:35
there's not really a good way to do that yet - it's on the roadmap though