• 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
Tiny.m
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Tiny.m


  • Subject: Tiny.m
  • From: Bruce Stephens <email@hidden>
  • Date: Tue, 29 Nov 2011 11:01:56 +1100

Along time ago, 2002, Garfinkel and Mahoney published
"Building Cocoa Applications" (O'Reilly) and one particular
example application Tiny.m pp104-109 and pp129-138
compiled with a standard terminal cc -Wall... command.

The problem is that under the newest version of xcode 4.2.1 and compiler
there is now a delegate error...

Tiny.m:93: warning: class 'NSView' does not implement the 'NSWindowDelegate' protocol

however the delegate method windowWillClose specified within the DemoView class  does actually work (twice)
The delegate is set with the message [myWindow setDelegate: myView];

The interface is specified as...
@interface DemoView: NSView {...
I have also tried
@interface DemoView: NSView <NSWindowDelegate> {...
and have tried
@interface DemoView: NSView <NSApplicationDelegate, NSWindowDelegate> {...
All 3 options fault.

I have also tried the delegate method windowShouldClose and it too also works.

What has changed or what am I doing wrong?

Thanks to all for comments in advance!

Bruce Stephens. _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Tiny.m
      • From: Jens Alfke <email@hidden>
  • Prev by Date: Re: [SOLVED] Debugging ARC app on Snow Leopard
  • Next by Date: Re: Tiny.m
  • Previous by thread: Re: MainWindow.xib required or not?
  • Next by thread: Re: Tiny.m
  • Index(es):
    • Date
    • Thread