• 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
Re: Calling an Action from a function
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling an Action from a function


  • Subject: Re: Calling an Action from a function
  • From: Alexander Spohr <email@hidden>
  • Date: Mon, 24 May 2004 22:27:05 +0200

hi there,

actions do have a sender argument. (at least if we are talking about the methods you connect in ib to buttons and the like)

so it should be
aTarget.theAction(null); // java
or
[aTarget theAction:nil]; // objc

naturally you have to have the target to send it that method.

but if you want to make a button press itself (to call the action on its target), use
aControl.performClick(null);
or
[aControl performClick:nil];

and have a look at the sendActionToTarget method of NSControl.

atze


Am 24.05.2004 um 20:53 schrieb Peter Wollschlaeger:

Am 24.05.2004 um 19:50 schrieb Kodex:

Is there a way to call an action from a function? IE
making the code press a button at a timer if they user
hasnt yet or in response to a loop? I tired simply
calling it like this

if (test == true)
theAction();

But i get a defination error on it. Thanks for the
help in advance guys =)
~Kyle


[self performSelector:@selector(nameOfAction:)];

Hope this helps
Peter



__________________________________
Do you Yahoo!?
Yahoo! Domains  Claim yours for only $14.70/year
http://smallbusiness.promotions.yahoo.com/offer
_______________________________________________
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.
_______________________________________________
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.


References: 
 >Calling an Action from a function (From: Kodex <email@hidden>)
 >Re: Calling an Action from a function (From: Peter Wollschlaeger <email@hidden>)

  • Prev by Date: Undo Problem: No Dot On Document After Saving...
  • Next by Date: Re: MVC paradigm question
  • Previous by thread: Re: Calling an Action from a function
  • Next by thread: Copy/Paste not working from keyboard
  • Index(es):
    • Date
    • Thread