RE: Events between Objective C objects
RE: Events between Objective C objects
- Subject: RE: Events between Objective C objects
- From: "Jonathan E. Jackel" <email@hidden>
- Date: Mon, 19 May 2003 17:00:36 -0400
I think you are referring to messaging. Objects send messages to each other
all the time. A foo instance can send a message like [bar doSomething]; it
only needs bar to point to an object that responds to a doSomething message
(actually, if bar doesn't respond to doSomething, it just ignores the
message with no harm done).
Outlets in nibs are just freeze-dried pointers to objects. When the nib's
controller says "if ([button state] == NSOnState)", it's sending a message
to button, which is a pointer to a button object. The assignment of the
pointer is done by the nib instead of in code, using the connections you set
up in Interface Builder.
Read up on Objective C. This is real basic stuff. The docs are probably on
your hard drive.
Jonathan
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Rolf
>
Sent: Monday, May 19, 2003 3:55 PM
>
To: email@hidden
>
Subject: Events between Objective C objects
>
>
>
Hi,
>
>
I'm searching for a simple straight forward way of implementing
>
events between non-visual objects coded in Objective C. The event
>
mechanism must be synchronous, should not involve broadcasting
>
and does not need to support multiple listeners - one to one
>
connections is ok. Registering
>
for event reception (making a "connection" in Objective C
>
terminology?) and triggering of the event must be done
>
programatically - i.e no InterfaceBuilder. How's this done in
>
Objective C ?
>
When making connections in InterfaceBuilder I see that
>
IBAction/IBOutlet are used but I don't see the actual code that
>
registers for event and that generates the event. How is this
>
done programatically ?
>
>
/Rolf
>
_______________________________________________
>
cocoa-dev mailing list | email@hidden
>
Help/Unsubscribe/Archives:
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
>
Do not post admin requests to the list. They will be ignored.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.