mirror of
https://github.com/qmlnet/qmlnet.git
synced 2026-05-16 14:15:57 -06:00
[GH-ISSUE #14] Support for detecting if an object is "connected" to Qml in some way. #8
Labels
No labels
bug
enhancement
help wanted
help wanted
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/qmlnet#8
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @pauldotknopf on GitHub (Jul 17, 2018).
Original GitHub issue: https://github.com/qmlnet/qmlnet/issues/14
@pauldotknopf commented on GitHub (Jul 17, 2018):
This should be done before #7.
This will require us to track .NET instances that are currently alive in the Qml world.
This is the rough idea:
We store the instances in .NET with a
Dictionary<object, NetInstance>. When sending an object to Qml, we need to check if an existingNetInstancealready exists in the dictionary and use it, otherwise create one. Within the deconstructor ofNetInstance, we need to reach out to the .NET world and remove the instance from our global dictionary.IsConnectedwill simple do ainstance.ContainsKeyto determine if object is currently wrapped in Qml/V8 somewhere.@devmil commented on GitHub (Jul 19, 2018):
no longer needed?
@pauldotknopf commented on GitHub (Jul 20, 2018):
Yeah, not sure the use case anymore. I was initially only doing to do this to ensure the underlying facilities were in place for doing signals, but that was solved on your end.