Hi, 2009/5/6 Boris "billiob" Faure <bill...@gmail.com>: > Here's how i think this should be done : > all those stuff you modify (nick, dp = display picture, music, psm = > pm) should be stored in what i want to call "profile". Those should be > properties : set + get.
Yep I agree, these are all info part of a user profile. > Then, we should have a real EventManager where you can register for > events and emit events. Look at how it's done for the contact list. There it is done with goject's signals, are we keeping that? > When you register for an event, you say if you want to edit the data > sent (will be used by plugins...) or if the receiver is read only. > Then, each callbacks registered for a specific event are stored in a > list : rw in the head, ro in the end. 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 > 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") ;) -- 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