On Mar 6, 5:39 pm, miga <[email protected]> wrote: > On Mar 6, 10:35 am, [email protected] wrote: > > > About: (4.2) Add event handling using your own event source > > > In MyEvent.java: > > /* Below two constructors take a source object as argument. Is this a > > implementation requirement * in the 'event model'? > > */ > > public MyEvent(Object source) { > > super(source); > > } > > > public MyEvent(Object source, String myEventName) { > > super(source); > > this.myEventName = myEventName; > > } > > > Can I have constructor which do not take a source object as argument, > > and resulting event object still can participate in and take advantage > > of the 'event model'? > > No, that is not possible, the event is an abstract model, so it should > be there. > Think of it a bit, how possibly could you read a news in your > newspaper if there is are news at all, even if there are writers, > papers, printers, reporters, press agency, and so on? You are right. Silly me. As soon as I remove the source from the parameter, I got an error. Pls tell a bit about 'abstract model'. Thank you.
--~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
