After reading a host of theoretical explanations on bindings, I tried the bindings-based currency converter tutorial to try to get some basic feel for bindings in practice. The example is written for an earlier version of OSX, but I think I reproduced it correctly for XCode 3. However, I get the following runtime error.

Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Cannot create number from object <_NSControllerObjectProxy: 0x148070> of class _NSControllerObjectProxy'

I am surprised by the error because bindings is supposed to be "smart enough" to convert the numbers in text fields (strings) to numbers when necessary. For those who haven't seen the tutorial, the interface is:

@interface Converter : NSObject
{
  double dollarsToConvert;
  double exchangeRate;
}
-(double) amountInOtherCurrency;
// implemented as return (double) (dollarsToConvert * exchangeRate)
@end

I have no idea what this error means and found no helpful references on the web. If someone could shed some light on this issue I'd really appreciate it. Thanks.

Daniel
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to