The way the class hierarchy works is:
SPView - base class for all views of an SPDocument ^ SPSVGView - rendered graphical view ^ SPDesktop - editable rendered graphical view
SPViews are the 'model' side of the MVC equation, with various widgets (SPDesktopWidget is the one normally used with SPDesktops) acting as view/controllers. It's actually the SPDesktopWidget, not the SPView (SPDesktop) which is subscribing to the status message signal.
I still don't see why SPView is involved in statusbar handling... but anyway, if you say this is right, let it be. What ails me is that I want to provide a richer and more convenient interface for statusbar messages. For example, I want a function for temporary displays that are pushed and then popped after some timeout. This means the statusbar signal must be split in two, or at least given extra arguments. Is this the right approach?
Btw, I do not want us to introduce more global state as far as "finding the current desktop automatically" -- eventually I want all signal handlers and SPActions bound to specific views, so they "know" their associated view rather than having to look at a global variable to know which is 'current'.
Right, but what is to be done now? As I wrote, now all calls to sp_view_set_status start from the desktop and figure out its view. If this is wrong, what is right? Starting from some object on the canvas that logically "issues" the message, ascending to its SPView, and then sending a message from SPView to the associated desktop widget? That seems overly complicated to me, but I'm OK with it if its implemented and if I'm given a convenient interface to it.
In other words, what is the minimum of arguments that a statusbar-setting function (callable from anywhere) must have? Now it accepts a message and an SPView, but I don't like having to figure out the SPView every time I call it. Can there be a function that accepts only the message and if yes, how to program it properly?
_________________________________________________________________ The new MSN 8: smart spam protection and 2 months FREE* http://join.msn.com/?page=features/junkmail http://join.msn.com/?page=dept/bcomm&pgmarket=en-ca&RU=http%3a%2f%2f...