Jack <goodcall__1@xxxxxxxxxxx> writes:
>Great - thanks. It works fine. I hope this will make it to beta14?
Yes.
>
>----- Original Message -----
>From: "Slaven Rezic" <slaven@xxxxxxxx>
>To: "Jack" <goodcall__1@xxxxxxxxxxx>
>Cc: "Nick Ing-Simmons" <nick@xxxxxxxxxxxxxxx>; <ptk@xxxxxxxxxxxxxxxxxx>
>Sent: Thursday, January 08, 2004 3:11 PM
>Subject: Re: BUG: dlineinfo returns a scalar
>
>
>> "Jack" <goodcall1@xxxxxxxxxxx> writes:
>>
>> > The dlineinfo method of Tk::Text does not return the values in list context
>(as
>> > in 800.025 - and as stated in the documentation).
>> >
>> > #run this
>> > use Tk;
>> > my $mw=tkinit;
>> > my $text=$mw->Text->pack;
>> > $mw->idletasks;
>> > my ($x,$y,$w,$h,$b)=$text->dlineinfo('1.0');
>> > print "X: $x\n";
>> > __END__
>> >
>> > Notice how all the values are located within the $x variable.
>> >
>> > I assume that this is a bug??
>> >
>> > Note: the "bbox" method is still OK.
>> >
>>
>> Here's a fix:
>>
>> --- Tk-804.025_beta13/pTk/mTk/generic/tkText.c Thu Dec 11 21:21:48 2003
>> +++ Tk-804.025_beta13-perl5.8.2d/pTk/mTk/generic/tkText.c Thu Jan 8 23:07:50
>2004
>> @@ -740,9 +740,18 @@ TextWidgetCmd(clientData, interp, argc,
>> if (TkTextDLineInfo(textPtr, &index1, &x, &y, &width, &height, &base)
>> == 0) {
>> char buf[TCL_INTEGER_SPACE * 5];
>> + Tcl_Obj *el;
>> + el = Tcl_GetObjResult(interp);
>>
>> + Tcl_ListObjAppendElement(interp,el,Tcl_NewIntObj(x));
>> + Tcl_ListObjAppendElement(interp,el,Tcl_NewIntObj(y));
>> + Tcl_ListObjAppendElement(interp,el,Tcl_NewIntObj(width));
>> + Tcl_ListObjAppendElement(interp,el,Tcl_NewIntObj(height));
>> + Tcl_ListObjAppendElement(interp,el,Tcl_NewIntObj(base));
>> + /*
>> sprintf(buf, "%d %d %d %d %d", x, y, width, height, base);
>> Tcl_SetResult(interp, buf, TCL_VOLATILE);
>> + */
>> }
>> } else if ((c == 'e') && (strncmp(argv[1], "edit", length) == 0)) {
>> result = TextEditCmd(textPtr, interp, argc, argv);
>>
>> --
>> Slaven Rezic - slaven@xxxxxxxx
>>
>> tktimex - project time manager
>> http://sourceforge.net/projects/ptktools/
>> -++**==--++**==--++**==--++**==--++**==--++**==--++**==
>> This message was posted through the Stanford campus mailing list
>> server. If you wish to unsubscribe from this mailing list, send the
>> message body of "unsubscribe ptk" to majordomo@xxxxxxxxxxxxxxxxxx
>>
-++**==--++**==--++**==--++**==--++**==--++**==--++**==
This message was posted through the Stanford campus mailing list
server. If you wish to unsubscribe from this mailing list, send the
message body of "unsubscribe ptk" to majordomo@xxxxxxxxxxxxxxxxxx
|