I have a separate window popup for inventory. I'm trying to drag from that window to the main window's map. I seem to be having issues due to the popup window being the current focus or perhaps there's something else I'm not thinking of?
Any suggestions or quick snippets that can demonstrate this would be greatly appreciated. =D
ID:154785
![]() Dec 24 2011, 6:32 pm (Edited on Dec 26 2011, 6:00 am)
|
|
![]() Dec 24 2011, 7:59 pm
|
|
Make sure you're using the full ID if you're checking the src_control/over_control arguments. You also need to make sure the maps are drop zones, I think.
|
The map is a dropzone. It appears the issue is in the fact that the window that pops up is the focus and not the main window. Here's what I have:
MouseDrop(over_object=src,src_location,over_location, src_control,over_control,params) |
Yusuke13 wrote:
The map is a dropzone. It appears the issue is in the fact that the window that pops up is the focus and not the main window. Here's what I have: > Debug all of the parameters, but IIRC, over_location will be the turf you're dropping on, over_control should be the control your dropping on, or main.map_pane.map1. |
I noticed this in the proc's parameters.
over_object=src Are you intending to drop the object upon itself? Also are you using the client MouseDrop procedure or the atom MouseDrop procedure. You appear to be using the atom procedure. If so here is an additional issue (it's still an issue if you're using the client one, but I don't think the client one would compile because of attempted access to client.contents if(!src in contents) return Since it's an atom procedure all calls to src refer to the atom itself as the source. So this proc reads "if the object is not within itself return" (implicit call to src.contents). Usually this would always be true and thus terminate execution. It should read if(!src in usr.contents) return Mouse procs are one of the few usr-safe procs. |