• 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: Wring code without interface builder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Wring code without interface builder


  • Subject: Re: Wring code without interface builder
  • From: Marco Binder <email@hidden>
  • Date: Sun, 04 Aug 2002 20:52:41 +0200

Albert Russel wrote:

> Are there examples available that show how this is done. I simply do not
> understand how you can define position and behaviour of controls and views
> without the Interface Builder. Must I edit .nib files, can that be done from
> Project Builder? And by the way, I hope that the Developer documentation for
> OS X 10.2 will be a lot better than what we have now.

Well, to answer you latter question first: no, Jaguar dev docs will be
essentially the same as we have now.

If you wanna programatically create your app4s interface, you just have to
instantiate the appropriate classes. You really should have a look at the
documentation of NSWindow, NSView and NSApplication.

You define positions and stuff by setting the frame of your views or
controls. The frame-rect always refers to ist superview4s coordinate system.
So, if created a window with rect (ths time screen base coordinates)
100,100, 200, 300 (x,y, width, height) and you wanna place a button in the
middle of it, you4d go ahead and create a NSButton, add your button to your
windows contents view as a subview (refer to NSView documentation- it4s
[NSView addSubview]) and specify the buttons frame to be NSRect(90,140, 20,
20) for a 20x20 pixels button in the middle of your window.

It4s really sraightforward and should not be a problem, just consult the
documentation even if you dont like it. But: why dont you just USE
InterfaceBuilder?

marco
_______________________________________________
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: Wring code without interface builder
      • From: "Albert Russel" <email@hidden>
References: 
 >Wring code without interface builder (From: "Albert Russel" <email@hidden>)

  • Prev by Date: Re: the bloody Omni frameworks
  • Next by Date: Re: Can't pipe files to compileHelp
  • Previous by thread: Wring code without interface builder
  • Next by thread: Re: Wring code without interface builder
  • Index(es):
    • Date
    • Thread