REVO2700 DragAndDrop23Ii uCurLoc505,443 uPaypalURLChttps%3A%2F%2Fwww.paypal.com%2Fcgi-bin%2Fwebscr%3Fcmd%3D_xclick%26business%3Deric%252echatonet%2540sosmartsoftware%252ecom%26item_name%3DEric%2520Chatonet%26item_number%3DDev%2520Support%26no_shipping%3D0%26no_note%3D1%26tax%3D0%26currency_code%3DEUR%26return%3Dhttp%3A%2F%2Fwww.sosmartsoftware.com%2F%26charset%3DUTF%252d8How to Manage Drag and Drop ' ULucida Grande ULucida Grande WLucida Grande ULucida Grande UVerdana WLucida Grande WVerdana UVerdana U Helvetica U Helvetica U Helvetica UHelvetica,Unicode UHelvetica,UnicodeW courier new @Utahoma Utahoma Wtahoma UVerdana WVerdana @UVerdana WVerdana @WVerdana UGeorgiaUGeorgia UArial UArial UMonaco UMonaco AUVerdana UCourierUVerdana WArialUArialWArial U Courier New UVerdana UVerdanaWGeorgia UTahoma cREVGeneral debugObjectsstackfileversion2.7cREVGeometryCachestackID2027 Xon preOpenStack set the style of this stack to "modeless" set the loc of this stack to the screenloc set the uCurLoc of this stack to the loc of this stack end preOpenStack --------------------------------------- on openStack if not MinVersion(2.9) then -- answer warning "Some features in this stack need Rev 2.9 or later." & cr & "Rev Error dialog may show up." as sheet end if end openStack --------------------------------------- on moveStack set the uCurLoc of this stack to the loc of this stack end moveStack --------------------------------------- on resizeStack revUpdateGeometry repeat with i = 1 to the number of btns in grp "Boundaries" set the uLoc of btn i of grp "Boundaries" to the loc of btn i of grp "Boundaries" end repeat repeat with i = 1 to the number of flds if the uDontResize of fld i then next repeat set the vScrollBar of fld i to the formattedHeight of fld i > the height of fld i end repeat set the uCurLoc of this stack to the loc of this stack end resizeStack --------------------------------------- on linkClicked pLink if pLink = "Here" then revGoUrl "http://www.mail-archive.com/use-revolution@lists.runrev.com/msg18480.html" else if pLink = "docs" then FindInDictionary "dragdata" -- C else if pLink = "Basics" then set the menuHistory of btn "Tabs" to 2 else FindInDictionary pLink -- C end linkClicked --------------------------------------- on ShowAnotherStack local tLeft ----- if item 3 of the screenRect - the right of this stack < the width of stack "AnotherStack" + 16 then put the left of this stack into tLeft if the width of this stack <> 800 then set the width of this stack to 800 set the left of this stack to tLeft end if move this stack to 410,item 2 of the loc of this stack in 200 milliseconds end if go stack "AnotherStack" set the defaultStack to the mainStack of this stack end ShowAnotherStack --------------------------------------- on FindInDictionary pLink local tLink,tFlag,tLineNo ----- set the cursor to watch put word 1 of pLink into tLink put "revDocs" is in the windows into tFlag ----- if not tFlag then go invisible to cd 4 of stack "revDocs" as modeless else lock screen go to cd 4 of stack "revDocs" as modeless end if ----- set the cursor to watch go to cd 4 of stack "revDocs" set the defaultStack to "revDocs" if pLink <> fld "SearchText" then put word 1 of pLink into fld "SearchText" send "updateFilter" to fld "SearchText" end if put lineOffset(cr & word 1 of pLink,cr & fld "Data") into tLineNo if not matchChunk(the hilitedText of fld "Data",word 1 of pLink & "*") then set the hilitedLine of fld "Data" to tLineNo send "entryChunk" && "entryDisplay",quote & "line" && tLineNo && "of fld 10" & quote to grp "Dataview" end if put tLink into fld "SearchText" -- due to an unknown bug in revDocs ----- show stack "revDocs" unlock screen end FindInDictionary --------------------------------------- on DisplayMessage pParams,pFld local tKeys,tKey,tKeysList ----- if fld pFld = "Messages:" then put empty into fld pFld if "dragDrop" is in pParams then put the keys of the dragdata into tKeys repeat for each line tKey in tKeys if the dragData[tKey] = empty then put tab & tKey & ": empty" & cr after tKeysList else put tab & tKey & ": not empty" & cr after tKeysList end repeat delete last char of tKeysList put tKeysList & cr & pParams & cr before fld pFld else put pParams & cr before fld pFld set the vScrollbar of fld pFld to the formattedHeight of fld pFld > the height of fld pFld end DisplayMessage --------------------------------------- function MinVersion pVersion return (char 1 to 3 of the version >= pVersion) end MinVersion   uCurField ListField1 uDraggedFromFieldBcREVGeometryCacheIDsh12081795348171946120618534153110131206634311825125812064406256101093120644763553711081206464200264113112081824148332015120705075504214781207050755043148012070507550441482120705075504514831206456435319112612064564353201125120645630114011291207050755046148412064564353211127120645643532211281206548126350119512067176565661337120653065630511641206654754802130312067176565671338120653065630611651206953071665136412061850569121012120644786606611091206951664674136212064559089631123120644155138310971206530924030116612064642041681132120628830887810281206289700005103612064406421031095120643872976210921206531419117116812066218406871236120662194840212421207132611517166612066225708971837120662257089818381206377962895108412071533870761181120661069492512321207153387077117912061856936411018120653027394611631206634523988127012071386895921783120645620472211241206634773073125912066347730741260120671379723313311206353911525106712064483796541117120645590540211211206634773075126412064483796551118120663477307612651208179624417194712062983163311043120637016703110681206635914134128012063526828931065120618540682010141206441614072109912061849868561010120637017868210691206370178684107112070521926471514120637017868510721206370178686107312063701786871075120645643169411301206891359521134712066555151161310120689135952213481206447882829111012066551725581306120689135952313491206891359524135012064423100721103120637766248510811206621253713123712081796457421948120626790685816001206970234783138112065263675201151120653027145111611206654708520130112064420579001104120619091108210201206378065028108512066347483421272120644867898411201206288329016103012064478986401111120644821971060211120644821970960210120714998583418361206448219711602121207051273280150812064482197126021312063523038591063cREVGeometrycachetotal104orderc1206185056912 1206289700005 1206184986856 1206185406820 1206185693641 1206440625610 1206353911525 1206288308878 1206298316331 1206370178682 1206370178686 1206370178687 1206442057900 1207051273280 1206713797233 1206621253713 1206634523988 1206455905402 1206456204722 1206456301140 1206610694925 1206530271451 1206530924030 1206531419117 1206634773073 1206634773074 1206634773075 1206634773076 1206185341531 1206352682893 1206352303859 1206378065028 1206370178684 1206370178685 1207149985834 1207050755042 1207050755043 1207050755044 1207050755045 1207050755046 1207132611517 1206621948402 1206717656566 1206717656567 1206891359521 1206891359522 1206891359523 1206891359524 1206441614072 1206448219709 1206448219710 1206448219711 1206448219712 1206526367520 1206530656305 1206530656306 1206548126350 1206655515116 1206377662485 1207052192647 1206634748342 1206635914134 cREVGeneralscriptChecksum0o@eg'.89 bookmarks breakPoints handlerListtpreOpenStack openStack moveStack resizeStack linkClicked ShowAnotherStack FindInDictionary DisplayMessage MinVersionscriptSelectionchar 822 to 832 prevHandler preOpenStack tempScriptscript+

on preOpenStack

set the style of this stack to "modeless"

set the loc of this stack to the screenloc

set the uCurLoc of this stack to the loc of this stack

end preOpenStack

---------------------------------------

on openStack

if not MinVersion(2.9) then --

answer warning "Some features in this stack need Rev 2.9 or later." & cr & "Rev Error dialog may show up." as sheet

end if

end openStack

---------------------------------------

on moveStack

set the uCurLoc of this stack to the loc of this stack

end moveStack

---------------------------------------

on resizeStack

revUpdateGeometry

repeat with i = 1 to the number of btns in grp "Boundaries"

set the uLoc of btn i of grp "Boundaries" to the loc of btn i of grp "Boundaries"

end repeat

repeat with i = 1 to the number of flds

if the uDontResize of fld i then next repeat

set the vScrollBar of fld i to the formattedHeight of fld i > the height of fld i

end repeat

set the uCurLoc of this stack to the loc of this stack

end resizeStack

---------------------------------------

on linkClicked pLink

if pLink = "Here" then revGoUrl "http://www.mail-archive.com/use-revolution@lists.runrev.com/msg18480.html"

else if pLink = "docs" then FindInDictionary "dragdata" -- C

else if pLink = "Basics" then set the menuHistory of btn "Tabs" to 2

else FindInDictionary pLink -- C

end linkClicked

---------------------------------------

on ShowAnotherStack

local tLeft

-----

if item 3 of the screenRect - the right of this stack < the width of stack "AnotherStack" + 16 then

put the left of this stack into tLeft

if the width of this stack <> 800 then

set the width of this stack to 800

set the left of this stack to tLeft

end if

move this stack to 410,item 2 of the loc of this stack in 200 milliseconds

end if

go stack "AnotherStack"

set the defaultStack to the mainStack of this stack

end ShowAnotherStack

---------------------------------------

on FindInDictionary pLink

local tLink,tFlag,tLineNo

-----

set the cursor to watch

put word 1 of pLink into tLink

put "revDocs" is in the windows into tFlag

-----

if not tFlag then go invisible to cd 4 of stack "revDocs" as modeless

else

lock screen

go to cd 4 of stack "revDocs" as modeless

end if

-----

set the cursor to watch

go to cd 4 of stack "revDocs"

set the defaultStack to "revDocs"

if pLink <> fld "SearchText" then

put word 1 of pLink into fld "SearchText"

send "updateFilter" to fld "SearchText"

end if

put lineOffset(cr & word 1 of pLink,cr & fld "Data") into tLineNo

if not matchChunk(the hilitedText of fld "Data",word 1 of pLink & "*") then

set the hilitedLine of fld "Data" to tLineNo

send "entryChunk" && "entryDisplay",quote & "line" && tLineNo && "of fld 10" & quote to grp "Dataview"

end if

put tLink into fld "SearchText" -- due to an unknown bug in revDocs

-----

show stack "revDocs"

unlock screen

end FindInDictionary

---------------------------------------

on DisplayMessage pParams,pFld

local tKeys,tKey,tKeysList

-----

if fld pFld = "Messages:" then put empty into fld pFld

if "dragDrop" is in pParams then

put the keys of the dragdata into tKeys

repeat for each line tKey in tKeys

if the dragData[tKey] = empty then

put tab & tKey & ": empty" & cr after tKeysList

else put tab & tKey & ": not empty" & cr after tKeysList

end repeat

delete last char of tKeysList

put tKeysList & cr & pParams & cr before fld pFld

else put pParams & cr before fld pFld

set the vScrollbar of fld pFld to the formattedHeight of fld pFld > the height of fld pFld

end DisplayMessage

---------------------------------------

function MinVersion pVersion

return (char 1 to 3 of the version >= pVersion)

end MinVersion

 @DGI2345cklTTabs}5on menuPick pNewItem, pOldItem local tLeft ----- lock screen show grp pNewItem hide grp pOldItem put empty into img "Drop" put empty into img "Drop2" unlock screen unlock screen switch pNewItem case "Between two Rev windows" set the uCurLoc of this stack to the loc of this stack ShowAnotherStack -- C break case "Towards Rev" case "From Rev" put "Messages:" into fld "DDMessage" put "Messages:" into fld "DDMessage2" set the vScrollbar of fld "DDMessage" to false set the vScrollbar of fld "DDMessage2" to false default close stack "AnotherStack" if the uCurLoc of this stack is a point and the loc of this stack <> the uCurLoc of this stack then move this stack to the uCurLoc of this stack in 200 milliseconds end if end switch end menuPick R>HBasics Into one Rev window Between two Rev windows From Rev Towards Rev cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-55Master,expectedRect 20,7,780,345Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-20Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVGeneral scriptChecksumAi7 aj\$cy1 breakPoints handlerListmenuPickscriptSelectionchar 568 to 567 bookmarks revUniqueID 1206185056912 prevHandlermenuPick tempScriptscript 

on menuPick pNewItem, pOldItem

local tLeft

-----

lock screen

show grp pNewItem

hide grp pOldItem

put empty into img "Drop"

put empty into img "Drop2"

unlock screen

unlock screen

switch pNewItem

case "Between two Rev windows"

set the uCurLoc of this stack to the loc of this stack

ShowAnotherStack -- C

break

case "Towards Rev"

case "From Rev"

put "Messages:" into fld "DDMessage"

put "Messages:" into fld "DDMessage2"

set the vScrollbar of fld "DDMessage" to false

set the vScrollbar of fld "DDMessage2" to false

default

close stack "AnotherStack"

if the uCurLoc of this stack is a point and the loc of this stack <> the uCurLoc of this stack then

move this stack to the uCurLoc of this stack in 200 milliseconds

end if

end switch

end menuPick

SSS.png  Hon mouseDown revGoUrl "http://www.sosmartsoftware.com" end mouseDown Pf"-PNG  IHDR". pHYs.#.#x?v 9iCCPPhotoshop ICC profilexڝwTTϽwz0z.0. Qf Ml@DEHb!(`HPb0dFJ|yyǽgs{.$O./ 'z8WGбx0Y驾A@$/7z HeOOҬT_lN:K"N3"$F/JPrb[䥟}Qd[Sl1x{#bG\NoX3I[ql2$ 8xtrp/8 pCfq.Knjm͠{r28?.)ɩL^6g,qm"[Z[Z~Q7%" 3R`̊j[~: w!$E}kyhyRm333: }=#vʉe tqX)I)B>== <8Xȉ9yP:8p΍Lg kk Ѐ$t!0V87`ɀ2A. @JPA#h'@8 .: ``a!2D!UH 2 dA>P ECqB**Z:]B=h~L2  5pN:|ó@ QC !H,G6 H9R ]H/r Aw( Q(OTJCm@*QGQ-(j MF+ 6h/*t:].G7Зw7 Xa<1:L1s3bXyeb~19 vGĩp+5qy^ oó|= ?'Htv`Ba3BDxHxE$Չ"XAP44077&9$An0;T2421t.54ld+s;# V]=iY9FgM֚k&=%Ō:nc1gcbcfX.}lGv{c)LŖN퉛w/p+/<j$.$%&㒣OdxTԂԑ4i3|o~C:&S@L u[Uo3C3OfIgwdO|;W-wsz 17jl8c͉̈́3+{%lKWr[ $ llGmnacOkE&EEY׾2⫅;K,KhtiN=e²{^-_V^Oo§s]?TWީrjVQ=w}`嚢zԶiו8>k׍ E  [ly邟~_Y53rW򯎼^{7so}x>|쇊z>yzgAMA|Q cHRMz%u0`:o_F"IDATxbax& O?"?z$<@,X< dz,,2{H?Hk4^B˧̌<4i_rD@,hgaӊb:޾zo]ǷDr8 4y6{5ݕ]WMż#٩ƧoZQqm8$Iyon0w 3+ `8 K d+ ,?ۏҟ]xۥW/~g33+?@S_B9.3_823J{;kc :e'HfCqΈ#{x#Sxs`]Ϛ[^>Y5c+?8r2,FF zh(~(M Ѱ狻v%?d|\>}aeE,^%oΦU{ǃ_Tdگ?w>ytfo <"JYղC"%.686lq-dG &pK\j{H@FeoFWwnAςDE|Փg{Y8~#%̅~f^U8]#50Ln>n^>~f[v6&߰ d cvF>H?~ߟ郹,",Z9}WX%ëXDHĄŠ 9J02qrrﳃ_+yop6E[?;3R.QYy844>?ǛGW50s[s|DYޜs%fq-9_KLu~W=\j^n+!a&lgǯ^ӏ]m rB#ǻ? hV.n6%Lz<х ;'￿ ?g{3蟿~/,r6 ~rOmsy9<9'x9 s-RXxծ|:,>̲ܿ?R= w3< 0 C_>;%'o3_?*imcރ?"2BqN.z6UI/"N~|zʲ/Ho_8AII[9Ԟ|d/O^0Q-$*ۻ= ?:Ű̢*'c*fy_ο> ^Q0si.c``_̒NL l [{p H),x]^ F o1ٍ-w}R0XxkqF_bh6^ . f6F Y. M;S.!IΞz+ *rO3߿z:;;El9%5<{{ˣa!0F6q!qNq M ߿,Oمye-d~82ċsɫ }?R\]WɫJEYDMI\XBV^]$L\ҺJj\6_d x }#ǩB__=r{ 73昳ps0+hڙ7}T~˻oya!!#v</^#.+YXUGN?FSHERTYQHXVDWߞ\RP&-<*e|o:ԹDZO\C7VUAqc㗶ɔ2SRS^!ѕ򊼡r2\vont@W޳2.>eͩ\Pvw׾zY-NݛoM7+Iq+Z( V2{sW/~PvKꙟ(wnZ_V!_xDľTbƯ@I]u &vnn:aAJJ}0-{aQf_>\~A>/x a|x]=҆'?X=ۜ\VqIe̩>[g$\be4 KkabEXOH9 ϟqɍO^-V`ʇ{<~y1I 2sps2 }g,,j2 UWUgWĿ630~}go |mĦ#".$"oϸd⃥>_v>AFN~A&HFLOhpIY PW&У O7., ٲ;|e  ,(|w(㷕 ~ մ6岛6mcC  ŋ"Ogw^z`)PK(B ]SLhُn gyf quc|xw铦-Wfh9Ӌn?zzȅ<U6t5J{ʜ&'O;/?_SģNZƯƐ1D#Ey8rD9*{2hl8zi{᧖UqP$(M[QWc 'Ӆn@ȏ>ov7V9:V Ɇ12 QWB`"EkyщYeWާӝwZ\i+7M4+' 6 7J7tAcV3! abF$Lup!5ӭ4ՠn es=>zZ$g?./}<9YS8RGJRpVܩ-M/)=PXT<_1CWMr!lqy[KIE 1A fzY-3W‘W]d7ۑRVͿ h(Tb 69|yfʖ V&%a&'Jt^c N@JXJԎ0yof6>0S'_!à-c0_cFˮ ¶ 2.5 XjS%-X%ԑ0ꀣÝz]m?^8%g*@̶2)x+[V,$p59'>qdI@%˟x/Ⱥ)e9RJ)sRCbN+$ %\w7[:·mwhMNl'bIг܂:m֐kuF]i.w/_ߞo]e3 p ؂_.b,&kWLZSϯ_nlvӓ~K@LTKT]PRV }xuc&G%+v6FQIUVPqyV<<>~z';;0v..Vf&fv6VfV`A痏RQJEME&X@w2(9XW.wLrjɲ&(A[հxUe||RZ*)b< D.N`Q+,'ۤ ԳQxɗ<~}i]`b'lg54`g|}ƉOOE.FB XKl ɻuVGDTT`}yBXvRbgW1P燔vx4v  _vM{Dun` `C73\&vU+_R^;LJן_]>[DLk~5+RigvYJQˏ[̎ZN32;?߿???ٝ;?>|sbҒڞR?>~x!*h/|&xwoJDX̎[cƒ+_ X'*fZ+k”WCּs Ý _=l>$ٹ#WTOGOGp[`0W'=?Ǡw\"zi+'Z{7Μ r7/_ZAˋfeTxoW@Ps&on?MM(WT ֥y E 6!ßon7?ҿ?>zr[ Ƿ7?y򆘦<^\۽bꅅ Wuov>ZBݩ>SV'_]:2@W_?6Zd~|t󯰲S_:w5w~O_7;GL7H^츹kfamo>xtv!޳+O=`F`]7^\9xɉ-o8ee~¯oo iWԿ=4!MU3A~1?@KOa}`~H/7737?>o(2A_?{u'>7 `==Wpi}dϧ'v.Ⱦ2Y^<ӇXyy~~{'6~u+h ë >q^!eV w2{*wξ ?pf/+po?>+a%,-G!xs{ UziN:Lȉj?bFbFZ`X!C_5 lfUHv#H{ y*ϊa-Xc \|(:mJ[}pwwK\ӻ^7#`@jE f{&0HaOeR^b:"8r G#Rτ%P>-Z[XhWCC VAGL[X _DGY36ؘs`AX@z?6e_4B+LI=88hY X"=G1"978H3X˄ ۦ { nfh !l8t~C)yyޞoՙoo-Hu,k-Te5ʈfFK\{Hpehu?" GDÆGZK'h?D⡕B>,,7ug'H= `ı} /Q@60,lk1'!l"F?M!H \2nha?h"?͈+#Ă'?[BX?Z'$V} e@)ii@:TZVJ@, \͌o'zM[{@D}3<bhT``4Ӥ(IENDB` cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-0.5MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,movevDistance-25Master,scalebottomDistanceMaster,expectedRect336,358,464,392Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaletopDistanceMaster,moveHAbsolutefalseMaster,scaleleftDistance Master,moveHtrue cREVGeneralscriptChecksum`}^.e bookmarks revUniqueID 1206184986856 handlerList mouseDownscriptSelection char 13 to 12 prevHandler tempScriptscript

on mouseDown

revGoUrl "http://www.sosmartsoftware.com"

end mouseDown

 ToplevelhExon mouseUp if the hilite of me then topLevel this stack else set the style of this stack to "modeless" end mouseUp iR1Check this box to access all objects and scripts cREVGeometryMaster,scaleBottomObjectSideBottomMaster,moveVObjectSidebottomMaster,movehDistancefalseMaster,scaleBottomscaleBottomtrueMastertrueMaster,moveVObjectRefcardMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutefalseMaster,moveVAbsolutetrueMaster,scaleBottomfalse Master,moveVtrueMaster,expectedRect18,301,100,324Master,scalebottomDistance-0.04Master,movevDistance-28Master,scalerightDistanceMaster,cardRanking1Master,scaleleftDistanceMaster,scaletopDistance cREVGeneral bookmarks revUniqueID 1206185341531 handlerListmouseUp prevHandlermouseUp tempScriptscriptSelection char 11 to 10script PaypalcKon mouseUp revGoUrl UrlDecode(the uPaypalURL of this stack) end mouseUp f>CClick here to support development by making a donation with Paypal^D Donate... cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-60MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,expectedRect699,362,781,385Master,scalebottomDistanceMaster,movevDistance-27Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,moveHAbsolutetrueMaster,scaleleftDistanceMaster,scaletopDistance Master,moveHtrue cREVGeneral bookmarks revUniqueID 1206185406820 handlerListmouseUpscriptSelection char 47 to 46 prevHandlermouseUp tempScriptscript Basicsi$"' cREVGeneral revUniqueID 1206190911082  Label Field )`(& cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-75Master,expectedRect 40,38,760,190Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-40Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVGeneral bookmarks revUniqueID 1206185693641 handlerList prevHandler tempScriptscript #How-To Stack #024 by Eric Chatonet @"  04/01/08: Initial release. @ .04/02/08: Modified Bonus sub-section example. @- '04/02/08: Modified DragEnter comments. @& b04/13/08: Added in the 'From Rev' section an example about how to modify dragged text on-the-fly. @a 04/14/08: Added a method to create on-the-fly a drag image with transparency of a control. see Using Rev 2.9 sub-section of Into one Rev Window section. @_ @_ @l @| @  WThis stack shows you how to manage Drag and Drop. Some features need Rev 2.9 or later. @E @E @L vIf you run a prior version, you have been already warned: Rev Error dialog may show up but it's not a real problem... @u !All scripts are fully commented. @ Enjoy! @ @ Note:   1. When checked, the TopLevel check box at the bottom left of this window allows you to access all objects and scripts easily.   a =2. This window can be enlarged to read comments more easily. < @ " How is organized this tutorial? @1600   @ 1. Basics 2. Into one Rev window  2.1 Using the grab command ! 2.2 Using the mouseDown message 2.3 Using Rev 2.9 new features 5 2.4 Bonus: dragging and droping between list fields 3. Between two Rev windows 4. From Rev 5. Towards Rev @  Brief history @1600  @ @ Drag and Drop was invented by Apple (system 7) in the very beginning of the nineties and, at this time, allowed mainly to drag and drop a file icon on an application or a printer one to open the file or print it. @ @ Later this very visual way of doing has been generalized to exchange data between applications or within an application, in the same window or not to perform many different actions like reorganizing for instance. @ Data that may be dragged and dropped are very numerous: a chunk of text, an image, a file, a whole folder or even any custom representation of any kind of data. @: @: @G @L @Q @U @Y @c @i7 @ zUsing Drag and Drop is of great advantage because actually it performs a sophisticated action using a very simple method. @y   Drag and Drop basics @1600   lWith Rev prior to 2.9 Drag and Drop could be handled using the following function, messages and properties:   V  \. DragSource function Returns the long ID of the object that dragged data was dragged from.    glossary/Writing_Tr/22.xml  glossary/Objects_an/438.xml1 7$ [. DragStart message Sent to a control when the user clicked on it and then started to drag    F % the mouse pointer (changed in 2.9)    ]. DragEnter message Sent when the mouse pointer moves into an object during a drag and drop.     glossary/User_Inter/296.xml" / glossary/Objects_an/438.xml> D glossary/User_Inter/32.xmlN [ _. DragLeave message Sent when the mouse pointer moves out of an object during a drag and drop.     glossary/User_Inter/296.xml" / glossary/Objects_an/438.xml@ F glossary/User_Inter/32.xmlP ] [. DragDrop message Sent to the object where data was dropped when a drag and drop finishes     glossary/Objects_an/438.xml % glossary/User_Inter/32.xmlD Q M. DragMove message Sent when the user moves the mouse during a drag and drop    , glossary/User_Inter/32.xml? \. DragEnd message Sent to the object a drag and drop started from, when the data is dropped     glossary/Objects_an/438.xml $ glossary/User_Inter/32.xml' 4' P. DragData property Specifies what data is being dragged during a drag and drop    ;  (changed in 2.9)   ^. DragDestination property Returns the long ID of the object that dragged data was dropped on    glossary/Writing_Tr/22.xml " glossary/Objects_an/438.xml6 <!  XTo perform custom Drag and Drop (dragging any control) Rev provides a specific command:     8  E. Grab command Causes an object to follow the movements of the mouse     glossary/Objects_an/438.xml % pIn addition, Rev provides two commands and two properties that can be used to simulate Drag and Drop by script: o  0. Drag command Simulates a mouse click and drag     Y. DragSpeed property Use the dragSpeed property to control the speed of the drag command     glossary/Values_and/68.xml' / dictionary/command/2093.xmlL P glossary/Writing_Tr/522.xmlQ <. Move command Moves an object from one location to another     glossary/Objects_an/438.xml  [. MoveSpeed property Use the moveSpeed property to change the speed of animation performed     glossary/Values_and/68.xml' /+  with the move command  dictionary/command/1133.xml   glossary/Writing_Tr/522.xml New properties have been added in Rev 2.9 that make Drag and Drop easier to handle and compliant with usual guidelines on any platform:   ) 4 AF  `. DragAction property Specifies what action will be performed upon an object when it is dragged    I c. DragDelta property Specifies the distance the pointer must be moved to initialise drag behaviour    M Z. DragImage property Reports the id of an image that should be used to represent the drag    D operation ]. DragImageOffset property Specifies the placement of the drag image when dragging an object    A l. AllowableDragActions property Reports a list of actions that the source application will act upon for the    K  current drag-drop operation OClick on a link to open Rev dictionary (may not work with old versions of Rev) N @ `'@ Flche2.png  PNG  IHDR Kpl_ pHYs  gAMA|Q cHRMz%u0`:o_FIDATxb?,Xv$ϯ.?~~e'P#@11 @?~23_k_?V@p /÷>|()%ţ,%-F2\@ *n w JU牓/_ o_ū(II` b`AM]Nk5 _ ,?d+@021~K?@fӬ ~W XXY};w<||| ߿}Kw^W@koǑ74;Gڷo_߿uLL7qe`&Fqϟ_sPuFFfbA8`(10r=zk~ TxNP`=l|,IENDB` cREVGeneral revUniqueID 1206267906858 LimitsK\( cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-76Master,expectedRect348,40,768,324Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-32Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVGeneral revUniqueID 1206289700005D PaypalDonateTYon mouseUp put "https://www.paypal.com/xclick/business=payments%40tactilemedia.com&item_name=Support+for+Revolution+List+Reordering+Code&no_shipping=1&return=http%3a//www.tactilemedia.com/payments/paid.html&no_note=1&tax=0&handling=0&shipping=0¤cy_code=USD" into tURL if "Mac" is in platform() then put "open location" && quote & tURL & quote into s do s as AppleScript else set the hideConsoleWindows to true if ("NT" is in systemVersion()) or (word 2 of systemVersion() > 4.89) then put quote & tURL & quote into tURL set the shellCommand to "cmd.exe" put quote & quote into T get shell("start" && T && tURL) else # LAUNCH ON OLD WINDOWS put the tempName into tPath set itemDel to "/" put "tactile.htm" into last item of tPath put createHTML(tURL) into url ("file:" & tPath) replace "/" with "\" in tPath get shell("start" && quote & tPath & quote) end if end if end mouseUp function createHTML tURL put \ "" & return &\ "" & return &\ "" & return &\ " " & return &\ "" & return &\ "" & return &\ "" & return &\ "" into tCode return tCode end createHTML  hhNNnn22WW$$HHssAApp44ffDDee||ppVVvv!!XX""66MMn>4                                                                                    J cREVGeneralscriptChecksumBD7;,&Ud revUniqueID 1206438729762 bookmarks handlerListmouseUp createHTMLscriptSelectionchar 724 to 723 prevHandlermouseUp tempScriptscriptGReal Drag and Dropa$#5& cREVGeneral revUniqueID 1206440642103 EInfo1)p8on linkClicked pLink revGoUrl pLink end linkClicked ('- cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-75Master,expectedRect 40,39,341,325Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVGeneralscriptChecksum)֜B3(=@ bookmarks revUniqueID 1206440625610 handlerList linkClickedscriptSelection char 38 to 37 prevHandler linkClicked tempScriptscript

on linkClicked pLink

revGoUrl pLink

end linkClicked

 Real Drag and Drop  WCaution: This section needs Rev 2.9 or later or you'll get errors with prior versions.    ,* if grab or mouseDown allow to implement drag and drop in a single Rev window, real Drag and Drop involves to exchange many kinds of data between windows and applications (including the desktop). @1600         @1600 IInto one Rev windowaThis is a handler that has been put higher in the hierarchy to be triggered in all cases --------------------------------- on dragMove pX,pY if "button" is in the dragSource then set the threeD of img "Drop4" to not (pX,pY is within the rect of img "Drop4") -- highlights or not the drop area according to the mouse position -- pX and pY parameters are sent by the engine end if end dragMove < cREVGeneralscriptChecksum(^"6QT revUniqueID 1206441551383 bookmarks handlerListdragMove tempScript prevHandlerdragMovescriptSelectionchar 389 to 388scriptE

This is a handler that has been put higher in the hierarchy to be triggered in all cases

---------------------------------

on dragMove pX,pY

if "button" is in the dragSource then

set the threeD of img "Drop4" to not (pX,pY is within the rect of img "Drop4")

-- highlights or not the drop area according to the mouse position

-- pX and pY parameters are sent by the engine

end if

end dragMove

Grabi$4 cREVGeneral bookmarks revUniqueID 1206288329016 handlerList prevHandler tempScriptscript+ Show ScriptEp@on mouseUp edit the script of grp "GrabWebPages" end mouseUp $d} cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-102MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,movevDistance-97Master,scalebottomDistanceMaster,expectedRect648,303,748,326Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneralscriptChecksum3p>p-vRMr bookmarks revUniqueID 1206353911525 handlerListmouseUpscriptSelection char 63 to 62 prevHandlermouseUp tempScriptscript

on mouseUp

edit the script of grp "GrabWebPages"

end mouseUp

) Label Field ssssss~x8 cREVTable currentview+Drag and drop here a web page from the left cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect634,220,762,256Master,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneral revUniqueID 1206352682893 Drag and drop here a web page from the left'Drop p9on mouseUp set the text of me to empty end mouseUp zz` cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect634,122,762,218Master,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneralscriptChecksum8Љ}KS bookmarks revUniqueID 1206352303859 handlerListmouseUpscriptSelection char 53 to 52 prevHandlermouseUp tempScriptscript

on mouseUp

set the text of me to empty

end mouseUp

Info2)`(A- cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-75Master,expectedRect 40,39,341,325Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVGeneralscriptChecksumُ B~ revUniqueID 1206288308878 bookmarks handlerList tempScript prevHandler linkClickedscriptSelection char 1 to 0script

 *Dragging and dropping into one Rev window ) fUse the option menu above to display other methods and; especially, new ones allowed in 2.9 or later. e When having to make a custom Drag and Drop process in the same window, using the Grab command is an easy way to achieve the goal with a few lines of code. @1600  3 5 G O b: local lSourceLoc

-- script local variable set at mouseEnter and used at mouseUp

-------------------------

on mouseDown

grab the target -- this line makes the job

end mouseDown

-------------------------

on mouseUp

local tRightPlaceFlag

-----

put the mouseLoc is within the rect of img "Drop" into tRightPlaceFlag

if tRightPlaceFlag then

set text of img "Drop" to the text of image ID (the icon of the target)

-- displays chosen thumbnail by reference to the ID of the image set as the target's icon

-- this way of doing allows to display the same image as many times as needed from a single stored image

end if

-----

set the threeD of the target to true

-- unhighlights the thumbnail

if not tRightPlaceFlag then beep

set the loc of the target to lSourceLoc

-- put back the thumbnail

end mouseUp

-------------------------

on mouseEnter

put the loc of the target into lSourceLoc

-- stores the thumbnail position

end mouseEnter

-------------------------

on dragStart

set the threeD of the target to false -- highlights the thumbnail

end dragStart

-------------------------

TButtonjB '8B22 cREVGeneral revUniqueID 1206447635537  UButtonjB 'rB23 cREVGeneral revUniqueID 1206447866066  VButtonjB 'B24 cREVGeneral revUniqueID 1206447882829  WButtonjB 'B25 cREVGeneral revUniqueID 1206447898640  , MouseDowna$#& cREVGeneral revUniqueID 1206370167031 bookmarks handlerList tempScript prevHandlerscript=il@ cREVGeometry Master,expectedRect644,223,752,286Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1206378065028 < Label Field d cREVTable currentview Move Speed cREVGeneral revUniqueID 1206377962895 Move Speed9 MoveSpeedad$y@(@(1400 cREVGeometry Master,expectedRect648,246,748,282Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-0.1275Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking0Master,scaleleftDistanceMaster,moveHAbsolutefalseMaster,scaletopDistance Master,moveHfalse cREVGeneral revUniqueID 1206377662485- Show ScriptEp>on mouseUp edit the script of grp "Boundaries" end mouseUp $d{ cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-102MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,expectedRect648,303,748,326Master,scalebottomDistanceMaster,movevDistance-97Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksum.v>qqbE revUniqueID 1206370178682 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelection char 48 to 47script

on mouseUp

edit the script of grp "Boundaries"

end mouseUp

/ Label Field ssssss~x8 cREVTable currentview+Drag and drop here a web page from the left cREVGeometry Master,expectedRect634,220,762,256Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1206370178684 Drag and drop here a web page from the left0Drop2 p7on mouseUp set the text of me to empty end mouseUp zz` cREVGeometry Master,expectedRect634,122,762,218Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksum*on mouseUp

set the text of me to empty

end mouseUp

1Info3)`(A- cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,expectedRect 40,39,341,325Master,scalebottomDistance-75Master,movevDistancefalseMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaleleftDistanceMaster,scaletopDistance cREVGeneralscriptChecksumُ B~ revUniqueID 1206370178686 bookmarks handlerList tempScript prevHandler linkClickedscriptSelection char 1 to 0script

 *Dragging and dropping into one Rev window ) < If grab is easy to use, it does not provide all features you might want because you don't know in real time where is the grabbed object and, above all, because many messages regarding to Drag and Drop are not actually sent by the engine in this configuration: dragMove, dragEnter, dragLeave, dragEnd and dragDrop. @1600        $ & - 2 : VSo another way, needing a bit more scripting, might appear better by using mouseDown. K K T AAs the previous, this method is compatible with any Rev version. @ In this second example:   W Thumbnails moves are mastered within boundaries that are those of their owner group. @1600  T Thumbnails are put back into their original location using the move command when the Drag and Drop is not done in the right location and move duration depends on the slider value (set in milliseconds). @1600  ? A E X Thumbnails layers are reordered to ensure that the chosen thumbnail is always on top. @1600    !6 + The cursor changes to reassure the user. @1600     ~Compared to the grab version, you can see that Rev allows multiple methods and there is always a way to enhance a process :-) } Vocabulary needed:  OClick on a link to open Rev dictionary (may not work with old versions of Rev) N   mouseDown message @1600     target function @1600     move command @1600     location property @1600   2 top, bottom, left, right and topLeft properties @1600           &  mouseH and mouseV properties @1600        cursor property @1600    , layer and relayerGroupedControls property @1600      " P `DB3 Boundaries i0 on mouseDown local tRelMousePos,tDragEnterFlag ----- put the left of the target - the mouseH,the top of the target - the mouseV into tRelMousePos -- stores mouse position relative to the target MoveThumbToFront -- see below set the threeD of the target to false -- highlights thumbnail ----- repeat while the mouse is down if the top of the target <= the top of the owner of the target then set the loc of the target to item 1 of the loc of the target,item 2 of the loc of the target + 1 set the screenMouseLoc to globalLoc(the mouseH & comma & (the mouseV + 1)) -- moves the target by one pixel to put it back within the boundaries -- setting the screenMouseLoc is necessary to avoid recursion effects else if the bottom of the target >= the bottom of the owner of the target then set the loc of the target to item 1 of the loc of the target,item 2 of the loc of the target - 1 set the screenMouseLoc to globalLoc(the mouseH & comma & (the mouseV - 1)) else if the left of the target <= the left of the owner of the target then set the loc of the target to item 1 of the loc of the target + 1,item 2 of the loc of the target set the screenMouseLoc to globalLoc((the mouseH + 1) & comma & the mouseV) else if the right of the target >= the right of the owner of the target then set the loc of the target to item 1 of the loc of the target - 1,item 2 of the loc of the target set the screenMouseLoc to globalLoc((the mouseH - 1) & comma & the mouseV) else set the topleft of the target to (the mouseH + item 1 of tRelMousePos),(the mouseV + item 2 of tRelMousePos) -- moves the target: kind of scripted grab command end if ----- set the blendLevel of the target to 25 put (the mouseLoc is within the rect of img "Drop2") into tDragEnterFlag -- tDragEnterFlag will be true or false set the threeD of img "Drop2" to not tDragEnterFlag -- highlights drop area if needed if tDragEnterFlag then set the cursor to 1131 else set the cursor to arrow -- changes cursor end repeat ----- now the mouse is up if the mouseLoc is within the rect of img "Drop2" then set text of img "Drop2" to the text of image ID (the icon of the target) -- displays chosen thumbnail by reference to the ID of the image set as the target's icon -- this way of doing allows to display the same image as many times as needed from a single stored image set the loc of the target to the uLoc of the target -- location is here stored in a custom property in the thumbnail itself else move the target to the uLoc of the target in (the thumbPos of sb "MoveSpeed") milliseconds without waiting -- put the target back at its source location using the move command -- location is here stored in a custom property in the thumbnail itself beep end if ----- reset: set the blendLevel of the target to 0 set the threeD of img "Drop2" to true set the threeD of the target to true end mouseDown ------------------------- on MoveThumbToFront -- sets the layer of the selected thumbnail on-the-fly local tRightLayer ----- put the layer of the owner of the target + the number of btns in the owner of the target into tRightLayer -- the layer of group's last button = the frontmost one set the relayerGroupedControls to true -- compulsory to change the layer of an object belonging to a group set the layer of the target to tRightLayer set the relayerGroupedControls to false end MoveThumbToFront d' cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMaster,scaleRightscaleBottomtrueMastertrueMaster,scaleleftObjectRef 1206288308878Master,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,scaleleftObjectSiderightMaster,movevDistancefalseMaster,scalebottomDistance-76Master,expectedRect348,34,774,334Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-25Master,scaleleftAbsolutetrueMaster,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,scalelefttrueMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance15 cREVGeneral scriptChecksumV{yQ1MW]yNQ breakPoints handlerListmouseDown MoveThumbToFrontscriptSelectionchar 3560 to 3559 bookmarks revUniqueID 1206370178687 prevHandler mouseEnter tempScriptscript.U

on mouseDown

local tRelMousePos,tDragEnterFlag

-----

put the left of the target - the mouseH,the top of the target - the mouseV into tRelMousePos

-- stores mouse position relative to the target

MoveThumbToFront -- see below

set the threeD of the target to false -- highlights thumbnail

-----

repeat while the mouse is down

if the top of the target <= the top of the owner of the target then

set the loc of the target to item 1 of the loc of the target,item 2 of the loc of the target + 1

set the screenMouseLoc to globalLoc(the mouseH & comma & (the mouseV + 1))

-- moves the target by one pixel to put it back within the boundaries

-- setting the screenMouseLoc is necessary to avoid recursion effects

else if the bottom of the target >= the bottom of the owner of the target then

set the loc of the target to item 1 of the loc of the target,item 2 of the loc of the target - 1

set the screenMouseLoc to globalLoc(the mouseH & comma & (the mouseV - 1))

else if the left of the target <= the left of the owner of the target then

set the loc of the target to item 1 of the loc of the target + 1,item 2 of the loc of the target

set the screenMouseLoc to globalLoc((the mouseH + 1) & comma & the mouseV)

else if the right of the target >= the right of the owner of the target then

set the loc of the target to item 1 of the loc of the target - 1,item 2 of the loc of the target

set the screenMouseLoc to globalLoc((the mouseH - 1) & comma & the mouseV)

else

set the topleft of the target to (the mouseH + item 1 of tRelMousePos),(the mouseV + item 2 of tRelMousePos)

-- moves the target: kind of scripted grab command

end if

-----

set the blendLevel of the target to 25

put (the mouseLoc is within the rect of img "Drop2") into tDragEnterFlag

-- tDragEnterFlag will be true or false

set the threeD of img "Drop2" to not tDragEnterFlag -- highlights drop area if needed

if tDragEnterFlag then set the cursor to 1131

else set the cursor to arrow

-- changes cursor

end repeat

----- now the mouse is up

if the mouseLoc is within the rect of img "Drop2" then

set text of img "Drop2" to the text of image ID (the icon of the target)

-- displays chosen thumbnail by reference to the ID of the image set as the target's icon

-- this way of doing allows to display the same image as many times as needed from a single stored image

set the loc of the target to the uLoc of the target

-- location is here stored in a custom property in the thumbnail itself

else

move the target to the uLoc of the target in (the thumbPos of sb "MoveSpeed") milliseconds without waiting

-- put the target back at its source location using the move command

-- location is here stored in a custom property in the thumbnail itself

beep

end if

----- reset:

set the blendLevel of the target to 0

set the threeD of img "Drop2" to true

set the threeD of the target to true

end mouseDown

-------------------------

on MoveThumbToFront -- sets the layer of the selected thumbnail on-the-fly

local tRightLayer

-----

put the layer of the owner of the target + the number of btns in the owner of the target into tRightLayer

-- the layer of group's last button = the frontmost one

set the relayerGroupedControls to true

-- compulsory to change the layer of an object belonging to a group

set the layer of the target to tRightLayer

set the relayerGroupedControls to false

end MoveThumbToFront

`ButtonjB 'redB2uLoc432,2555 cREVGeneral revUniqueID 1206448678984  ]ButtonjB 'redrB2uLoc432,1393 cREVGeneral revUniqueID 1206448379654  ^ButtonjB 'redB2uLoc432,1974 cREVGeneral revUniqueID 1206448379655 bookmarks handlerListmouseUp tempScript prevHandlerscript  fButtonjB 'red8B2uLoc432,812 cREVGeneral revUniqueID 1206456435319  OBonusa$; cREVGeneral revUniqueID 1206442310072 PInfo4)pMon linkClicked pLink switch pLink case "Get In Line" revGoUrl "http://www.tactilemedia.com/download/" break case "DragDropList" revGoUrl "http://www.geocities.com/janschenkel/" break case "Dragging with ListFields" revGoUrl "http://www.sanke.org/MetaMedia/SamplesTools.htm" end switch end linkClicked (A- cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,expectedRect 40,39,341,325Master,scalebottomDistance-75Master,movevDistancefalseMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaleleftDistanceMaster,scaletopDistance cREVGeneralscriptChecksum& JH6W>l\ revUniqueID 1206442057900 bookmarks handlerList linkClicked tempScript prevHandler linkClickedscriptSelection char 36 to 35script

on linkClicked pLink

switch pLink

case "Get In Line"

revGoUrl "http://www.tactilemedia.com/download/"

break

case "DragDropList"

revGoUrl "http://www.geocities.com/janschenkel/"

break

case "Dragging with ListFields"

revGoUrl "http://www.sanke.org/MetaMedia/SamplesTools.htm"

end switch

end linkClicked

 *Dragging and dropping into one Rev window ) qAnother kind of nice Drag and Drop may be used to reorder a list field or pass data from a field to another one. 2 2 F J% o 2See all following nice stuff that might help you:  Get In Line by Scott Rossi @1600        DragDropList by Jan Schenkel @1600     ' Dragging with ListFields by W. Sanke @1600       aEven if these stacks do not use Rev Drag and Drop 2.9 new features, they are really interesting. ` Example on the right uses Rev 2.9 new features to allow Drag and Drop of a line from a field into another one using the Move, Copy or Clear mode. 8 85 m x } ~    PNote that Clear mode is pure scripting and does not exist as a dragAction mode.    0 ? I  You might be interested, by comparing with the stacks linked above, in how these new features are able to simplify your code :-)   `DB List Fieldsio3 cREVGeometry Master,expectedRect402,62,741,342Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-0.28625Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking0Master,scaleleftDistanceMaster,moveHAbsolutefalseMaster,scaletopDistance Master,moveHfalse cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1207052192647 handlerListscriptSelection char 1 to 0 prevHandler dragEnter tempScriptscript

,i!$ cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect 523,33,680,69Master,movehDistance-228Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneral revUniqueID 1207149985834 - Label Field %Y cREVTable currentview Drag Action: cREVGeneral revUniqueID 1206622570897 Drag Action:.DDMode2 e@&LdModify drag action and see how the cursor changes and how D&D can be done according to this settingxMoveMove Copy Clear cREVGeneral revUniqueID 1206622570898   ListField17)pActually both fields have the same script: Of course some handlers could be reported in a higher object But understanding would have been more difficult :-) ---------------------------------- local lLineNo -- script local variable ---------------------------------- on mouseEnter set the dragDelta to 10 set the uCurField of this cd to the short name of the target -- this custom prop allows to know which field may initiate drag and drop -- the goal is to prevent an auto drag and drop: see DropAllowed() function end mouseEnter ---------------------------------- on dragMove -- sent repeatedly when the dragdata is within the field local tContents,tHilitedText ----- if DropAllowed() and the dragAction <> "None" then -- see below put (the mouseV - the top of the target) div the effective textheight of the target into lLineNo -- line number if lLineNo > the number of lines of the target then put the number of lines of the target into lLineNo ----- lock screen put StripCR(me) into tContents -- see below put the hilitedText of the target into tHilitedText -- stores highlighted line put cr after line lLineNo of tContents -- creates a blank line set the text of the target to tContents set the hilitedLine of the target to lineOffset(tHilitedText,tContents) -- restores highlighted line unlock screen end if end dragMove ---------------------------------- on DragLeave -- restores current contents if DropAllowed() then -- see below lock screen put the hilitedLine of the target into tHilitedLine put StripCR(me) into the target -- set the hilitedLine of the target to tHilitedLine unlock screen end if end DragLeave ---------------------------------- on dragEnter if DropAllowed() then -- see below switch the menuHistory of btn "DDMode2" case 1 set the dragAction to "Move" break case 2 set the dragAction to "Copy" break default set the dragAction to "None" end switch end if end dragEnter ---------------------------------- on dragDrop local tContents ----- if DropAllowed() then -- see below put StripCR(me) into tContents -- see below if lLineNo = 0 then put the dragdata["text"] & cr before tContents else put cr & the dragdata["text"] after line lLineNo of tContents end if lock screen set the text of the target to tContents set the hilitedLine of the target to lLineNo + 1 -- sets highlighted line to dropped line unlock screen end if ----- if the menuHistory of btn "DDMode2" = 1 then -- move mode if the short name of the target = "ListField1" then delete line (the hilitedLine of fld "ListField2") of fld "ListField2" else delete line (the hilitedLine of fld "ListField1") of fld "ListField1" end if end if mouseEnter -- end dragDrop ---------------------------------- function StripCR pText -- returns 'normal' field's contents if char 1 of pText = cr then delete char 1 of pText if char -1 of pText = cr then delete char -1 of pText replace cr & cr with cr in pText return pText end StripCR --------------------------------- function DropAllowed return the uCurField of this cd <> the short name of the target end DropAllowed --------------------------------- on dragStart set the dragData["text"] to the selectedText -- plain text put the selectedText of the target into fld "Temp" -- in order to create the right image set the dragImage to CreateDragImage() -- see below set the dragImageOffset to the width of last image div 2,the height of last image div 2 -- centered end dragStart --------------------------------- on dragEnd delete last image -- we no longer need the drag image if the menuHistory of btn "DDMode2" = 3 then -- clear mode delete line (the hilitedLine of the target) of the target end if end dragEnd --------------------------------- function CreateDragImage -- creates drag image on-the-fly local tRect,tempImage ----- put the rect of fld "Temp" into tRect ----- export snapshot from rect tRect of this cd to tempImage as jpeg -- export image to a variable lock messages -- important to speed up the process create invisible image -- we don't want to see it set the text of last image to tempImage if there is an image ID 6001 then delete image ID 6001 set the ID of last image to 6001 -- setting dimensions unlock messages return the ID of last image -- we need it to set the dragImage property end CreateDragImage Bj cREVGeometry Master,expectedRect399,66,505,228Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-348Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksumJGtk'Wy bookmarks revUniqueID 1207050755042 handlerListfmouseEnter dragMove DragLeave dragEnter dragDrop StripCR DropAllowed dragStart dragEnd CreateDragImagescriptSelection char 1 to 0 prevHandlerdragEnd tempScriptscript?

Actually both fields have the same script:

Of course some handlers could be reported in a higher object

But understanding would have been more difficult :-)

----------------------------------

local lLineNo -- script local variable

----------------------------------

on mouseEnter

set the dragDelta to 10

set the uCurField of this cd to the short name of the target

-- this custom prop allows to know which field may initiate drag and drop

-- the goal is to prevent an auto drag and drop: see DropAllowed() function

end mouseEnter

----------------------------------

on dragMove -- sent repeatedly when the dragdata is within the field

local tContents,tHilitedText

-----

if DropAllowed() and the dragAction <> "None" then -- see below

put (the mouseV - the top of the target) div the effective textheight of the target into lLineNo -- line number

if lLineNo > the number of lines of the target then put the number of lines of the target into lLineNo

-----

lock screen

put StripCR(me) into tContents -- see below

put the hilitedText of the target into tHilitedText -- stores highlighted line

put cr after line lLineNo of tContents -- creates a blank line

set the text of the target to tContents

set the hilitedLine of the target to lineOffset(tHilitedText,tContents) -- restores highlighted line

unlock screen

end if

end dragMove

----------------------------------

on DragLeave -- restores current contents

if DropAllowed() then -- see below

lock screen

put the hilitedLine of the target into tHilitedLine

put StripCR(me) into the target --

set the hilitedLine of the target to tHilitedLine

unlock screen

end if

end DragLeave

----------------------------------

on dragEnter

if DropAllowed() then -- see below

switch the menuHistory of btn "DDMode2"

case 1

set the dragAction to "Move"

break

case 2

set the dragAction to "Copy"

break

default

set the dragAction to "None"

end switch

end if

end dragEnter

----------------------------------

on dragDrop

local tContents

-----

if DropAllowed() then -- see below

put StripCR(me) into tContents -- see below

if lLineNo = 0 then

put the dragdata["text"] & cr before tContents

else

put cr & the dragdata["text"] after line lLineNo of tContents

end if

lock screen

set the text of the target to tContents

set the hilitedLine of the target to lLineNo + 1 -- sets highlighted line to dropped line

unlock screen

end if

-----

if the menuHistory of btn "DDMode2" = 1 then -- move mode

if the short name of the target = "ListField1" then

delete line (the hilitedLine of fld "ListField2") of fld "ListField2"

else

delete line (the hilitedLine of fld "ListField1") of fld "ListField1"

end if

end if

mouseEnter --

end dragDrop

----------------------------------

function StripCR pText -- returns 'normal' field's contents

if char 1 of pText = cr then delete char 1 of pText

if char -1 of pText = cr then delete char -1 of pText

replace cr & cr with cr in pText

return pText

end StripCR

---------------------------------

function DropAllowed

return the uCurField of this cd <> the short name of the target

end DropAllowed

---------------------------------

on dragStart

set the dragData["text"] to the selectedText -- plain text

put the selectedText of the target into fld "Temp" -- in order to create the right image

set the dragImage to CreateDragImage() -- see below

set the dragImageOffset to the width of last image div 2,the height of last image div 2 -- centered

end dragStart

---------------------------------

on dragEnd

delete last image -- we no longer need the drag image

if the menuHistory of btn "DDMode2" = 3 then -- clear mode

delete line (the hilitedLine of the target) of the target

end if

end dragEnd

---------------------------------

function CreateDragImage -- creates drag image on-the-fly

local tRect,tempImage

-----

put the rect of fld "Temp" into tRect

-----

export snapshot from rect tRect of this cd to tempImage as jpeg

-- export image to a variable

lock messages -- important to speed up the process

create invisible image -- we don't want to see it

set the text of last image to tempImage

if there is an image ID 6001 then delete image ID 6001

set the ID of last image to 6001

-- setting dimensions

unlock messages

return the ID of last image -- we need it to set the dragImage property

end CreateDragImage

Line 1 Line 2 Line 3 Line 4 Line 5 Line 6  ListField27)p local lLineNo ---------------------------------- on mouseEnter set the dragDelta to 10 set the uCurField of this cd to the short name of the target end mouseEnter ---------------------------------- on dragMove local tContents,tHilitedText ----- if DropAllowed() and the dragAction <> "None" then -- see below put (the mouseV - the top of the target) div the effective textheight of the target into lLineNo -- line number if lLineNo > the number of lines of the target then put the number of lines of the target into lLineNo ----- lock screen put StripCR(me) into tContents put the hilitedText of the target into tHilitedText put cr after line lLineNo of tContents set the text of the target to tContents set the hilitedLine of the target to lineOffset(tHilitedText,tContents) unlock screen end if end dragMove ---------------------------------- on DragLeave if DropAllowed() then lock screen put the hilitedLine of the target into tHilitedLine put StripCR(me) into the target -- set the hilitedLine of the target to tHilitedLine unlock screen end if end DragLeave ---------------------------------- on dragEnter if DropAllowed() then switch the menuHistory of btn "DDMode2" case 1 set the dragAction to "Move" break case 2 set the dragAction to "Copy" break default set the dragAction to "None" end switch end if end dragEnter ---------------------------------- on dragDrop local tContents ----- if DropAllowed() then put StripCR(me) into tContents if lLineNo = 0 then put the dragdata["text"] & cr before tContents else put cr & the dragdata["text"] after line lLineNo of tContents end if lock screen set the text of the target to tContents set the hilitedLine of the target to lLineNo + 1 unlock screen end if ----- if the menuHistory of btn "DDMode2" = 1 then if the short name of the target = "ListField1" then delete line (the hilitedLine of fld "ListField2") of fld "ListField2" else delete line (the hilitedLine of fld "ListField1") of fld "ListField1" end if end if mouseEnter -- end dragDrop ---------------------------------- function StripCR pText if char 1 of pText = cr then delete char 1 of pText if char -1 of pText = cr then delete char -1 of pText replace cr & cr with cr in pText return pText end StripCR --------------------------------- function DropAllowed return the uCurField of this cd <> the short name of the target end DropAllowed --------------------------------- on dragStart set the dragData["text"] to the selectedText put the selectedText of the target into fld "Temp" set the dragImage to CreateDragImage() set the dragImageOffset to the width of last image div 2,the height of last image div 2 end dragStart --------------------------------- on dragEnd delete last image if the menuHistory of btn "DDMode2" = 3 then delete line (the hilitedLine of the target) of the target end if end dragEnd --------------------------------- function CreateDragImage local tRect,tempImage ----- put the rect of fld "Temp" into tRect export snapshot from rect tRect of this cd to tempImage as jpeg lock messages create invisible image set the text of last image to tempImage if there is an image ID 6001 then delete image ID 6001 set the ID of last image to 6001 unlock messages return the ID of last image end CreateDragImage @Bj cREVGeometry Master,expectedRect645,66,751,228Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksum7C  q0U revUniqueID 1207050755043 bookmarks handlerListfmouseEnter dragMove DragLeave dragEnter dragDrop StripCR DropAllowed dragStart dragEnd CreateDragImage tempScript prevHandlerdragEndscriptSelectionchar 2986 to 2985script6

local lLineNo

----------------------------------

on mouseEnter

set the dragDelta to 10

set the uCurField of this cd to the short name of the target

end mouseEnter

----------------------------------

on dragMove

local tContents,tHilitedText

-----

if DropAllowed() and the dragAction <> "None" then -- see below

put (the mouseV - the top of the target) div the effective textheight of the target into lLineNo -- line number

if lLineNo > the number of lines of the target then put the number of lines of the target into lLineNo

-----

lock screen

put StripCR(me) into tContents

put the hilitedText of the target into tHilitedText

put cr after line lLineNo of tContents

set the text of the target to tContents

set the hilitedLine of the target to lineOffset(tHilitedText,tContents)

unlock screen

end if

end dragMove

----------------------------------

on DragLeave

if DropAllowed() then

lock screen

put the hilitedLine of the target into tHilitedLine

put StripCR(me) into the target --

set the hilitedLine of the target to tHilitedLine

unlock screen

end if

end DragLeave

----------------------------------

on dragEnter

if DropAllowed() then

switch the menuHistory of btn "DDMode2"

case 1

set the dragAction to "Move"

break

case 2

set the dragAction to "Copy"

break

default

set the dragAction to "None"

end switch

end if

end dragEnter

----------------------------------

on dragDrop

local tContents

-----

if DropAllowed() then

put StripCR(me) into tContents

if lLineNo = 0 then

put the dragdata["text"] & cr before tContents

else

put cr & the dragdata["text"] after line lLineNo of tContents

end if

lock screen

set the text of the target to tContents

set the hilitedLine of the target to lLineNo + 1

unlock screen

end if

-----

if the menuHistory of btn "DDMode2" = 1 then

if the short name of the target = "ListField1" then

delete line (the hilitedLine of fld "ListField2") of fld "ListField2"

else

delete line (the hilitedLine of fld "ListField1") of fld "ListField1"

end if

end if

mouseEnter --

end dragDrop

----------------------------------

function StripCR pText

if char 1 of pText = cr then delete char 1 of pText

if char -1 of pText = cr then delete char -1 of pText

replace cr & cr with cr in pText

return pText

end StripCR

---------------------------------

function DropAllowed

return the uCurField of this cd <> the short name of the target

end DropAllowed

---------------------------------

on dragStart

set the dragData["text"] to the selectedText

put the selectedText of the target into fld "Temp"

set the dragImage to CreateDragImage()

set the dragImageOffset to the width of last image div 2,the height of last image div 2

end dragStart

---------------------------------

on dragEnd

delete last image

if the menuHistory of btn "DDMode2" = 3 then

delete line (the hilitedLine of the target) of the target

end if

end dragEnd

---------------------------------

function CreateDragImage

local tRect,tempImage

-----

put the rect of fld "Temp" into tRect

export snapshot from rect tRect of this cd to tempImage as jpeg

lock messages

create invisible image

set the text of last image to tempImage

if there is an image ID 6001 then delete image ID 6001

set the ID of last image to 6001

unlock messages

return the ID of last image

end CreateDragImage

Line 7 Line 8 Line 9 Line 10 Line 11 Line 12ResetEpon mouseUp local tList ----- repeat with i = 1 to 12 put "Line" && i & cr after tList end repeat delete last char of tList lock screen set the backColor of fld "Temp" to the effective hiliteColor put empty into fld "Temp" put line 1 to 6 of tList into fld "ListField1" put line 7 to 12 of tList into fld "ListField2" set the hilitedLine of fld "ListField1" to 1 set the hilitedLine of fld "ListField2" to 1 unlock screen end mouseUp R cREVGeometry Master,expectedRect533,248,615,271Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-226Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksumUEC*~?Z revUniqueID 1207050755044 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelectionchar 242 to 241scripte

on mouseUp

local tList

-----

repeat with i = 1 to 12

put "Line" && i & cr after tList

end repeat

delete last char of tList

lock screen

set the backColor of fld "Temp" to the effective hiliteColor

put empty into fld "Temp"

put line 1 to 6 of tList into fld "ListField1"

put line 7 to 12 of tList into fld "ListField2"

set the hilitedLine of fld "ListField1" to 1

set the hilitedLine of fld "ListField2" to 1

unlock screen

end mouseUp

Temp(`$j uDontResizetrue cREVGeometry Master,expectedRect399,292,489,312Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-348Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1207050755045  Label Field 7 uDontResizetrue cREVGeometry Master,expectedRect392,311,600,332Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-304Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVTable currentviewTemplate to create a drag image cREVGeneral revUniqueID 1207050755046 Template to create a drag image Show ScriptEp:on mouseUp edit script of fld "ListField1" end mouseUp $d: cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-102MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,movevDistance-97Master,scalebottomDistanceMaster,expectedRect648,303,748,326Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneral scriptChecksum^f٘d handlerListmouseUp breakPointsscriptSelection char 57 to 56 bookmarks revUniqueID 1207051273280 prevHandlermouseUp tempScriptscript

on mouseUp

edit script of fld "ListField1"

end mouseUp

 Label Field fpD uDontResizetrue cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect392,311,600,332Master,movehDistance-228Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVTable currentview&Exchange data between these two fields cREVGeneral revUniqueID 1207132611517 'Exchange data between these two fieldsRev29aThis is the script used by each thumbnail (source object) written in the group that owns them --------------------------------- on dragStart if "button" is in the target then -- right target set the text of img "Drop4" to empty -- drop area cleanup for demo purpose ----- set the dragImage to the icon of the target -- ID set the dragImageOffset to the width of the target div 2,the height of the target div 2 -- so the drag image is centered under the mouse set the dragData["image"] to the text of img ID (the icon of the target) -- sets the dragged data to image's binaries end if end dragStart --------------------------------- on mouseEnter set the dragDelta to 10 -- drag will begin if the mouse (down) is moved by ten pixels at least end mouseEnter --------------------------------- on dragEnd set the threeD of img "Drop4" to true -- resets drop area border end dragEnd : cREVGeneralscriptChecksumtN JR*] revUniqueID 1206621840687 bookmarks handlerListdragStart mouseEnter dragEnd tempScript prevHandlerdragEndscriptSelectionchar 678 to 677script

This is the script used by each thumbnail (source object) written in the group that owns them

---------------------------------

on dragStart

if "button" is in the target then -- right target

set the text of img "Drop4" to empty -- drop area cleanup for demo purpose

-----

set the dragImage to the icon of the target -- ID

set the dragImageOffset to the width of the target div 2,the height of the target div 2

-- so the drag image is centered under the mouse

set the dragData["image"] to the text of img ID (the icon of the target)

-- sets the dragged data to image's binaries

end if

end dragStart

---------------------------------

on mouseEnter

set the dragDelta to 10

-- drag will begin if the mouse (down) is moved by ten pixels at least

end mouseEnter

---------------------------------

on dragEnd

set the threeD of img "Drop4" to true

-- resets drop area border

end dragEnd

3 Label Field "$0 cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,expectedRect 34,36,778,340Master,scalebottomDistance-60Master,movevDistancefalseMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-22Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking2Master,scaleleftDistanceMaster,scaletopDistance cREVTable currentview cREVGeneral revUniqueID 1206713797233 bookmarks handlerList tempScript prevHandlerscript Info5)pon dragStart end dragStart --------------------------------- on mouseEnter end mouseEnter --------------------------------- on dragEnd end dragEnd (A- cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-75Master,expectedRect 40,39,341,325Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVGeneralscriptChecksumiHQao; revUniqueID 1206621253713 bookmarks handlerListdragStart mouseEnter dragEnd tempScript prevHandler linkClickedscriptSelectionchar 136 to 135script

on dragStart

end dragStart

---------------------------------

on mouseEnter

end mouseEnter

---------------------------------

on dragEnd

end dragEnd

 *Dragging and dropping into one Rev window ) It's child's play to implement drag and drop with Rev 2.9 that take cares of many things for you: cursor, blendlevel, image return when the operation fails and much more.  @1 @2 @9q xAbove all, the drag image is not restricted to the card window boundaries as it is in both previous described methods. @w  In the source object  @1600   Mainly you only need to write a dragStart handler in any control script to initiate a Drag and Drop operation from this control:  )W on dragStart @ @hh"   set the dragImage to  @  @  ' [set the dragImageOffset to ] @  @  @   % set the dragData[] to @ @hh"  @hh"  @  @ @hh"  end dragStart @ @hh"  _. Where is the ID of any image that will be used automatically blended as the drag image.   #0 S ] \Note that if you use an image that has been reduced and locked, Rev uses the reduced image. [ S. Where specifies the cursor hot spot relative to the image when dragging.   -% -So to center the drag image under the mouse: Tset the dragImageOffset to the width of div 2,the height of div 2 @  @  @ % @0 1 @6 : @; B @M N )Setting the dragImageOffset is optional. ( N. Where indicates the data you want to be grabbed to another location:   !, 6The dragData is an array with multiple possible keys:   ) $See the docs fore more information. # . dragdata["html "] . dragdata["rtf"] . dragdata["Unicode"] . dragdata["image"] . dragdata["files"] . dragdata["styles"] . dragdata["private"] ~Last option (private) is interesting to make sure that data will not be able to be accepted by another app but only by yours. }  In the destination area @1600    In such an object (that may be completely transparent but must have its visible property set to true), two handlers are enough to be done: dragEnter and dragDrop:     0The first one allows to accept the drop or not. For instance: on dragEnter @  ) if the dragData["image"] <> empty then  @  @hh" @  @  @$ ! set the dragAction to "copy" @  @   else @ ! set the dragAction to "none" @  @  end if @ end dragEnter @  to not (pX,pY is within the rect of ) @ @  @   @# $ @% + @. 5 @9 > end dragMove @ @  uDragMove is sent repeatedly by the engine and it comes with two parameters that indicate the current mouse location. OOf course it can only be received if the drag image is within the card window. Usually you'll handle this message in the card or the stack script (here it is handled in a group script for 'my' convenience :-) dragEnd  VDragEnd is sent to the object a drag and drop started from, when the data is dropped.  glossary/Objects_an/438.xml  glossary/User_Inter/32.xml -( XWhat the docs don't tell is that you can test the dragData value to know what happened: on dragEnd @   switch the dragdata @hh"" DarkOrchid4 @brown  @red   case "copy" @red @brown  break @black @blue  case "move" @blue @brown    @black @black break @black @blue  case "none" @blue @brown  & $ @black$ end switch @brown @red @brown end dragEnd @   Setting the drag image @1600    LOf course, you can use any image you have put somewhere: it's the simplest. iBut you can also create the drag image on-the-fly as in the Export text example in the From Rev section. < < G W _ There is another nice way to create a drag image including an alpha channel (transparency) from any control using a specific form of the Export Snapshot command: ^export snapshot [from rect[angle] rectangle] [of object] | [from object] to as PNG Example: on dragStart @brown  local tObj  @blue   -----  @hh"" DarkOrchid4 $ put the long name of me into tObj @hh"" DarkOrchid4 @blue  @red  @ darkorange  4 set the dragData["text"] to "Test" -- or whatever  @blue @hh""  @hh""  @red  @black @hh""  @hh""  @hh"" DarkOrchid4% J set the dragImageOffset to the width of me div 2,the height of me div 2 @ @ @hh""  @hh""  @  @hh""  @hh""  @hh""  @! @hh""& ' @hh"") @* @hh"", - @hh""0 1 @2 @hh""6 @7 @hh""= > @hh""@ @A @hh""C D @hh""G H  create invisible image @hh"" @ @hh"" @  Q do "export snapshot from rect (the rect of tObj) of tObj to" && it && "as PNG" @hh"" @blue L $ set the dragImage to the ID of it @blue @  @red @  @hh"" @red @hh""  @hh""  ! end dragStart @  "--------------------------------- @hh""! on dragEnd @   delete last image  @  end dragEnd @  This code snippet creates a 32-bit invisible PNG image with transparency from the dragged control: only opaque parts of the control will be shown: others will stay transparent. +Try to drag the scroll bar on the right... MOf course it's just an example that does nothing but getting you started :-) PSee the scripts for more details about higlighting the drop area, cleanup, etc.  @ Vocabulary needed:  OClick on a link to open Rev dictionary (may not work with old versions of Rev) N @ dragStart, dragEnter, dragEnd, dragDrop, dragMove messages @1600         # + - 5 ? dragData, dragImage, dragImageOffset dragAction properties @1600        ' ) 3 ? `DBiU" cREVGeometry Master,expectedRect 523,33,680,69Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-199Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1206621948402 Show ScriptsEpon mouseUp edit script of grp "Into one Rev Window" edit script of img "Drop4" edit script of grp "Rev29" edit script of sb "Scrollbar" end mouseUp $d9 cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-102MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,expectedRect648,303,748,326Master,scalebottomDistanceMaster,movevDistance-97Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral scriptChecksum=ڥ:aS breakPoints handlerListmouseUpscriptSelectionchar 144 to 143 revUniqueID 1206634523988 bookmarks tempScript prevHandlermouseUpscript

on mouseUp

edit script of grp "Into one Rev Window"

edit script of img "Drop4"

edit script of grp "Rev29"

edit script of sb "Scrollbar"

end mouseUp

9 Label Field ssssss~x8 cREVTable currentview+Drag and drop here a web page from the left cREVGeometry Master,expectedRect634,220,762,256Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1206717656566 Drag and drop here a web page from the left:Drop4 pThis is the script of the drop area (destination object) ------------------------ on mouseUp set the text of me to empty -- cleanup end mouseUp ------------------------ on dragEnter if the dragData["image"] <> empty then set the dragAction to "copy" -- accepts drop of images only else set the dragAction to "none" -- don't accept any drop end if end dragEnter ------------------------ on dragDrop set the text of me to the dragData["image"] -- uses the dragged data to display an image end dragDrop zz` cREVGeometry Master,expectedRect634,122,762,218Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksum̒rZa.dn revUniqueID 1206717656567 bookmarks handlerListmouseUp dragEnter dragDrop tempScript prevHandlermouseUpscriptSelectionchar 362 to 361script

This is the script of the drop area (destination object)

------------------------

on mouseUp

set the text of me to empty -- cleanup

end mouseUp

------------------------

on dragEnter

if the dragData["image"] <> empty then

set the dragAction to "copy"

-- accepts drop of images only

else

set the dragAction to "none"

-- don't accept any drop

end if

end dragEnter

------------------------

on dragDrop

set the text of me to the dragData["image"]

-- uses the dragged data to display an image

end dragDrop

CButtonjB 'red8B2uLoc432,812 cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-368MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutefalse Master,moveVfalseMaster,expectedRect399,56,465,106Master,scalebottomDistanceMaster,movevDistance-0.7975Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking1Master,scaleleftDistanceMaster,scaletopDistanceMaster,moveHAbsolutetrue Master,moveHtrue cREVGeneral revUniqueID 1206891359521  DButtonjB 'redrB2uLoc432,1393 cREVGeometry Master,expectedRect399,114,465,164Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-368Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1206891359522  EButtonjB 'redB2uLoc432,1974 cREVGeometry Master,expectedRect399,172,465,222Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-368Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral bookmarks revUniqueID 1206891359523 handlerListmouseUp prevHandler tempScriptscript  FButtonjB 'redB2uLoc432,2555 cREVGeometry Master,expectedRect399,230,465,280Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-368Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1206891359524   Scrollbarq>This is the script of the scrollbar where a PNG image (with transparency) is created on-the-fly --------------------------------- on mouseEnter set the dragDelta to 33 end mouseEnter --------------------------------- on dragStart local tObj ----- put the long name of me into tObj -- easier and more secure set the dragData["text"] to "Test" -- or whatever set the dragImageOffset to the width of me div 2,the height of me div 2 create invisible image -- not shown do "export snapshot from rect (the rect of tObj) of tObj to" && it && "as PNG" set the dragImage to the ID of it -- the engine places the long name of the created image into 'it' automatically end dragStart --------------------------------- on dragEnd delete last image -- we no longer need it end dragEnd /* # NOTE THE PRE-2.9 BUG IN THE EXPORT COMMAND THAT PREVENTS # A SNAPSHOT FROM CORRECTLY CAPTURING THE LOCAL OBJECT RECT # UNLESS A SHORT OBJECT REFERENCE IS USED Thanks to Scott Rossi who identified this bug :-) For prior versions (if you want to adapt this code for other purposes), he proposes cleverly to use: put the long name of me into tObj put word 1 of tObj into tObjType put the short name of tObj into tObjName do "export snapshot from rect (the rect of pObj) of" && tObjName && quote & tObjName & quote && "to" && it && "as PNG" */ *B&5Drag this scrollbar and appreciate transparent areasq3;31100 cREVGeneralscriptChecksumڒ Hu:L7Ԓ bookmarks revUniqueID 1208179534817 handlerListmouseEnter dragStart dragEndscriptSelectionchar 781 to 780 prevHandlerdragEnd tempScriptscript I

This is the script of the scrollbar where a PNG image (with transparency) is created on-the-fly

---------------------------------

on mouseEnter

set the dragDelta to 33

end mouseEnter

---------------------------------

on dragStart

local tObj

-----

put the long name of me into tObj -- easier and more secure

set the dragData["text"] to "Test" -- or whatever

set the dragImageOffset to the width of me div 2,the height of me div 2

create invisible image -- not shown

do "export snapshot from rect (the rect of tObj) of tObj to" && it && "as PNG"

set the dragImage to the ID of it

-- the engine places the long name of the created image into 'it' automatically

end dragStart

---------------------------------

on dragEnd

delete last image -- we no longer need it

end dragEnd

/*

# NOTE THE PRE-2.9 BUG IN THE EXPORT COMMAND THAT PREVENTS

# A SNAPSHOT FROM CORRECTLY CAPTURING THE LOCAL OBJECT RECT

# UNLESS A SHORT OBJECT REFERENCE IS USED

Thanks to Scott Rossi who identified this bug :-)

For prior versions (if you want to adapt this code for other purposes), he proposes cleverly to use:

put the long name of me into tObj

put word 1 of tObj into tObjType

put the short name of tObj into tObjName

do "export snapshot from rect (the rect of pObj) of" && tObjName && quote & tObjName & quote && "to" && it && "as PNG"

*/

K Option Menu }on menuPick -- quick and very dirty :-) lock screen hide grp "Grab" hide grp "MouseDown" hide grp "Bonus" hide grp "Rev29" switch the menuHistory of me case 1 show grp "Grab" break case 2 show grp "MouseDown" break case 3 show grp "Rev29" break case 4 send "mouseUp" to btn "Reset" show grp "Bonus" end switch put empty into img "Drop" put empty into img "Drop2" put empty into img "Drop4" unlock screen end menuPick ''.Using the grab commandTUsing the grab command Using the mouseDown message Using Rev 2.9 new features Bonus cREVGeometry Master,expectedRect 39,39,338,61Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistancefalseMastertrueMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking1Master,scaleleftDistanceMaster,scaletopDistance cREVGeneral scriptChecksumwїV3[F handlerListmenuPick breakPointsscriptSelectionchar 330 to 329 revUniqueID 1206441614072 bookmarks tempScript prevHandlermenuPickscriptm

on menuPick -- quick and very dirty :-)

lock screen

hide grp "Grab"

hide grp "MouseDown"

hide grp "Bonus"

hide grp "Rev29"

switch the menuHistory of me

case 1

show grp "Grab"

break

case 2

show grp "MouseDown"

break

case 3

show grp "Rev29"

break

case 4

send "mouseUp" to btn "Reset"

show grp "Bonus"

end switch

put empty into img "Drop"

put empty into img "Drop2"

put empty into img "Drop4"

unlock screen

end menuPick

2Thumbnail1.jpg  `@0t RJFIFddDuckyAdobed   #%'%#//33//@@@@@@@@@@@@@@@&&0##0+.'''.+550055@@?@@@@@@@@@@@@`"!1A"Qaq2RBr#b3C4S$!AQa1"3 ?Xii{ȖC2&4FlMfM[r6#8:6\W䱷Tq 6?4En B; E nJ=;c*&j0m`oTI6Ԁ:R/WV|Nv%Qlm{'KשDsmmA:\@9|mA+Ѹ2ޘ׉-Rk"(L6 n]4Wo6 _Z?!6 S֛_WI}[vRVQY#[ 8%v!uhU{P̪[Մ$LdmbxxX|V#wzVhk^)8XRY۠J4)OrzsUm f?a*5潹>U$%GtP _1Ynے īxk;s (v'Syܡa*V ]{f#/;_[2=Ї_UwF/pz5{@Kp[{yvm@5w_<gۅ(?6qj-]? ϡ|  ,Pa!7:>zJ%77XsƠ #@>vѳjL!d` =6bi$۪c oIm57٫1^k.-?ܔMt!]Ї ՘[#k*l[@N>lMHHP;0bo<pCdb0<(4zI7Xo|{8MK57肠b4ACG'V2@̃K;ns&*&a'bOfS'eRH&׈U\q/csa:,!l0)ܻYT (gH:NX5H,^Tn(U=KP4<o4k4q9nMȋsE O}"]ZZR=p=\(spWv5(3Т{oF:ţs.Qt,z[9 pΓacezوLlF9{cΉzHHV{X[:KɩM f߇%VBokE`sT7ﯖ;xyyS{}[VxI1*H*}McQ2(f$Щ6n(ܬ ~Hn@66׽[U{SB3"e0Bu[Η0vlCO@MEnf, F#F5N#Y{3Q\ .NA2OM8?HlE cREVGeometry Master,expectedRect412,56,476,104Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-356Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral bookmarks revUniqueID 1206448219709 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript3Thumbnail2.jpg  `@0t JFIFddDuckyAdobed   #%'%#//33//@@@@@@@@@@@@@@@&&0##0+.'''.+550055@@?@@@@@@@@@@@@`"!1AQq"a2B3SRr#4$b%!1AaQq"RrB ?ڼ6THЃE L3#:Wttt<Hv+#[Y?Ůܛrq׭Sr-} =WP; _e9bH$ Pخ;p4;Kڙ!PVp~&9u!P|v;ڳ22olwk~c:H_._6u, WPMy9sXFnxE߮>q}D,A 9s)$ ^%Ռm5mBolwЦ]Y+t[u&爵6olwk~c Ԁ lONo ^sk~c3[8W Ȧ'.tQopN?-Bolw: lWU:#4 p.xALO,vtsFpbX~t':$Ys nI8`ݛeXDDHX U;(pX$21 })4D ]6mU3c 3"μ"5Htm,vclB}M.jrs?<6uR 6?OI ,d)8PoR%DL`|o VҡSL_JZn @itBTgl( mƆu?-uBvA[Vd7=P# ax4:tڸDH6NBmEY&9yL/4r=>AFGO?X E_mmNkĠKhӅNLN6q ./b,j_𸢹O֞5m-s ðҚ}eJd*$EveiLyޥLu0EmB;ev\lkǟ='DK2kR/`q$=D G')Y]M4olgnx=*):c!P/PBPric## U=Ut5;OPMCpe{nʹ5;Oe ̎yDnl1`6cpqlye͓NO{ f].9^ Xꞝ3JڕKh޼wv,)7x~t4:Dyg5 9XE2#( {Ϻ@-wTM+x#ݘQ4!_&a5 h SӘrw!8.bm_mM>i&klx$cuP]`)*FT "g|;/mS$Cnam)iK¹奾$[v/Y)ljP1U0o5 M[M]~clA-Ki|j[_+ L G([1[o}O&m.jKa$Yq#Ֆ;""ޒO7quڗ 3ǘ:Xd|H)WIjLs]lAq4jNO*ٲM@zuyٖ'Tf8fM4ZuhIE~_Iwz2(6vj5i$V2[/I;PipG!x/m"]NG 83n $Jʸ5R 0c{e"'Nt|OPd<@0 h7T68$ڡ3Jp7ΏQM\1芺־e2 ٮ ,i(X+4|y,PJ|lGk j>++)E|C-3u<⩗&QQxc[4!>`4?p(IهmUsu)'&lo;^M>~m25_.~imy,}̻ }0^`ղ/HCTYp@Mk+bak.Ӣc!&^/VnLQXdloloB-f:xͯCm6# cREVGeometry Master,expectedRect412,114,476,162Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-356Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral bookmarks revUniqueID 1206448219710 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript4Thumbnail3.jpg  `z@0rJFIFddDuckyAdobed   #%'%#//33//@@@@@@@@@@@@@@@&&0##0+.'''.+550055@@?@@@@@@@@@@@@`"!1QA"aq2#R3BbrCc4s$T!1AQ"a2qBbR ?{3*`c`/Hyi c> 9g.a~zCRc-hd6}8չtv,E\'E*TMc=92Bmݵu:lr ^мw G[ kV65w.VaSxkȸ;p:iNK"( {o |s[荒hrMñBfRw9s3ylAfB#w|@hao]q}5ǯgssKbra ~߈APt( P{Ћ ߫һp$koc *\Ç @v5Q`HOiC8 ׵qcru&>0I1<y3&&b|/ڄEwќ5; ԓڵvd<3p1# {~{KKt:35^߻]a9tvk5,i{yrSi]# 07Pkokwcd&TDC-YL!k?f5*2bnk J5a{vûej5[<<}6 .ָ^uZM]=@Jyzٍ]кn\Ja4 0E(po+>V q܌_[ߦ׭D{(s4D_ɺ%}/s*zB05ݭ+53¸n@$ho4x(cmVqV/<-֯kc3+Xs3.ּCx7rVl q!H:hmBOs8ļe.ڍkڋd} |"QhVfUw@z<g [Ef۰s2OB(@R.mCDP5 L+o4rY2weH[)$f|HI6@hDe]n_dޑ)B!!_j \l(jO֊_2EyenQ\B{[˲ߖ1I:~",B"A][ |rۺMZL8{ V{MdXKjL63F 6"+aǓ$T4VcU[t^P?)maA2PrYr]U`iȯdmfP l7{lvT8,Hq텓fYcuOV1NJ/
8|&}u^j b*kI8[7![c HUB}Lfܜüj~]H-YTyC6;HZSTVE[l\\}CUPQM+axtͿO Vv}s LM/hvPȏPc䷏Ux+#U+2`쬱ـ6:R1#Ge(S F{tCp])F9q9 xX11*1J=RĊ>$Лֳ\+M4Q=/f.N*J%Hl@кt54B2X;U*$DmܷQ!SOwZS}3/3"Ǘ$F'Y#.,#BBLXЯ_7+F@7t>d l߭qckvk!#\ŷ[nGU?= oQ cMfUf]bH֪ o,}O߯{+s@NSJ#М&nn_}t:ulnk_V pЃ grs^Rai{c7}'q-gì^/2'Qf/uPA[b_9}%Hn. Gw+=8п>40*GLܟ}_`wa]mJO\@R #`O-G] E6/;M ,Gq \Gv\X^!lkw\1_HxeO3yvvO_T$TicH'ZJٟ̑mͬl_nDI}jX"¬d omāaU;h*E5UffU=wd>]mJܯQkM1U -"mh(mF]v${g-,:𗀌w7sssw4 +`T-pEiQa0텁L-jmo0$ (0 Tb4'MaUmP,Ăo*4ZLU.A樂M:ј)Xe2wZV cREVGeometry Master,expectedRect412,230,476,278Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-356Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral bookmarks revUniqueID 1206448219711 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscript5Thumbnail4.jpg  `@@0r JFIFddDuckyAdobed   #%'%#//33//@@@@@@@@@@@@@@@&&0##0+.'''.+550055@@?@@@@@@@@@@@@`"!1AQa"2qBR#C$r3b!1AQa"Rq ?mD1-\ ܮබ><'FHd6>!ujX [V$LG뢶}L{Zg{g鵹i#@snZo!k.(c,(x"ճ2q8=WA-]X ~zթJ uRUFvܽSl- iM*ˍg6/jENR.`N9Aո%QYι¬3:RS>5M-Tu[VlhFAd-t(- Yڑw6:}_(α&lΨc |*uo* rC4yӮvp;e!*)NKBV@lKvBt Q[B&]U%QXơklb#υFRņ0Tk\e&.QL:Hvî-2NbbOk tFX C3KۉmPaXhhA/Vbhht6Yl,a†ݞ[ Ӫ' M(0Jf ΀¨ܺ!RmI%P8 sx/l1mHV 45%F0f >dˍz\Hk1vTFr .zg٪*uXнu`58i^BeDÞ{qi/#[JqkMD @Ofޢ8g 5owh dW"jρʤB~ռX$\S!G}@mi^BBnѽR $k q;N$*]x*(i^BFOSu=tVR3^0DžBYažx@#"γ~q1Z8XSTtƌd'F;`n|UWPgNӼTR c]ӻw+`F. tO"f'96SojFPL MקEXkFD#$/vR0F0#<"Fjأ[*ȃZ6۸v;oH bhqqK^!mG6$r&qh*231j-ga"<ľ.96^rHfa qƭ[1`0#UOGO'Qӂ *(Go,8(-zԶ؉:XUn|a H }ѸۥX-TA(nvK|q1˅[vK.ᰐޠ=3έv;FCD1$@n GPi goXM/OFg>O[hw7Z@¬nCIR};C| Nϡ=D=x_ʺA0_*}J6UH|)NϡNHz.ׁ{[dg*_u C0< =xv /sN<<*7t,!@ S#)JQ[ *D"*/w.;?'Rip` 0 nbE+Ripu*ۆ!# ǺNr f#)Vmvfбg#y;u{Ua U.\-֘]]U29ғQ˨jk4٩}S OYfny8${*gM}!<'?S,n.0?ol]ؕ `7MT-otYJd%g(QBՀ7sm`̿tLF,܃9h;r1hݽhqذu`}?mAn5!t a ҭ iFtS°F7IHvά ns:tYsN1#Wnbz/t!@SW.Wc4 `Ay;&پmT4#,׆{CQp‰S"0εkII259m5*B mC1+n%j(?¸҄ҭ+wWltQmH:Ju?xI}'\n?+7 , K6t]ӯA11)'~>^lnGI yVwXVl4;Dz-7X:Tn{3`.0wڶn@UIXx׸~Ownhv: \T(Me휁1pq;j Hij1BD0K\ڞɗ8I)Nl\(9Wwut&8L w  6Ŕֲ`NCl@dc@=ݾ hc 8+_/28*bŠ޲#1>arbƅ;>kTG? cREVGeometry Master,expectedRect412,172,476,220Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-356Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral bookmarks revUniqueID 1206448219712 handlerListscriptSelection char 1 to 0 prevHandler tempScriptscriptcBetween two Rev windowsa$") cREVGeneral revUniqueID 1206455908963 aInfo6)`(&- cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-75Master,expectedRect 40,39,341,325Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1206455905402 handlerListscriptSelection char 1 to 0 prevHandler linkClicked tempScriptscript

 .Dragging and dropping between two Rev windows -  wActually if you use Rev 2.9 or later you can use exactly the same method as the one described in the previous section. v  rBut here we'll explore another kind of Drag and Drop very useful to create palettes as the the IDE tools palette. q  Of course, between to Rev windows, you can't use a control as in the previous examples (grab and mouseDown): it would no longer be seen as soon as it would go out of the card window :-) @1600 $ % ) <  So Drag and Drop between two Rev windows (prior to 2.9) needs to use a stack that will be able to be moved all around the screen if needed...  % ( 8 LA  Q In this example, the needed stack is created on-the-fly and deleted when done. @1600 & ' / 9 Using a stack is compulsory but not any Drag and Drop specific message the engine can provide will be sent: no problem, you'll script all this by yourself :-) To create the stack, the code uses templates intensively: templateStack and templateImage. This way of doing is faster than creating a stack then setting its properties. @1600 $ % < I N [P This means that the main properties of the stack that are different from a regular one are set before creating it. See the script. 6 @6 V, The way of moving the stack according to the mouse location is actually the same as moving a control in a window but all coordinates must be global, i.e. related to the screen, because the loc of a stack relies on the screen top-left (0,0). @1600     As in the previous example using mouseDown, the stack itself is moved back to the source thumbnail location in case of failure of Drag and Drop. @1600 " # B+ m% Vocabulary needed:  OClick on a link to open Rev dictionary (may not work with old versions of Rev) N   mouseDown message @1600     globalLoc function @1600    defaultStack property @1600     screenMouseLoc property @1600    + templateStack and templateImage keywords @1600     !  move command @1600     create and delete commands @1600       O `D'd Thumbnails ion mouseDown local tPos,tDragFromStack,tRect,tStartLoc,tImage,tNowLoc,tWidth,tHeight,tCopyModeFlag,tRightLocationFlag ----- if "AnotherStack" is not among the lines of the windows then -- demo purpose only ShowAnotherStack -- C end if ----- put globalLoc(the loc of the target) into tPos -- storing initial location put the short name of this stack into tDragFromStack set the defaultStack to "AnotherStack" put globalLoc(the topLeft of img "Drop" of stack "AnotherStack"),globalLoc(the bottomRight of img "Drop" of stack "AnotherStack") into tRect -- storing target rect set the defaultStack to tDragFromStack put the text of image ID (the icon of the target) into tImage -- storing needed image data put the screenMouseLoc into tStartLoc put 66 into tWidth -- size needed for this example put 50 into tHeight -- size needed for this example put the hilite of btn "CopyMode" into tCopyModeFlag ----- lock messages repeat -- check for some movement before drag (at least 8 pixels horizontally) put the screenMouseLoc into tNowLoc if abs(item 1 of tNowLoc - item 1 of tStartLoc) < 8 then if the mouse is up then exit mouseDown next repeat else exit repeat end if end repeat ----- building a stack on-the-fly: reset the templateStack -- just in case set the name of the templateStack to "ThumbnailControl" set the visible of the templateStack to false -- we create it invisible set the decorations of the templateStack to "noShadow" set the style of the templateStack to "palette" set the blendLevel of the templateStack to 25 ----- create stack reset the templateStack -- to default for others set the defaultStack to "ThumbnailControl" set the loc of this stack to tPos -- initial thumb location set the minWidth of this stack to tWidth set the minHeight of this stack to tHeight set the width of this stack to tWidth set the height of this stack to tHeight set the showBorder of this cd to true set the BorderColor of this cd to "red" set the ThreeD of this cd to false set the borderWidth of this cd to 1 ----- adding the right image on-the-fly: reset the templateImage -- just in case ----- set the width of the templateImage to tWidth set the height of the templateImage to tHeight set the lockloc of the templateImage to true set the text of the templateImage to tImage ----- create image reset the templateImage -- to default for others set the loc of img 1 to the loc of this card ----- all has been created: show this stack if not tCopyModeFlag then hide the target ----- repeat -- moving the stack according to the mouse location set the loc of this stack to the screenMouseLoc -- global coordinates put (the screenMouseLoc is within tRect) into tRightLocationFlag -- tRightLocationFlag is a Boolean (TrueOrFalse) that means that the mouse is in the right place or not if tRightLocationFlag then set the cursor to 1131 set the threeD of img "Drop" of stack "AnotherStack" to false -- highlights drop area else set the cursor to arrow set the threeD of img "Drop" of stack "AnotherStack" to true -- unhighlights drop area end if -- indication for the user if the mouse is up then exit repeat -- stop end repeat ----- if tRightLocationFlag then -- right place set the threeD of img "Drop" of stack "AnotherStack" to true set the text of img "Drop" of stack "AnotherStack" to the text of img 1 of this stack else -- wrong place move this stack to tPos in 200 milliseconds -- put the stack back to the source thumbnail location beep end if show the target delete this stack -- we no longer need it unlock messages end mouseDown U' cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMaster,scaleRightscaleBottomtrueMastertrueMaster,scaleleftObjectRef 1206288308878Master,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,scaleleftObjectSiderightMaster,expectedRect348,34,774,334Master,scalebottomDistance-76Master,movevDistancefalseMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-25Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,scaleleftAbsolutetrueMaster,scalelefttrueMaster,cardRanking2Master,scaleleftDistance0Master,scaletopDistance cREVGeneralscriptChecksumѷL I revUniqueID 1206456204722 bookmarks handlerList mouseDown tempScript prevHandler mouseDownscriptSelectionchar 695 to 700script-

on mouseDown

local tPos,tDragFromStack,tRect,tStartLoc,tImage,tNowLoc,tWidth,tHeight,tCopyModeFlag,tRightLocationFlag

-----

if "AnotherStack" is not among the lines of the windows then -- demo purpose only

ShowAnotherStack -- C

end if

-----

put globalLoc(the loc of the target) into tPos -- storing initial location

put the short name of this stack into tDragFromStack

set the defaultStack to "AnotherStack"

put globalLoc(the topLeft of img "Drop" of stack "AnotherStack"),globalLoc(the bottomRight of img "Drop" of stack "AnotherStack") into tRect

-- storing target rect

set the defaultStack to tDragFromStack

put the text of image ID (the icon of the target) into tImage -- storing needed image data

put the screenMouseLoc into tStartLoc

put 66 into tWidth -- size needed for this example

put 50 into tHeight -- size needed for this example

put the hilite of btn "CopyMode" into tCopyModeFlag

-----

lock messages

repeat -- check for some movement before drag (at least 8 pixels horizontally)

put the screenMouseLoc into tNowLoc

if abs(item 1 of tNowLoc - item 1 of tStartLoc) < 8 then

if the mouse is up then exit mouseDown

next repeat

else

exit repeat

end if

end repeat

----- building a stack on-the-fly:

reset the templateStack -- just in case

set the name of the templateStack to "ThumbnailControl"

set the visible of the templateStack to false -- we create it invisible

set the decorations of the templateStack to "noShadow"

set the style of the templateStack to "palette"

set the blendLevel of the templateStack to 25

-----

create stack

reset the templateStack -- to default for others

set the defaultStack to "ThumbnailControl"

set the loc of this stack to tPos -- initial thumb location

set the minWidth of this stack to tWidth

set the minHeight of this stack to tHeight

set the width of this stack to tWidth

set the height of this stack to tHeight

set the showBorder of this cd to true

set the BorderColor of this cd to "red"

set the ThreeD of this cd to false

set the borderWidth of this cd to 1

----- adding the right image on-the-fly:

reset the templateImage -- just in case

-----

set the width of the templateImage to tWidth

set the height of the templateImage to tHeight

set the lockloc of the templateImage to true

set the text of the templateImage to tImage

-----

create image

reset the templateImage -- to default for others

set the loc of img 1 to the loc of this card

----- all has been created:

show this stack

if not tCopyModeFlag then hide the target

-----

repeat -- moving the stack according to the mouse location

set the loc of this stack to the screenMouseLoc -- global coordinates

put (the screenMouseLoc is within tRect) into tRightLocationFlag

-- tRightLocationFlag is a Boolean (TrueOrFalse) that means that the mouse is in the right place or not

if tRightLocationFlag then

set the cursor to 1131

set the threeD of img "Drop" of stack "AnotherStack" to false

-- highlights drop area

else

set the cursor to arrow

set the threeD of img "Drop" of stack "AnotherStack" to true

-- unhighlights drop area

end if

-- indication for the user

if the mouse is up then exit repeat -- stop

end repeat

-----

if tRightLocationFlag then -- right place

set the threeD of img "Drop" of stack "AnotherStack" to true

set the text of img "Drop" of stack "AnotherStack" to the text of img 1 of this stack

else -- wrong place

move this stack to tPos in 200 milliseconds

-- put the stack back to the source thumbnail location

beep

end if

show the target

delete this stack -- we no longer need it

unlock messages

end mouseDown

eButtonjB 'B2uLoc432,1974 cREVGeneral revUniqueID 1206456435320  gButtonjB 'B2uLoc432,2555 cREVGeneral revUniqueID 1206456435321  hButtonjB 'rB2uLoc432,1393 cREVGeneral revUniqueID 1206456435322  jButtonjB '8B2uLoc432,1392 cREVGeneral revUniqueID 1206456431694  i Show ScriptEp>on mouseUp edit the script of grp "Thumbnails" end mouseUp $d? cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-102MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,movevDistance-97Master,scalebottomDistanceMaster,expectedRect648,303,748,326Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneralscriptChecksumNV`2g-fk bookmarks revUniqueID 1206456301140 handlerListmouseUpscriptSelection char 48 to 47 prevHandlermouseUp tempScriptscript

on mouseUp

edit the script of grp "Thumbnails"

end mouseUp

 CopyModehe0@Copy cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-318MastertrueMaster,moveVObjectRefcardMaster,movehObjectRef 1206353911525Master,moveVAbsolutetrue Master,moveVtrueMaster,expectedRect398,304,462,327Master,scalebottomDistanceMaster,movevDistance-85Master,movehObjectSiderightMaster,scalerightDistanceMaster,cardRanking1Master,scaleleftDistanceMaster,scaletopDistanceMaster,movehAbsolutetrue Master,movehtrue cREVGeneral revUniqueID 1206526367520 k copy mac.gif Dv\62H|Ɂ<A@`px|~|lF~~I< cREVGeneral revUniqueID 1206464200264l subtract mac D,Z63G@Ɂ=@`px|~|lF~~H cREVGeneral revUniqueID 1206464204168 Towards Revaon dragMove DisplayMessage the params,"DDMessage" -- for demo purpose end dragMove --------------------------------------- on dragEnd DisplayMessage the params,"DDMessage" -- for demo purpose end dragEnd $; cREVGeneralscriptChecksum'\G% revUniqueID 1206530273946 bookmarks handlerListdragMove dragEnd tempScript prevHandlerdragEndscriptSelectionchar 165 to 164script&

on dragMove

DisplayMessage the params,"DDMessage" -- for demo purpose

end dragMove

---------------------------------------

on dragEnd

DisplayMessage the params,"DDMessage" -- for demo purpose

end dragEnd

 Label Field (&. cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,expectedRect 40,38,782,340Master,scalebottomDistance-60Master,movevDistancefalseMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-18Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking2Master,scaleleftDistanceMaster,scaletopDistance cREVTable currentview cREVGeneral revUniqueID 1206610694925 Info7)`(&- cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,expectedRect 40,39,341,325Master,scalebottomDistance-75Master,movevDistancefalseMaster,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaleleftDistanceMaster,scaletopDistance cREVGeneralscriptChecksumُ B~ revUniqueID 1206530271451 bookmarks handlerList tempScript prevHandler linkClickedscriptSelection char 1 to 0script

 1Dragging and dropping anything into a Rev window 0 The user may drag and drop almost anything into your project: folder(s), file(s) and text (plain text, rtf, html or unicode). @1600   > A G L P X \$ So your concerns are: 0. Do the dragged data belong to the right kind? / &. Is the drop made in the right area? % 8. What to do if all the above conditions are fulfilled? 7 " Checking the dragged data type @1600    As soon as you write a dragMove, dragEnter, dragLeave, dragEnd or dragDrop* handler you are able to check the dragData property:    ! * , 5 7 > B K# n v [* dragDrop will be triggered only when dragAction property (see below) will have been set. ' ' 1) 6The dragData is an array with multiple possible keys:   ) $See the docs fore more information. # . dragdata["html "] . dragdata["rtf"] . dragdata["Unicode"] . dragdata["image"] . dragdata["files"] . dragdata["styles"] . dragdata["private"] Important:  HThe presence of a key or another does not prejudge the original format: lRev tries to provide all formats it is able to... in order for you to choose the one that suits your needs. - So how to know what are the dragged data? @1600   ) If "files" is among the keys of the dragData assumes there are file(s) or folder(s) and only those because it's impossible to drag and drop files and text at the same time :-) , , You'll get a list of lines with a path per line but unfortunately, folders paths don't end with a slash. I have requested this as an enhancement, so test by yourself to know if it could be done. If it's not the case, use: *function DistinguishFileFromFolder pPaths @ !  local tFiles,tPath,tList  @   -----  @hh"  if pPaths = empty then  @  @  return empty  @  end if  @  @  -----  @hh" ' repeat for each line tPath in pPaths  @  @   " if there is a file tPath then  @  @ ! put tPath & cr after tList  @  else  @ ) put tPath & slash & cr after tList  @  end if  @  @ end repeat  @  @  -----  @hh"  delete last char of tList  @   return tList  @  end DistinguishFileFromFolder @  eThis function will return list where every file or folder will be identified for further processing: Nset the dragData["files"] to DistinguishFileFromFolder(the dragData["files"]) @  @ @  @6 : @; @C Files, on Mac OS X or Win 32 have always an extension that should allow you to discriminate the files you want if necessary: My How to Manage Drag and Drop for Files or Folders tutorial n10 might help you to reach this more specific goal. } } 0  > On the contrary, if "files" and "image" are not among the keys of the dragData assumes there is only text and, at first sight, a single one.  C Q; XIt can be an url dragged from a browser or anything else: an url begins with http, etc.   = M Q Lastly, when coming from the out world, you'll sometimes get image among the keys but this depends on the source application: it works well from PhotoShop but not from MS Word for instance. = = B{  Setting the dragAction @1600    A dragEnter message is sent to the target when you drag anything on it... and if you have written a dragEnter message accordingly:   w If there is no dragEnter handler related to any target, no drop will be accepted: this means that you have only to take care of areas where you want possibly accept a drop. But be aware that unlocked fields accept drops naturally: if you want to inhibit this feature, just add in an unlocked field script: on dragEnter @  end dragEnter @  In Rev prior to 2.9, setting the acceptDrop property to true in a dragEnter handler was enough to be able to subsequently trigger the DragDrop message sent when the user released the mouse. ! ! +[  / zAcceptDrop is now deprecated in Rev 2.9 and later and has been replaced by the dragAction property that is more flexible: O O Y DragAction property can be:   6. None: the target application does not want the data    - 6. Move: the target application wants to move the data    - 6. Copy: the target application wants to copy the data    - 6. Link: the target application wants to link the data    - Practically, this means that you can test the dragData when the mouse enters a possible target then set the dragAction consequently. . . 66 l v For instance:  on dragEnter @  & if ".txt" is in the dragData then  @  @ @! # set the dragAction to "copy" @  @  & else set the dragAction to "none" @ @   @   end dragEnter @  SWith such a script, the target will accept drag and drop of plain text files only. bNote that dragData without any key specified always returns main information: here the file path. a A consequence of this change in 2.9 and later is that Rev sets the cursor by itself according to the dragAction contents: specific cursors are used when the dragAction is set to copy (add cursor) or link (alias/shortcut cursor) but stays an usual arrow when using none or move. 8 8 ? Ii       -      Important:   It may happen that data seem to be able to be dropped in Rev (you get a drag image set by an external app) but actually the dragData are empty. | | LSo it's a good idea to test the dragData's contents in a dragEnter handler: on dragEnter @   local tMode  @   -----  @hh""  if the dragData = empty then @hh"" @ @  @  @  put "none" into tMode @   else @ @  put "Copy" into tMode  @  end if  @   set the dragAction to tMode @  @  end dragEnter @  Use the Drag Action option menu on the right and watch the messages that are sent and how may change the cursor when entering the drop area according to the drag action you choose.     Responding to the drop @1600    Once you have accepted the drop (and we have seen above that you are able to master this completely :-) what are you going to do with it?  ;. If it is a file, you are able to get its contents using:    ) 0 put url("file:" & ) into tContents @ *  -- for text files @hh" 3 put url("binfile:" & ) into tContents @ - # -- for images and other binfiles @hh"" dIf it is an image, a sound, a movie, etc. you'll use an image object, a player, etc. to display it. c . If it is a folder, probably you'll have to parse it to get embedded files: there are many directory walker handlers all over the place. If needed click here to get a code example.    I \ l.   PSee How to Manage Drag and Drop for Files or Folders tutorial for more details.  0 4 5 V. If it is text you'll choose the best format allowed by Rev according to your needs.    F For instance:  : set the rtfText of fld "Display" to the dragdata["rtf"] @  @   @* @2 Or: @ . put the dragdata["text"] into fld "Display" @  @  @  etc. @ TNote: When the drag comes from outside of Rev, the dragSource will be always empty. 3 3 = Vocabulary needed:  S Main messages, functions, commands and properties listed in the Basics section. @1600   < C I  `D'  Label Field ssssssLx8 cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect588,164,708,220Master,movehDistance-152Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVTable currentview.Drag and drop anything here from the out world cREVGeneral revUniqueID 1206530656305 Drag and drop anything here from the out worldDrop3 pNon dragEnter local tMode ----- if the dragData = empty then put "none" into tMode else put the selectedText of btn "DDMode" into tMode set the dragAction to tMode if tMode <> "none" then set the threeD of me to false DisplayMessage the params,"DDMessage" -- for demo purpose end dragEnter ----------------------------- on dragLeave set the threeD of me to true DisplayMessage the params,"DDMessage" -- for demo purpose end dragLeave ----------------------------- on dragDrop set the threeD of me to true DisplayMessage the params,"DDMessage" -- for demo purpose end dragDrop --------------------------------------- on dragMove DisplayMessage the params,"DDMessage" -- for demo purpose end dragMove --------------------------------------- on dragEnd DisplayMessage the params,"DDMessage" -- for demo purpose end dragEnd H` cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect584,136,712,232Master,movehDistance-152Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneral scriptChecksum6e ;H handlerList-dragEnter dragLeave dragDrop dragMove dragEnd breakPointsscriptSelectionchar 983 to 982 revUniqueID 1206530656306 bookmarks tempScript prevHandlermouseUpscript 

on dragEnter

local tMode

-----

if the dragData = empty then put "none" into tMode

else put the selectedText of btn "DDMode" into tMode

set the dragAction to tMode

if tMode <> "none" then set the threeD of me to false

DisplayMessage the params,"DDMessage" -- for demo purpose

end dragEnter

-----------------------------

on dragLeave

set the threeD of me to true

DisplayMessage the params,"DDMessage" -- for demo purpose

end dragLeave

-----------------------------

on dragDrop

set the threeD of me to true

DisplayMessage the params,"DDMessage" -- for demo purpose

end dragDrop

---------------------------------------

on dragMove

DisplayMessage the params,"DDMessage" -- for demo purpose

end dragMove

---------------------------------------

on dragEnd

DisplayMessage the params,"DDMessage" -- for demo purpose

end dragEnd

 Show ScriptEp9on mouseUp edit the script of img "Drop3" end mouseUp $dY cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-102MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,expectedRect648,303,748,326Master,scalebottomDistanceMaster,movevDistance-97Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksumH6/R0[sH* revUniqueID 1206530924030 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelection char 43 to 42script

on mouseUp

edit the script of img "Drop3"

end mouseUp

 DDMessage 0Von mouseUp put "Messages:" into me set the vScrollbar of me to false mouseEnter -- end mouseUp ----------------------- on mouseEnter if the number of lines of me = 1 then set the tooltip of me to "Messages sent by the engine during the process will be displayed here" else set the tooltip of me to "Click to clear" end mouseEnter `&FMessages sent by the engine during the process will be displayed here cREVTablemaxColumnCount cREVGeometryMaster,moveVObjectSidebottomMaster,scaleBottomObjectSideBottomMaster,movehDistance-370MastertrueMaster,moveVObjectRefcardMaster,scaleBottomObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutefalseMaster,scaleBottomAbsolutetrue Master,moveVfalseMaster,scaleBottomtrueMaster,movevDistance-0.5475Master,scalebottomDistance-75Master,expectedRect352,38,500,324Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneralscriptChecksum!{9;#F8: revUniqueID 1206531419117 bookmarks handlerListmouseUp mouseEnter tempScript prevHandlermouseUpscriptSelection char 89 to 88script

on mouseUp

put "Messages:" into me

set the vScrollbar of me to false

mouseEnter --

end mouseUp

-----------------------

on mouseEnter

if the number of lines of me = 1 then set the tooltip of me to "Messages sent by the engine during the process will be displayed here"

else set the tooltip of me to "Click to clear"

end mouseEnter

Messages:i!$ cREVGeometry Master,expectedRect 523,33,680,69Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-204Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1206548126350  Label Field %Y cREVTable currentview Drag Action: cREVGeneral revUniqueID 1207153387076 Drag Action:DDMode eX&LbModify drag action and see how the cursor changes and how D&D can be done or not in the drop area]CopyNone Move Copy Link  cREVGeneral revUniqueID 1207153387077  From Revaon dragMove DisplayMessage the params,"DDMessage2" -- for demo purpose end dragMove --------------------------------------- on dragEnd DisplayMessage the params,"DDMessage2" -- for demo purpose end dragEnd $: cREVGeneralscriptChecksum Y<\Z6v+ bookmarks revUniqueID 1206634311825 handlerListdragMove dragEndscriptSelectionchar 178 to 177 prevHandlerDisplayMessage tempScriptscript=

on dragMove

DisplayMessage the params,"DDMessage2" -- for demo purpose

end dragMove

---------------------------------------

on dragEnd

DisplayMessage the params,"DDMessage2" -- for demo purpose

end dragEnd

 Label Field (&. cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-60Master,expectedRect 40,38,782,340Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-18Master,scaleRightObjectSideRightMaster,scaleRightObjectRefcardMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVTable currentview cREVGeneral revUniqueID 1206634773073 Info8)`(&- cREVGeometryMaster,scaleBottomObjectSideBottomMaster,movehDistancefalseMastertrueMaster,scaleBottomObjectRefcardMaster,scaleBottomAbsolutetrueMaster,scaleBottomtrueMaster,movevDistancefalseMaster,scalebottomDistance-75Master,expectedRect 40,39,341,325Master,scaleRightAbsolutetrueMaster,scaleRighttrueMaster,scalerightDistance-459Master,scaleRightObjectRefcardMaster,scaleRightObjectSideRightMaster,cardRanking2Master,scaletopDistanceMaster,scaleleftDistance cREVGeneralscriptChecksumُ B~ bookmarks revUniqueID 1206634773074 handlerListscriptSelection char 1 to 0 prevHandler linkClicked tempScriptscript

 JDragging and dropping anything from a Rev window into another application I You can export to another application (desktop included) any kind of data as soon as the destination application is able to accept this data. @1600  9 ;S  uDrag and drop a chunk of text, the thumbnail or the file icon on the right: see their tooltips for more information. t About how to use dragImage, dragImageOffset and dragData, see Using Rev 2.9 new features sub section of In one Rev Window section: here we'll only discuss specific features when dragging and dropping anything from a Rev window into another application.     + 0 8 > X h y8 K ( Exporting text from an unlocked field @1600  % nActually, you have nothing to do if you want to allow dragging a text selection made in an unlocked field :-)   M Rev will handle it by itself (in cooperation with the destination application) and will take care of fonts, styles, colors, etc. But in such a case, you'll not display any drag image and, with Mac OS X where there is no 'Don't drop' cursor (as there is one with Win32) you'll want to add a drag image. @ BUnfortunately, with Rev 2.9 rc4 I used to write this tutorial, it appears that inserting a dragStart handler in the field script creates a conflict between dragDelta value and selecting text ability because mouseDown is not sent to an unlocked field: may be this issue is already fixed in the version you use (bug #6294). @G @G @[ @d8 @ @ @ To export plain text, use: @ -set the dragData["text"] to the selectedText @blue  @red    @ darkorange DAnd to export styled text, prefer to use html or rtf. For instance: ) ) - 1 4 =set the dragData["html"] to the htmlText of the selectedText @blue  @red    @red  ( @ darkorange0  Exporting images @1600   To export an image, you need to write one line only in a dragStart handler in the script of the control that initiates Drag and Drop: 9 9 BC on dragStart @  $ set the dragData["image"] to  @  @   end dragStart @  #Where is the ID of any image.  Exporting anything else @1600    hActually, you may allow a drag start from any control and set by yourself the contents of the dragData. For instance, if the dragData["files"] are set to a real file and the drag done in your emailer, it will become an attachment :-)   &[ When the data is dropped, the object a drag and drop started from, receives a dragEnd message. This does not prejudge any success but you know the mouse was released.  glossary/Objects_an/438.xml $ glossary/User_Inter/32.xml' 4 N UQ Unfortunately, in this case, the dragdata and the dragDestination are always empty if you test them in a dragEnd handler. So there is no way to know what happened exactly... ! ! ) 2 Al # Creating a drag image on-the-fly @1600    Most often, you'll use existing images to specify the drag image but you can create them on-the-fly too as the one used here when dragging from the unlocked field. ;See the script of the unlocked field for more information. : ! Modifying the dragData["text"] @1600    ;Unfortunately, something like the following does not work: A set the dragData["text"] to the dragData["text"] && "modified"  @  @   @" * NSo, if you need to modify dragged text, use te selectedText function instead: / / ; = set the dragData["text"] to the selectedText && "modified"  @blue  @red  @black  @ darkorange" . 5Or, for more flexibility, write a specific function: 4  : set the dragData["text"] to Transform(the selectedText)  @blue  @red  @black   ' @ darkorange, 8 $----------------------------------- @hh""# function Transform pText @blue    @black  @black  return pText @black @blue  end Transform @brown   Vocabulary needed:   OClick on a link to open Rev dictionary (may not work with old versions of Rev) N  # dragStart and dragEnter messages @1600       dragData property @1600   N `D' Show ScriptsEpon mouseUp edit the script of fld "Text" edit the script of btn "RevDocsStack" edit the script of btn "SSThumbnail" end mouseUp $d? cREVGeometryMaster,moveVObjectSidebottomMaster,movehDistance-102MastertrueMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,moveVAbsolutetrue Master,moveVtrueMaster,movevDistance-97Master,scalebottomDistanceMaster,expectedRect648,303,748,326Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneralscriptChecksum”ӫ9%׳55DJ bookmarks revUniqueID 1206634773075 handlerListmouseUpscriptSelectionchar 112 to 111 prevHandlermouseUp tempScriptscript

on mouseUp

edit the script of fld "Text"

edit the script of btn "RevDocsStack"

edit the script of btn "SSThumbnail"

end mouseUp

 DDMessage2 0Uon mouseUp put "Messages:" into me set the vScrollbar of me to false mouseEnter -- end mouseUp ----------------------- on mouseEnter if the number of lines of me = 1 then set the tooltip of me to "Messages sent by the engine during the process will be displayed here" else set the tooltip of me to "Click to clear" end mouseEnter `&FMessages sent by the engine during the process will be displayed here cREVTablemaxColumnCount cREVGeometryMaster,scaleBottomObjectSideBottomMaster,moveVObjectSidebottomMaster,movehDistance-370MastertrueMaster,scaleBottomObjectRefcardMaster,moveVObjectRefcardMaster,moveHObjectRefcardMaster,scaleBottomAbsolutetrueMaster,moveVAbsolutefalseMaster,scaleBottomtrue Master,moveVfalseMaster,expectedRect352,38,500,324Master,scalebottomDistance-75Master,movevDistance-0.5475Master,moveHObjectSiderightMaster,scalerightDistanceMaster,cardRanking2Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksumJS[;|k bookmarks revUniqueID 1206634773076 handlerListmouseUp mouseEnterscriptSelection char 89 to 88 prevHandlermouseUp tempScriptscriptw

on mouseUp

put "Messages:" into me

set the vScrollbar of me to false

mouseEnter --

end mouseUp

-----------------------

on mouseEnter

if the number of lines of me = 1 then set the tooltip of me to "Messages sent by the engine during the process will be displayed here"

else set the tooltip of me to "Click to clear"

end mouseEnter

Messages: i" cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect512,34,758,290Master,movehDistance-165Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaletopDistanceMaster,moveHAbsolutetrueMaster,scaleleftDistance Master,moveHtrue cREVGeneral revUniqueID 1206655515116 Text)pExporting text from an unlocked field --------------------------------- on dragEnter -- just to inhibit an auto drag and drop in the source field end dragEnter --------------------------------- on dragStart if the hilite of btn "WIthStyle" then set the dragData["html"] to the htmlText of the selectedText -- styled text else set the dragData["text"] to the selectedText -- plain text set the dragImage to CreateDragImage() -- see below set the dragImageOffset to the width of last image div 2,the height of last image div 2 -- centered DisplayMessage the params,"DDMessage2" -- for demo purpose end dragStart --------------------------------- on dragEnd delete last image -- we no longer need the drag image end dragEnd --------------------------------- on mouseEnter set the dragDelta to 40 end mouseEnter --------------------------------- function CreateDragImage -- creates drag image on-the-fly local tRect,tempImage ----- put the rect of fld "Text" into tRect add 2 to item 1 of tRect -- we don't want the field border appear add 2 to item 2 of tRect -- ditto put 140 into last item of tRect -- we don't want the check boxes appear ----- export snapshot from rect tRect of this cd to tempImage as jpeg -- export image to a variable lock messages -- important to speed up the process create invisible image -- we don't want to see it set the text of last image to tempImage set the width of last image to the width of last image div 2 set the height of last image to the height of last image div 2 -- setting dimensions unlock messages return the ID of last image -- we need it to set the dragImage property end CreateDragImage &.Select text and drop it into a word processor cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect534,38,754,184Master,movehDistance-0.195Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking0Master,scaletopDistanceMaster,moveHAbsolutefalseMaster,scaleleftDistance Master,moveHfalse cREVGeneralscriptChecksum|o]?@4WA bookmarks revUniqueID 1206634748342 handlerList6dragEnter dragStart dragEnd mouseEnter CreateDragImagescriptSelectionchar 1096 to 1095 prevHandler dragStart tempScriptscript]

Exporting text from an unlocked field

---------------------------------

on dragEnter

-- just to inhibit an auto drag and drop in the source field

end dragEnter

---------------------------------

on dragStart

if the hilite of btn "WIthStyle" then

set the dragData["html"] to the htmlText of the selectedText -- styled text

else set the dragData["text"] to the selectedText -- plain text

set the dragImage to CreateDragImage() -- see below

set the dragImageOffset to the width of last image div 2,the height of last image div 2 -- centered

DisplayMessage the params,"DDMessage2" -- for demo purpose

end dragStart

---------------------------------

on dragEnd

delete last image -- we no longer need the drag image

end dragEnd

---------------------------------

on mouseEnter

set the dragDelta to 40

end mouseEnter

---------------------------------

function CreateDragImage -- creates drag image on-the-fly

local tRect,tempImage

-----

put the rect of fld "Text" into tRect

add 2 to item 1 of tRect -- we don't want the field border appear

add 2 to item 2 of tRect -- ditto

put 140 into last item of tRect -- we don't want the check boxes appear

-----

export snapshot from rect tRect of this cd to tempImage as jpeg

-- export image to a variable

lock messages -- important to speed up the process

create invisible image -- we don't want to see it

set the text of last image to tempImage

set the width of last image to the width of last image div 2

set the height of last image to the height of last image div 2

-- setting dimensions

unlock messages

return the ID of last image -- we need it to set the dragImage property

end CreateDragImage

 At vero eos et accusaus et iusto ducimus qui blanditiis praesentium atque corrupti quos similique sunt in culpamollitia animi id est laborum et    ! 8 C X a @Redj w "  dolorum laborum deser nimi   @!Blue    SSThumbnailjB 7Exporting an image (web page thumbnail) --------------------------------- on dragStart set the dragImage to the icon of me set the dragImageOffset to the width of me div 2,the height of me div 2 set the dragData["image"] to the text of img ID (the icon of the target) DisplayMessage the params,"DDMessage2" -- for demo purpose end dragStart --------------------------------- on mouseEnter set the dragDelta to 10 end mouseEnter B20Drop this image into an app that accepts images5 cREVGeometry Master,movevDistancefalseMaster,scalebottomDistanceMaster,expectedRect629,209,695,259Master,movehDistance-0.1275Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking0Master,scaletopDistanceMaster,moveHAbsolutefalseMaster,scaleleftDistance Master,moveHfalse cREVGeneral scriptChecksumMJ T;b˘) breakPoints handlerListdragStart mouseEnterscriptSelection char 69 to 73 bookmarks revUniqueID 1206635914134 prevHandler dragStart tempScriptscript

Exporting an image (web page thumbnail)

---------------------------------

on dragStart

set the dragImage to the icon of me

set the dragImageOffset to the width of me div 2,the height of me div 2

set the dragData["image"] to the text of img ID (the icon of the target)

DisplayMessage the params,"DDMessage2" -- for demo purpose

end dragStart

---------------------------------

on mouseEnter

set the dragDelta to 10

end mouseEnter

  RevDocsStackjB Exporting a file (Rev file icon) --------------------------------- on dragStart set the dragData["files"] to the filename of stack "revDocs" set the dragImage to the icon of the target set the dragImageOffset to the width of me div 2,the height of me div 2 DisplayMessage the params,"DDMessage2" -- for demo purpose end dragStart --------------------------------- on mouseEnter set the dragDelta to 10 end mouseEnter D!fDrop this icon into your emailer to make it an attachment On your desktop to make a copy of this file cREVGeneralscriptChecksumɱb& !\і bookmarks revUniqueID 1206654754802 handlerListdragStart mouseEnterscriptSelectionchar 264 to 263 prevHandler dragStart tempScriptscript

Exporting a file (Rev file icon)

---------------------------------

on dragStart

set the dragData["files"] to the filename of stack "revDocs"

set the dragImage to the icon of the target

set the dragImageOffset to the width of me div 2,the height of me div 2

DisplayMessage the params,"DDMessage2" -- for demo purpose

end dragStart

---------------------------------

on mouseEnter

set the dragDelta to 10

end mouseEnter

  Label Field $ Yon mouseEnter set the tooltip of me to the filename of stack "RevDocs" end mouseEnter  '' uDontResizetrueL/Applications/Revolution Enterprise/2.9.0-rc-4/Toolset/revdocumentation.rev cREVTable currentviewrevdocumen....rev (4.9 MB) cREVGeneralscriptChecksum[O-m9]T!9} revUniqueID 1206655172558 bookmarks handlerList mouseEnter tempScript prevHandlerscriptSelection char 73 to 72script$

on mouseEnter

set the tooltip of me to the filename of stack "RevDocs"

end mouseEnter

revdocumen....rev (4.9 MB)RNoCodeheon mouseUp if the hilite of me then set the dragDelta to 10 set the script of fld "Text" to empty set the hilite of btn "WithStyle" to true set the enabled of btn "WithStyle" to false else set the dragDelta to max(the width of fld "Text",the height of fld "Text") set the script of fld "Text" to the script of btn "Code1" set the enabled of btn "WithStyle" to true end if end mouseUp YTest drag and drop from this unlocked field with D&D code or without any scripting in itWithout D&D code cREVGeneralscriptChecksumKP2;DC>T$ bookmarks revUniqueID 1206951664674 handlerListmouseUpscriptSelectionchar 397 to 396 prevHandlermouseUp tempScriptscript<

on mouseUp

if the hilite of me then

set the dragDelta to 10

set the script of fld "Text" to empty

set the hilite of btn "WithStyle" to true

set the enabled of btn "WithStyle" to false

else

set the dragDelta to max(the width of fld "Text",the height of fld "Text")

set the script of fld "Text" to the script of btn "Code1"

set the enabled of btn "WithStyle" to true

end if

end mouseUp

e WithStylehe  Export style cREVGeneralscriptChecksumُ B~ revUniqueID 1206970234783 bookmarks handlerList tempScript prevHandlermouseUpscriptSelection char 1 to 0script

 Rev doc.png !ˉPNG  IHDR! pHYs  gAMA|Q cHRMz%u0`:o_FAIDATxba@k׮p>L߿Ŀb1Ο?_HH"6d @ϟ? _|a÷oDEE Z @L0Ǐd! (lXYY899~p o~% Ĭ, &CD D0f~͛ K P3tRalvvv/_xNR"h!,Y GP d)@1! b)oA4,>A| d)@5 -C_l\P\PUUا yxx=zTXXX-( c:d9 ,d`aea/<[}a˖- m@ d!@!oPÛI >fj`l0//,,( PV}z^@y p~YŒՋ ̾ گ^3+bH+ +8xAB߿и@X-|?Ck#[>)7C}" 8؀id!,Q,afL@@J<Ą^͟!8"㯀/ Nf<A~??*2xf/("[xC; >|8Ep/?~2l83_] Ͽ|Y{pXP>@tĥ޼y %ua͚@psv:Ll L̠${~%MD V,?P^fb 0@L2~^<7fWeaHO7Ѐ? ~ Wodx1c^nAAA< #b*+g ?tOs- O~gX: B)'3 ,9 n?"P`^"!0aǾ~303;(00~L v1l\4+r;W2|ً ~r`Cq|@LmG /` G?~ɰioaa~6 kʫ :?f`d Be|p`Ӧ`7וfopYpGǀy zjh݆6phЃ̅^d@(_N^T/έ z U:U w> BI,H&Ƅ&jݻw`T'un'SY>_| "׀A0dR~@Lǚ o_gm7\ 祀Y#0~2_ w>fCg%|TxA 2ُ[,uawwWp}%[[{l@_xMLL0t߇[@,l[s[π@0@([ .bĄt'YBPe)z#bdVւ@Y222 7owP#9TҀ9@!;e6y @'0ݫ~IENDB` cREVGeneral revUniqueID 1206654708520TCode1Ep3on dragEnter -- just to inhibit an auto drag and drop in the source field end dragEnter --------------------------------- on dragStart if the hilite of btn "WIthStyle" then set the dragData["html"] to the htmlText of the selectedText else set the dragData["text"] to the selectedText set the dragImage to 1314 set the dragImageOffset to 14,16 DisplayMessage the params,"DDMessage2" -- for demo purpose end dragStart --------------------------------- on mouseEnter set the dragDelta to 10 -- max(the width of me,the height of me) end mouseEnter lR cREVGeneralscriptChecksum$jV'hy63 bookmarks revUniqueID 1206953071665 handlerListdragEnter dragStart mouseEnterscriptSelectionchar 510 to 509 prevHandler dragEnter tempScriptscript

on dragEnter

-- just to inhibit an auto drag and drop in the source field

end dragEnter

---------------------------------

on dragStart

if the hilite of btn "WIthStyle" then

set the dragData["html"] to the htmlText of the selectedText

else set the dragData["text"] to the selectedText

set the dragImage to 1314

set the dragImageOffset to 14,16

DisplayMessage the params,"DDMessage2" -- for demo purpose

end dragStart

---------------------------------

on mouseEnter

set the dragDelta to 10 -- max(the width of me,the height of me)

end mouseEnter

@[jJFIFCCj" }!1AQa"q2#BR$3br %&'()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz w!1AQaq"2B #3Rbr $4%&'()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz ?f/ٯ_?gw]kZ;6:ojZ^/5OSo4 [eydFcᏆWgo.s:g7CDӼ'[xEIxV״-3OGS/nK4i83)a|sHo4h(4? >y&USqeң i&ҳnR(2dWo#ⷊ4)x,ѡ:h`\T(<TЧFJ EEߤ_ɟ?k3t&~l?>!7 &WzgY2Xx._]>Mֳ%xcCeqe3u|x7⧉˯RO&૫o?>7|O~5{D/#>'׭<`O5ai^,gSNdiZu?8Zso.͈Jq$c<=XsqŏNtxwE*Ukj)gRmJ3kAE4獼so|/?MGI]on|a} \&cXbRxwUkj6~GUWtk_z[ⵗΟt_j>"<c?Ƶmƞ*-5 :\QifD }.qb]vXl~,jd+?~#|Z>Ыs:ǃ|I;CѼ;O ɭHuҴ; Ri5Dm=Ο~(~njeߌk<{|<.W↖nDh?|Kρ%mWI>#|3gEJ9ô^.ѡnRV:%:?mϊ:j1N[Zq):RVV"gД*ӫ(AF̮hIsr_k P?ɟ?k3t&~l?4Wp;L;#'u|H| +ѳf7G2gF?s}E /ÿd?2xGWďNxɟ?k3t&~l?4Qp;L#'u|H| +ѳf7_O;Z)BZΓhMi:V~N4:(m,4 Ha+k[h5QYp?cx>&Mp2.W3UΤ#FJ%NS2m'W?ݟQkŞ,x0%<;Zf5i-HNcYܕJqu>yz>x4/|?> Ѯo x}VJei-&&Kmlli^ KxaNaTЁ?+QqgSɲt)ӧ`!C9cB8ZQ!Tc%I$AO^0b<0"jpW UZ\:j՞Y)ԫRrT)͹I}SBoz?j?g%~#֢,I!U 1ΰ~? ~JFG>~W7=j(o*8y4Axo7 ?OQ@Z(["e!o5^ }SBoz?j?g%~#֢?,HWp:aTЁ?+ڧ _?/=_!U 1ΰ~? ~JF_mK~#}&ksmZu}2 ˻tn+ۘ4Ui~s;O3<Ɲ,:PXS.t㈫R0QIv?|k>#?kl*ANM[F Xv :ԡ?~4JQct}`qon preOpenStack

set the loc of this stack to (the right of stack (the mainstack of this stack) + 146),item 2 of the loc of stack (the mainstack of this stack)

put empty into img "Drop"

end preOpenStack

  Label Field ssssssDQx2 cREVTable currentview2Drag and drop here a web page from the other stack cREVGeometry Master,expectedRect634,220,762,256Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneral revUniqueID 1206456978192 Drag and drop here a web page from the other stackDrop p6on mouseUp set the text of me to empty end mouseUp @:` cREVGeometry Master,expectedRect634,122,762,218Master,scalebottomDistanceMaster,movevDistancefalseMaster,movehDistance-102Master,moveHObjectSiderightMastertrueMaster,scalerightDistanceMaster,moveHObjectRefcardMaster,cardRanking1Master,scaleleftDistanceMaster,moveHAbsolutetrueMaster,scaletopDistance Master,moveHtrue cREVGeneralscriptChecksumfjYl}&N'fGwC revUniqueID 1206456978193 bookmarks handlerListmouseUp tempScript prevHandlermouseUpscriptSelection char 53 to 52script

on mouseUp

set the text of me to empty

end mouseUp