f



tk text widget

Hi,
See tk 4.2 file tkText.c:

	    Tcl_AppendResult(interp, "bad switch \"", arg,
		    "\": must be -forward, -backward, -exact, -regexp, ",
		    "-nocase, -count, or --", (char *) NULL);
	    return TCL_ERROR;

.....

	} else if ((c == 'f') && (strncmp(argv[i], "-forwards", length) ==
0)) {
	    backwards = 0;
.....


hm , must be "-forward" , but writed "-forwards"
also:
tk 7.x
tk 8.4.x
tk 8.5.x
......
and see tk 8.6 file tkText.c:

    static const char *const switchStrings[] = {
	"--", "-all", "-backwards", "-count", "-elide", "-exact", "-
forwards",
	"-hidden", "-nocase", "-nolinestop", "-overlap", "-regexp",
	"-strictlimits", NULL
    };
.....
	    Tcl_AppendResult(interp, "bad switch \"", Tcl_GetString(objv[i]),
		    "\": must be --, -all, -backward, -count, -elide, ",
		    "-exact, -forward, -nocase, -nolinestop, -overlap, ",
		    "-regexp, or -strictlimits", NULL);
	    return TCL_ERROR;
	}

.....

must be "-forward" , but writed "-forwards"
must be "-backward" , but writed "-backwards"
----------------------------------------
ok
next:

Practical Programming in Tcl & Tk, Third Edition
By Brent B. Welch  Table 33-4
&
Practical Programming in Tcl & Tk, Fourth Edition
By Brent B. Welch  Table 36.4

Options to the search operation.
-forward	Searches forward from index. This is the default.
-backward	Searches backward from index.
-----------------------------------------
why  ? ))
0
comp_art (9)
9/16/2011 9:09:51 PM
comp.lang.tcl 23428 articles. 2 followers. Post Follow

1 Replies
848 Views

Similar Articles

[PageSpeed] 41

On Sep 16, 4:09=A0pm, elipse <comp_...@ymail.com> wrote:
> Hi,
> See tk 4.2 file tkText.c:
>
> =A0 =A0 =A0 =A0 =A0 =A0 Tcl_AppendResult(interp, "bad switch \"", arg,
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "\": must be -forward, -backward,=
 -exact, -regexp, ",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "-nocase, -count, or --", (char *=
) NULL);
> =A0 =A0 =A0 =A0 =A0 =A0 return TCL_ERROR;
>
> ....
>
> =A0 =A0 =A0 =A0 } else if ((c =3D=3D 'f') && (strncmp(argv[i], "-forwards=
", length) =3D=3D
> 0)) {
> =A0 =A0 =A0 =A0 =A0 =A0 backwards =3D 0;
> ....
>
> hm , must be "-forward" , but writed "-forwards"
> also:
> tk 7.x
> tk 8.4.x
> tk 8.5.x
> .....
> and see tk 8.6 file tkText.c:
>
> =A0 =A0 static const char *const switchStrings[] =3D {
> =A0 =A0 =A0 =A0 "--", "-all", "-backwards", "-count", "-elide", "-exact",=
 "-
> forwards",
> =A0 =A0 =A0 =A0 "-hidden", "-nocase", "-nolinestop", "-overlap", "-regexp=
",
> =A0 =A0 =A0 =A0 "-strictlimits", NULL
> =A0 =A0 };
> ....
> =A0 =A0 =A0 =A0 =A0 =A0 Tcl_AppendResult(interp, "bad switch \"", Tcl_Get=
String(objv[i]),
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "\": must be --, -all, -backward,=
 -count, -elide, ",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "-exact, -forward, -nocase, -noli=
nestop, -overlap, ",
> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 "-regexp, or -strictlimits", NULL=
);
> =A0 =A0 =A0 =A0 =A0 =A0 return TCL_ERROR;
> =A0 =A0 =A0 =A0 }
>
> ....
>
> must be "-forward" , but writed "-forwards"
> must be "-backward" , but writed "-backwards"
> ----------------------------------------
> ok
> next:
>
> Practical Programming in Tcl & Tk, Third Edition
> By Brent B. Welch =A0Table 33-4
> &
> Practical Programming in Tcl & Tk, Fourth Edition
> By Brent B. Welch =A0Table 36.4
>
> Options to the search operation.
> -forward =A0 =A0 =A0 =A0Searches forward from index. This is the default.
> -backward =A0 =A0 =A0 Searches backward from index.
> -----------------------------------------
> why =A0? ))

This is interesting. Two points.

American English usage would be forward and backward. English English
usage would be forwards and backwards.

Second, if abbreviations of the options are allowed, forward would be
an acceptable prefix for forwards.
Likewise for backward.

0
escargo (54)
9/17/2011 3:45:44 AM
Reply:

Similar Artilces:

tcl/tk 8.4 text widget question
Hi! Can you help. I have a gui script that displays the output of commands as they are ran in a text widget with scroll bar. However, once the output goes past the height of the text widget, the text does not automatically scroll down. When the processing is complete, I have to scroll to the bottom to see the last few lines including the line where it says "Processing complete" Does anyone know how to fix this? Meg Cooper mulkey_mouse@cox.net wrote: > Hi! > Can you help. > I have a gui script that displays the output of commands as they are > ran in a text widget with scroll bar. However, once the output goes > past the height of the text widget, the text does not automatically > scroll down. When the processing is complete, I have to scroll to the > bottom to see the last few lines including the line where it says > "Processing complete" > > Does anyone know how to fix this? > Meg Cooper Try... $txt see end .... after you add each new line of text. Jeff Hey!! Thanks!! It worked like a charm. ---------- Forwarded message ---------- From: Jeff Godfrey <jeff_godf...@pobox.com> Date: Feb 25, 12:32=A0pm Subject: tcl/tk 8.4 text widget question To: comp.lang.tcl mulkey_mo...@cox.net wrote: > Hi! > Can you help. > I have a gui script that displays the output of commands as they are > ran in a text widget with scroll bar. However, once the output goes > past the height of the text widget, the tex...

Tcl/Tk text widget article in Linux Journal
Linux Journal have just published an article I wrote on the Tk text widget. None of the seasoned veterans on c.l.t will learn anything from it, but newbies might find it useful. The information should apply to Windows users too. The link is: http://www.linuxjournal.com/article.php?sid=7357&mode=thread&order=0 This is the first Tcl article (or indeed, any article) I've had published, so I'd welcome any constructive feedback - both on my writing and my Tcl coding. More importantly, this is the first Tcl based article that Linux Journal have published. When I made the original...

in Tcl/tk, How can I redirect stdout to a text widget?
I already wrote a tcl script. there are many output information sent to stdout in the script. Now I'm using TK to optimize this script, I hope to redirect all output information to a text widget, How can i do it? I tried to rediect output information to a file, it's OK. then I want to use "fileevent" command to trace the file's action and then send new information to a text widget. but system say that "filehandle cannot be read" error. I think that the reason should be the file is open for "w" and cannot be read. How can i do it? close stdout ...

Text widget Tab behaviour in Tcl/Tk 8.5
Last October I noticed that there was a difference in the way text widget tabs are handled in Tcl 8.5 when compared with 8.4. Apparently this is a new feature - but I was told that an option will be added to allow the "old" style of tab behaviour (so that existing code will work properly). I was just wondering if there have been any developments in this area? Best Regards, =Adrian= Adrian Davis wrote: > Last October I noticed that there was a difference in the way text > widget tabs are handled in Tcl 8.5 when compared with 8.4. > > Apparently this is a new featu...

text in a widget, text-widget
hello i have an application with a couple of text widgets but i would like to add some functionalities that at first and second sight are not directly supported by the plain text widget itself - ? for example i would like certain lines of text within the textwidget to take different background colors according to certain parameters also i would like to be able to detect certain sentences or words that would become 'links' and by clicking them i would open up different windows any suggestions to solutions and widgets for the above problems ? - i probably could...

1. Thank you everyone for your help. 2. Tcl/Tk Designer 3. Text Editor Widget
Hello CLT Thank you everyone that responds to my posts asking for info. I really appreciate it. At this stage of my tcl career I can ask many more questions than I can answer. Speaking of questions, here are a few more: 1. Is there a tcl/tk based user interface designer available? There has been no recent activity on VTCL, and SpecTcl looks even older. I am not averse to using VTCL. I would just prefer to use something that is being actively maintained. 2. Is there a text editor widget that I can drop into an application? I realize I could put something togeth...

RE: text in a widget, text-widget #2
Johan, Here this will give you an idea how to create a link in a text widget as well as some other tags. HTH Mike use strict; use Tk; use Tk::Dialog; my $mainWindow = MainWindow->new(-title => "Test Tags"); my $sc_width = 100; my $sc_height = 15; my $scrolled = $mainWindow->Scrolled( "Text", -scrollbars => 'se', -background => 'white', -wrap => &...

Re: text in a widget, text-widget @ 1145998849
Intrah onat Diria .. Tue, 25 Apr 2006 13:55:44 -0700 , ****** wrote "Revera y": > of "unsubscribe ptk" to majordomo@lists.stanford.edu > If you wish to unsubscribe from this mailing list, send the message body > This message was posted through the Stanford campus mailing list server. > ++**=3D=3D > -++**=3D=3D--++**=3D=3D--++**=3D=3D--++**=3D=3D--++**=3D=3D--++**=3D=3D--= > > > > > ,=20 > , _________________ > , |---| > , | > , lead > , ::::::opthe > , oo,loent,uaha > , }, > ,...

Re: text in a widget, text-widget @ 1146167556
Intrah onat Diria .. Tue, 25 Apr 2006 13:55:44 -0700 ,Van Nieuwenhuize, Mike wrote "Noalim y": > > Johan, > > Here this will give you an idea how to create a link in a text widget as > well as some other tags. > > HTH > > Mike > > use strict; > use Tk; > use Tk::Dialog; > > my $mainWindow = MainWindow->new(-title => "Test Tags"); > > my $sc_width = 100; > my $sc_height = 15; > > my $scrolled = $mainWindow->Scrolled( > ...

Problem with tk text widget in displaying Chinese characters, entry widget works fine.
Hi, There seems to be a problem with tk text widget. I am able to edit and see the chinese characters in both entry widget and text widget. When I move from one character to another using arrow key or mouse, it works fine in entry; But in text, it simply mess up. The problem could be that chinese characters are 2 bytes long and cursor moves 1 byte. The text interpreter might be combining the other byte of Chinese character with the 2 bytes of next chinese character. Do I have to change some setting for text widget and/ or install some patch? Thanks, Vikas Vikas Gupta schrieb: > Hi, >...

[TCL/TK interface] Passing variable to TCL/TK
Hi, I am trying to sent to a variable to tcl/tk and unify there it with a string. I wrote the prolog code: :- use_module(library(tcltk)). :- use_package(classic). go(A):- tk_new([name('Simple')], Tcl), tcl_eval(Tcl, 'source simple2.tcl', _), tcl_eval(Tcl, ['ask', br(write(A))], _), tk_main_loop(Tcl), tcl_delete(Tcl). and the tcl file simple2.tcl proc ask {var} { unify_term $var my_value } unfortunatelly when I query for go(S). the interpeter goes into a loop (!?). Where I am wrong. Are there any example code somewhere i...

tabbing through Tk Text widgets
I've got a Tk window with a large number of Text widgets, and I'd like to have the TAB key move focus from one Text widget to the next. Unfortunately I can't find the recipe. Can anybody help? Peace Elaine Jackson wrote: > I've got a Tk window with a large number of Text widgets, and I'd like to have > the TAB key move focus from one Text widget to the next. Unfortunately I can't > find the recipe. Can anybody help? > > Peace See methods tk_focusNext & tk_focusPrev in http://www.pythonware.com/library/tkinter/introduction/x9374-event-processing...

How to capture text in tk widget
Hi, I have a tk text window. My need is - if I highlight some portion of text with mouse, it should automatically be saved into a variable. Please suggest me on how to do this. Thanks, Balajee On 28 apr, 13:13, balajee <balaj...@gmail.com> wrote: > Hi, > =A0 =A0I have a tk text window. My need is - if I highlight some portion > of text with mouse, it should automatically be saved into a variable. > Please suggest me on how to do this. > > Thanks, > Balajee You need to set up a binding for the event that ends the selection, something along these...

Using a tk text widget for stdout
I am using a text widget as a substitute for the stdout of binary executables in Linux. e.g: if t is the tk text widget: $t insert end [exec ./dnaml < dnaml.setup] However, the whole output of dnaml to stdout is only appended within the widget after dnaml has completed execution. While dnaml is executing, no output appears in the widget. I need to see the output as it is produced, more or less as it would appear in a terminal window. Id there any way around this problem? Is the text widget perhaps inappropriate? I would greatly appreciate any advice. WillemF wrote: > I am using a te...

Does Tk text widget support ligatures?
From the very little I've googled, it appears that ligature info (if supported by a particular font) is somehow embedded into a font--especially for some non-English languages. There are apparently a hand-full of ligatures defined for English unicode? \ufb00 thru \ufb06 is ff, fi, fl, ffi, ffl, ft and st Perhaps that's it. If I attempted to implement the above, but the font did not have the glyphs for some or all of the range fb00-fb06, is there a way I could tell? -- computerjock AT mail DOT com On 7/13/2015 10:45 PM, Dave wrote: > From the very little I&...

tcl text widget wrap around?
Hi, I am using a proc to detect the occurrence of certain string in a text widget. It works by periodically scan each line of the text widget (starting at the current line), check content, decrement line number if not matched, *repeats, until it reaches line 0. The problem is that it appears the text widget's line number will eventually wrap around after awhile, so it is possible that the current line index sits close to 0. Is there any easy way around this problem? How can I tell a text widget's buffer size? Thanks On 3/27/11 8:16 AM, py wrote: > Hi, &...

Text/C editor written in Tcl/Tk
Dear all, I have used the Tk text widget for some time. It is the most powerful text widget I have ever seen. My feeling is that it should not be very difficult to build a great editor out of it. I am currently using jEdit which is written in Java. Is there any editor written in Tcl/Tk written that is comparable to jEdit, Emacs, Vim existed some where? I checked Google and was unable to find one. Thanks a lot! Best regards, Jingzhao ouj wrote: > Dear all, > > I have used the Tk text widget for some time. It is the most powerful text > widget I have ever seen. My feeling is ...

Program output to Tk text widget
We're kicking off a program (in this case rsync) in a script, and showing its output in a text widget. I'm trying to figure out how to get the output to display properly, since rsync overwrites the text on the same line to give a file count progress (printf with no \n). The output in the text box looks like this: receiving file list... 100 files... 200 files... 300 files... However if you run rsync from a command prompt those lines are overwriting each other, "incrementing" the count.. How can I get it to go the same way in the textbox? If the "\n" is removed belo...

How to drag a file into tcl tk entry widget?
I want to have my script ability to receive drooped files from windows explorer on tk entry widget. Basically when user drops a file on widget, it should be filled with its path. Is it possible using tcl tk? Thanks On 7/24/12 10:08 AM, sarbjit1987@gmail.com wrote: > I want to have my script ability to receive drooped files from windows explorer on tk entry widget. Basically when user drops a file on widget, it should be filled with its path. Is it possible using tcl tk? Use the TkDnD extension. -- +------------------------------------------------------------------------+ | Gerald W. Lester, President, KNG Consulting LLC | | Email: Gerald.Lester@kng-consulting.net | +------------------------------------------------------------------------+ Στις 24/7/2012 18:11, ο/η Gerald W. Lester έγραψε: > On 7/24/12 10:08 AM, sarbjit1987@gmail.com wrote: >> I want to have my script ability to receive drooped files from windows >> explorer on tk entry widget. Basically when user drops a file on >> widget, it should be filled with its path. Is it possible using tcl tk? > > Use the TkDnD extension. > > A tutorial can be found here: http://wiki.tcl.tk/36708 George On Tuesday, July 24, 2012 8:43:43 PM UTC+5:30, George Petasis wrote: > =CE=A3=CF=84=CE=B9=CF=82 24/7/2012 18:11, =CE=BF/=CE=B7 Gerald W. Lester = =CE=AD=CE=B3=CF=81=CE=B1=CF=88=CE=B5: > &gt; On 7/24...

uninitialized value using a Tk Text widget
x-posted from perlmonks I have several widgets displayed including a scrollable listbox and some scrollable text boxes. If a user clicks in one of my textboxes and begins to use the down arrow key when the textbox is empty, perl throws "Use of uninitialized value in numeric ne (!=) at ...Text.pm line 1223" I tried to duplicate this with a small example, but [code] use Tk; my $mw = MainWindow->new(); $mw->Scrolled('Text')->pack(); $mw->Text()->pack; MainLoop; [/code] does not display the problem for either the Scrolled Text or the simple Tex...

HELP! REFRESHING LABEL WIDGET IN TCL/TK
hi everyone, i'm a newbie to tcl/tk. i want to change the value of a label (using -text option)in a while loop. ex: label .l1 -text "value of i" pack .l1 set i 10 while { $i>0} { .l1 configure -text "$i" # changing the text value of label after 500 incr i -1 } In this loop, i have even used delay( "after 500") . but i get only the final value( i =1) displayed on the label . can anyone help me in refreshing the label widget. pralini@gmail.com wrote: > hi everyone, > i'm a newbie to tcl/t...

Tk::Text and Embedded Widgets
Hi all, While writing a basic text formatter I decided to add a horizontal bar tag (similar to html's <hr>) that results in a frame being embedded into a text widget. I wanted the frame to stretch _across_ the line its on, but the -stretch option to Tk::Text's windowCreate method only applies vertically. I've since done a workaround (ie by setting the Frame's width to the width of the text widget on creation), but changes to the text's size are not reflected in the Frame (for obvious reasons). Is there a way to embed a widget into a Text box that ...

highlight text in text widget
Hi, I am trying to make widget that displays text. I also want a search keywords available. The way I have envisioned is something similar to emacs search, i.e. it highlights all the occurrences of the keyword that you are interested in. I am trying to find out if that kind of highlighting be done in widget_text or some other widgets. Can anyone help? Thanks neon writes: > I am trying to make widget that displays text. I also want a search > keywords available. The way I have envisioned is something similar to > emacs search, i.e. it highlights all the occurrences of the keyword &g...

Per/Tk
HI, I define the window : my $mw = new MainWindow; # Main Window my $frm_name = $mw -> Frame() -> pack(); my $lab1 = $frm_name -> Label(-text=>"Enter the remote hostname or IP:") -> pack(); my $ent1 = $frm_name -> Entry() -> pack(); my $lab2 = $frm_name -> Label(-text=>"Enter the number of iterations to run [5]:") -> pack(); my $ent2 = $frm_name -> Entry() -> pack(); my $but = $mw -> Button(-text=>"Start nettest", -command =>\&start) -> pack(); #Text Area $txt = $mw -> Text(-width=>70, -height=>20) -&g...

Web resources about - tk text widget - comp.lang.tcl

DashboardWidgets - Community for Designers, Developers, and Users of Dashboard Widgets
DashboardWidgets is an internet community for coders, designers, and users of Apple's new Dashboard feature in Mac OS X 10.4, Tiger.

Twidget - Twitter.com Dashboard Widget
Developing Twidget takes time and effort. If you enjoy Twidget, feel it is of value to you and would like to help out, please consider making ...

iBook Widgets - Widgets for iBooks Author
Awesome widgets for iBooks Author

RSS Feed Widget
As its name suggests, is a handy widget to help you embed and display your favorite RSS, just specify the URL of RSS feed, click the "Create ...

Make custom mobile apps, web widgets, and rich media ads — Widgetbox
Mobile web apps, web widgets and rich media powered by the Flite Engagement Platform.

Widgetmate.com : Cool widgets to spice up your webpage
News Widget The News Widget delivers fresh, breaking news from around the world for the topics of your choice to your blog, webpage, website, ...

Widget Press - Creators of iPad, iPhone, iPod touch & Web App Developer Toolkits.
Widget Press, creators of ModelBaker, FormEntry and FormEntry Server, the no programming development tools that builds Web, iPad, iPhone, iPod ...

SIMILE Widgets
This is an open-source “spin-off” from the SIMILE project at MIT . Here we offer free, open-source web widgets, mostly for data visualizations. ...

GUI widget - Wikipedia, the free encyclopedia
This article is about reusable components for building user interfaces. For small desktop/web applications, see widget engine . For other uses, ...

Preview CrunchBase Widget
The CrunchBase widget allows you to embed information about companies, people, financial organizations, and products anywhere on the web. If ...

Resources last updated: 3/13/2016 10:34:07 AM