Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Updates the ExampleApplication to provide simple plugin support for m…

…ost of the plugin types. Ruby support is still iffy and requires much more work.
  • Loading branch information...
commit 58999d3c163f965bfe6065a0a11dff359715bc53 1 parent 1843c86
@Grayson authored
View
BIN  ExampleApplication/Example.scpt
Binary file not shown
View
6 ExampleApplication/ExampleApplication.xcodeproj/ghansard.mode1v3
@@ -523,7 +523,7 @@
<key>StatusbarIsVisible</key>
<true/>
<key>TimeStamp</key>
- <real>255655452.46238601</real>
+ <real>255660444.095864</real>
<key>ToolbarDisplayMode</key>
<integer>1</integer>
<key>ToolbarIsVisible</key>
@@ -887,7 +887,7 @@
<key>Frame</key>
<string>{{0, 0}, {650, 209}}</string>
<key>RubberWindowFrame</key>
- <string>454 334 650 250 0 0 1440 878 </string>
+ <string>600 175 650 250 0 0 1440 878 </string>
</dict>
<key>Module</key>
<string>PBXDebugCLIModule</string>
@@ -916,7 +916,7 @@
<key>ToolbarConfiguration</key>
<string>xcode.toolbar.config.consoleV3</string>
<key>WindowString</key>
- <string>454 334 650 250 0 0 1440 878 </string>
+ <string>600 175 650 250 0 0 1440 878 </string>
<key>WindowToolGUID</key>
<string>1C78EAAD065D492600B07095</string>
<key>WindowToolIsVisible</key>
View
46 ExampleApplication/ExampleApplication.xcodeproj/ghansard.pbxuser
@@ -90,9 +90,9 @@
};
1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */ = {
uiCtxt = {
- sepNavIntBoundsRect = "{{0, 0}, {720, 2058}}";
- sepNavSelRange = "{2754, 5}";
- sepNavVisRange = "{2479, 623}";
+ sepNavIntBoundsRect = "{{0, 0}, {439, 2310}}";
+ sepNavSelRange = "{5748, 0}";
+ sepNavVisRange = "{5236, 504}";
};
};
1DC323C70F3B77990011E197 /* ExampleObjCPlugin */ = {
@@ -305,6 +305,42 @@
vrLen = 474;
vrLoc = 308;
};
+ 1DD73CDB0F3D107F00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ comments = "warning: 'NSObject' may not respond to '-objectForKey:'";
+ fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */;
+ rLen = 1;
+ rLoc = 137;
+ rType = 1;
+ };
+ 1DD73CDC0F3D107F00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */;
+ name = "NSApplescript+FCSAdditions.m: 154";
+ rLen = 0;
+ rLoc = 5620;
+ rType = 0;
+ vrLen = 399;
+ vrLoc = 5221;
+ };
+ 1DD73CE50F3D119B00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ comments = "warning: 'NSObject' may not respond to '-allKeys'";
+ fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */;
+ rLen = 1;
+ rLoc = 135;
+ rType = 1;
+ };
+ 1DD73CE60F3D119B00552B38 /* PBXTextBookmark */ = {
+ isa = PBXTextBookmark;
+ fRef = 1DC323600F3B75910011E197 /* NSApplescript+FCSAdditions.m */;
+ name = "NSApplescript+FCSAdditions.m: 156";
+ rLen = 0;
+ rLoc = 5748;
+ rType = 0;
+ vrLen = 434;
+ vrLoc = 5236;
+ };
29B97313FDCFA39411CA2CEA /* Project object */ = {
activeArchitecture = i386;
activeBuildConfigurationName = Debug;
@@ -439,6 +475,10 @@
1DD73C7B0F3CFE1A00552B38 /* PBXTextBookmark */ = 1DD73C7B0F3CFE1A00552B38 /* PBXTextBookmark */;
1DD73C7C0F3CFE1A00552B38 /* PBXTextBookmark */ = 1DD73C7C0F3CFE1A00552B38 /* PBXTextBookmark */;
1DD73C7D0F3CFE1A00552B38 /* PBXTextBookmark */ = 1DD73C7D0F3CFE1A00552B38 /* PBXTextBookmark */;
+ 1DD73CDB0F3D107F00552B38 /* PBXTextBookmark */ = 1DD73CDB0F3D107F00552B38 /* PBXTextBookmark */;
+ 1DD73CDC0F3D107F00552B38 /* PBXTextBookmark */ = 1DD73CDC0F3D107F00552B38 /* PBXTextBookmark */;
+ 1DD73CE50F3D119B00552B38 /* PBXTextBookmark */ = 1DD73CE50F3D119B00552B38 /* PBXTextBookmark */;
+ 1DD73CE60F3D119B00552B38 /* PBXTextBookmark */ = 1DD73CE60F3D119B00552B38 /* PBXTextBookmark */;
};
sourceControlManager = 1DC322F40F3B747D0011E197 /* Source Control */;
userBuildSettings = {
View
8 ExampleApplication/ExampleController.m
@@ -17,9 +17,14 @@ - (void)awakeFromNib
{
ABAddressBook *book = [ABAddressBook sharedAddressBook];
ABPerson *me = [book me];
+ ABMultiValue *mv = [me valueForProperty:kABPhoneProperty];
+ NSMutableArray *array = [NSMutableArray array];
+ unsigned int count = [mv count];
+ unsigned int idx = 0;
+ for (idx = 0; idx < count; idx++) [array addObject:[mv valueAtIndex:idx]];
NSDictionary *meDict = [NSDictionary dictionaryWithObjectsAndKeys:
[NSString stringWithFormat:@"%@ %@", [me valueForProperty:kABFirstNameProperty], [me valueForProperty:kABLastNameProperty], nil], @"name",
- [me valueForProperty:kABPhoneProperty], @"phone", nil];
+ array, @"phone", nil];
self.me = meDict;
}
@@ -27,6 +32,7 @@ - (IBAction)showPluginMenu:(id)sender {
id value = nil;
if ([sender tag] == 0) value = [self.me objectForKey:@"name"];
else if ([sender tag] == 1) value = [self.me objectForKey:@"phone"];
+ NSLog(@"%s %@", _cmd, self.me);
NSArray *plugins = [PluginManager pluginsForProperty:@"label-click" forValue:self.me withValue:value];
NSMenu *m = [[[NSMenu alloc] initWithTitle:@"pluginMenu"] autorelease];
Please sign in to comment.
Something went wrong with that request. Please try again.