2 // PBWebDiffController.m
5 // Created by Pieter de Bie on 13-10-08.
6 // Copyright 2008 Pieter de Bie. All rights reserved.
9 #import "PBWebDiffController.h"
12 @implementation PBWebDiffController
18 [diffController addObserver:self forKeyPath:@"diff" options:0 context:@"ChangedDiff"];
23 [self showDiff:diffController.diff];
26 - (void) observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context
28 if ([(NSString *)context isEqualToString: @"ChangedDiff"])
29 [self showDiff:diffController.diff];
32 - (void) showDiff: (NSString *) diff
34 if (diff == nil || !finishedLoading)
37 id script = [view windowScriptObject];
38 [script callWebScriptMethod:@"showDiff" withArguments: [NSArray arrayWithObject:diff]];