mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-29 05:37:41 +00:00
Merge pull request #2884 from daboe01/documentation-for-attributedStringWithAttachment
fixed: documentation for attributedStringWithAttachment: was missing
This commit is contained in:
@@ -2,9 +2,6 @@
|
||||
* CPLayoutManager.j
|
||||
* AppKit
|
||||
*
|
||||
* FIXME remove from DOM when scrolled out of visible area? (as done in CPTableView)
|
||||
*
|
||||
*
|
||||
* Created by Daniel Boehringer on 27/12/2013.
|
||||
* All modifications copyright Daniel Boehringer 2013.
|
||||
* Extensive code formatting and review by Andrew Hankinson
|
||||
|
||||
@@ -262,6 +262,12 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1,
|
||||
return [super attributedSubstringFromRange:aRange];
|
||||
}
|
||||
|
||||
/*!
|
||||
Returns an instance of CPTextStorage that contains the provided instance of CPView.
|
||||
This can be used to insert arbitrary views into the text. These views are treated as individual characters during editing.
|
||||
This works only with views that conform to the CPCoding protocol
|
||||
*/
|
||||
|
||||
+ (id)attributedStringWithAttachment:(CPView)someView
|
||||
{
|
||||
var result = [[self alloc] initWithString:_CPAttachmentCharacterAsString];
|
||||
@@ -293,25 +299,3 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1,
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
||||
@implementation CPTextStorage (CPCoding)
|
||||
|
||||
- (id)initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
self = [super initWithCoder:aCoder];
|
||||
|
||||
if (self)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)encodeWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
[super encodeWithCoder:aCoder];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user