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

Re: [sc-dev] autoindent method in sctextview




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?

Thanks,

Barton