Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!thunder.mcrcim.mcgill.edu!quiche!philwzo From: philwzo@cs.mcgill.ca (Philippe WIECZOREK) Newsgroups: comp.sys.next Subject: Button class bug ? Message-ID: <1991Feb26.223500.20157@cs.mcgill.ca> Date: 26 Feb 91 22:35:00 GMT Sender: news@cs.mcgill.ca (Netnews Administrator) Organization: SOCS, McGill University, Montreal, Canada Lines: 29 Originator: philwzo@homer I wanted to change the name of a button. I used the following code: - changeTitle:sender { if ( condition ) [sender setTitle:"title1"]; else [sender setTitle:"title2"]; return self; } I was forced to put a '[sender display]' just before the 'return self' in order to make the button redisplay properly. If not, the two titles are one on the other. In that particular case, the '1' of 'title1' will mix with the '2' of 'title2'. Is this normal ? Or is it a bug of the button class ? Of course, I am sure that the sender is actually a button... -- philwzo@cs.mcgill.ca Phil, McGill University, Montreal, Quebec, CANADA. -- Brought to you by Super Global Mega Corp .com