|
Hello!
I’m having some trouble in regards to using FBApplication callbacks in my CustomManager class. When I try to create a member object of class FBApplication, I get a disassembly error. If I try to create a local copy of FBApplication, any callbacks I register to that instance are never called.
In an attempt to work around this restriction, I’ve encountered another problem. There does not appear to be any way to detect if an object has been deleted, either by the user, or by the system during Clear, Open, or New file operations. This means that references to those objects are dangerous, because attempting to call a function on an object that has been deleted will cause a crash. Pointers to FBComponent objects are not set to NULL when the object is deleted but it looks like the mLocalPtr attribute is, unfortunately those member attributes are private, and can’t be tested directly.
In a third attempt to work around this limitation I created a derived version of the FBNote class and overloaded the destructor. I was going to create an OnNoteDestroyed event callback to hook my CustomManager class too, but then I realized that I have no idea how to create a new event broadcaster.
There are no examples of how to do it, and the documentation is extremely sparse. I imagine it has something to do with the FBPropertyEvent class, but I have had no luck finding an example of usage anywhere.
Any help that anyone has on solving any of these problems would be much appreciated.
|