ftp.nice.ch/peanuts/GeneralData/Usenet/news/1989/CSN-89.tar.gz#/comp-sys-next/1989/Aug/problem-with-Interface-Builder-Action-Messasges

This is problem-with-Interface-Builder-Action-Messasges in view mode; [Up]


Date: Sun 01-Aug-1989 17:48:42 From: Unknown Subject: problem with Interface Builder Action Messasges I am trying to use interface builder for a medium size programming project and am having trouble with action messages and tags. I have create a couple of control panels with buttons and text fields enclosed within matracies and boxes. I have connected the button and text field action messages to target my application object and that all works fine. I then query the sender of the message for its tag and am getting the wrong tag number. Apparently the tag is from the matrix or box that contains the button pressed. How do I get around this difficulty? -=- Mark Jansen, Department of Computer and Information Science The Ohio State University; 2036 Neil Ave., Columbus, OH USA 43210-1277 mark@cis.ohio-state.edu >From: croley@walt.cc.utexas.edu (David T. Croley)
Date: Sun 01-Aug-1989 23:33:50 From: Unknown Subject: Re: problem with Interface Builder Action Messasges In article <56535@tut.cis.ohio-state.edu> mark@apple3.cis.ohio-state.edu (Mark Jansen) writes: >I am trying to use interface builder for a medium size programming project >and am having trouble with action messages and tags. I have create a couple of >control panels with buttons and text fields enclosed within matracies and >boxes. I have connected the button and text field action messages to target >my application object and that all works fine. > >I then query the sender of the message for its tag and am getting the >wrong tag number. Apparently the tag is from the matrix or box that contains >the button pressed. How do I get around this difficulty? When a you have a matrix of buttons [or menuCells for that matter], the sender is the matrix itself, not the individual button. To get its tag, you could : myTag = [[sender selectedCell] tag]; Or you could look at its position, and base your logic on #defines, remembering that 0 is the first position, then: int row = [sender selectedRow]; // columnar list switch (row) { .... One day I woke up and it all made perfect sense. andrew >From: birenboi@malibu.aero.org (Aaron Birenboim)
Date: Sun 02-Aug-1989 14:50:12 From: Unknown Subject: Re: problem with Interface Builder Action Messasges In article <56535@tut.cis.ohio-state.edu> Mark Jansen writes: >I then query the sender of the message for its tag and am getting the >wrong tag number. Apparently the tag is from the matrix or box that contains >the button pressed. If the whole matrix is connected to the target, then "tag" will indeed refer to the matrix's tag. You can use the "selectedTag" method (which is simply a short-cut for sending "tag" to the "selectedCell") to get the tag of the button that was actually pressed. Ali Ozer, NeXT Developer Support aozer@NeXT.com >From: joe@oregon.uoregon.edu (Joe St Sauver)

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Marcel Waldvogel and Netfuture.ch.