logo       

Re: BUG: dlineinfo returns a scalar: msg#00079

Subject: Re: BUG: dlineinfo returns a scalar
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



<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
boot-loaders.gr...    php.pear.genera...    debugging.valgr...    kde.redhat.user...    text.xml.xsl.ge...    culture.languag...    hardware.microc...    java.servicemix...    redhat.release....    web.zope.plone....    user-groups.lin...    opendarwin.webk...    video.mjpeg.use...    sysutils.bcfg2....    encryption.gpg....    lx-office.devel...    xfree86.forum/2...    mail.mutt.devel...    acpi.devel/2003...    qnx.openqnx.dev...    network.irc.irs...    freebsd.devel.m...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe