[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
BLT 2.4i fix for Tcl 8.2
From: |
Marcus G. Daniels |
Subject: |
BLT 2.4i fix for Tcl 8.2 |
Date: |
08 Sep 1999 13:55:46 -0700 |
User-agent: |
Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4 |
Several folks mentioned using Tcl/Tk 8.2 with Swarm 2.0.
Here's a fix to BLT 2.4i that is now necessary in order for
drag and drop to work reliably.
*** bltDnd.c.~1~ Thu May 20 13:46:37 1999
--- bltDnd.c Wed Sep 8 14:48:48 1999
***************
*** 1430,1445 ****
register Source *srcPtr; /* drag&drop source record */
{
int status;
! WindowTree *treePtr;
Tcl_DString buffer;
SubstDescriptors subst[3];
Tcl_DString dString;
Tcl_HashEntry *hPtr;
- treePtr = GetTargetWindow(srcPtr, srcPtr->token.lastX,
srcPtr->token.lastY);
if (treePtr == NULL) {
return;
}
Tcl_DStringInit(&buffer);
Tcl_DStringAppend(&buffer, srcPtr->pkgCmdResult, -1);
--- 1430,1453 ----
register Source *srcPtr; /* drag&drop source record */
{
int status;
! WindowTree *treePtr =
! GetTargetWindow(srcPtr, srcPtr->token.lastX, srcPtr->token.lastY);
Tcl_DString buffer;
SubstDescriptors subst[3];
Tcl_DString dString;
Tcl_HashEntry *hPtr;
+ char dataTypeBuf[strlen (treePtr->dataType) + 1], *dataType;
if (treePtr == NULL) {
return;
}
+ strcpy (dataTypeBuf, treePtr->dataType);
+ #if 1
+ dataType = dataTypeBuf;
+ #else
+ dataType = treePtr->dataType;
+ #endif
+
Tcl_DStringInit(&buffer);
Tcl_DStringAppend(&buffer, srcPtr->pkgCmdResult, -1);
***************
*** 1456,1462 ****
if (status != TCL_OK) {
goto reject;
}
! hPtr = Tcl_FindHashEntry(&(srcPtr->handlerTable), treePtr->dataType);
if (hPtr != NULL) {
char *cmd;
--- 1464,1470 ----
if (status != TCL_OK) {
goto reject;
}
! hPtr = Tcl_FindHashEntry(&(srcPtr->handlerTable), dataType);
if (hPtr != NULL) {
char *cmd;
***************
*** 1492,1498 ****
Tcl_DStringInit(&dString);
Blt_DStringAppendElements(&dString, "send", treePtr->interpName,
dragDropCmd, "target", treePtr->targetName, "handle",
! treePtr->dataType, Tcl_DStringValue(&buffer), (char *)NULL);
status = Tcl_Eval(srcPtr->interp, Tcl_DStringValue(&dString));
Tcl_DStringFree(&dString);
if (status != TCL_OK) {
--- 1500,1506 ----
Tcl_DStringInit(&dString);
Blt_DStringAppendElements(&dString, "send", treePtr->interpName,
dragDropCmd, "target", treePtr->targetName, "handle",
! dataType, Tcl_DStringValue(&buffer), (char *)NULL);
status = Tcl_Eval(srcPtr->interp, Tcl_DStringValue(&dString));
Tcl_DStringFree(&dString);
if (status != TCL_OK) {
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- BLT 2.4i fix for Tcl 8.2,
Marcus G. Daniels <=