Skip to content

Commit

Permalink
Fix some missing ViAppController casts.
Browse files Browse the repository at this point in the history
  • Loading branch information
Shadowfiend committed Oct 30, 2014
1 parent 4e74802 commit c122218
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/NSView-additions.m
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ - (NSString *)getExStringForCommand:(ViCommand *)command prefix:(NSString *)pref
if ([[[self window] windowController] isKindOfClass:[ViWindowController class]])
exString = [[[self window] windowController] getExStringInteractivelyForCommand:command prefix:prefix];
else
exString = [[NSApp delegate] getExStringForCommand:command prefix:prefix];
exString = [(ViAppController *)[NSApp delegate] getExStringForCommand:command prefix:prefix];
return exString;
}

Expand Down
2 changes: 1 addition & 1 deletion app/ViBundle.m
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,7 @@ - (BOOL)loadPluginCode
_path, @"bundlePath",
nil];
NSError *error = nil;
[[NSApp delegate] eval:script
[(ViAppController *)[NSApp delegate] eval:script
withParser:_parser
bindings:bindings
error:&error];
Expand Down
2 changes: 1 addition & 1 deletion app/ViProject.m
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ - (NSArray *)structureOfTabs:(PSMTabBarControl *)tabBar

[tabViewItems eachBlock:^(id obj, BOOL *stop) {
NSTabViewItem *item = (NSTabViewItem *)obj;
NSSplitView *split = [item view];
NSSplitView *split = (NSSplitView *)[item view];
ViTabController *tabController = (ViTabController *)[item identifier];
NSArray *viewControllers = [tabController views];

Expand Down
2 changes: 1 addition & 1 deletion app/ViTextView-ex_commands.m
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ - (id)ex_eval:(ExCommand *)command
{
NSString *script = [[[self textStorage] string] substringWithRange:command.range];
NSError *error = nil;
[[NSApp delegate] eval:script
[(ViAppController *)[NSApp delegate] eval:script
withParser:nil
bindings:nil
error:&error];
Expand Down
2 changes: 1 addition & 1 deletion app/ViTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ - (void)initWithDocument:(ViDocument *)aDocument viParser:(ViParser *)aParser
saved_column = -1;
reverted_line = -1;
snippetMatchRange.location = NSNotFound;
original_insert_source = [[NSApp delegate] original_input_source];
original_insert_source = [((ViAppController*)[NSApp delegate]) original_input_source];
_taskRunner = [[ViTaskRunner alloc] init];

_wordSet = [NSMutableCharacterSet characterSetWithCharactersInString:@"_"];
Expand Down
4 changes: 2 additions & 2 deletions app/ViWindowController.m
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,7 @@ - (void)windowDidLoad
context:NULL];

// Set up default status bar.
NuBlock *statusSetupBlock = [[NSApp delegate] statusSetupBlock];
NuBlock *statusSetupBlock = [(ViAppController *)[NSApp delegate] statusSetupBlock];
if (statusSetupBlock) {
NuCell *argument = [[NSArray arrayWithObject:messageView] list];

Expand Down Expand Up @@ -1307,7 +1307,7 @@ - (void)tabView:(NSTabView *)aTabView didCloseTabViewItem:(NSTabViewItem *)tabVi

- (BOOL)validateMenuItem:(NSMenuItem *)menuItem
{
NSWindow *keyWindow = [[NSApp delegate] keyWindowBeforeMainMenuTracking];
NSWindow *keyWindow = [(ViAppController *)[NSApp delegate] keyWindowBeforeMainMenuTracking];
BOOL isDocWindow = [[keyWindow windowController] isKindOfClass:[ViWindowController class]];

return isDocWindow;
Expand Down

0 comments on commit c122218

Please sign in to comment.