• 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: Still can't get NSArrayController to work!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Still can't get NSArrayController to work!


  • Subject: Re: Still can't get NSArrayController to work!
  • From: mmalcolm crawford <email@hidden>
  • Date: Fri, 17 Sep 2004 18:53:26 -0700


On Sep 17, 2004, at 6:25 PM, jjoonathan wrote:
The controller still doesnt work with the tableviews.

It's not clear what the context is here? There are many examples of controllers working perfectly well with table views...

I have tried subclassing NSValueTransformer, and this is my code for transforming values:
NSMutableArray *ret = [[NSMutableArray alloc] initWithArray:value];


Is 'value' the input value to the 'transformedValue' method? Why is it being added to the array in addition to the other objects below? Are you expecting its values to be mutable?

If you're returning 'ret', it also needs to be autoreleased, otherwise you're leaking the array.

	int i;
	for (i=0;i<[nsa count];i++)

Where does nsa come from?
You probably want this method to be efficient; sending a 'count' message during the iteration is less efficient than:


	int i, cnt = [nsa count];
	for (i=0; i<cnt ;i++)


I get the same error as always.

What error?

mmalc

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >Still can't get NSArrayController to work! (From: jjoonathan <email@hidden>)

  • Prev by Date: Re: NSTableView subclass with column-spanning text?
  • Next by Date: modal window + sheet
  • Previous by thread: Re: Still can't get NSArrayController to work!
  • Next by thread: modal window + sheet
  • Index(es):
    • Date
    • Thread