• 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
Method parameter is sometimes zeroed (weird problem)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Method parameter is sometimes zeroed (weird problem)


  • Subject: Method parameter is sometimes zeroed (weird problem)
  • From: Stuart Crook <email@hidden>
  • Date: Mon, 19 Nov 2007 16:58:25 +0000

Hi, I'm having a really weird problem, which is probably something obvious...

ObjectA is a subclass of NSObject and implements the method (void) tabView:(NSTabView *)tabview didChangeHeightBy:(float)change, which is a delegate method (of my own creation, not Cocoa's) for ObjectB.

ObjectB is a subclass of NSTabView, which holds ObjectA as its delegate and invokes the delegate method on it with [[self delegate] tabView: self didChangeHeightBy: change] where 'change' is a float value.

The problem is that in the delegate method, the 'change' parameter is always 0.0. I've put in NSLogs, traced the values in debug and passed in constant float values, and while a non-zero value is always passed, the received parameter 'change' is always 0.0. BUT only when called in this way. If I get ObjectA to call the method on itself, the change parameter is passed correctly. The same is true if I call the method from ObjectC, another NSObject subclass.

This is under 10.4.11 on Intel. All objects are compiled from source inside the same project.
_______________________________________________


Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Method parameter is sometimes zeroed (weird problem)
      • From: Shawn Erickson <email@hidden>
  • Prev by Date: Re: Programatically creating a checkbox
  • Next by Date: Re: Method parameter is sometimes zeroed (weird problem)
  • Previous by thread: Develop at Skype
  • Next by thread: Re: Method parameter is sometimes zeroed (weird problem)
  • Index(es):
    • Date
    • Thread