{"action":"created","issue":{"url":"https://api.github.com/repos/tingraldi/SwiftScripting/issues/7","labels_url":"https://api.github.com/repos/tingraldi/SwiftScripting/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/tingraldi/SwiftScripting/issues/7/comments","events_url":"https://api.github.com/repos/tingraldi/SwiftScripting/issues/7/events","html_url":"https://github.com/tingraldi/SwiftScripting/issues/7","id":116716442,"number":7,"title":"Issue with iTunes and SBObject","user":{"login":"sedroc","id":343703,"avatar_url":"https://avatars.githubusercontent.com/u/343703?v=3","gravatar_id":"","url":"https://api.github.com/users/sedroc","html_url":"https://github.com/sedroc","followers_url":"https://api.github.com/users/sedroc/followers","following_url":"https://api.github.com/users/sedroc/following{/other_user}","gists_url":"https://api.github.com/users/sedroc/gists{/gist_id}","starred_url":"https://api.github.com/users/sedroc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sedroc/subscriptions","organizations_url":"https://api.github.com/users/sedroc/orgs","repos_url":"https://api.github.com/users/sedroc/repos","events_url":"https://api.github.com/users/sedroc/events{/privacy}","received_events_url":"https://api.github.com/users/sedroc/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-11-13T07:19:10Z","updated_at":"2015-11-13T19:43:11Z","closed_at":null,"body":"Hi, I was using your tool to create a header for iTunes scripting. I am not sure if it is a bug or if I am doing something wrong. \r\n\r\nIn the iTunes.h file the selection property has type SBObject and can be converted to a SBElementArray in Obj-C. It is then possible to iterate over all the items selected by the user. \r\n```objc\r\n// The application program\r\n@interface iTunesApplication : SBApplication\r\n\r\n[...]\r\n\r\n@property (copy, readonly) SBObject *selection;  // the selection visible to the user\r\n\r\n[...]\r\n\r\n@end\r\n```\r\n\r\nIn the created iTunes.swift file selection has type Int and I do not see how to use this to iterate over the selection of items in iTunes.\r\n\r\n```swift\r\n// MARK: iTunesApplication\r\n@objc public protocol iTunesApplication: SBApplicationProtocol {\r\n[...]\r\n\r\n    optional var selection: Int { get } // the selection visible to the user\r\n\r\n[...]\r\n}\r\n```\r\n\r\nThank you so much for this project. It makes working with Swift & SB feasible again.\r\n"},"comment":{"url":"https://api.github.com/repos/tingraldi/SwiftScripting/issues/comments/156538539","html_url":"https://github.com/tingraldi/SwiftScripting/issues/7#issuecomment-156538539","issue_url":"https://api.github.com/repos/tingraldi/SwiftScripting/issues/7","id":156538539,"user":{"login":"tingraldi","id":1117318,"avatar_url":"https://avatars.githubusercontent.com/u/1117318?v=3","gravatar_id":"","url":"https://api.github.com/users/tingraldi","html_url":"https://github.com/tingraldi","followers_url":"https://api.github.com/users/tingraldi/followers","following_url":"https://api.github.com/users/tingraldi/following{/other_user}","gists_url":"https://api.github.com/users/tingraldi/gists{/gist_id}","starred_url":"https://api.github.com/users/tingraldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tingraldi/subscriptions","organizations_url":"https://api.github.com/users/tingraldi/orgs","repos_url":"https://api.github.com/users/tingraldi/repos","events_url":"https://api.github.com/users/tingraldi/events{/privacy}","received_events_url":"https://api.github.com/users/tingraldi/received_events","type":"User","site_admin":false},"created_at":"2015-11-13T19:43:11Z","updated_at":"2015-11-13T19:43:11Z","body":"This is an issue with the translation script not handling Objective-C lightweight generics. I plan to address this in a future update."}}