These are chat archives for AvaloniaUI/Avalonia

28th
Dec 2015
Nikita Tsukanov
@kekekeks
Dec 28 2015 09:23

@danwalmsley

ah ; should be ?

I'm still not sure about that

@flcl42

Looks like paml view can't be loaded on android, and I have to create design using code. Hope am not right.

Themes are loaded from paml and our testapp is using them

So there is some problem on your side
Kevin
@KeKl
Dec 28 2015 11:20
Is there a way to know if a property is binded to something? If I only check against null I get maybe a problem with default values?
Alexey
@flcl42
Dec 28 2015 11:24
@kekekeks, does this project use TestApplicationShared's class MainWindow in call MainWindow.Create() inside OnCreate of MainBaseActivity class ?
Kevin
@KeKl
Dec 28 2015 11:25
Great. Thanks.
Steven Kirk
@grokys
Dec 28 2015 11:27
though that doesn't check for bindings - a local value will also cause IsSet = true
do you need to check for bindings specifically?
Kevin
@KeKl
Dec 28 2015 11:32
I need something equivalent to BindingOperations.GetBinding != null.
Whether there is some kind of binding IsSet will be true?
Steven Kirk
@grokys
Dec 28 2015 11:38
so you need it to return false if the value is set via control.SetValue but true if the value is set via control.Bind?
there's currently no way to tell if a value is set via a binding or SetValue
Kevin
@KeKl
Dec 28 2015 11:47
No I think it is sufficient that I know the value is set.
Thanks.
Nikita Tsukanov
@kekekeks
Dec 28 2015 11:52
@flcl42 the problem is with your project, EmbeddedResource is perfectly supported by xamarin
Alexey
@flcl42
Dec 28 2015 12:20
Yes, most likely I've just added haml file in some bad way. Also, a little bug http://puu.sh/mbg8F/7c86f147ae.png
danwalmsley
@danwalmsley
Dec 28 2015 13:29
@kekekeks is there are reason we cant use ';' in the resource url?
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:29
I thought that it's better to use built-in Path/Query separator instead of splitting manually
But I'm still not sure about that
danwalmsley
@danwalmsley
Dec 28 2015 13:30
ok I was just thinking people are already used to ;assembly=xxx
but underneath you could replace ;assembly= with ?assembly=
then do the query?
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:31
AssetLoader takes Uri as input argument
So it's already parsed
danwalmsley
@danwalmsley
Dec 28 2015 13:31
ah ok
its only minor... was just confusing.. but if it was documented somewhere that wouldnt be a problem
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:32
It may change later
@grokys need your opinion about that
danwalmsley
@danwalmsley
Dec 28 2015 13:32
yeh sure
ok
Steven Kirk
@grokys
Dec 28 2015 13:33
not sure either
i'd be tempted to say "use ';' as that's what clr-namespace uses"
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:33
clr-namespace is namespace specifier after all
Which don't have to be Uri at all
Steven Kirk
@grokys
Dec 28 2015 13:34
well it's used as an XML namespace which have to be URLs I believe
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:34
Nope, you can write anything there
A namespace name is a uniform resource identifier (URI)
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:35
At least XML reader doesn't try to parse it
Steven Kirk
@grokys
Dec 28 2015 13:36
ah: "However, the namespace specification does not require nor suggest that the namespace URI be used to retrieve information; it is simply treated by an XML parser as a string."
but anyway: clr-namespace: is a URL
the question is why it used ; rather than ?
Alexey
@flcl42
Dec 28 2015 13:38
Is there a way to check if animation finished?
Cos it is multiple URLs like traceroute, joined
Steven Kirk
@grokys
Dec 28 2015 13:41
@flcl42 how are you triggering the animation?
i don't think it's multiple URLs joined.

The generic URI syntax consists of a hierarchical sequence of
components referred to as the scheme, authority, path, query, and
fragment.

  URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

  hier-part   = "//" authority path-abempty
              / path-absolute
              / path-rootless
              / path-empty

The scheme and path components are required, though the path may be
empty (no characters). When authority is present, the path must
either be empty or begin with a slash ("/") character. When
authority is not present, the path cannot begin with two slash
characters ("//"). These restrictions result in five different ABNF
rules for a path (Section 3.3), only one of which will match any
given URI reference.

The following are two example URIs and their component parts:

     foo://example.com:8042/over/there?name=ferret#nose
     \_/   \______________/\_________/ \_________/ \__/
      |           |            |            |        |
   scheme     authority       path        query   fragment
      |   _____________________|__
     / \ /                        \
     urn:example:animal:ferret:nose
so it seems that the ';' character means the whole URI is the path
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:45

so it seems that the ';' character means the whole URI is the path

Which actually makes sense

Steven Kirk
@grokys
Dec 28 2015 13:46
Animate.Property returns an Animation<T> which is an Observable<T> - you can subscribe to that and listen for OnCompleted
i.e.
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:46
I think that we need to implement GetAwaiter on that type
Steven Kirk
@grokys
Dec 28 2015 13:46
you can just call ToTask on it to do that
Nikita Tsukanov
@kekekeks
Dec 28 2015 13:46
So people will be able to await animations
Steven Kirk
@grokys
Dec 28 2015 13:47
so yeah, @flcl42 that's the easiest way: await Animate.Property(...).ToTask()
that should work...
or if you don't want to await it, use Animate.Property(...).Subscribe(_ => { }, () => { /* completed here */ })
Alexey
@flcl42
Dec 28 2015 13:50
ToTask works fine, ty. Hope it will not lead to leaks.
Steven Kirk
@grokys
Dec 28 2015 13:50
it shouldn't, no
Steven Kirk
@grokys
Dec 28 2015 13:59
@kekekeks this could be very interesting for you: https://youtu.be/6p6-FMZRiAc?t=49m36s
"we now have skiasharp, which runs on everything skia runs"
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:01
Well, it will be a bit hard to wrap in C# classes, I think
Steven Kirk
@grokys
Dec 28 2015 14:01
well it sounds like they've done it
danwalmsley
@danwalmsley
Dec 28 2015 14:01
is it available?
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:01
nope
Steven Kirk
@grokys
Dec 28 2015 14:01
i think he said its going to be available soon
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:02
The problem is that you still need a lot of platform-specific magic to get it drawing to the screen
Steven Kirk
@grokys
Dec 28 2015 14:02
"we have a prototype but we have to open source it" he said
yeah, well it'll be interesting to see what they come up with...
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:04
Another problem is that skia don't have one uniform API surface
And, finally, binary blob size
Currently I'm linking only what we actually need
But for server-side code it will be amazing to have a managed skia wrapper
Steven Kirk
@grokys
Dec 28 2015 14:07
will be interesting to see how they distribute it
"the issue that we had with cairo is that it keeps an internal state and you end up translating back and forth from this state way too often"
amen
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:08
If binary size is acceptable and platform-related issues are solved, it's easy to port our current backend back to C#
Steven Kirk
@grokys
Dec 28 2015 14:09
yep
that whole video is very interesting
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:12
Full utf8?
Oh, great, let's have a lot of issues with non ASCII characters
Darnell Williams
@Seeker1437
Dec 28 2015 14:13
When Microsoft says its big....
lol
Steven Kirk
@grokys
Dec 28 2015 14:13
"the only problem right now is that skia is a little bit big, but we're trying to trim it down a little bit"
@ImaBrokeDude Miguel isn't MS
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:13
They might trim useful things, you know
Steven Kirk
@grokys
Dec 28 2015 14:14
i do know
Darnell Williams
@Seeker1437
Dec 28 2015 14:14
Xamarin sorry
Steven Kirk
@grokys
Dec 28 2015 14:14
we'll have to wait and see
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:14
Current implementation is working, I just need to fix FormattedText and figure out how to deal with that tilemode
Steven Kirk
@grokys
Dec 28 2015 14:15
ah you've already all heard this but "we have a nuget, the native code is inside it"
Darnell Williams
@Seeker1437
Dec 28 2015 14:15
See, its amazing what you guys are doing, I think you guys are current :D
nugeeeet
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:15
So I think that we'll stick to C++ implementation for a while
Until they'll offer something better to use
Steven Kirk
@grokys
Dec 28 2015 14:16
definitely
once it's open sourced, it's worth speaking to them to try and get it usable for us
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:17
The problem with all these announcements is that people say "hey, we've got this cool thing working" and then it takes a year or two to actually release something useful
Steven Kirk
@grokys
Dec 28 2015 14:17
and i love how miguel says "nujeƩ"
yeah, well i understand that well ;)
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:17
Because, technically we have perspex working on mobile
Darnell Williams
@Seeker1437
Dec 28 2015 14:17
Yeah D:
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:18
It's rendering controls and stuff
Darnell Williams
@Seeker1437
Dec 28 2015 14:18
oh @kekekeks remember when you recommended I run OSX on a vm?
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:19
VMWare should be running it pretty well
Alexey
@flcl42
Dec 28 2015 14:19
Xamarin provides rest, isn't it?
Darnell Williams
@Seeker1437
Dec 28 2015 14:19
I cant deploy because that VM has no serial
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:19
deploy what
Darnell Williams
@Seeker1437
Dec 28 2015 14:19
an app
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:19
where
Darnell Williams
@Seeker1437
Dec 28 2015 14:19
to an iPad
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:19
Ehm, what
danwalmsley
@danwalmsley
Dec 28 2015 14:20
@grokys will Xamarin see us as competition?
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:20
Try to google it, may be you need to use chameleon/chimera to load it
Steven Kirk
@grokys
Dec 28 2015 14:20
well if they don't see coreclr as competition, i doubt it
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:20
@danwalmsley competition to what?
Steven Kirk
@grokys
Dec 28 2015 14:20
and also there have been xamarin people in here
danwalmsley
@danwalmsley
Dec 28 2015 14:20
Xamarin.Forms
ah ok thats good
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:20
lol
Darnell Williams
@Seeker1437
Dec 28 2015 14:20
oh nah
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:20
They are selling competely different product
Xamarin.Forms is free
danwalmsley
@danwalmsley
Dec 28 2015 14:20
to be fair Xamarin is saturating the mobile space
there is nothing available for Desktop space yet,,
Darnell Williams
@Seeker1437
Dec 28 2015 14:21
Partially true
danwalmsley
@danwalmsley
Dec 28 2015 14:21
thats what Perspex offers that is unique
Darnell Williams
@Seeker1437
Dec 28 2015 14:21
They have beta universal support
Steven Kirk
@grokys
Dec 28 2015 14:21
a healthy ecosystem is always a good thing
Darnell Williams
@Seeker1437
Dec 28 2015 14:22
so theoretically when they release Xamarin for universal it might extend it's reach
Alexey
@flcl42
Dec 28 2015 14:22
Xamarin.Forms is free
wut
Darnell Williams
@Seeker1437
Dec 28 2015 14:23
yep it is
Alexey
@flcl42
Dec 28 2015 14:25
There is no price-free nor opensource version
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:25
Ehm
You are free to download it from NuGet
And use it with Windows Phone
Alexey
@flcl42
Dec 28 2015 14:27
well
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:27
That's because of app size limitation
You can't fit it in 64kb starter edition size limit
danwalmsley
@danwalmsley
Dec 28 2015 14:28
yeh that why I never touched Xamarin.Forms
Alexey
@flcl42
Dec 28 2015 14:29
And they also have no visual designer (yet)
danwalmsley
@danwalmsley
Dec 28 2015 14:29
Perspex is ahead!! :D
Nikita Tsukanov
@kekekeks
Dec 28 2015 14:29
I don't think there ever be proper visual designer for XForms
Darnell Williams
@Seeker1437
Dec 28 2015 14:29
:D
Darnell Williams
@Seeker1437
Dec 28 2015 15:32
Yeah now that I think about it, more developers are shunting full designers
making more if a preview thing
Darnell Williams
@Seeker1437
Dec 28 2015 18:18
@grokys how would one use Match in Style?
Steven Kirk
@grokys
Dec 28 2015 18:20
Ummm, I have no idea what you mean
Alexey
@flcl42
Dec 28 2015 18:20
BorderThickness="0,0,0,2" of TextBlock looks like 2,2,2,2. Is it bug, or as should be?
Alexey
@flcl42
Dec 28 2015 18:33
nvm, it doesn't work for Border too and you likely now it
Steven Kirk
@grokys
Dec 28 2015 20:35
Hmm, that should work. Could you file an issue?
Guys, I'm going to bed now and then I'm on holiday for 10 days so I won't be around much. Please file issues if there's anything you want to ask!