NSScrollView* scrollView;
NSString* file;
- int markedLine;
+ NSUInteger markedLine;
id<BSSourceViewDelegate> delegate;
}
@property(readwrite, assign) BSSourceViewTextView* textView;
@property(readwrite, assign) NSScrollView* scrollView;
@property(readwrite, nonatomic, assign) NSString* file;
-@property(readwrite, assign) int markedLine;
+@property(readwrite, assign) NSUInteger markedLine;
@property(readwrite, assign) id delegate;
- (void)setFile:(NSString*)f;
- (void)setString:(NSString*)source asFile:(NSString*)path;
-- (void)scrollToLine:(int)line;
+- (void)scrollToLine:(NSUInteger)line;
@end
@optional
// Notifies the delegate that the gutter was clicked at a certain line.
-- (void)gutterClickedAtLine:(int)line forFile:(NSString*)file;
+- (void)gutterClickedAtLine:(NSUInteger)line forFile:(NSString*)file;
// Whether to accept a file drop.
- (BOOL)sourceView:(BSSourceView*)sv acceptsDropOfFile:(NSString*)fileName;
/**
* Tells the text view to scroll to a certain line
*/
-- (void)scrollToLine:(int)line
+- (void)scrollToLine:(NSUInteger)line
{
if ([[textView textStorage] length] == 0)
return;
// go through the document until we find the NSRange for the line we want
int rangeIndex = 0;
- for (int i = 0; i < line; i++)
+ for (NSUInteger i = 0; i < line; i++)
{
rangeIndex = NSMaxRange([[textView string] lineRangeForRange:NSMakeRange(rangeIndex, 0)]);
}
*/
- (void)setupViews
{
- int gutterWidth = 30;
+ NSUInteger gutterWidth = 30;
// setup the line number view
NSRect numberFrame = [self bounds];
/**
* The gutter was clicked, which indicates that a breakpoint needs to be changed
*/
-- (void)gutterClickedAtLine:(int)line forFile:(NSString*)file
+- (void)gutterClickedAtLine:(NSUInteger)line forFile:(NSString*)file
{
if ([manager hasBreakpointAt:line inFile:file])
{