lotrointerface.com
Search Downloads


Go Back   LoTROInterface > LotRO > Developer Discussions > Lua Programming Help (L)

Reply
Thread Tools Display Modes
  #1  
Unread 10-12-2010, 08:19 PM
SanDBoX's Avatar
SanDBoX SanDBoX is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Location: Idaho
Posts: 40
Drag/Drop operations

I am trying to setup a window so that it will accept a drag&drop item, I have figured out how to see when it happens, but cant figure out how to get the item that was dropped, I really dont want to use a quickslot for this (could cause issues latter)

So far I have :
Quote:
Window = class( Turbine.UI.Window )

function Window:Constructor( )
Turbine.UI.Lotro.Window.Constructor( self )
self:SetSize( 100, 100 )
self:SetPosition( 100, 100 )
self:SetText( "Testing Grounds" )
self:SetAllowDrop( true )
end


function selfragDrop(sender, args)
Turbine.Shell.WriteLine( "Received Item" )
end
but when I cycle through the information from sender all I get is the y,x coords and a seemingly unused "dragdropinfo" table which just has an __implementation atribute that is blank.

Anyone know how to collect the dropped item?
Reply With Quote
  #2  
Unread 10-13-2010, 12:29 AM
MrJackdaw's Avatar
MrJackdaw MrJackdaw is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Feb 2009
Location: Lancaster, England
Posts: 249
DragDrop does not fire for quicklsots - not so sure about windows. Maybe bugged?
__________________
************************************************** ************************************************** **
"Our ideals may never be realised, But they indicate what we are trying to do." Dick Tahta
Reply With Quote
  #3  
Unread 10-13-2010, 08:49 PM
SanDBoX's Avatar
SanDBoX SanDBoX is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Location: Idaho
Posts: 40
I tried to get the parent thinking maybe the item caused the drag and drop but not go, doesnt even have the "GetParent" method.

Anyone have any other ideas? is this one of those things that they put in but havent implamented yet?

I would really like to get the drag and drop thing to work...
Reply With Quote
  #4  
Unread 10-14-2010, 08:09 AM
D.H1cks's Avatar
D.H1cks D.H1cks is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Apr 2007
Posts: 162
I have a custom button that accepts drag drop items. I get the item using:

newItem = args.DragDropInfo:GetShortcut():GetItem();
Reply With Quote
  #5  
Unread 10-14-2010, 04:50 PM
SanDBoX's Avatar
SanDBoX SanDBoX is offline
The Undying
Interface Author - Click to view interfaces
 
Join Date: Sep 2010
Location: Idaho
Posts: 40
Okay, thank you! will look more into that direction, but one problem I found is that when I collect the Item my "args" always ends up nil, are you using something other then the 'DragDrop(sender, args)' ?


EDIT:
and when I get DragDropInfo from the sender the GetShortcut() always comes back with just __Implementation, and GetItem() gets nil...

so confused, wish the api documentation was more then a "this is the methods we have, you figure out how they go"

Last edited by SanDBoX : 10-14-2010 at 05:54 PM.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 01:45 AM.


Our Network
EQInterface | EQ2Interface | Minion | WoWInterface | ESOUI | LoTROInterface | MMOUI | Swtorui