News:

So the widespread use of emojis these days kinda makes forum smileys pointless, yeah?

Main Menu

[Java] Implementing Interfaces

Started by Joe, April 04, 2006, 11:31:35 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Joe

In my free time in Comp Prog, I'm writing an IRC client, but that's beside the point (mostly). I've written a EventCallbacks interface and implemented it in both SwingUI and ConsoleUI. I want to be able to pass the reference to the UI to the Connection class so that it can fire their callbacks. Do I just pass it as EventCallback UI or as a java.lang.Object, or what?

EDIT -
I may not be able to read this in the morning, so could you drop the answer in an email to wlafrance@baraboo.k12.wi.us as well, please? (It's for class, so eh?)
Thanks.
Quote from: Camel on June 09, 2009, 04:12:23 PMI'd personally do as Joe suggests

Quote from: AntiVirus on October 19, 2010, 02:36:52 PM
You might be right about that, Joe.


iago

You should be able to pass it as an EventCallback, if you're implementing EventCallback. 

Welcome to polymorphism...

MyndFyre

Quote from: iago on April 05, 2006, 10:20:48 AM
You should be able to pass it as an EventCallback, if you're implementing EventCallback. 

Welcome to polymorphism...

Hahaha, that's not far from what I told him.  ;)
Quote from: Joe on January 23, 2011, 11:47:54 PM
I have a programming folder, and I have nothing of value there

Running with Code has a new home!

Quote from: Rule on May 26, 2009, 02:02:12 PMOur species really annoys me.