other stuff
# OLD
proc ::myoo::ClassIs {myR cls} {
upvar $myR my
expr {[llength [lsearch -exact -sorted [set $my(__CLASS__)::__SUPER__SORTED__] $cls]] > 0}
}
# want to have
proc ::myoo::ClassIs {myR cls} {
upvar $myR my
lsearch -exists -exact -sorted [set $my(__CLASS__)::__SUPER__SORTED__] $cls }
ONE simple FLAG erase a lot of code.
aotto1968 <aotto1968@t-online.de> wrote:
It is preferable to start a new thread for a new topic.
other stuff
# OLD
proc ::myoo::ClassIs {myR cls} {
upvar $myR my
expr {[llength [lsearch -exact -sorted [set $my(__CLASS__)::__SUPER__SORTED__] $cls]] > 0}
}
# want to have
proc ::myoo::ClassIs {myR cls} {
upvar $myR my
lsearch -exists -exact -sorted [set $my(__CLASS__)::__SUPER__SORTED__] $cls
}
ONE simple FLAG erase a lot of code.
Write up a TIP, and supply an implementation, and the maintainers just
might add your feature.
On Thu, 2 Jan 2025 21:39:32 -0000 (UTC)
Rich <rich@example.invalid> wrote:
aotto1968 <aotto1968@t-online.de> wrote:
It is preferable to start a new thread for a new topic.
other stuff
# OLD
proc ::myoo::ClassIs {myR cls} {
upvar $myR my
expr {[llength [lsearch -exact -sorted [set $my(__CLASS__)::__SUPER__SORTED__] $cls]] > 0}
}
# want to have
proc ::myoo::ClassIs {myR cls} {
upvar $myR my
lsearch -exists -exact -sorted [set $my(__CLASS__)::__SUPER__SORTED__] $cls
}
ONE simple FLAG erase a lot of code.
Write up a TIP, and supply an implementation, and the maintainers just
might add your feature.
Or simply use
proc ::myoo::ClassIs {myR cls} {
upvar $myR my
expr {$cls in [set $my(__CLASS__)::__SUPER__SORTED__]}
}
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,007 |
Nodes: | 10 (0 / 10) |
Uptime: | 60:41:56 |
Calls: | 13,152 |
Calls today: | 2 |
Files: | 186,574 |
D/L today: |
1,799 files (806M bytes) |
Messages: | 3,312,977 |