Re: Wring code without interface builder
Re: Wring code without interface builder
- Subject: Re: Wring code without interface builder
- From: "Albert Russel" <email@hidden>
- Date: Sun, 4 Aug 2002 21:43:38 +0200
>
> 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.
That's to bad, the docs for the classes is ok although I would like more
samples of their usage but the docs for the Developer tools is not good
enough. In the DevEnvGuide directory it is stated that the Tools&Techniques
book for Next software's tools will be revised and reorganized for upcoming
releases of OS X.
Why wait for a later version than Jaguar to deliver something like that.
>
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?
As I stated in my first posting I DO use InterfaceBuilder.I am completely
new to the Mac, Objective-C and Cocoa and I just do not like it if there is
to much magic going on when I am developing code. The feeling that something
magic happens is due to my lack of understanding Cocoa. But you are right,
probably everything can be found in the current docs and I should make a
bigger effort looking for answers there. I do hope though that eventually
there will be more documentation available, if necessary from others than
Apple. I am still puzzled how events from the different controls and views
are sent to each other if you do not use InterfaceBuilder but since you say
that everything I want to know is in the current docs I will look for
answers there.
Greetings, Albert.
_______________________________________________
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.