• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
AppleScriptObjC framework error?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScriptObjC framework error?


  • Subject: AppleScriptObjC framework error?
  • From: Dave <email@hidden>
  • Date: Fri, 24 Dec 2010 00:52:26 -0600

Applescript is giving me the wrong value for an edge-case Cocoa constant in a NSTableView drag and drop action.

Here's the details:

-- validate drags
 on tableView_validateDrop_proposedRow_proposedDropOperation_(theTableView, theID, theRow, theOperation)

    -- This method (header NSTextView.h) returns a NSDragOperation
    -- (header NSDragging.h) constant defined as follows:
    --
    --typedef NSUInteger NSDragOperation;
    --
    --enum {
    --    NSDragOperationNone = 0,
    -- etc.
    --    NSDragOperationEvery = NSUIntegerMax
    --};
    --
    -- Applescript code is seeing this as -1 which causes the following
    -- return to fail with syslog message:
    -- "unable to set return value because the AppleScript value <NSAppleEventDescriptor: -1> could not be coerced to type Q."
    --
    -- I am bypassing this problem by using an integer value of 0x7FFFFFFF.
    --return current application's NSDragOperationEvery
    return 2.147483647E+9


    end tableView_validateDrop_proposedRow_proposedDropOperation_

Regards,
-- Dave




-- Dave

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
applescriptobjc-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: AppleScriptObjC framework error?
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: Setting Menu Item's Keyboard Shortcut
  • Next by Date: Re: AppleScriptObjC framework error?
  • Previous by thread: Re: Setting Menu Item's Keyboard Shortcut
  • Next by thread: Re: AppleScriptObjC framework error?
  • Index(es):
    • Date
    • Thread