summaryrefslogtreecommitdiff
path: root/tikzit/src/osx/TikzSourceController.m
diff options
context:
space:
mode:
authorJohan Paulsson <gonz@users.sourceforge.net>2013-02-26 17:07:05 +0000
committerJohan Paulsson <gonz@users.sourceforge.net>2013-02-26 17:07:05 +0000
commit44fc6c6fc022b7262175a71a981ddc3969132ed5 (patch)
tree677ded4cf5d5c61ff0375b7025e77300b4382950 /tikzit/src/osx/TikzSourceController.m
parent814372e88b23ce7956b2322d6f382742e2277ea5 (diff)
osx gui parsing errors
Diffstat (limited to 'tikzit/src/osx/TikzSourceController.m')
-rw-r--r--tikzit/src/osx/TikzSourceController.m15
1 files changed, 15 insertions, 0 deletions
diff --git a/tikzit/src/osx/TikzSourceController.m b/tikzit/src/osx/TikzSourceController.m
index 6d1580c..428c6ba 100644
--- a/tikzit/src/osx/TikzSourceController.m
+++ b/tikzit/src/osx/TikzSourceController.m
@@ -28,6 +28,7 @@
@synthesize graphicsView, sourceView, source, status;
@synthesize documentUndoManager, tikzChanged;
+@synthesize errorMessage, errorNotification;
- (void)endEditing {
NSResponder *res = [[sourceView window] firstResponder];
@@ -125,6 +126,10 @@
if ([graphicsView enabled]) [self updateTikzFromGraph];
}
+- (IBAction)closeParseError:(id)pId{
+ [errorNotification setHidden:TRUE];
+}
+
- (void)textDidBeginEditing:(NSNotification *)notification {
if ([graphicsView enabled]) {
[graphicsView setEnabled:NO];
@@ -169,9 +174,19 @@
[status setStringValue:@"success"];
[status setTextColor:successColor];
+
+ [errorNotification setHidden:TRUE];
} else {
[status setStringValue:@"parse error"];
[status setTextColor:failedColor];
+
+
+ NSLog(@"Parse error: %@",[assembler lastError]);
+
+ NSError *e = [assembler lastError];
+
+ [errorMessage setStringValue:[[[assembler lastError] userInfo] valueForKey:NSLocalizedDescriptionKey]];
+ [errorNotification setHidden:FALSE];
}
}
}