Re: [Fxruby-users] Message Identifiers, Types, etc again.
Status: Inactive
Brought to you by:
lyle
From: Hugh S. S. E. E. <hg...@dm...> - 2003-06-13 13:39:54
|
On Fri, 13 Jun 2003, Sander Jansen wrote: > On Friday 13 June 2003 07:44 am, Hugh Sasse Staff Elec Eng wrote: > > Just when I thought I was no longer confused about this: > > > > On Thu, 12 Jun 2003, Hugh Sasse Staff Elec Eng wrote: > > > OK, reading this in conjunction with paragraphs 3 and 4 of > > > > > > http://www.fox-toolkit.org/messages.html > > > > > > it seems that message_id is actually the sender of the message, and > > > message type is actually the message itself (not counting associated > > > data). I would have called the message itself the message_id, > > > > Well, it is not as simple as that. The FXRuby API docs for > > FXShutter, FXShutterItem, FXScrollbar and FXList at least refer to > > Message Identifiers which are constants, and are not names of the > > originating objects. So should these be called Message Types for > > consitency with other FOX docs, or what? > > > > Hugh > > a message consists of a type and a id. Sometimes called the selector. Yes, and from the above URL the id is the sender of the message, and the type is the individual message without data. > > In C++ we have the following macros to get the type and id from a selector: > > FXSELTYPE(selector) > FXSELID(selector) > > In constructors of widgets, you normally have to input a target and selector. > In that case, the selector is only the ID. Its still named this way because > of historically reasons. Also "getSelector" would give you back the ID. But then the id is the widget that sent the message. My point is that http://www.fxruby.org/doc/api/classes/Fox/FXScrollbar.html and the similar pages refer to Message Identifiers, and then list Message types. <quote> Message identifiers ID_TIMEWHEEL: x ID_AUTOINC_LINE: x </quote> I currently believe that these cannot be called identifiers because the identifier is a widget, which is not a constant. A message type is a constant. So, either I am right about this, and the api docs need fixing, or I am wrong about this, and http://www.fox-toolkit.org/messages.html needs fixing because it says: <quote> The approach taken by FOX is a Target/Message System. Each Widget sends its message to a certain object called the target. As there may be multiple Widgets sending messages to one specific target, a message id is used to tell them apart. Moreover, a single Widget may be able to send several kinds of messages; this problem is solved by typing the messages by a message type. Using the message type and message id, the source and type of a GUI event or action can be uniquely identified. </quote> Or, is there in fact a third way to understand this, and reconcile both these documents? > > Sander > Hugh |