[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [sc-dev] autoindent method in sctextview

OK, I've had a chance to look at the code now and it looks like it goes back to the last tab stop and matches it on a return. Is that a correct assessment?


On Dec 23, 2004, at 2:15 AM, James McCartney wrote:

autoIndent gets called whenever you press return (without also pressing
the option key which defeats autoIndent).

- (void) keyDown: (NSEvent*) event
     NSString *characters = [event characters];
     if ([characters isEqual: @"\03"]) {
         [[self delegate] executeSelection: self];
     } else if (([characters isEqual: @"\n"] || [characters isEqual:
@"\r"]) && !([event modifierFlags] & NSAlternateKeyMask)) {
         [self autoIndent: event];

On Dec 23, 2004, at 12:36 AM, Barton J. Friedland wrote:

I notice there is a method autoindent in the sctextview class.

It looks like it is not set to be called by any actions the user could
take in the UI.

Can someone let me know about this code and how it is supposed to work?



sc-dev mailing list