[Adium-devl] Building a JoinChatView
Evan Schoenberg
evan.s at dreskin.net
Sat Sep 30 00:35:57 UTC 2006
Mark, sorry for the resend, I forgot to reply-to-all.
On Sep 29, 2006, at 8:03 PM, Mark Huetsch wrote:
> I add my nib to Adium. Then I want to set up the File's Owner to be
> a GaimQQJoinChatView, which should be a subclass of
> DCJoinChatViewController, which is in turn a subclass of
> NSWindowController. If I "Read Files..." to add the
> DCJoinChatViewController header, IB tells me "Uknown superclass".
> Trying to "Import Resource", I get "This file doesn't contain any
> valid resources". Why the errors?
>
You're missing one superclass. I wish IB were smart enough to search
a source tree and find the classes it needs...
GaimQQJoinChatViewController : DCJoinChatViewController : AIObject :
NSObject
DCJoinChatViewController and its subclasses don't actually control a
window, so it's not an NSWindowController subclass -- it configures a
view which is within a window, so it's just a standard object. An
AIObject, in this case (which is what most objects in Adium inherit
from -- it allows easy access to the 'adium' instance variable).
Your eye probably jumped to DCJoinChatWindowController which has a
similar name.. it manages the entire window.
The group chat stuff is fairly old at this point and is a little
convoluted, though quite functional. It is in need of actual
documentation -- sorry for throwing you into the lion's den :)
With the theoretical out of the way, the practical:
Read Files... select AIObject.h from Adium Framework/Source. Then
read DCJoinChatViewController. (You can also drag the .h file to the
document window in Interface Builder... that's what I usually do).
Did that help? Let me know if any of that explanation was unclear :)
Cheers,
Evan
p.s. Import Resource is basically useless.. it's for if you want to
imbed a sound file, a picture, etc., in the nib bundle... which is
considered a deprecated thing to do by Apple and is therefore not
recommended in the first place.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20060929/d25b4bf7/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 186 bytes
Desc: This is a digitally signed message part
URL: <http://adium.im/pipermail/devel_adium.im/attachments/20060929/d25b4bf7/attachment.sig>
More information about the devel
mailing list