SOLVED fontDidClose observer – how to get RFont object, that has been closed?
-
Like in the topic:
this doesn't work for me (I think it used to work a few months ago, but I'm not sure about it).The only solution is to use
fontWillClose
?from mojo.events import addObserver, removeObserver class Test(): def __init__(self): addObserver(self, "fontDidClose","fontDidClose") def fontDidClose(self,info): print(">>!>>>",info) print(info['font']) # doesn't work Test()
-
yes, to get the closing font use
fontWillClose
– which is called before closing the font. (fontDidClose
does not return a font because the font has just been closed :)