开发者

NSOutlineVIew Drag, drop in different window (same app)

开发者 https://www.devze.com 2023-04-03 04:01 出处:网络
My question really concerns draging in an outline view, but I\'d guess that doesn\'t make any difference.

My question really concerns draging in an outline view, but I'd guess that doesn't make any difference.

If I have two documents open (Same document based application), and I drag an item from one document to another, How can I tell if I'm dropping in a different window than I started in?

The way I would do it off hand, is set a boolean ivar to Yes in the outlineview:writeItems... then set it back to No upon successful drop. Then at entry into outlineView:acceptDrop... the ivar should be Yes if the drop is in the same document, No if it is a different document.

Is there some better, or mor开发者_如何学编程e conventional way that I'm missing?


After all this time, I guess there is no one with a better idea. Seems like this would come up often enough that there should be a standard approach.

I implemented this with a boolean ivar as I described and it works fine.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号