PDA

View Full Version : Copying lists on drop from library to another window



Moon Wizard
June 11th, 2008, 23:46
I'm making some modifications to my own monster library module, which includes a database list of monster abilities. This question concerns dragging a module NPC to the Personalities tab, in order to create a customized version.

I was not able to get the Personalities window to accept the data node list based on an acceptdrop tag with the abilities list name in a field tag, so I built a custom onDrop handler. However, when I attempt to do a getValue() on a formattedtext field, I get a nil value.

Is there any way to have the default onDrop handler automatically handle a drop of a database node more than one level deep? Or is there a way to get the value of a formattedtext field?

Thanks,
JPG

joshuha
June 12th, 2008, 00:57
Formattedtext fields are broken right now as far as function for getting and setting them. The only way they work is in the * field copy but obviously since you are doing some custom things like lists its not possible.

Foen
June 12th, 2008, 06:29
It is possible to combine acceptdrop and onDrop so that both formattedtext and nested data can be handled, but not formattedtext within nested data, sadly.

This problem is covered in another thread (https://www.fantasygrounds.com/forums/showthread.php?t=8294).

Foen

Moon Wizard
June 12th, 2008, 09:13
Good thinking on the workaround, Foen. I think that will do exactly what I need.

Cheers,
JPG