• 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
NSTabView delegate question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

NSTabView delegate question


  • Subject: NSTabView delegate question
  • From: Manooch Khajeh <email@hidden>
  • Date: Sat, 14 Dec 2002 09:54:08 -0800

I am working on a 'System Preferences' plug-in which has 2 tabs. When
I get a click on a tab, I like to update the contents of the text
fields in that tabview.

I have created a NSObject called infoPaneDelegate which I create and
pass it a pointer to the main object. When I click on a tab, I do get
the willSelectTabViewItem call. In there, I send a message to my main
code to redraw the content, but the call [cMacWirelessConfig
informationInit] never happens.

Below please see the simple code. Would you please let me know what I
am doing wrong?

thanks,
Manooch


// main code
//
- (void)didSelect
{
kern_return_t rc;

cInfoPaneDelegate = [[infoPaneDelegate alloc] init];
rc = [cInfoPaneDelegate initInfoPaneDelegate:self];
if (rc != noErr)
{
NSLog (@"MacWirelessConfig:didSelect:initInfoPaneDelegate failed.
rc=%d\n", rc);
return;
}





//
// infoPaneDelegate.h
//
#import <Cocoa/Cocoa.h>
#import <Foundation/Foundation.h>

@class ComMacWirelessConfig;

@interface infoPaneDelegate : NSObject
{
// MacWirelessConfig class
ComMacWirelessConfig cMacWirelessConfig;
}

- (kern_return_t)
initInfoPaneDelegate:(ComMacWirelessConfig)pMacWirelessConfig;
- (void)tabView:(NSTabView*)tabView
willSelectTabViewItem:(NSTabViewItem*)tabViewItem;
@end







//
// infoPaneDelegate.m
//
#import "infoPaneDelegate.h"
#import "MacWirelessConfigUI.h"


@implementation infoPaneDelegate

- (kern_return_t)
initInfoPaneDelegate:(ComMacWirelessConfig)pMacWirelessConfig
{
NSLog (@"MacWirelessConfig:infoPaneDelegate.m:initInfoPaneDelegate\n");

cMacWirelessConfig = pMacWirelessConfig;

return kIOReturnSuccess;
}


- (void)tabView:(NSTabView*)tabView
willSelectTabViewItem:(NSTabViewItem *)tabViewItem;
{
// kern_return_t rc;

NSLog
(@"MacWirelessConfig:infoPaneDelegate.m:willSelectTabViewItem\n");

[cMacWirelessConfig informationInit];
}

@end
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Re: Best way to save user preferences
  • Next by Date: Re: NSData (again!)
  • Previous by thread: when NSStatusItems get the boot...
  • Next by thread: Re: NSData (again!)
  • Index(es):
    • Date
    • Thread