• 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: (no subject)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: (no subject)


  • Subject: Re: (no subject)
  • From: Fritz Anderson <email@hidden>
  • Date: Sat, 27 Nov 2004 15:58:55 -0600

By any chance do you add the items to the mutable array, and send reloadData, before the NIB containing the table has loaded? The reloadData would then be going to nil, and having no effect.

-- F

On 26 Nov 2004, at 10:20 PM, Michael A. Crawford wrote:

I'm trying to run the RCE example from Michael Beam's "Incorporating Rendezvous into Your Cocoa Applications."

http://www.macdevcenter.com/pub/a/mac/2002/11/08/cocoa.html
http://www.macdevcenter.com/pub/a/mac/2002/11/15/cocoa.html
http://www.macdevcenter.com/pub/a/mac/2003/05/13/cocoa.html

The problem is that when I run the example the table-view, which should show any active RCE clients, is blank all the time. I can see from the debugger and trace output that two service instances are being discovered added to the NSMutableArray associated with the table-view, but they don't show up in the table-view. The reloadData method is being called when the services are added and removed from the array, per the example in the articles.

Besides instrumenting the code, which I've done, is there any other way I can see what is going on when reloadData is called? I have breakpoints on the following methods but they only seem to be called at application startup, when the array has zero entries.

-Michael

@interface RCEController : NSObject
{
// instance variables
NSMutableArray* discoveredServices;
NSNetServiceBrowser* domainBrowser;
NSFileHandle* listeningSocket;
NSNetService* service;
NSNetServiceBrowser* serviceBrowser;
NSSocketPort* socketPort;


// outlets
IBOutlet id discoveredServicesList;
IBOutlet id username;
}

- (int)numberOfRowsInTableView:(NSTableView*)tableView
{
return [discoveredServices count];
}

- (id)tableView:(NSTableView*)tableView objectValueForTableColumn:(NSTableColumn*)tableColumn
row:(int)row
{
return [discoveredServices objectAtIndex:row];
}

--
Fritz Anderson
Consulting Programmer Chicago, Illinois
http://resume.manoverboard.org/

 _______________________________________________
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: 
 >(no subject) (From: "Michael A. Crawford" <email@hidden>)

  • Prev by Date: Re: NSTask send commands via standardInput
  • Next by Date: IBPalette refuses to bring up inspector
  • Previous by thread: (no subject)
  • Next by thread: Newbie question: constants
  • Index(es):
    • Date
    • Thread