These are chat archives for AvaloniaUI/Avalonia

6th
Nov 2016
Andrew
@zezba9000
Nov 06 2016 17:59
@grokys My workaround for now is to just load all pages in a Grid then set there IsVisible property to true/false to handle pages. Seems to work good that way.
Steven Kirk
@grokys
Nov 06 2016 18:02
ok great you have a workaround
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:16
@jkoritzinsky Just saw that! I'll take a look to the changes soon! Big thanks, man!
@grokys I've progressed a bit! the integration seems closer :D
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:16
No prob!
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:17
@jkoritzinsky The thing I don't like is to model events like properties
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:18
I personally think that it's a relatively clean abstraction, especially with the new API.
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:18
Do you think you could make a base class, like "Member" from which Properties and Events derive?
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:18
Setting the value -> adding a handler
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:18
why do you think that events and properties should derive from the same class?
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:18
Getting a value -> Get the Raise delegate
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:19
OK, I buy it :)
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:19
We could have a Member base instead of a Property base. I'd be ok with that
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:19
but I'm cold when I saw the IsEvent property!
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:19
I'm totally up for renaming Property -> Member.
I'll take a look on how to remove the IsEvent property.
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:20
OK, and the RegularPropertyOrEvent seems bad for me
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:20
I think I'm only using it in SourceValueConverter to convert a string to a delegate reference to the handler
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:20
it's like you're creating hammers and drones from the same method
haha :)
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:20
I'll take some more looks on the naming. I'm up for changing that.
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:21
I will feel a lot better if you can "strongly" type that factory method, too
thank you!!
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:21
Outside of naming, do you think the design I picked is pretty good?
It'll be hard to strongly name that method because of the rules behind accessing members but I'll take a stab at it.
*accessing events
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:21
anyways, I would have taken 90% of your code for dealing up with events. They are so wild ... I haven't played with them at a so low level before
OK!
it's more or less OK
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:22
The hardest part was getting the AddHandler delegate to work with the differing API surfaces
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:23
I'll be happier if the people looking at the code get that events and properties are almost the same
yes, that must be hard
It would be nice to have something like a base like "Member"
then, from Member, 2 classes: Attachable and Regular
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:24
Interesting. I like that idea.
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:24
from Attachable => AttachableEvent and AttachableProperty
and the same for Regular members
it produces no surprises to read that
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:25
Ok.
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:25
I was a bit shocked when I had ask a Property if it's an Event or not :)
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:25
Question: I have an idea for how to get rid of IsEvent
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:26
but it would be really nice to read if they are already an Event, modeled with a very easy-to-understand hierarchy
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:26
Would you be ok with SourceValueConverter converting a string to a handler any time the target is a delegate type?
For example,
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:26
it looks like a conversion to me :)
I know what you mean!
yes, I'm fine with it :D
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:27
Perfect!
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:27
oops, the dinner is ready!
Jeremy Koritzinsky
@jkoritzinsky
Nov 06 2016 20:27
Then I can get rid of IsEvent.
I'll go make that change
José Manuel Nieto
@SuperJMN
Nov 06 2016 20:27
talk to you later!
thanks for your collaboration!