Thread: Issue with AcceptDrop?
-
May 16th, 2012, 13:56 #1
- Join Date
- Jan 2010
- Location
- Chester, Uk
- Posts
- 147
Issue with AcceptDrop?
Hi All,
I am experiencing an issue in FG2 (v2.8.1) where the rules around <acceptdrop> appear to be ignored. I have a window list which contains the following xml:
Code:<acceptdrop> <class>item</class> <fields>*</fields> </acceptdrop>
This is happening in my ruleset, but I have also recreated it in the 3.5E ruleset as well:
Create a new campaign
Create a new story
Drag and drop the story to items - see how the story is added to items.
Has anyone else experienced this issue?
Thanks in advance
-
May 16th, 2012, 14:23 #2
Question for the workshop ? (not the lab) ?
I did some work creating a new "base" windowlist for Savage Worlds that gave me some nice XML configuration for more complex drag'n'drop stuff. But from memory, what you've written should work as intended.
You're not overriding the drop handler in any custom LUA are you ?Former SW ruleset / Deadlands extension author. Now I just wanna play a few games. And maybe hack. A little.
-
May 16th, 2012, 14:34 #3
- Join Date
- Jan 2010
- Location
- Chester, Uk
- Posts
- 147
Originally Posted by phantomwhale
Originally Posted by phantomwhale
Its not a big issue - I am convinced that this used to work though. Its not just my machine as the issue was raised by someone else. In addition, I see it happening in the 3.5E ruleset which uses the exact same xml
-
May 17th, 2012, 00:31 #4
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,570
Try "field" instead of "fields".
https://www.fantasygrounds.com/refdoc/windowlist.xcp
Regards,
JPG
-
May 17th, 2012, 08:56 #5
- Join Date
- Jan 2010
- Location
- Chester, Uk
- Posts
- 147
Sorry, my example was incorrect. The ruleset is using <field>, not <fields> and I still see this issue.
-
May 17th, 2012, 18:44 #6
Supreme Deity
- Join Date
- Mar 2007
- Posts
- 20,570
Both the NPCs and items in 3.5E/4E use that approach to create copies of module links dropped onto the campaign lists.
Looking at the code, the drop will not copy if:
* The drop class does not match the class in the acceptdrop.class tag
* If the class of the shortcut is not defined in the ruleset.
* If the drag object shortcut data does not point to a database node.
You can add an onDrop event handler for the windowlist control in order to review the dragdata object being used in the drop event. (i.e. dragdata.getType(), dragdata.getShortcutData())
Regards,
JPG
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks