Re: [Pyobjc-dev] Adding outlets and actions without rewiring it all
Brought to you by:
ronaldoussoren
From: Ronald O. <ous...@ci...> - 2003-03-22 19:19:43
|
On Saturday, Mar 22, 2003, at 19:07 Europe/Amsterdam, Antonio Rodriguez wrote: > Excuse me if this is more my ineptitude with IB than a pyobjc question: > > Using Obj-C, when I change a class definition in IB by adding an > outlet or an action, I can use the "Read Files" option to find the > changes in the instance which I have wired up to my view. In PyObjc > this is not an option. > > the way I'm understanding it now (and correct me if I am wrong), I > have to re-instatiate and re-wire everytime I find that I forgot that > I needed an extra outlet or action. Is that correct or am I missing > something? I seem to remember that it was the same with the java > bridge which was a real show stopper for those of us constantly > tweaking our apps. If I understand you correctly you seem to assume that you have to recreate your model objects in the NIB everytime you want to change the python class for the model. That is not true, the class definition in IB is a different beast than the one in you python script. What I usually do is: - Paint a UI in Interface Builder, including the initial definition of one or more model classes/objects. - Generate a template using AppKit.NibClassBuilder (used a script) - Fill in the template. If the model interface changes later on I change the definition in IB and update the python files. There is no need to rewire anything in IB. Ronald |