Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!usc!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!hp4nl!dutrun!galaxy!ben From: ben@duttnph.tudelft.nl (Ben Verwer) Newsgroups: comp.sys.mac.programmer Subject: Help wanted on SetWordBreak Keywords: Textedit, SetWordBreak, triple click Message-ID: Date: 9 Apr 91 07:13:15 GMT Sender: news@dutrun.UUCP Lines: 28 I want to implement a textedit window in which triple clicking selects a line. For that I check the time between clicks, and if small enough install a new wordbreak routine by using SetWordBreak. The problem is I cannot even emulate the standard behaviour. I would think the next routine would suffice: in MPW c pascal Boolean mywordbreak(Ptr text, short position) { return text[position] < 0x20; } But it does not work. Converting text to unsigned char* first does not help. Anybody know this problem? The routine which calls mywordbreak seems to get stuck and call mywordbreak with the same position all the time. This does not happen when a click occurs but also sooner, probably for checking where to break a line (even to the crOnly field is negative, some- time I don't get either). Ben Verwer Lorentzweg 1 tel +31(15)783247 Pattern Recognition Group 2628 CJ Delft fax +31(15)626740 Faculty of Applied Physics The Netherlands Delft University of Technology --- int O; main(){char*l;if(*(O+++(l="\n!telbuoder"))/*l) exit('-'-'-'); /*(*/)/*(*/main();';';write('='!='!',l+--O,~~'?'?'|'||'|':'+'+'+');}