theodox / mGui

Python module for cleaner maya GUI layout syntax
MIT License
123 stars 23 forks source link

Threaded property access #9

Closed theodox closed 8 years ago

theodox commented 10 years ago

In the threaded branch, it appears safe to, say, asynchronously update an observableCollection and have it update the UI - however making all the property accessors use EvalDeferredInMainThreadWithResult means that you get long hangs and some dependent layout items don't work properly because, I suspect, the layout items don't have sizes yet.

It would be really nice not to have to think about this at the user level at all. How to get there?

theodox commented 10 years ago

On a related (?) note... what about virtualized lists?

theodox commented 10 years ago

as of 2886a5271f0d0b238f1304455e1e08f049c7a518 the main line can: 1) update an observableCollection from a thread (the observable uses MayaEvents, so it is safe) 2) update bindings inside a list redraw(the update call is coming from a MayaEvent in the list)

Part of the confusion was a bug in bindingContexts so that all bindings were ending up in the same context.

theodox commented 8 years ago

I'm going to close this issue... not only does this seem stable but also there is https://github.com/theodox/mTasks to cover many of the applications i'd have used here