problem about scripting-bridge-Collection of common programming errors


  • Greg Steiner
    xcode cocoa email scripting-bridge
    Here’s what I’m attempting to do: Let’s assume that you are in mail and create a New blank mail message, then enter some data into it, such as body copy, etc. (in my case, the message was created through scripting bridge using the “Mail Contents of this Page” from safari… the main purpose of this process for my application.)From my application, I want to select that message and assign it to:MailOutgoingMessage *myMessage;so that I can programmatically add recipients. I’ve tried several ways

  • Daniel
    applescript spotify scripting-bridge
    I use Scripting Bridge (Cocoa) to access AppleScript methods and properties of Spotify. For example, I need to access artwork of the current playing track. On the most of my machines Spotify pushes an ordinary instance of NSImage class, which I can access via something like [[spotifyApp currentTrack] artwork], and everything works as expected.But on the one of my machines and one friend’s machine-instead of an instance of NSImage class-I get very strange SpotifyImageData by calling still the sam

  • Philip Regan
    objective-c cocoa scripting-bridge
    In using Scripting Bridge with Excel, when I get the value of a single cell, I don’t know what class I’m going to get from the cell. A range of a single cell so far returns an NSString or NSNumber (a range of multiple cells always returns an NSArray and I need to coerce the values from there). In my work, I usually only want the string value of the cell, so to coerce the value of a single-cell range into what I need, I do this…NSString *cellValue = [targetRange.value get]; if ([cellValue isKin

  • user1231779
    xcode osx scripting-bridge
    To use ScriptingBridge with iTunes, I used:iTunesApplication *iTunes = [SBApplication applicationWithBundleIdentifier:@”com.apple.iTunes”];However, when I run the application, (I have traced the source of the error to the above line), I get a build failed, and these errors:Apple Mach-O Linker (Id) Error “_OBJC_CLASS_$_SBApplication”, referenced from: objc-class-ref in AppDelegate.o ld: symbol(s) not found for architecture x86_64andApple Mach-O Linker (Id) Error Linker command failed with exit co

  • goofrider
    osx cocoa itunes macruby scripting-bridge
    I’m trying to populate an NSPopUpButton with an array of ITunesPlaylist objects. I got the NSArrayController bind to NSPopUpButtonapp = SBApplication.applicationWithBundleIdentifier(“com.apple.iTunes”) playlists = app.sources.objectWithName(“Library”).userPlaylistsmyArrayController.setContent playlistsAll the playlists will appear in the NSPopUpButton but they all have names with <ITunesUserPlaylist:0x4018a5000: iTunesUserPlaylist 0 of iTunes Source “Library” of Application “iTunes” (51822)&g

  • alwaysapple
    objective-c itunes scripting-bridge artwork
    I have been trying to figure out how to get the iTunes artwork for the currently playing song with scripting bridge. I have gotten to a point where it works for some songs, but for others, I get a SIGABRT. I’m not sure what the issue could be, so any help would be greatly appreciated. Here is what I have so far:iTunesApplication * iTunes = [SBApplication applicationWithBundleIdentifier:@”com.apple.iTunes”]; NSImage *songArtwork; iTunesTrack *current = [iTunes currentTrack]; iTunesArtwork *artwor

  • abroekhof
    objective-c cocoa objective-c-category scripting-bridge
    I am trying to write a category over iTunesTrack with associated objects (an NSMutableDictionary and an NSNumber)#import “iTunes.h” #import <objc/runtime.h>@interface iTunesTrack (dictionary) – (NSMutableDictionary*) getDictionary; – (NSNumber*) getScan; – (BOOL)scanTrack:(NSString *)equationString; @endThis fails:Undefined symbols for architecture x86_64:”_OBJC_CLASS_$_iTunesTrack”, referenced from:l_OBJC_$_CATEGORY_iTunesTrack_$_dictionary in iTunesTrack+dictionary.o ld: symbol(s) not fo

  • jmah
    objective-c cocoa linker ld scripting-bridge
    I was updating a Scripting Bridge glue file today (for Mail.app), and noticed that the sdp(1) man page reads:You do not need to create a corresponding implementation file; Scripting Bridge will create theclass implementations at runtime.That sounds cool, but without implementations for the generated classes I get (as expected):Undefined symbols for architecture x86_64:”_OBJC_CLASS_$_MailApplication”, referenced from:objc-class-ref in DMBugReportWindowController.o”_OBJC_CLASS_$_MailAttachment”, r

  • rounak
    objective-c cocoa scripting-bridge
    I’m a bit familiar with Scripting Bridge, and have used it for controlling the play/pause/back/next functions in iTunes. Through sdef and sdp I was able to create an iTunes.h file, with which I could declare an iTunesApplication object.When I tried to do the same thing for the inbuilt Reminders.app I got an error that saidsdp: error: class “list” inherits from undefined class “item”.sdp: error: class “reminder” inherits from undefined class “item”.Could any one help me in creating a Reminders.h

  • AmaltasCoder
    cocoa osx applescript scripting-bridge
    I have a document based drawing application that allows the user to save the final document as a JPEG file. Whenever the user saves a JPEG, I would like to import the picture to an iPhoto album “MyAppName album”. I am using Using Scripting Bridge and i have added the iPhoto.h file to my application. I have also added the ScriptingBridge.frameworkI am having some real trouble even creating the album “MyAppName album”. Can you please show me some code for the following pseudocode:if (check whether

Web site is in building