• 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: Method not seeing array as array
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Method not seeing array as array


  • Subject: Re: Method not seeing array as array
  • From: Ricky Sharp <email@hidden>
  • Date: Wed, 02 Feb 2005 14:47:42 -0600

On Wednesday, February 02, 2005, at 01:32PM, Michael Swan <email@hidden> wrote:

>@interface AppController : NSObject
>{
>     IBOutlet NSMatrix *channelDisplay;
>     IBOutlet NSMatrix *channelMatrix;
>     IBOutlet NSTextField *grandMaster;
>	NSArray *channelArray;
>	MSChannel *channel1;
>	MSChannel *channel2;
>	MSChannel *channel3;

[rest snipped]

This is outside of the problem you're experiencing, but you may want to simplify your code and use indexed accessors to maintain the array of channels.

e.g. methods following a pattern like this (assuming the ivar is named 'channels'):

- (unsigned int)countOfChannels;
- (id)objectInChannelsAtIndex:(unsigned int)index;
- (void)insertObject:(MSChannel *)newMSChannel inChannelsAtIndex:(unsigned int)index;
- (void)removeObjectFromChannelsAtIndex:(unsigned int)index;
- (void)replaceObjectInChannelsAtIndex:(unsigned int)index withObject:(MSChannel *)newMSChannel;

If you have Accessorizer, you can auto-generate all this code (also including the implmentations).

--
Rick Sharp
Instant Interactive(tm)

 _______________________________________________
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: 
 >Method not seeing array as array (From: Michael Swan <email@hidden>)

  • Prev by Date: Re: Method not seeing array as array
  • Next by Date: Re: Method not seeing array as array
  • Previous by thread: Re: Method not seeing array as array
  • Next by thread: Re: Method not seeing array as array
  • Index(es):
    • Date
    • Thread