Revision: 7609
http://skim-app.svn.sourceforge.net/skim-app/?rev=7609&view=rev
Author: hofman
Date: 2011-12-28 12:36:45 +0000 (Wed, 28 Dec 2011)
Log Message:
-----------
create field editor for find field early and synthesize accessor
Modified Paths:
--------------
trunk/SKFindController.m
Modified: trunk/SKFindController.m
===================================================================
--- trunk/SKFindController.m 2011-12-28 12:18:25 UTC (rev 7608)
+++ trunk/SKFindController.m 2011-12-28 12:36:45 UTC (rev 7609)
@@ -48,8 +48,7 @@
@implementation SKFindController
-@... delegate, findField, messageField, doneButton, navigationButton, ownerController, findString;
-@... fieldEditor;
+@synthesize delegate, findField, messageField, doneButton, navigationButton, ownerController, findString, fieldEditor;
- (void)dealloc {
[[NSNotificationCenter defaultCenter] removeObserver:self];
@@ -96,6 +95,9 @@
NSMenu *menu = [NSMenu menu];
[menu addItemWithTitle:NSLocalizedString(@"Ignore Case", @"Menu item title") action:@selector(toggleCaseInsensitiveFind:) target:self];
[[findField cell] setSearchMenuTemplate:menu];
+
+ fieldEditor = [[SKFindFieldEditor alloc] init];
+ [fieldEditor setFieldEditor:YES];
}
- (void)windowDidBecomeKey:(NSNotification *)notification {
@@ -219,14 +221,6 @@
}
}
-- (NSTextView *)fieldEditor {
- if (fieldEditor == nil) {
- fieldEditor = [[SKFindFieldEditor alloc] init];
- [fieldEditor setFieldEditor:YES];
- }
- return fieldEditor;
-}
-
- (void)findForward:(BOOL)forward {
BOOL found = YES;
if ([findString length]) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|