• 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: NSPoint and automatic constructor
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSPoint and automatic constructor


  • Subject: Re: NSPoint and automatic constructor
  • From: Jim Witte <email@hidden>
  • Date: Sat, 22 May 2004 19:46:39 -0500

ehm... you do know that C is a standard, and compilers should adhere to it rather than introduce "smart" new notation on their own? :)
Yes, but if p = NSPoint(50,50) where p is an automatic variable, and is thus allocated as a record on the stack, which is then assigns directly, as
Sorry, I thought you wanted implicit constructors (as mentioned in the post you replied to)

What exactly *is* an automatic constructor (I'm continually learning that I really don't know C++ much at all - I know enough of it that Java was simple, but not much more) I can see a constructor, which would allocate a structure and then return it's pointer, but in an example like the one cited:

NSMakeLine( NSPoint(x,y), NSPoint(q,r) )

there are no variables to assign the NSPoints to..

I would think/hope that the commercial compilers (CodeWarrior and IBM's) do it better! ;)

I'm wondering what Metrowerk's response to xCode will be.. I'd like a way to directly import an xCode project to CW, since most sample code is in xCode.. CW does seem faster (even than xCode I think, though I haven't do side by side tests) for compiling and espeicially linking. There have been a few projects (Cocoa OpenGL example) which I can't get Zero-link to work with...

Jim
_______________________________________________
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.


  • Follow-Ups:
    • Re: NSPoint and automatic constructor
      • From: Allan Odgaard <email@hidden>
References: 
 >NSMakePoint and such - what about memory allocation? (From: Christoffer Lerno <email@hidden>)
 >Re: NSMakePoint and such - what about memory allocation? (From: Jim Witte <email@hidden>)
 >Re: NSMakePoint and such - what about memory allocation? (From: Jim Witte <email@hidden>)
 >Re: NSMakePoint and such - what about memory allocation? (From: Allan Odgaard <email@hidden>)

  • Prev by Date: Re: frame.size.height = 0?
  • Next by Date: RE: Changing Texture on a Window
  • Previous by thread: Re: NSMakePoint and such - what about memory allocation?
  • Next by thread: Re: NSPoint and automatic constructor
  • Index(es):
    • Date
    • Thread