CGTalk > Software > Autodesk Maya > Maya Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 04-03-2009, 05:27 PM   #1
claudiof
Veteran
 
claudiof's Avatar
portfolio
claudio
-, Chile
 
Join Date: Jun 2008
Posts: 76
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 ?

Code:
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; } window; paneLayout; 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" showWindow;
 
Old 04-03-2009, 07:19 PM   #2
A-OC
Expert
 
A-OC's Avatar
portfolio
Andrés Ossandón
Generalist 7th Dan
Santiago, Chile
 
Join Date: Jan 2004
Posts: 226
Send a message via MSN to A-OC
It looks like it needs a drag callback as well.

Try this:

Code:
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 "}; } window; paneLayout; textScrollList -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"; showWindow;
 
Old 04-04-2009, 12:53 AM   #3
claudiof
Veteran
 
claudiof's Avatar
portfolio
claudio
-, Chile
 
Join Date: Jun 2008
Posts: 76
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.
but
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
textScrollList.

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-04-2009 at 01:10 AM.
 
Old 04-04-2009, 03:23 AM   #4
A-OC
Expert
 
A-OC's Avatar
portfolio
Andrés Ossandón
Generalist 7th Dan
Santiago, Chile
 
Join Date: Jan 2004
Posts: 226
Send a message via MSN to A-OC
Quote:
Originally Posted by claudiof
prints Testing drag callback.
but
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-04-2009, 03:23 AM   #5
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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
CGSociety
Society of Digital Artists
www.cgsociety.org

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

All times are GMT. The time now is 08:24 PM.


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