Interface Builder and projects with variable number of windows
Interface Builder and projects with variable number of windows
- Subject: Interface Builder and projects with variable number of windows
- From: Markus Hanauska <email@hidden>
- Date: Wed, 28 May 2003 16:01:41 +0200
Sorry for this probably extremely dumb, newbie question. I really tried
to find an answer myself, but I don't even know how to search for it
(which keywords to use), as it's not easily said in a word or two.
So far I have only played around with Project Builder, nice tool, rapid
app development. The lanuguage of my choice is Java, because it's also
rapid app development (garbage collection, super easy string concat,
also extreme simple conversion between primitiv formats, classes for
all common tasks exist and I never had to debug Java code, while I'm
debugging C code all day long). Sometimes it's not about speed.
My problem is: I can easily build a main window with the Interface
Builder. Cool. I can add a handler and have Java managing all button
clicks, text field changes, etc.. Within a few minutes I have a working
main window for my app. So far, so well.
But now there is a list of servers in the main window (editable by
user, works all fine) and whenever the user clicks on a server, a
status window for this very server shall show up. And exactly here is
my problem.
When I design such a status window in the Interface Builder, than I
have one window. What if I now want to open exactly this window many
times, always with a class in the background that receives a different
server adress and then sets the text fields and graphics of the window
accordingly? How can I do that with Interface Builder? Is it even
possible?
Therefor I have to write a class that does NOT have a static outlet,
but a dynamic outlet, so every instance of this class gets a reference
to another status window. And how can I open the same window multiple
times?
Right now (with my current knowledge) it seems to me that if you want
to have 100 status windows, you have to store 100 identical windows
into the NIB file, create 100 times the backend class and connect each
window with the outlet of one backend class. But what if the user then
would like to open 200 status windows at once? (whether it makes sense
or not, if he has the resources, it must be possible)
That's what I don't understand about the concept. E.g. how would I go
about writing a Web Brower using only Java and Interface Builder? I
need *multiple* browser Windows at once, each driven by the same
backend code, but this code always takes only care of one window.
Or do I then have to create the full window all by myself, creating
every object within the window, altering size and position, setting
hundreds of attributes... then I would have to drop Cocoa in the long
run and use Swing, because there exists Interface Builders that only
make a "pattern" of a window and I can then create as many instances of
the resulting class as I need.
Did someone understand my question? It would be very nice if anyone
could shine a light on this issue. Thank you.
--
Best Regards,
Markus Hanauska
_______________________________________________
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.