• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
How to use delegate and customs events in Objective-C?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

How to use delegate and customs events in Objective-C?


  • Subject: How to use delegate and customs events in Objective-C?
  • From: Raul <email@hidden>
  • Date: Wed, 27 Sep 2006 23:30:53 +0200

I am developing a program for Mac.
I have made a Interface/Class with some methods and i need to create
one event when the Data in this Interface change , i would called it
UpdateData.

In the GUI side i need to conect this UpdateDate event to one method
to redraw data of the GUI.

I am new into Objective-C and i don't know how to did this delegate
and customs events , i did this in other languages so i understand the
power of events.

I very appreciate if someone can show me an example in Objective-C of
I am asking.

Thanks.






Review ...

<http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/index.html>

..and..

<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/index.html>

..in particular..

<http://developer.apple.com/documentation/Cocoa/Conceptual/CocoaFundamentals/CommunicatingWithObjects/chapter_6_section_1.html>


I have made a Interface/Class with some methods and i need to create
one event when the Data in this Interface change , i would called it
UpdateData.

If you're talking about "Delegates" and "Events" using .NET terminology, you're probably looking for something we call "Notifications". Their interfaces are quite dissimilar, but they still provide basically the same functionality.

<http://developer.apple.com/documentation/Cocoa/Conceptual/Notifications/index.html>





Yes i mean about "Delegates" and "Events" of .NET terminology.

I take a look at NSnotifications but i don't understand how to implement this.

Can anyone give me an example of this , i one Interface i could launch
UpdateData and in the other Interface i want to listen the UpdateData
of the other object.

Thanks.





> I have made a Interface/Class with some methods and i need to create
> one event when the Data in this Interface change , i would called it
> UpdateData.

If you're talking about "Delegates" and "Events" using .NET
terminology, you're probably looking for something we call
"Notifications". Their interfaces are quite dissimilar, but they
still provide basically the same functionality.

<http://developer.apple.com/documentation/Cocoa/Conceptual/
Notifications/index.html>










Yes i mean about "Delegates" and "Events" of .NET terminology.

I take a look at NSnotifications but i don't understand how to implement this.

Can anyone give me an example of this , i one Interface i could launch
UpdateData and in the other Interface i want to listen the UpdateData
of the other object.


Read this article:

http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/index.html#//apple_ref/doc/uid/10000177i

if URL is splitted try this http://tinyurl.com/qadak






Yes i mean about "Delegates" and "Events" of .NET terminology.

I take a look at NSnotifications but i don't understand how to implement this.

Can anyone give me an example of this , i one Interface i could launch
UpdateData and in the other Interface i want to listen the UpdateData
of the other object.


Read this article:

http://developer.apple.com/documentation/Cocoa/Conceptual/KeyValueObserving/index.html#//apple_ref/doc/uid/10000177i

The above URL is NOT related to the question about NSNotifications.
The above URL bring in concepts that the original poster is not ready
to deal with, I recommend >not jumping to that level of things.

Anyway... regarding NSNotifications review the documentation for them
and in particular the conceptual documentation (just about always
linked from the top of the >API doc pages).

<http://developer.apple.com/documentation/Cocoa/Conceptual/Notifications/index.html>

-Shawn




Yes i mean about "Delegates" and "Events" of .NET terminology.

I take a look at NSnotifications but i don't understand how to
implement this.

Can anyone give me an example of this , i one Interface i could launch
UpdateData and in the other Interface i want to listen the UpdateData
of the other object.

See my other email for reference documentation... but I wanted to point out this type of question is not about the Objective-C language (what this list is for) but about Cocoa / Mac OS X programming. I suggest you direct future questions related to Cocoa to Apple's cocoa- dev list.

<http://lists.apple.com/cocoa-dev>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: Crash in NSTextView with embedded QuickTime file
  • Next by Date: Selected item in NSToolbar
  • Previous by thread: Re: Crash in NSTextView with embedded QuickTime file
  • Next by thread: Selected item in NSToolbar
  • Index(es):
    • Date
    • Thread