These are chat archives for AvaloniaUI/Avalonia

31st
May 2016
Matthijs ter Woord
@mterwoord
May 31 2016 06:09
@Seeker1437 That's reactive stuf
Matthijs ter Woord
@mterwoord
May 31 2016 06:48
Nikita Tsukanov
@kekekeks
May 31 2016 06:52

Binary serialization (BinaryFormatter) will be available again

Not that again

Matthijs ter Woord
@mterwoord
May 31 2016 06:52
:(
danwalmsley
@danwalmsley
May 31 2016 12:41
@grokys was wondering if I might be able to look at INCC in the virtualization branch, although you may prefer to do it?
Steven Kirk
@grokys
May 31 2016 12:56
i actually already started on it, but it's not finished - will commit what i have
ok @danwalmsley the latest commit adds a tiny bit of INCC support - if you want to try doing more you're welcome!
the controls in the VirtualizationTest app need to be wired to a view model impl
and then basically find something that doesn't work, write a unit test, write the code to make the unit test pass
danwalmsley
@danwalmsley
May 31 2016 13:22
ok @grokys I will take a look :)
I'm also hoping if you have an hour sometime this week or next we can have a serious look at my memory leak, basically running Avalon Studio for more than 40 minutes and you use up all the ram on your machine...
but not much is going on,
it could be content control again not sure... but iv been spent days trying to figure it out, chased loads of red herrings
and I'm not closer to finding it
James Walmsley
@jameswalmsley
May 31 2016 13:53
This message was deleted
danwalmsley
@danwalmsley
May 31 2016 13:57
@grokys how do I sync to PR, iv implemented adding new items and removing selected item
to test app.
Steven Kirk
@grokys
May 31 2016 13:58
you'll submit a new PR against the PR branch which i will merge
danwalmsley
@danwalmsley
May 31 2016 13:58
ok
removing items isn't handled propertly, but i'll fix that in a separate commit :)
danwalmsley
@danwalmsley
May 31 2016 14:10
@grokys ItemVirtualizerSimple? is that where INCC is implemented?
Steven Kirk
@grokys
May 31 2016 14:29
rather than append and prepend (which is a single word afaik ;) ) i was just going to have the test app add the item at the selection point
ItemVirtualizerSimple? is that where INCC is implemented?
well no, INCC is implemented in the collection, but i assume that's not what you're asking ;)
ItemVirtualizerSimple handles INCC yes
danwalmsley
@danwalmsley
May 31 2016 14:30
sorry yes Handles I should have said
ok i'll update test app with that change
kind of obvious now you said that
I can remove any item except the last one.
Steven Kirk
@grokys
May 31 2016 14:31
for adding, if there's no selection add at the end
danwalmsley
@danwalmsley
May 31 2016 14:32
ok sure
when I try to remove last one , then recycle containers trys to access Items[Length + 1]
causing exception... I'm not sure if I need to put a boundary guard in, or if its something that should have been handled before
Steven Kirk
@grokys
May 31 2016 14:33
are you adding unit tests for each of these cases you fix?
this stuff needs to be done using TDD
danwalmsley
@danwalmsley
May 31 2016 14:34
ok yeh, I'll add a unit test first... that's the only one iv looked at so far
apart from updating test app...
Steven Kirk
@grokys
May 31 2016 14:44
could you mark your PR as WIP (work in progress) until you think it's ready for merge?
in the title
just helps me and other people know when stuff is ready
when I try to remove last one , then recycle containers trys to access Items[Length + 1]
it shouldn't be doing that
that's part of the logic you have to implement
if you're at the end of the list and the user deletes an item, you will have to move the FIrstItem back
danwalmsley
@danwalmsley
May 31 2016 14:48
ok sure... right I'm adding a Test for that case...
then i'll change PR to WIP :)
and then i'll try and fix that case
danwalmsley
@danwalmsley
May 31 2016 15:05
@grokys iv updated PR with a test for that, so will try and fix that case.
danwalmsley
@danwalmsley
May 31 2016 15:16
@grokys can you give me a quick hint about this method
RecycleMoveContainers
in context for recycling the last container. .
Steven Kirk
@grokys
May 31 2016 15:17
ok, imagine you've got a list with 10 items visible and you want to scroll down 5 items
you need to move the bottom 5 containers to the top, and recycle the top 5 containers to be the new items, which are moved to the bottom
that's what that method does
make sense?
Darnell Williams
@Seeker1437
May 31 2016 15:18
Ooh okay so like a buffer?
danwalmsley
@danwalmsley
May 31 2016 15:19
ok right, makes sense
Steven Kirk
@grokys
May 31 2016 15:19
hmm... a bit... i guess? not really much like a buffer though :)
danwalmsley
@danwalmsley
May 31 2016 15:19
ok and if I have been scrolled to bottom, and removed the last item
then I guess no recycling can happen its, just remove the last panel.Children also
Steven Kirk
@grokys
May 31 2016 15:19
well they could be recycled
but tbh i wouldn't bother
Darnell Williams
@Seeker1437
May 31 2016 15:19
Then it should get one from the top right?
danwalmsley
@danwalmsley
May 31 2016 15:19
ok sure
Steven Kirk
@grokys
May 31 2016 15:20
it'd be a lot more complicated and removing happens far less often than scrolling
Darnell Williams
@Seeker1437
May 31 2016 15:20
True
Steven Kirk
@grokys
May 31 2016 15:22
sorry, when i said "recycled" i maybe wasn't clear
"recycling" technically means assigning a new item to an existing container
you will have to do that even when an item gets deleted
however when scrolling less than a page, you can literally reuse the existing containers without recycling them
you don't need to bother with that i don't think
danwalmsley
@danwalmsley
May 31 2016 15:35
@grokys how do I convert between indexes in the original array, to the indexs of the items panel...
?
Steven Kirk
@grokys
May 31 2016 15:36
the index of the item will be panelIndex + FirstIndex
FirstIndex is the index of the item shown at the top of the panel
danwalmsley
@danwalmsley
May 31 2016 15:41
doesn't seem to be a panelIndex?
to convert from firstIndex to panelIndex
FirstIndex - panel.Children.Count?
Steven Kirk
@grokys
May 31 2016 15:56
by panelIndex i meant the index of the container in the panel
to convert the other way, assuming your item index is called itemIndex the use itemIndex - FirstIndex
i misread your question as asking how to convert the other way
but it's not hard: FirstIndex is the index of the first item in the panel