Tk Text Edit

Check-in [476cf3718c]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Changed method to get installdir, remodel backslash to foreslash when open files from command prompt
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:476cf3718c0e7db838a79d1ef0a94029092abaae
User & Date: dennis 2001-02-05 17:52:07
Context
2001-02-09
15:23
no message check-in: 10f4e3f31b user: dennis tags: trunk
2001-02-05
17:52
Changed method to get installdir, remodel backslash to foreslash when open files from command prompt check-in: 476cf3718c user: dennis tags: trunk
2001-02-04
01:04
Modifications to support wrapping check-in: 3176c54f0b user: dennis tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to lib/edit.tcl.

102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
...
261
262
263
264
265
266
267













268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
destroy $ou
}


#------------------------------------------------------------------------------+

proc setup {} {
global env installdir tk_version tcl_version c home numw tcl_platform

if {$tcl_platform(platform)!="windows"} {

if {![info exist env(DISPLAY)]} {
puts stdout "Are you sure yo're running X ?"
exit
}
................................................................................


#------------------------------------------------------------------------------+


if {$tcl_platform(platform)!="windows"} {
#Unix
set installdir [file dirname [info script]]
set home "$env(HOME)/.tcltextedit"

if {![file exists $home]} {
file mkdir $home
}

} else {
#Windows
set installdir [file dirname [info script]]
set home $installdir
}

set numw 99

set op [pwd]
cd $installdir
................................................................................
source gui.tcl
source txt.tcl
source bindings.tcl
source speed.tcl
cd $op















#------------------------------------------------------------------------------+

#Check if user supplied anything at the command line

set i 1
set fil [lindex $argv 0]

while {$fil!=""} {

#NewFile

set tmp [string toupper $fil]
if {[string first "HTTP://" $tmp]=="0"} {
file::Load "http $fil" -force
} else {
	#textLoadFile .text $fil
        file::Load "file $fil" -force







|







 







|








|







 







>
>
>
>
>
>
>
>
>
>
>
>
>









|







102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
...
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
...
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
destroy $ou
}


#------------------------------------------------------------------------------+

proc setup {} {
global env installdir tk_version tcl_version c home numw tcl_platform argv0

if {$tcl_platform(platform)!="windows"} {

if {![info exist env(DISPLAY)]} {
puts stdout "Are you sure yo're running X ?"
exit
}
................................................................................


#------------------------------------------------------------------------------+


if {$tcl_platform(platform)!="windows"} {
#Unix
set installdir [file dirname $argv0]
set home "$env(HOME)/.tcltextedit"

if {![file exists $home]} {
file mkdir $home
}

} else {
#Windows
set installdir [file dirname $argv0]
set home $installdir
}

set numw 99

set op [pwd]
cd $installdir
................................................................................
source gui.tcl
source txt.tcl
source bindings.tcl
source speed.tcl
cd $op



#------------------------------------------------------------------------------+

proc fixname {f} {
set r ""
for {set i 0} {$i <[string length $f] } {incr i } {
set c [string index $f $i]
if {$c=="\134"} {set c "/"}
set r "$r$c"
}
return $r
}

#------------------------------------------------------------------------------+

#Check if user supplied anything at the command line

set i 1
set fil [lindex $argv 0]

while {$fil!=""} {

set fil [fixname $fil]

set tmp [string toupper $fil]
if {[string first "HTTP://" $tmp]=="0"} {
file::Load "http $fil" -force
} else {
	#textLoadFile .text $fil
        file::Load "file $fil" -force