Re: Custom event without EventObject class
From: hiwa (HGA03630_at_nifty.ne.jp)
Date: 01/27/04
- Previous message: hiwa: "Re: New to Linux"
- In reply to: P: "Custom event without EventObject class"
- Next in thread: P: "Re: Custom event without EventObject class"
- Reply: P: "Re: Custom event without EventObject class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 26 Jan 2004 17:25:25 -0800
tortcam@hotmail.com (P) wrote in message news:<f45e0989.0401260921.1d1d109d@posting.google.com>...
> Hello,
> I need to use events in MIDP2.0, where EventObject class does not
> exist. I have built a custom event WITHOUT using EventObject (see code
> below: //Initially //Final) and, apparently, it has the same behaviour
> as the same one extending this class. My question is:
> Is it possible to build a custom event without extending EventObject
> that has the same behaviour as one which extends class EventObject?
> What am I missing?
>
> //public class MyEvent extends EventObject {//Initialy
> public class MyEvent {
> Object _source; //Final
> private MyEvent _myEvent;
>
> public MyEvent( Object source, MyEvent myEvent ) {
> //super( source );//Initially, but canīt do this now
> _source=source; // now
> _myEvent = myEvent;
> }
> public Object getSource(){ // This method was not here before, but
> it is now
> return _source;
> }
>
> Thank you,
> P
No problem if you implement your own event firing/listening framework from scratch.
BTW
> public MyEvent( Object source, MyEvent myEvent ) {
^^^^^^^^^^^^^^^
What is this?
- Previous message: hiwa: "Re: New to Linux"
- In reply to: P: "Custom event without EventObject class"
- Next in thread: P: "Re: Custom event without EventObject class"
- Reply: P: "Re: Custom event without EventObject class"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]