Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Removing dependency on "anchor" tag
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Weeble  
View profile  
 More options Jan 29 2009, 4:01 am
Newsgroups: comp.lang.tcl
From: Weeble <clockworksa...@gmail.com>
Date: Thu, 29 Jan 2009 01:01:11 -0800 (PST)
Local: Thurs, Jan 29 2009 4:01 am
Subject: Removing dependency on "anchor" tag
Hi,
    I'm trying to fix some code in Python's IDLE editor that broke
with Tk 8.5. It depended on being able to find the "anchor" tag on a
text widget in order to keep the text selection working while
providing custom behaviour for the home key: the first press should
send the cursor to the first non-whitespace character on the line, and
subsequent presses should toggle between that position and the
absolute start of the line.

The problem is that it tries to read the "anchor" mark in order to
correctly update the selection, but in Tk 8.5 it has been renamed to
be unique to each text widget and is noted to be private. What is the
correct way to customise this behaviour? I can get it to work by
calling tk::TextKeySelect (and the resulting code is much simpler!)
but I'm not sure if this is really supposed to be a public method. Is
it just as likely to change in future versions? How many versions back
will it work? Is there a better way? I don't think reimplementing the
entire text selection system is a viable option.

Many thanks,
    Weeble.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Weeble  
View profile  
 More options Jan 29 2009, 4:14 am
Newsgroups: comp.lang.tcl
From: Weeble <clockworksa...@gmail.com>
Date: Thu, 29 Jan 2009 01:14:40 -0800 (PST)
Local: Thurs, Jan 29 2009 4:14 am
Subject: Re: Removing dependency on "anchor" tag
On Jan 29, 9:01 am, Weeble <clockworksa...@gmail.com> wrote:

> Hi,
>     I'm trying to fix some code in Python's IDLE editor that broke
> with Tk 8.5. It depended on being able to find the "anchor" tag...

Oops, obviously I mean anchor *mark*, not tag.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Koen Danckaert  
View profile  
 More options Jan 29 2009, 11:10 am
Newsgroups: comp.lang.tcl
From: Koen Danckaert <k...@spam.spam>
Date: Thu, 29 Jan 2009 17:10:25 +0100
Local: Thurs, Jan 29 2009 11:10 am
Subject: Re: Removing dependency on "anchor" tag

Weeble wrote:
>     I'm trying to fix some code in Python's IDLE editor that broke
> with Tk 8.5. It depended on being able to find the "anchor" tag on a
> text widget in order to keep the text selection working while
> providing custom behaviour for the home key: the first press should
> send the cursor to the first non-whitespace character on the line, and
> subsequent presses should toggle between that position and the
> absolute start of the line.

> [...] I don't think reimplementing the
> entire text selection system is a viable option.

Well, maybe it is... but someone else already did it for you. Have a look at the ntext package in tklib, discussed on http://wiki.tcl.tk/17976

--Koen


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »