You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the only way to test whether a socket can be connected to an object is to call AbstractSocket::connect(Object const&) in a try {} catch {} block and see if any sparks fly. This is problematic if (e.g.) you need to write a UI that lists all objects in an OpenSim::Model that can be connected to, because that requires iterating over many objects and (slowly) throwing many exceptions.
That use-case was triggered when developing OSC's socket editor (issue). I got around it by caching a list of connectees once, but it would be better to avoid exceptions altogether.
The text was updated successfully, but these errors were encountered:
Currently, the only way to test whether a socket can be connected to an object is to call
AbstractSocket::connect(Object const&)
in atry {} catch {}
block and see if any sparks fly. This is problematic if (e.g.) you need to write a UI that lists all objects in anOpenSim::Model
that can be connected to, because that requires iterating over many objects and (slowly) throwing many exceptions.That use-case was triggered when developing OSC's socket editor (issue). I got around it by caching a list of connectees once, but it would be better to avoid exceptions altogether.
The text was updated successfully, but these errors were encountered: