Cannot Understand Event Earsffdr Cocoa-Applescript

Hello Guys,
I'm trying to just write a little X-code 4 app to display it's own directory, using Cocoa-Applescript. I've created a window under MainMenu.xib, and linked it to my code in AppDelegate.applescript. My code looks something like this:
on myButtonHandler_(sender)
        set theFolder to POSIX path of (the path to current application)
        set theFile to theFolder & "/Contents/Resources/Dir.app"
        display dialog (the path to me)
        return void
    end myButtonHandler
The app builds perfectly, but when I click the button, it says:
[AppDelegate myButtonHandler:]: «script» doesn’t understand the «event earsffdr» message. (error -1708)
I have no idea what is happening there, so any help is appreciated!
P.S This code also works perfectly in Applescript Editor, but I want it to look better with a window, so this is really weird.

I've tried the applecation bundle thing, and my code looks like this:
    on myButtonHandler_(sender)
        set theFolder to POSIX path of (the path to current application's NSBundle's mainBundle()'s bundlePath())
        set theFile to theFolder & "/Contents/Resources/Dir.app"
        display dialog theFile
    end myButtonHandler
But now the error is:
«class ocid» id «data optr00000000E0B3660401000000» doesn’t understand the «event earsffdr» message. (error -1708)
In Applescript Editor, the code makes the error : NSBundle doesn’t understand the mainBundle message.
In addition, 'path to current application' doesen't work either, and it displays the original error.

Similar Messages

  • Web View not loading in Cocoa Applescript application?

    Hey guys...me again, and I need help, AGAIN, haha.
    I found a tutorial for web views in Cocoa Applescript because I couldnt find it anywhere, but it wont load.
    The web view does not display anything when the app is launching.
    I am using Cocoa Applescript.
    This is my AppDelegate.applescript I am using for the web view:
    script AppDelegate
      property parent : class "NSObject"
        property ourWebView : missing value (* This links the webview *)
              on applicationWillFinishLaunching_(aNotification)
      -- tell ourWebView to setMainFrameURL_("http://tinyurl.com/RMHTML")
              end applicationWillFinishLaunching_
              on applicationShouldTerminate_(sender)
      -- Insert code here to do any housekeeping before your application quits
                        return current application's NSTerminateNow
              end applicationShouldTerminate_
        on myButtonHandler_(sender)
            activate application "Terminal"
            tell application "System Events" to keystroke "Desktop/RecoverDevice"
            tell application "System Events" to keystroke return
            delay 1
            tell application "System Events" to keystroke "setenv auto-boot true"
            delay 1
            tell application "System Events" to keystroke return
            delay 1
            tell application "System Events" to keystroke "saveenv"
            delay 1
            tell application "System Events" to keystroke return
            delay 1
            tell application "System Events" to keystroke "reboot"
            delay 1
            tell application "System Events" to keystroke return
            delay 1
            tell application "Terminal"
                quit
            end tell
        end doMyButton_
        on myButtontwoHandler_(sender)
            open location "https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YF2DKZYRH6B GA"
        end doMyButton2_
    end script
    Whoever helps me will be thanked in my apps about page...
    Thanks, Adam B

    When I launch it...it says this:
    2012-01-22 17:21:01.658 RecoverMe[96706:407] Error loading /Library/Application Support/SIMBL/Plugins/GreaseKit.bundle/Contents/MacOS/GreaseKit:  dlopen(/Library/Application Support/SIMBL/Plugins/GreaseKit.bundle/Contents/MacOS/GreaseKit, 265): no suitable image found.  Did find:
              /Library/Application Support/SIMBL/Plugins/GreaseKit.bundle/Contents/MacOS/GreaseKit: GC capability mismatch
    Does that have anything to do with it not loading the webview?

  • How can I create Tracking-Areas in Cocoa-Applescript?

    How can I create multiple tracking areas that activate handlers that are specific to a certain area, when the mouse enters that area, in Cocoa-Applescript, Xcode 5?

    You can use NSTrackingArea to set up the area(s) you want to track.  For example, if you have a view named "myView" that you wanted to use, you can set up a tracking area by specifying the rectangle (I am going to use the entire view) and tracking options with something like:
       set options to (current application's NSTrackingMouseEnteredAndExited as integer) + (current application's NSTrackingActiveInKeyWindow as integer) + (current application's NSTrackingInVisibleRect as integer)
       set trackingArea to current application's class "NSTrackingArea"'s alloc's initWithRect:(myView's frame()) options:options owner:me userInfo:"tracking myView"
       myView's addTrackingArea:trackingArea
    The options are a bit wordy, but they determine how things are tracked - you could also just look up what they are in the class headers and use that.  You then need to add NSResponder handlers in the owner class for what you are interested in - for this example, they would be:
      on mouseEntered:theEvent -- cursor has entered a tracking rectangle
        log "mouseEntered"
        log theEvent's userData() -- data specific to a trackingArea
      end mouseEntered:
      on mouseExited:theEvent -- cursor has exited a tracking rectangle
        log "mouseExited"
        log theEvent's userData() -- data specific to a trackingArea
      end mouseExited:
    When using multiple tracking areas, you can add some user info that can be retrieved from the event.  In the above example, I used the string "tracking myView", but it can be whatever you want.

  • My Calendar on my iPhone won't allow me to save any events. It says "cannot save event" does anyone know how to fix this issue?

    After updating my phone earlier this month to the 5.1 software my calendar won't let me save any events. It displays "Cannot save event" I have tried googling the error and I have tried restarting the app, restarting my phone and even cutting the calendar off and back on....nothing has worked. Any other suggestions???

    Select the drive and Finder > Get info and at the bottom "ignore permissions on this volume"
    You can copy the files, but the ownership on the files still belongs to the other user account, once your done copying, then perform a #6 Reset Users Permissions and that will set all the ownership to that account.
    ..Step by Step to fix your Mac
    Another method is to copy the entire folder, then change it's permissions.

  • How can I make a window transparent but keep its objects opaque in Cocoa-Applescript?

    How can I do this in Cocoa-Applescript, Xcode? As well, is it possible to blur the area behind where the transparent window is?

    You can set the window transparency with something like:
    theWindow's setBackgroundColor:(current application's NSColor's clearColor)
    theWindow's setOpaque:false
    I haven't seen a way using public APIs to blur behind the window, but I'm not sure about using ASObjC with stuff like Core Image, anyway.
    You might also try something like setting the background to a gray color and play with the grayscale and alpha values (colorWithCalibratedWhite:0.0 alpha:0.2, for example).

  • My calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    my calendar will no longer let me add new event or delete them, it comes up with an error saying "cannot save event, no end date set" or "event does not belong to that event store". can anyone help with this?

    Hi,
    To configure your ODBC DataSource, go to Control Panel ---> DataSources(ODBC) (If you are in a Windows environment).
    Select the tab System DSN. If you have not added your data source, then do so by clicking on the Add button. If you have added the datasource, click on the Configure button to configure it.
    Give the datasource name, then the database name.
    You have to give the hostname, service name and server name. I guess, in most cases, the datasource name and host name will be the same, service name and server name will be the same. If you are using TCP/IP, the protocol will be onsoctcp.
    There will be a file named Services under C:\WINNT\system32\drivers\etc where you have to give the port number for accessing this server.
    It will be like this <service name> <portnumber>/tcp
    Hope this helps...
    best wishes,
    Nish

  • How can I create a Table View in Cocoa Applescript?

    This is my last resort. I've searched for days and only found tutorials for iPhone and Cocoa, and I have no idea where to start. I'm looking for a way to create a Table View, and fill it with a few cells that call a handler when clicked. I've looked through the Xcode help, the Apple documentation, and countless tutorials, and I don't know what to do. I'm sure what I'm asking is possible, because usually what is possible in Cocoa is possible in Cocoa-Applescript.
    Perhaps something like:
    myTableView's addCell_OfType_WithHandler("This is a text cell", text, "myHandler:")
    I would appretiate any responses and brief descriptions on the matter.

    You did not answer my first question, which was not an idle question. I'll answer here, but if cross-chatter appears in a different thread I'll ignore it. You'll have to keep track of the mess yourself.
    Apple_For_The_Win wrote:
    At this point, I've dragged a Table View onto my window, in Xcode. I've connected it to the value "myTableView", and that's where I need help. I'm specifically trying to add cells into the table view.
    I'll assume that 'connected it to the value "myTableView"' means that you've control-dragged in XCode from the table view in Main Menu.xib to a property in your applescript app delegate called myTableView. If that's not the case, please correct me.
    I prefer to use an array controller for this, so please drag an array controller object into main menu.nib. once you've done that, do the following:
    open the applescript app delegate and add a new property called "tableController"
    select the table view in the object list (you may need to open some disclosure triangles to reach it). and add appropriate (an) column name(s). you can hide column titles later if you like, but having named columns makes life easier.
    select the array controller in the object list
    rename the array controller "table data"
    open the attributes inspector, and then add the column name(s) as key(s) in the object controller area
    open the bindings inspector, and where it says "controller content", open the disclosure arrow and bind the content to the App Delegate object on the model key path self.tableController
    select the table view in the object list again, then go down a level and select each column in turn
    for each column, open the bindings inspector, and where it says "value", open the disclosure arrow and bind the content to the Table Data object with the controller key arrangedObjects model key path being the name of the column (which is the name of the key in the controller as well)
    back in the applescript app delegate, add code like the following:
      -- create a list of records, where each record represents a row and the column name is the record key
      set myData to {{column_1_name:"hello"}}
      -- convert it to an NSArray and add it to the controller content. don't forget the *my* keyword, or it won't work
      set my tableController to NSArray's arrayWithArray:myData
      -- may or may not be needed
      myTableView's reloadData()
    That should populate the table with simple text. if you want something more complicated (like buttons or links) then create the more complicated elements separately and add them to the data.

  • Ical cannot create event in month view

    iCal cannot create event in month view. Is this a bug?
    I've tried double clicking in a day as I always did but nothing.

    Ko be,
    Application UI issues are in many cases, caused by a corrupt plist file.
    Quit iCal, and try removing the com.apple.iCal.plist file from your Macintosh HD/Users/yourusername/Library/Preferences Folder. Since that Library is now hidden, you have to use the Finder>Go Menu>Depress the "Option" key>Library. Drag the .plist file to your desktop, and log out/in or restart and check iCal for functionality.
    Also read Apple iCal 5 Office Software Review | Macworld for a description of Lion iCal.

  • Calendar on iOS 7.1: Cannot Save Event - That event does not belong to that event store.

    Hi All,
    I have an iPhone 5 running iOS 7.1.
    Yesterday, while updating a birthday in the iPhone iOS calendar app (default calendar = GMail), I noticed that the new 'List View' in the iOS 7.1 calendar (and only that view) showed an event called 'New Event' - which has a start date of 2014 and an end date of 2001. If I go into that event, it will show me no title and no location - only, as mentioned, funny start and end times. The 'Delete Event' button is completely missing. This 'New Event' does not come up in any other view.
    Trying to input a ficticious title with a valid start and end time into that event slot leads to a message from the calendar app saying: "Cannot Save Event - That event does not belong to that event store." I have deleted all calendars and re-add them again via settings, with / without soft and hard reset and tried every possible combination. Yet, the event will not disappear.
    The funny thing is that this 'New Event' will still showed up, even when my GMail, work and iCloud calendars were disabled. I have, however, subscribed to a GMail calendar for Australian holidays, and there is a built-in 'Birthday' calendar that pulls the dates from the contacts (I do not use that contact field, though).
    Does anyone have a similar issue? Any suggestions how to fix it?
    Thanks in advance!
    Edit: This 'New Event' does not seem to sync to any calendar other than on the iPhone - not to Gmail, not to work, not to iCloud.

    Had same problem. Although the phone looks off   it actually isnt.  If you actually turn it off and then on again this problem will disappear. I think its a memory overload issue that is solved by clearing the memory by turning it off.
    Worked for me

  • Events in Cocoa

    Is there a way to handle events in Cocoa. I am a .Net programmer trying to come over from the dark side but as of right now I am stuck on what seems to be a simple problem. I've created a simple water meter program. It is composed of two NSTextFields, a NSButton, and a NSMessageLabel. It takes input from the one text field subtracts it from the other then mutiplies that number by the 'price per gallon' and displays the result in the label. Seems simple enough. I am now trying to clear the label when the user changes either one of those numbers in the TextFields. I've searched online but only been able to find that I might need to use delegates but only maybe, and that I might need to use control?TextDidChange. If anyone could help me or point me in the right direction i would greatly appreciate it.
    Thomas

    I put the log statement in my -awakeFromNib and I see in the console window where the log message appears, but the textDidChange is not getting called, or at least not working because neither the log message nor the the clearing of the message box. Here is my implementation file :
    [i]
    #import "WaterMeterController.h"
    @implementation WaterMeterController
    -(void)awakeFromNib
    NSLog(@"awakeFromNib called");
    [currentReading setDelegate:self];
    [previousReading setDelegate:self];
         //Variable Declaration
         double PRICE_PER_GALLON = .0075;
           double totalBill = 0.0;
         int galUsed = 0;
         int currentBox = 0;
         int previousBox = 0;
    - (IBAction)calculateBill:(id)sender
         currentBox = [currentReading intValue];
         previousBox = [previousReading intValue];
         galUsed = currentBox - previousBox;
         totalBill = PRICE_PER_GALLON * galUsed;
         NSString *theBill;
         theBill = [NSString stringWithFormat: @" %lf", totalBill];
         [messageText setStringValue: theBill];
    - (void)textDidChange:(NSNotification *)aNotification
         //Log to console:
         NSLog(@"TextChanged");
         //Clear the Text
        [messageText setStringValue:@""];
    @end
    [/i]
    I have also made both my text boxes (currentReading, and previousReading) delegates in the .Nib file by control clicking from the text boxes to the controller class. I can't see why this isn't working
    Thanks for looking
    Thomas

  • "cannot save event. no calendar has been set."  what does this mean and how do i fix it?

    I keep getting the error message when I try to enter a new event or edit an existing event to my calendar:
    "Cannot save event.  No calendar has been set."
    Any ideas on how to fix it?  VERY inconvenient!
    Thanks.
    txwyrick

    Well, there's a lot we don't know ... for example, if you have actually set up a calendar somewhere you're trying to sync to.
    Anyway, with no other information than what you provided, here's a possible troubleshooter:
    iCloud: Troubleshooting iCloud Calendar

  • What handler is called when a Status-Bar-Icon is clicked in Cocoa-Applescript?

    In Cocoa-Applescript Xcode, what handler is called when the Status-Bar-Icon for my app is clicked? Are there any variables or connections that I have to make?

    Thanks Red_menace! I don't know what the Apple community would do without you.
    For others viewing this question, the following is the proper format, for Cocoa-Applescript:
    property NSStatusBar : class "NSStatusBar"
    property StatusItem : ""
    on applicationWillFinishLaunching_()
    set StatusItem to NSStatusBar's systemStatusBar's statusItemWithLength_(current application's NSSquareStatusItemLength)
    StatusItem's setAction_("myAction:")
    end applicationWillFinishLaunching_
    on myAction_()
    say "Hello!"
    end myAction_
    Where "myAction:" is the action that you want to call when the Status-Bar-Item is clicked. It should also be noted that this handler will not be called if a menu or view is already linked to it's click action.

  • Simple introduction/tutorial on how to make Cocoa-Applescript Applets?

    I'm looking for a simple tutorial on how to make Cocoa-Applescript Applets.  I'm pretty new to Applescript, but fairly good at it, and I was wondering how Cocoa-Applescript Applets worked.  I was curious as I've been wondering if it was possible to somehow display images in Applescript, and it apparently is the only/easiest way.  My problem is that I haven't been able to find any tutorials on using it, so I was wondering if you guys could point me in the right direction, that'd be great!
    thanks in advance

    The main difference is with how the Cocoa APIs are used - in addition to the AppleScript and AppleScriptObjC release notes, there are some examples and resources at Mac OS X Automation.  Note that in Yosemite, AppleScriptObjC is available to all scripts, not just applets and libraries.

  • Cannot add events to my calendar

    Cannot add events to my calendar no plus sign button like manual shows

    Just spoke with a Senior Tech at Apple Support who solved the problem, for me at least, and it involved disabling Calendar under my Gmail account.
    Settings -> Mail, Contact, Calendars -> Accounts.
    One of my accounts is Gmail.
    Gmail -> Mail, Calendars, Notes. Mine were all turned 'ON'
    Turn OFF Calendars.
    Voila.
    Go back to Home->Calendar-> and the Plus + sign is there and editing is fine!!!!!

  • Cannot understand Security element wsu:Timestamp error

    I got the below error while trying to call the GetEvents method. I generated a Web Service proxy in Jdeveloper 11g and I'm using Weblogic 10.X. Below are my code. Do you have any idea?
    IntegrationEventWS integEventService = new IntegrationEventWS_Impl("IntegrationEventWS_saved_wsdl.wsdl");
    InputStream inbound = new Object().getClass().getResourceAsStream("/weblogic/wsee/policy/runtime/Wssp1.2-2007-Https-UsernameToken-Plain.xml");
    Default_Binding_IntegrationEventWS port = integEventService.getDefault(inbound, true, false);
    Stub portStub = (Stub)port;
    ArrayList credentialproviders = new ArrayList();
    CredentialProvider cp = new ClientUNTCredentialProvider(username.getBytes(),password.getBytes());
    credentialproviders.add(cp);
    portStub._setProperty(WSSecurityContext.CREDENTIAL_PROVIDER_LIST,credentialproviders);
    IntegrationEventWS_GetEvents_Input getEventsInput = new IntegrationEventWS_GetEvents_Input();
    getEventsInput.setEventCount(null);
    getEventsInput.setQueueName("Opportunity");
    IntegrationEventWS_GetEvents_Output getEventsOutput = port.getEvents(getEventsInput);
    Error
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand] FaultString [Cannot understand Security element wsu:Timestamp] FaultActor [null]No Detail; nested exception is:
         weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Cannot understand Security element wsu:Timestamp
    java.rmi.RemoteException: SOAPFaultException - FaultCode [{http://schemas.xmlsoap.org/soap/envelope/}MustUnderstand] FaultString [Cannot understand Security element wsu:Timestamp] FaultActor [null]No Detail; nested exception is:
         weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Cannot understand Security element wsu:Timestamp
         at oracle.e1.bssv.JC57M007.proxy.Default_Binding_IntegrationEventWS_Stub.getEvents(Default_Binding_IntegrationEventWS_Stub.java:87)
         at oracle.e1.bssv.JC57M007.IBS_CRMODProcessor.manageOpportunity(IBS_CRMODProcessor.java:63)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.e1.bssvfoundation.impl.jdenet.CallSBFHandler.callSBF(Unknown Source)
         at oracle.e1.bssvfoundation.impl.jdenet.CallSBFMsgHandler.process(Unknown Source)
         at oracle.e1.bssvfoundation.impl.jdenet.SBFServerJavaKernel.process(Unknown Source)
         at com.jdedwards.system.net.ProcessKernel.run(Unknown Source)
    Caused by: weblogic.wsee.jaxrpc.soapfault.WLSOAPFaultException: Cannot understand Security element wsu:Timestamp
         at weblogic.wsee.codec.soap11.SoapCodec.decodeFault(SoapCodec.java:357)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decodeFault(CodecHandler.java:118)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.decode(CodecHandler.java:103)
         at weblogic.wsee.ws.dispatch.client.CodecHandler.handleFault(CodecHandler.java:91)
         at weblogic.wsee.handler.HandlerIterator.handleFault(HandlerIterator.java:309)
         at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:269)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.handleResponse(ClientDispatcher.java:213)
         at weblogic.wsee.ws.dispatch.client.ClientDispatcher.dispatch(ClientDispatcher.java:150)
         at weblogic.wsee.ws.WsStub.invoke(WsStub.java:87)
         at weblogic.wsee.jaxrpc.StubImpl._invoke(StubImpl.java:337)
         at oracle.e1.bssv.JC57M007.proxy.Default_Binding_IntegrationEventWS_Stub.getEvents(Default_Binding_IntegrationEventWS_Stub.java:82)
         ... 9 more

    Thank you for the replys. However, when running the command:
    *$ java -classpath /export/home/jtownsen/java/ojdbc14_g.jar Connect*
    I got the following error message:
    Exception in thread "main" java.lang.NoClassDefFoundError: Connect
    In case anyone is interested, I did figure out a solution. First, I set the environment variable like so: (using Korn shell)
    *$ CLASSPATH=/export/home/jtownsen/java/ojdbc14_g.jar:/export/home/jtownsen/java/Connect.class:*
    *$ export CLASSPATH*
    Then I compiled the program with:
    *$ javac Connect.java*
    ...which created the Connect.class file.
    And ran the program with:
    *$ java Connect*
    ...and the program ran with no errors returned.
    Now I can begin on the next step. Thanks again to those who have replied.

Maybe you are looking for

  • Quicktime playback sometimes does not play back Video

    Recently upgraded to Snow leopard. Problem appeared after upgrade. On some, not all, quicktime videos, the play back only has audio, no video. Quicktime ver. 7.6.3. I have tried to upgrade to 7.6.4, but the installer won't let me, says I already have

  • Using string in if sentance?

    I've had some problems with checking a string in an if sentance. String var = "text"; if (var == "text") { blablabla This doesn't work if var is set to String. How can I solve it, switch doesn't work either. It doesn't fail to compile, and the variab

  • Match will not upload tracks no longer available in the Store?

    I purchased and album on 2/4/2007 (see below) which is apparently no longer available in the iTunes store. I understand that some music that was once available might be removed from the store for copyright reasons.  Because these tracks were protecte

  • Merge tdms file

    Hi, is there an easy way to merge a set of tdms-files (with same structure) to one file? For example: Measurement1.tdms Measurement2.tdms Measurement3.tdms to  Measurement.tdms

  • Iphone email default encoding in 3.0

    I am not sure if anybody reported this but in iPhone OS 3.0, all my Korean email is encoded in Chinese characters by default and I can't seem to change this manually. Does anyone know a solution to this?