• 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: Passing C Style Function Callbacks in Cocoa
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing C Style Function Callbacks in Cocoa


  • Subject: Re: Passing C Style Function Callbacks in Cocoa
  • From: Ondra Cada <email@hidden>
  • Date: Fri, 5 Mar 2004 20:24:57 +0100

Alessandro,

On Friday, Mar 5, 2004, at 19:49 Europe/Prague, Alessandro Volz wrote:

BOOL b = (BOOL)[target performSelector:action withObject:whatever];
warning: cast from pointer to integer of different size
where's the trick? i can live with this but you'll admit that a
warning-free app is already kind of satisfacting...

Quite.

BOOL b=(BOOL)(int)[...

should help. You know, the compiler tries to be smart, and suspects you don't really want to cast an id in one step both to a number, and a number of a small size at that ;)
---
Ondra Hada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
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: 
 >Re: Passing C Style Function Callbacks in Cocoa (From: Alessandro Volz <email@hidden>)

  • Prev by Date: Re: NSUndoManager -removeActionsWithTarget: does nothing
  • Next by Date: Re: Passing C Style Function Callbacks in Cocoa
  • Previous by thread: Re: Passing C Style Function Callbacks in Cocoa
  • Next by thread: Re: Passing C Style Function Callbacks in Cocoa
  • Index(es):
    • Date
    • Thread