Path: utzoo!attcan!uunet!cs.utexas.edu!mailrus!iuvax!uceng!ucunix!uccba!spca6!kgw2!dennisg From: dennisg@kgw2.bwi.WEC.COM (Eric Hammond) Newsgroups: comp.sys.next Subject: Re: link between main menu and module's action method. Message-ID: <600@kgw2.bwi.WEC.COM> Date: 10 Jul 90 11:22:01 GMT References: <3654@calvin.cs.mcgill.ca> Reply-To: dennisg@kgw2.UMD.EDU (Dennis Glatting) Distribution: na Organization: Xetron Corporation, Cincinnati, Ohio Lines: 29 In article <3654@calvin.cs.mcgill.ca> kriss@quiche.cs.mcgill.ca (Christian DUPONT) writes: >i am writting an App with a module. I included a Subclass of View in the >windown 's class of that module. The module's goal is to create as many windows > as the user request. >D >There are buttons in each window instance. I would like to connect those buttons >to actions of the subclass of View discussed above. How can i do that ? >when i connect the buttons to either first responder or File's Owner, none >of the actions appear in the inspector Window.How to get these actions >to be able to link them ? the problem here is to use IB one has to be a sub-class of Control. in my view this is a flaw. i solved the proeem using a quasi multipl-inheritance technique and assigned the target/action under software control. >Another question: is it possible from the menu (main nib file) to run action >methods defined in the module ? how to do it ? >what s the trick ??? yes it is but beware of the following problems: you can't assigne the target/action via IB. again this must be done under software. the menu targets have to exist, ie they have to be resident when the targets are assigned. -- -- dennisg@kgw2.bwi.WEC.COM | Dennis P. Glatting ..!uunet!tron!kgw2!dennisg |