• 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: static typing (Learning Cocoa Chapter 13)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static typing (Learning Cocoa Chapter 13)


  • Subject: Re: static typing (Learning Cocoa Chapter 13)
  • From: Michael Grant <email@hidden>
  • Date: Fri, 21 Sep 2001 13:19:40 -0500

At 11:03 -0700 9/21/2001, Henri Lamiraux wrote:
You need the asterisk. The fact that it is an outlet or not has nothing to do with the fact that in Objective-C you cannot statically allocate objects

NSButton myButton // wrong
NSButton* myButton // right

Yes, outlets are pointer but you need to declare a pointer in your header (NSButton myButton is not defining a pointer to a button, NSButton* myButton is)


I gotcha. It's not "dummyView" but "NSBox" that takes the asterisk, then. Thanks!



Look at the examples in the /Developer/Examples/InterfaceBuilder and /Developer/Examples/Cocoa

On Friday, September 21, 2001, at 10:55 AM, Michael Grant wrote:

At 10:18 -0700 9/21/2001, Henri Lamiraux wrote:
Try dummyView*

Either that's not it or I'm not understanding you properly. I shouldn't need the asterisk since the outlet (object) variables are already pointers, right? I tried just adding an asterisk anyway, and it didn't help.

A possible hint as to the nature of the problem: the compiler error messages are "in file included from ToDoAppDelegate.m:2:". This wouldn't have something to do with the way the various files import each other, would it? The #import directive is supposed to prevent that sort of problem, right? I'm afraid I don't know enough about the compiler yet....

Thanks!
Michael


Henri Lamiraux
Engineering Manager
User Interface Tools Group
Apple

--
Now with LRF support and LBL technology!


  • Follow-Ups:
    • Re: static typing (Learning Cocoa Chapter 13)
      • From: Ondra Cada <email@hidden>
    • Re: static typing (Learning Cocoa Chapter 13)
      • From: John Pannell <email@hidden>
References: 
 >Re: static typing (Learning Cocoa Chapter 13) (From: Henri Lamiraux <email@hidden>)

  • Prev by Date: Re: static typing (Learning Cocoa Chapter 13)
  • Next by Date: Re: static typing (Learning Cocoa Chapter 13)
  • Previous by thread: Re: static typing (Learning Cocoa Chapter 13)
  • Next by thread: Re: static typing (Learning Cocoa Chapter 13)
  • Index(es):
    • Date
    • Thread