Hi all,
I believe this subject has been discussed quite some time ago but I couldn’t find it anymore so wanted to ask you once more, but does anyone know a good way to get notifications when CPViewcontroller’s views get changed, e.g. when they get created or destroyed etc?
I’m using quite a few CPNotifications and one of the problems I’m running into is that removed subviews that listen to a certain notification still respond after they have been removed yet not garbage collected yet.
Ideally I’d like to remove them as observer when the view is removed from within the CPViewController but have so far not found a way to do so.
Thanks
Arjen
Hmm, I thought I’d tried those but can’t find them in the src or documentation.
Are you sure those work for you?
https://github.com/cappuccino/cappuccino/blob/v0.9.9/AppKit/CPViewController.j
http://www.cappuccino-project.org/learn/documentation/interface_c_p_view_controller.html
I’m running a slightly dated version of cappuccino but don’t really have time to update and test everything unless I’ll have to so please let me know.
Arjen
--
You received this message because you are subscribed to the Google Groups "Cappuccino & Objective-J" group.
To unsubscribe from this group and stop receiving emails from it, send an email to objectivej+...@googlegroups.com.
To post to this group, send email to objec...@googlegroups.com.
Visit this group at https://groups.google.com/group/objectivej.
For more options, visit https://groups.google.com/d/optout.
Ah great, I’ll check that out straight away.
Thanks!
Ok, I have finally found some time to update my entire project to the latest master and so far so good, thanks a lot for that!
However, I do have a quick question, but am I correct to say that the -viewWill|DidAppear and -viewWill|DidDisappear methods are only called in the viewcontroller itself and not in it’s super classes? If it’s not then there must be something in my code but I wanted to ask first anyway…
The behaviour I’m seeing now is that if a subclassed PSViewController (itself a subclass of CPViewController) does contain a viewDidDisappear method it’s called as expected, however if it doesn’t contain the method at all it does not call the viewDidDisappear method in the super PSViewController either. I suspect it’s got something to do with the inner workings of CPNotificationCenter but I’m not sure at all.
Thanks