Thanks to DMc for bug reports on the latest NB. Solved an issue arising from the gnocl::text search function, the interpreter would crash if the -tags option was not passed. This is now sorted and works well. The updated source and 32Bit linux builds are now available from SF.
Here's a test script.
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
package require Gnocl
set box(1) [gnocl::box -orientation vertical]
set find [gnocl::entry]
$find configure \
-primaryIcon "%#Clear" \
-secondaryIcon "%#Find" \
-variable findString \
-onIconPress {
switch %p {
primary {
set findString ""
$txt tag delete tag_find
}
secondary {
$txt tag delete tag_find
$txt tag create tag_find -foreground red
$txt search $findString -tags tag_find
}
}
}
set txt [gnocl::text -wrapMode word]
$txt lorem
$box(1) add $find -fill {1 0}
$box(1) add $txt -fill {1 1} -expand 1
gnocl::window -child $box(1)
Here's a test script.
#!/bin/sh
# the next line restarts using tclsh \
exec tclsh "$0" "$@"
package require Gnocl
set box(1) [gnocl::box -orientation vertical]
set find [gnocl::entry]
$find configure \
-primaryIcon "%#Clear" \
-secondaryIcon "%#Find" \
-variable findString \
-onIconPress {
switch %p {
primary {
set findString ""
$txt tag delete tag_find
}
secondary {
$txt tag delete tag_find
$txt tag create tag_find -foreground red
$txt search $findString -tags tag_find
}
}
}
set txt [gnocl::text -wrapMode word]
$txt lorem
$box(1) add $find -fill {1 0}
$box(1) add $txt -fill {1 1} -expand 1
gnocl::window -child $box(1)
Comments