Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why won't this work!?



NSKeyValueCoding returns an Object ...... I don't think it works with native types .... that's why we use .@count and not just .count I guess.

this method returns native boolean ....... not Boolean ..... I think that might be the problem with that not working for you. (just educated guess)

In any case I would try something like this (just a hunch without checking for you since no time to do that right now) ..... I think zero (like null) might evaluate to false ..... not sure without checking though....

ShowDowndloadsConditional: WOConditional {
	condition = downloads.@count;
	negate = true;
}

...or do what I usually do is Wonder is in your app .... use ERXGreaterThanConditional and compare count to zero

HTH, Kieran




On Oct 24, 2007, at 9:19 AM, Miguel Arroz wrote:

Hi!

  Sometimes I really think I should change business!

  I have this binding:

ShowDowndloadsConditional: WOConditional {
	condition = downloads.isEmpty;
	negate = true;
}

  "downloads" is an NSArray.

  When running, I get this:

Reason:
<my.top.secret.package.name.ExportDownloadItem 0xb95569> valueForKey (): lookup of unknown key: 'isEmpty'. This class does not have an instance variable of the name isEmpty or _isEmpty, nor a method of the name isEmpty, _isEmpty, getIsEmpty, or _getIsEmpty


  The ExportDownloadItem is an object in the array.

  My question is... why!?!?!? :)

If I do this the dull way (write a method that returns downloads.isEmpty() ) and bind to it, this works.

  Yours

Miguel Arroz

Miguel Arroz
http://www.terminalapp.net
http://www.ipragma.com



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists% 40mac.com


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/email@hidden

This email sent to email@hidden
References: 
 >Why won't this work!? (From: Miguel Arroz <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.