• 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: Please help..... NIL Object problems...
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Please help..... NIL Object problems...


  • Subject: Re: Please help..... NIL Object problems...
  • From: Henri Lamiraux <email@hidden>
  • Date: Wed, 1 Aug 2001 06:55:35 -0700

I don't see in the code below who is loading the nib file and setting
the connectStatusWindow, Calling [[GSSLSocket sharedGSSLSocket]
displayConnectStatus:nil]; may instantiate a GSSLSocket object but
doesn't load any nib (as far as I can see). So who is setting the window
outlet in this case????


On Wednesday, August 1, 2001, at 02:01 AM, Graham Wihlidal wrote:

> I have the variable declared by an instantiated class in IB which has
> an appropriate outlet, and in the class source header file it is
> declared like so
>
> Here is the source:
>
> GSSLSocket.h
> *********************************************
> #import <Cocoa/Cocoa.h>
>
> @interface GSSLSocket : NSObject {
> NSWindow* connectStatusWindow;
> }
> + (GSSLSocket*)sharedGSSLSocket;
> - (void)displayConnectStatus:(id)sender;
> @end
>
>
>
>
> GSSLSocket.m
> *********************************************
> #import "GSSLSocket.h"
>
> GSSLSocket *mainGSSLSocket = nil;
>
> @implementation GSSLSocket
>
> + (GSSLSocket *)sharedGSSLSocket;
> {
> if (mainGSSLSocket == nil)
> mainGSSLSocket = [[self alloc] init];
> return mainGSSLSocket;
> }
>
> - (void)displayConnectStatus:(id)sender
> {
> [connectStatusWindow center];
> [connectStatusWindow makeKeyAndOrderFront:self];
> }
>
> @end
>
>
> Calling this method (displayConnectStatus:nil) works fine in this
> source file, but calling:
>
> [[GSSLSocket sharedGSSLSocket] displayConnectStatus:nil]; does not work
>
> The class instance is created correctly because I tried adding an NSLog
> to the method and calling it the above way and it does indeed fire. It
> just doesn't have a set variable to work with.
>
> I would really appreciate some help.
>
> Thanks,
>
> Graham
> _______________________________________________
> cocoa-dev mailing list
> email@hidden
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev

Henri Lamiraux
Engineering Manager
User Interface Tools Group
Apple


  • Prev by Date: Re: Learning question about NSTableView and NSStrings
  • Next by Date: NSURL Proxy
  • Previous by thread: Re: Please help..... NIL Object problems...
  • Next by thread: Need Help with Help
  • Index(es):
    • Date
    • Thread