List of events a class can trigger

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

List of events a class can trigger

Fernando Rodríguez
Hi,

Is there an easy way to get a list of all the events a class can
trigger?

Thanks


Reply | Threaded
Open this post in threaded view
|

Re: List of events a class can trigger

Chris Uppal-3
Fernando,

> Is there an easy way to get a list of all the events a class can
> trigger?

Yes.

 From a class browser's class menu, or the class tree's context menu, you can
select Browse=>Published events.

 From code, you can ask an object for its #publishedEvents, which usually ends
up calling the class-side method #publishedEventsOfInstances.  E.g. trace
through:

    SessionManager current publishedEvents.

But be aware that:

a) The event lists are only advisory (no object can know all the events that
will be triggered off it).

b) The event lists will only be accurate if someone has attempted to keep them
up-to-date and correct (the Dolphin classes are usually pretty good in this).

c) Views usually trigger the events off their Presenter, rather than off
themselves.

d) All the information about published events is stripped during deployment....

    -- chris


Reply | Threaded
Open this post in threaded view
|

Re: List of events a class can trigger

Fernando Rodríguez
Hi,

For the classes that I create, am I suposed to create and keep this
list of published events, or is it done 'automagicly' by hte system?


Reply | Threaded
Open this post in threaded view
|

Re: List of events a class can trigger

Bernhard Kohlhaas-6
Fernando wrote:
> Hi,
>
> For the classes that I create, am I suposed to create and keep this
> list of published events, or is it done 'automagicly' by hte system?
>

It's not done for you as far as I can tell. ;(  As far as whether you're
  "supposed" to do it, all sends of #publishedEvents and
#publishedEventsOfInstances - not counting super-sends - seem to come
from utility methods and development tools, i.e.
ClassSelector>>browsePublishedEvents.  So it appears to be just for the
sake of documentation.

Bernhard