Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8572019
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:54:41+00:00 2026-06-11T18:54:41+00:00

For example, I make a MyUIElement , I can accept the user click it.

  • 0

For example, I make a MyUIElement, I can accept the user click it. When the user click it, the user can define a method for me when I click it. For example, they can increase the count by 1, when I click it.

So, if I am thinking on how to implement this logic…I can make a MyUIElementDelegate, and call back the MyUIElementDelegate‘ s onMyUIElementIsClicked: function, or I can allow user to addTarget: action: forEvents:. These two ways also works. But what is the different between them? Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:54:43+00:00Added an answer on June 11, 2026 at 6:54 pm

    Well, if the method to be called is on the same class, addTarget would be easier but if the method is defined in another class, implementing delegate would be a better idea to invoke the method. With a little bit of extra coding, delegate protocol will give you more flexibility, by the fact that it has two types of methods: @required and @optional.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

How can I make this sliding panel example to slide down on mouseover and
hello i am make like this example which i get from www.xxxxxx.com http://s1172.photobucket.com/albums/r568/novikoraharja/?action=view&current=justanimage.png i
For example, I know I can make a new row and enter values into
I think this example would make it clear. My HTML is this: <li class='nav-active'><span
I used this example to make the screen blur to focus attention. http://blog.wpfwonderland.com/2010/03/23/use-the-wpf-blur-effect-to-focus-attention/ I
I stripped this example to make it simple. I have a gridview with a
For example I make the recursive call defined below. The method finds the kth
I think my example will make this easier to follow: class x(): def a(self):
Trying to follow this example to make it work: http://weblogs.asp.net/kiyoshi/archive/2008/10/08/wcf-using-webhttpbinding-for-rest-services.aspx Here is my App.config
I found this example to make range work with switch statement: function GetText(value) {

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.