2009/5/6 Boris "billiob" Faure <bill...@gmail.com>: >> There it is done with goject's signals, are we keeping that? > > It's not done with gobjects, just plain python code, no threading, no > real event loop... look at the code ;)
OMG where did I see that? I'm drunk! >> Here I have a couple of doubts: this way you order callbacks so that >> ro callbacks get called only after the information has been modified >> by the other callbacks. But what about the rw callbacks? I mean there >> could be issues of ordering there too, IE if one cb depends on another >> being already called... How do we deal with that? (Not that I have >> better suggestions...) >> >>> When we Emit, we just do a "for each" on that list. rw callbacks will >>> return the value changed. >>> Or should all callback return the view given as parameter? >> >> It should give back the modified view, I think it makes it easier overall > > Yes, and maybe have a "priority list"... this sucks... i don't know > how to fix that. I am picturing a binary tree in my head... Convention: left-side CBs are of the same levels, right side are children. Let's say we have the following callbacks with dependencies: A, B, C do not depend on any other callback D, E depend on B F, G depend on D I depends on F A / B / \ C D / \ E F / \ G I The calling code will go first on the right side of the tree and then left. This could be a solution, but it could have problems. Also the tree will more than likely be unbalanced, but it will also be small... > > >>> In the UI, you just have a "onProfileViewUpdated(core, view)" and with >>> the core, you do a core.profile.nick = "LoL :p" and >>> core.profile.nick will emit that the profile has been updated... >> >> I think you mean core.profile.setNick("LoL :p") ;) > > No, i meant : > core.profile.nick = "LoL :p" > just like : > 22 @property > 23 def rad(): > 24 '''The angle in radians''' > 25 def fget(self): > 26 return self._rad > 27 def fset(self, angle): > 28 if isinstance(angle, Angle): > 29 angle = angle.rad > 30 self._rad = float(angle) > (from http://wiki.python.org/moin/PythonDecoratorLibrary) Yeah even better... OMG I'm just dumb!! -- Stéphane ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Amsn-devel mailing list Amsn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amsn-devel