• 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
Re: Which sender is which
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Which sender is which


  • Subject: Re: Which sender is which
  • From: "John C. Welch" <email@hidden>
  • Date: Thu, 07 Apr 2011 13:00:09 -0400
  • Thread-topic: Which sender is which

Okay, so I'm drawing an utter blank on how to use this in AppleScriptObjC.
How do you refer to [sender tag]?

If I try:

set theTag to sender's tag()

or

set theTag to sender's tag_()

I get:

2011-04-07 12:56:52.678 Derby Score[1998:903] -[NSDragDestination tag]:
unrecognized selector sent to instance 0x20009d620
2011-04-07 12:56:52.716 Derby Score[1998:903] *** -[MyImageView
performDragOperation:]: -[NSDragDestination tag]: unrecognized selector sent
to instance 0x20009d620 (error -10000)

If I just try:

set theTag to sender's tag

I get:

2011-04-07 12:59:18.250 Derby Score[2063:903] *** Canceling drag because
exception 'NSUnknownKeyException' (reason '[<NSDragDestination 0x2006d2c60>
valueForUndefinedKey:]: this class is not key value coding-compliant for the
key tag.') was raised during a dragging session

What am I missing here?


On 3/24/11 6:09 PM, "Rainer Standke" <email@hidden> wrote:

> you can set the 'Tag' field for each of the image wells in Interface Builder
> to a different int value. You might then be able to say [sender tag] to get
> that same int value, and thus you could figure out which well received the
> drop.
>
> Not sure about the syntax in AppleSript Obj-C, is obviously the Obj-C
> equivalent.
>
> Not sure if this all really applies to drag & drop, but it sure does apply to
> clicked button, where the tags on the buttons would be set in IB.
>
> Hope this helps,
>
> Rainer
>
>
> On Mar 23, 2011, at 12:22, John C. Welch wrote:
>
>> So I grokked tracking drag and drop into an image well thanks to Shane's
>> book.
>>
>> In my application, I've got 3 image wells. I'd like to do essentially the
>> same thing for each one when an image is dragged into it, but I'm not sure
>> of how to pull that information. I'm guessing it's in the sender info, but
>> looking for how to find that in the docs has been a bust.
>>
>> Any decent way to do this?



 _______________________________________________
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: Which sender is which
      • From: "Bukowinski, Peter" <email@hidden>
  • Prev by Date: trouble Receiving text from error
  • Next by Date: Re: Which sender is which
  • Previous by thread: trouble Receiving text from error
  • Next by thread: Re: Which sender is which
  • Index(es):
    • Date
    • Thread