• 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
Oddities in Cocoa/Java object initialization?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Oddities in Cocoa/Java object initialization?


  • Subject: Oddities in Cocoa/Java object initialization?
  • From: email@hidden
  • Date: Tue, 26 Jun 2001 23:01:35 -0400

I have a Java sub-class (twice removed) of NSDocument that seems to have two unexpected initialization behaviors (at least I didn't expect them):

1) Two constructors -- the no-arg constructor and the two arg (filename and type) seem to be getting called when the document is constructed;

2) A private data member (a boolean flag that's supposed to be initialized to "false") is getting "initialized" to false *after* the constructor(s) is(are) executed. This seems backward from the normal behavior of Java classes.

Are these behaviors perhaps a consequence of inheriting from Objective-C classes?

Thanks in advance...

Doug Knowles


  • Follow-Ups:
    • Re: Oddities in Cocoa/Java object initialization?
      • From: Joe Letteri <email@hidden>
  • Prev by Date: Re: Cocoa Template Type
  • Next by Date: Re: Thread Safe APIs?
  • Previous by thread: Re: NSToolbar and Interface Builder
  • Next by thread: Re: Oddities in Cocoa/Java object initialization?
  • Index(es):
    • Date
    • Thread