Re: Programatically Designing a GUI
Re: Programatically Designing a GUI
- Subject: Re: Programatically Designing a GUI
- From: "Dennis C. De Mars" <email@hidden>
- Date: Fri, 10 Aug 2001 07:31:49 -0700
I was also seriously thinking about a Cocoa application that would require
some NIB-less GUI building. Basically, the application would allow users to
add some controls in arbitrary fashion and it would remember their
placement. I would use IB for all of my own dialog boxes but there is no way
I could even use a template for what I have in mind for the user
customization part.
So I was a little discouraged to see your posting that it is "darn hard" to
do. On the other hand, a lot of the tasks you listed were things that I
expected I would have to do...
At any rate, I'd also love to see your demo program after you have it
updated.
- Dennis D.
on 8/9/01 3:06 PM, Simson L. Garfinkel at email@hidden wrote:
>
I wanted to throw in my two cents on this one. (sorry for the delay, but I
>
generally read my email in batches.)
>
>
Cent #1:
>
>
Ondra wrote:
>
>
>
>
>>>>>>> David Lee (DL) wrote at Sat, 4 Aug 2001 19:14:13 +0000:
>
> DL> but say I wanted to create an application that had a
>
> DL> Aqua GUI but used no NIB files whatsoever, could it all be done
>
> DL> programmatically like in the days before we had NIB files?
>
>
>
> Firstly, there never were those days: at the very first (in the NeXTStep
>
> 0.99) there was no PB, but the IB was there already.
>
>
Actually, in the very early days of NeXTSTEP, there was no Interface
>
Builder. However, IB was one of the first applications that was written.
>
>
Cent #2:
>
>
Yes, you can create all interfaces programmatically. It is darn hard to do,
>
but you can do it. You simply have to instantiate your own objects. You
>
need to create your own Window, you need to create a View, you need to put
>
the View inside the Window, you need to create your own controls and
>
sub-views, etc. If you want to create a push-button, you need to create the
>
control and the cell. Then you need to manage all of the layout yourself,
>
manually putting things where you want it. And you're not done yet! You need
>
to make sure that all of the outlets are properly set, that all of the
>
instance variables are kosher, etc. But if you do this, and you are VERY
>
GOOD, you can certainly get this all to work. This is, after all, how
>
programs like Interface Builder and OmniView instantiate controls and so
>
forth on a blank canvas.
>
>
Creating your own interfaces programmatically is a lot of fun. It's a lot of
>
work, but it's a lot of fun.
>
>
I have a demo program that does this, and even does hit recognition. It's
>
called Tiny.m. If anybody wants, I'll post it. (My version of Tiny.m
>
currently only runs on NeXTSTEP, but I'm porting it to Cocoa this weekend.)
>
_______________________________________________
>
cocoa-dev mailing list
>
email@hidden
>
http://www.lists.apple.com/mailman/listinfo/cocoa-dev