It is currently Sat May 26, 2018 6:42 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Drag & Drop
PostPosted: Sun Feb 11, 2018 7:28 am 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 200
Location: UK
Unfortunately, Drag & Drop is still broken on macOS.

Is there a way to do it ourselves through the CocoaMessage command?


Top
 Profile  
Reply with quote  
 Post subject: Re: Drag & Drop
PostPosted: Sun Feb 11, 2018 9:57 am 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3112
Location: Netherlands
I think it might be possible.
What do you exactly want ?

_________________
MacOS 10.13 High Sierra, PB 5.60 x64


Top
 Profile  
Reply with quote  
 Post subject: Re: Drag & Drop
PostPosted: Sun Feb 11, 2018 3:53 pm 
Offline
Enthusiast
Enthusiast

Joined: Thu Dec 29, 2011 5:03 pm
Posts: 200
Location: UK
I want to be able to reorder the items of gadgets - particularly the TreeGadget and ListIconGadget.


Top
 Profile  
Reply with quote  
 Post subject: Re: Drag & Drop
PostPosted: Sun Feb 11, 2018 4:11 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Apr 21, 2005 2:38 pm
Posts: 1502
Location: Germany
Did you already try my workaround (hidden thread) for ListIconGadgets? It has the big disadvantage that you have to wait some seconds after selecting a cell and before you may click a 2nd time onto that cell to move it. But at least it's working (kind of)... :wink:


Top
 Profile  
Reply with quote  
 Post subject: Re: Drag & Drop
PostPosted: Sun Feb 11, 2018 4:13 pm 
Offline
PureBasic Expert
PureBasic Expert

Joined: Sun Aug 08, 2004 5:21 am
Posts: 3112
Location: Netherlands
wombats wrote:
I want to be able to reorder the items of gadgets - particularly the TreeGadget and ListIconGadget.

It looks like in order to do that, you will have to implement certain methods for NSTableViewDataSource / NSOutlineViewDataSource .

I found a Swift example.
https://gist.github.com/sooop/3c964900d ... 5050d0de0a
Looking at the code, it appears you need to implement the following methods for the ListIconGadget.

tableView:writeRowsWithIndexes:toPasteboard:
tableView:acceptDrop:row:dropOperation:
tableView:validateDrop:proposedRow:proposedDropOperation:

_________________
MacOS 10.13 High Sierra, PB 5.60 x64


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye