Closed dehlen closed 9 years ago
The error occures because no observer has been added but in override public func tabView
the controller is trying to remove one. Did i miss something to add them in the first place or is this a bug in your library that should check if there is an observer before trying to remove one ? Talking about line 55.
Its a bug if the first selected tab view implement the protocole. (For my own use not all tab views implement the protocol) I Will commit a fix when possible
Please have a look at my latest commit on my fork: https://github.com/T-Rex-Editor/Prephirences/commit/0202cc9159d9f689df69c068fa56a04c06593e8a. I added an Array which holds all observed objects. Then it is possible to check if an object already has an observer or not. This commit fixes this issue but I guess it is not the prettiest solution. Feel free to improve my solution.
Keep track on observers into observed objects is the best way to be able to do a method like hasObserver
before removing observer
(or a list of observed object into observer)
But in your code you keep track of observers(not observed) into the observer himself, the list could contains only self`` Maybe its you want to add
viewControllerinto
observedObjects`
So a simple boolean could achieve the same fix, and it will be the fix so thx ;)
Hello I tried to follow your Readme but i currently get this error:
I did the following setup:
Not sure what I am doing wrong ?! The error is due to an unset observer to preferencesTabViewSize but I don't know what I am missing ?