Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Conversation

@shana
Copy link
Member

@shana shana commented Nov 15, 2017

Switching views was happening in such a way that the new view would not get OnDataUpdate called between OnEnable and OnUI, because OnDataUpdate only gets called during layout events, and we switch the view (calling OnEnable on it) during the onmouseup event. That meant that the newly-active view would not load data until the next ui cycle, which causes exceptions to be thrown, given that the rendering code relies on data to always be there in some way (either cached or empty or whatever, but something needs to exist)

This ensures that OnDataUpdate gets called on the new view manually. This means that the event type for OnUI is going to be mouseup... which might confuse the new view if it's trying to handle it? I think it's probably fine because by this point the event object has been marked as used, which means other controls that want to handle the event will ignore it.

shana and others added 2 commits November 15, 2017 19:49
Switching views was happening in such a way that the new view would not get
OnDataUpdate called between OnEnable and OnUI, because OnDataUpdate only
gets called during layout events, and we switch the view (calling OnEnable on it)
during the onmouseup event. That meant that the newly-active view would not load
data until the next ui cycle, which causes exceptions to be thrown, given
that the rendering code relies on data to always be there in some way (either
cached or empty or whatever, but *something* needs to exist)

This ensures that OnDataUpdate gets called on the new view manually. This means
that the event type for OnUI is going to be mouseup... which might confuse the
new view if it's trying to handle it? I think it's probably fine because by
this point the event object has been marked as used, which means other controls
that want to handle the event will ignore it.
@StanleyGoldman StanleyGoldman merged commit 106628d into master Nov 20, 2017
@StanleyGoldman StanleyGoldman deleted the fixes/switching-views branch November 20, 2017 20:18
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants