Skip to content
Browse files

Warn when setting up the output port fails

  • Loading branch information...
1 parent 8cb4e98 commit 881fc11fd0613da0399a33bf862223aa80259767 Jonathan del Strother committed Sep 15, 2009
Showing with 8 additions and 3 deletions.
  1. +1 −1 BBOSCPlugInSender.m
  2. +1 −0 BBOSCPluginReceiver.h
  3. +6 −2 BBOSCPluginReceiver.m
View
2 BBOSCPlugInSender.m
@@ -169,7 +169,7 @@ Return NO in case of failure during the execution (this will prevent rendering o
[[BBOSCManager sharedManager] removeOutput:self.oscPort];
self.oscPort = [[BBOSCManager sharedManager] createNewOutputToAddress:self.inputBroadcastAddress atPort:self.inputBroadcastPort withLabel:@"BB OSC"];
if (!self.oscPort)
- NSLog(@"Failed to created output port");
+ NSLog(@"Failed to create output port");
inputsChanged = YES;
}
View
1 BBOSCPluginReceiver.h
@@ -22,6 +22,7 @@
@property (nonatomic, readwrite, assign) BOOL inputDiscardExcessMessages;
@property (nonatomic, readwrite, assign) NSUInteger inputReceivingPort;
@property (nonatomic, readwrite, assign) NSString* inputReceivingPath;
+@property (nonatomic, readwrite, assign) BOOL outputError;
@property (nonatomic, readwrite, assign) BOOL outputMessageReceived;
@property (nonatomic, readwrite, assign) NSString* outputMessagePath;
@end
View
8 BBOSCPluginReceiver.m
@@ -24,7 +24,7 @@ @interface BBOSCPluginReceiver ()
@end
@implementation BBOSCPluginReceiver
-@dynamic inputDiscardExcessMessages, inputReceivingPort, inputReceivingPath, outputMessageReceived, outputMessagePath;
+@dynamic inputDiscardExcessMessages, inputReceivingPort, inputReceivingPath, outputError, outputMessageReceived, outputMessagePath;
@synthesize oscPort, oscParameters, listeningPath;
+ (NSDictionary*) attributes
@@ -56,6 +56,9 @@ Specify the optional attributes for property based ports (QCPortAttributeNameKey
if ([key isEqualToString:@"outputMessageReceived"]) {
return [NSDictionary dictionaryWithObjectsAndKeys:@"Message Received", QCPortAttributeNameKey, nil];
}
+ if ([key isEqualToString:@"outputError"]) {
+ return [NSDictionary dictionaryWithObjectsAndKeys:@"Port Error", QCPortAttributeNameKey, nil];
+ }
return nil;
}
@@ -194,7 +197,8 @@ Return NO in case of failure during the execution (this will prevent rendering o
self.oscPort = [[BBOSCManager sharedManager] createNewInputForPort:self.inputReceivingPort withLabel:@"BB OSC"];
self.oscPort.delegate = self;
if (!self.oscPort)
- NSLog(@"Failed to created input port");
+ NSLog(@"Failed to create input port");
+ self.outputError = !self.oscPort;
}
[messageLock lock];

0 comments on commit 881fc11

Please sign in to comment.
Something went wrong with that request. Please try again.