From e4f71420fcc7b07d2df0755cd7ce8d4066bb3e60 Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 15 Feb 2014 12:43:09 +0100 Subject: [PATCH] prototypes+style --- AppKit/CPTextView/CPLayoutManager.j | 4 ++-- AppKit/CPTextView/CPParagraphStyle.j | 2 +- AppKit/CPTextView/CPTextView.j | 3 ++- AppKit/CPTextView/_CPRTFParser.j | 8 ++++---- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/AppKit/CPTextView/CPLayoutManager.j b/AppKit/CPTextView/CPLayoutManager.j index 1a76f2957..9460684ad 100755 --- a/AppKit/CPTextView/CPLayoutManager.j +++ b/AppKit/CPTextView/CPLayoutManager.j @@ -154,7 +154,7 @@ var _objectsInRange = function(aList, aRange) CPArray _glyphsFrames; } -- (id)createDOMElementWithText:aString andFont:aFont andColor:aColor +- (id)createDOMElementWithText:(CPString)aString andFont:(CPFont)aFont andColor: (CPColor)aColor { var style, span = document.createElement("span"); @@ -221,7 +221,7 @@ var _objectsInRange = function(aList, aRange) return self; } -- (void)setAdvancements:someAdvancements +- (void)setAdvancements:(CPArray)someAdvancements { _glyphsFrames = []; diff --git a/AppKit/CPTextView/CPParagraphStyle.j b/AppKit/CPTextView/CPParagraphStyle.j index 1c67cd668..f3b509e1a 100755 --- a/AppKit/CPTextView/CPParagraphStyle.j +++ b/AppKit/CPTextView/CPParagraphStyle.j @@ -136,7 +136,7 @@ CPParagraphStyleAttributeName = @"CPParagraphStyleAttributeName"; var other = [[self class] alloc]; return [other initWithParagraphStyle:self]; } -- initWithParagraphStyle:(CPParagraphStyle) other +- (CPParagraphStyle)initWithParagraphStyle:(CPParagraphStyle)other { other._tabStops = [_tabStops copy]; other._alignment = _alignment; diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index dd21b5b1d..bc504c2d6 100755 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -1390,7 +1390,8 @@ var kDelegateRespondsTo_textShouldBeginEditing return _textStorage._string; } -- objectValue +// fixme: rich text should return attributed string, shouldn't it? +- (CPString)objectValue { return [self stringValue]; } diff --git a/AppKit/CPTextView/_CPRTFParser.j b/AppKit/CPTextView/_CPRTFParser.j index 97a193c74..2be2c2368 100755 --- a/AppKit/CPTextView/_CPRTFParser.j +++ b/AppKit/CPTextView/_CPRTFParser.j @@ -291,7 +291,7 @@ var kRgsymRtf = { return self; } -- (CPString)_checkChar:sym parameter:ch +- (CPString)_checkChar:(CPArray)sym parameter:(CPString)ch { switch (_curState) { @@ -431,7 +431,7 @@ var kRgsymRtf = { } -- (CPString)_changeDest:sym +- (CPString)_changeDest:(CPArray)sym { switch (sym[0]) { @@ -451,7 +451,7 @@ var kRgsymRtf = { return ''; } -- (CPString)_translateKeyword:keyword parameter:param fParameter:(BOOL)fParam +- (CPString)_translateKeyword:(CPString)keyword parameter:(CPString)param fParameter:(BOOL)fParam { if (kRgsymRtf[keyword] !== undefined) { @@ -530,7 +530,7 @@ var kRgsymRtf = { } } -- (CPString)_parseKeyword:rtf length:len +- (CPString)_parseKeyword:(CPString)rtf length:(unsigned)len { var ch = '', fParam = false,