dragCallback Buggy / not Functioning

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
Old 04 April 2009   #1
dragCallback Buggy / not Functioning

I am testing dragCallback skill of controls.
but unfortunately the targets says this is not working in Windows OS.

Just wantto learn If I can get which text is dragged into my scrolllist.
for example I wantto get the dragged text (middle mouse click and drag)
from shelf button to my own control ?

impossible ?

global proc string[] MyDropCallBack(string $dragControl, string $dropControl, string $msgs[], int $x, int $y, int $type)
print "hellooOOo Why This Print Doesn't Working ?.why no triggering ?";
string $myArray[]={ "an empty array" };
return $myArray;
textScrollList -numberOfRows 8 -allowMultiSelection true
-dropCallback MyDropCallBack
-append "one" -append "two" -append "three"
-append "four" -append "five" -append "six"
-append "seven" -append "eight" -append "nine"
-append "ten" -append "eleven" -append "twelve"
-append "thirteen" -append "fourteen" -append "fifteen"
Old 04 April 2009   #2
It looks like it needs a drag callback as well.

Try this:

global proc TestDropCB( string $dragControl, string $dropControl, string $msg[], int $x, int $y, int $type)
	print "Testing drop callback\n";

global proc string[] TestDragCB(string $dragControl, int $x, int $y, int $mods)
	print "Testing drag callback\n";
	return{" an empty array "};

	-numberOfRows 8
	-allowMultiSelection true
	-dragCallback TestDragCB
	-dropCallback TestDropCB
	-append "one" -append "two" -append "three"
	-append "four" -append "five" -append "six"
	-append "seven" -append "eight" -append "nine"
	-append "ten" -append "eleven" -append "twelve"
	-append "thirteen" -append "fourteen" -append "fifteen";
Old 04 April 2009   #3
and problem starts here.

it works if you drag from the own items of same textScrollList.
or from any other control which have callbacks.

and problem starts here.

prints Testing drag callback.
never prints "Testing drop callback".

try to middle mouse drag a shelf button to our textScrollList.
TestDropCB never triggers.

simply I wantto get the dropped text (a shelf button via middle mouse click) into

the documents says if the source has no callback procedures it doesnt work.
thus getting a text via mdidle mouse button from any shelff button to own control wont work so shelf buttons have no callbacks by default.
(this is default working for a textfield control).

Last edited by claudiof : 04 April 2009 at 01:10 AM.
Old 04 April 2009   #4
Originally Posted by claudiof: prints Testing drag callback.
never prints "Testing drop callback".
It does execute both callbacks in my clean scene.

Other than that I have to agree with you.

So it seems like you just have to add a drag callback to that shelf button of yours.

BTW do you reside in Santiago?
Old 04 April 2009   #5
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

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
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:30 PM.

Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.