Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!bionet!agate!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: multi-button CDEF, was Re: List Manager questions Message-ID: <8173@hoptoad.uucp> Date: 30 Jul 89 05:27:16 GMT References: <8374@bsu-cs.bsu.edu> <227700017@uxa.cso.uiuc.edu> <8115@hoptoad.uucp> <5129@umd5.umd.edu> <8138@hoptoad.uucp> <5134@umd5.umd.edu> <8156@hoptoad.uucp> <3530@ncsuvx.ncsu.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 37 In article <3530@ncsuvx.ncsu.edu> jnh@ecemwl.UUCP (Joseph N. Hall) writes: >This reminds me of an idea I had recently (probably not unique) which is >that a CDEF incorporating an entire vertical stack or horizontal row of >radio buttons would be awfully convenient ... you would supply an array of >titles in the refcon field, and the CDEF would work like a properly-managed >set of "ordinary" radio buttons, returning values of 1, 2, 3, etc., >depending upon which button was currently "on." I have no idea why >Apple didn't supply this control or something similar to it with some >version of the system software. One of these days I'll write it ... It's a very interesting idea; thanks for sharing it. The advantages are obvious, which is why I'll only deal with the disadvantages here. (And *not* because I am a negative, brooding figure, as some would suggest. I write most of my messages on a portable computer while skipping through sunny, windblown fields of daisies, humming a merry tune and thinking good thoughts about my fellow travellers on spaceship earth.) The problems have to do with titles and positions. One title isn't enough; you could introduce rules for partitioning single titles into multiples, but they would be unlikely to pass internationalization muster. So you have to have some way of storing multiple titles. Probably the best way would be to have an associated 'STR#' resource. Then you have the individual button positions. Each has its own rectangle. I am leery of automatic positioning schemes, since you lose power and whatever you decide on will probably be wrong for some desired layout. Again, the solution would appear to be an associated 'nrct' resource. The association between the resources could be as simple as giving them all the same resource id. These problems are soluble, so the idea is probably worth pursuing. Please let us know if you actually get around to doing this. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com "Don't talk to me about disclaimers! I invented disclaimers!" - The Censored Hacker