如果我有一个类BFLocation,并将这些对象的数组传递给我的applescript-objc,我该如何访问这些类属性呢?
BFLocation.h
@property NSString *url;BFManager.h
#import "BFLocation.h"
@interface script : NSObject
- (void)processLocations:(NSArray *)locations;
@endBFManager.applescript
script BFManager
property parent : class "NSObject"
on processLocations_(locations)
repeat with location in locations
log location's url
end repeat
end processLocations我得到了<NSAppleEventDescriptor: 'obj '{ 'form':'prop', 'want':'prop', 'seld':'url ', 'from':'obj '{ 'form':'ID ', 'want':'ocid', 'seld':'optr'($C0FF060080610000$), 'from':null() } }>
我需要强制转换location才能让它知道它是一个BFLocation对象吗?为什么我得到的是NSAppleEventDescriptor而不是预期的字符串?
发布于 2015-06-21 11:41:05
语法不正确,应该是
location's |url|()
https://stackoverflow.com/questions/30960608
复制相似问题