Re: [Pyobjc-dev] interface builder queries
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-08-26 16:29:10
|
On dinsdag, 26 augustus 2003, at 18:19PM, Michael Hudson wrote: > [this can hardly be the best place to ask this question...] > > My learn-PyObjC project -- a resource editor for EV Nova -- is going > quite nicely, but I have a question or two: > > 1) I'm going to have a lot (20? 30?) of NIBs and each one will likely > have it's own controller class (this seems to be the standard > approach) and it would be convenient to have most of these inherit > from a custom class. I don't see how to teach IB about this one > custom class that is shared between all the NIB files in the > project. I suppose I could just add the functionality I want to > NSWindowController... You can define the base-class in every NIB file, only add the actions/outlets you'll actually use. IIRC NibClassBuilder will automaticly merge the class definitions in the NIB files (as long as they all have the same super class). The definition in the NIB is just a promise that you'll provide a class in your code. > > 2) How hard is it to generate/manipulate NIBs programmatically? > They're mostly NSArchivered lumps of data, right? The point behind > this question is that I have a description of various data formats > and it might save time to generate a really clunky interface from > this description, and then turn it into a less clunky interface by > monkeying about in IB (but not have to sort *all* those connections > out by hand). I don't know, but I'd like to know. Please tell us if you find out :-) Ronald |