Re: resizing image returned from NSDraggingInfo -draggedImage
Re: resizing image returned from NSDraggingInfo -draggedImage
- Subject: Re: resizing image returned from NSDraggingInfo -draggedImage
- From: edward taffel <email@hidden>
- Date: Sat, 12 Apr 2014 19:03:32 -0400
thanks for your reply kyle.
you are absolutely correct: dts did provide a workaround w/ enumerateDraggingItemsWithOptions.
On Apr 12, 2014, at 3:51 PM, Kyle Sluder <email@hidden> wrote:
> On Apr 12, 2014, at 11:02 AM, edward taffel <email@hidden> wrote:
>>
>> during inter-document drags of app objects, i’d like to resize the drag image to the mag (zoom) of an entered document.
>> this was easily accomplished in carbon. when i ported from carbon [in 2011] i tried what i considered obvious, e.g.
>>
>> - (NSDragOperation)draggingEntered:(id < NSDraggingInfo >)sender {
>> NSImage* img= [sender draggedImage];
>> NSSize sz; // suitably initialized, of course
>>
>> [img setSize:sz];
>> [img recache];
>> }
>>
>> i was surprised when this did not work & reported it. i just noticed, engineering quietly closed the report [may 2013] w/ the suggestion that i investigate
>> enumerateDraggingItemsWithOptions: i’ve just had a look & this seems like very great bother to do something previously obtained w/ two lines of code.
>>
>> does anyone have a workaround?
>
> It sounds like DTS already have you the workaround: use NSDraggingItem.
>
> One reason for doing so is that pasteboard can now contain multiple items, which they couldn't under Carbon.
>
> --Kyle Sluder
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden