Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RBC - Refactored BLT Components - Initial Release

388 views
Skip to first unread message

Bob Techentin

unread,
Oct 11, 2009, 11:34:46 AM10/11/09
to
As many of you know, I worked with a team of undergraduate students
last year on refactoring portions of the BLT toolkit so that it would
work with Tcl/Tk 8.4, 8.5, and beyond. I was particularly interested
in the vectors and graphs, as that is what we use. I also asked the
team to work on winop (for snap) and the embedded eps portions. The
team delivered binaries and source code last May, and it seemed to
work. But as I dug a little deeper, there were some build
dependencies, and the automated tests didn't work quite the way I
expected. I've managed to do a little more tweaking, and I think that
it is ready for an alpha release.

http://www.sourceforge.net/projects/rbctoolkit/

RBC is:
- BLT's vector, graph, barchart, stripchart, winop, and eps
components
- TEA compliant
- 3800+ automated test suite, plus many more manual tests
- Works (for me) on win32, linux 32 bit and linux 64 bit, Tcl/Tk 8.4,
8.5, and 8.6beta.

RBC is not (yet):
- documented
- experienced
- beautiful (see pkgIndex.tcl for an example)
- free from Tcl/Tk internals
- including Zoom-Stack
- tested with starkits

But if you're willing to try it out, I'd be more than happy to accept
any feedback. Please use the sf.net trackers to document issues or
problems.

Thanks,
Bob Techentin
--
techenti...@mayo.edu


Will Duquette

unread,
Oct 11, 2009, 12:26:42 PM10/11/09
to
On Oct 11, 8:34 am, Bob Techentin <techentin.rob...@mayo.edu> wrote:
> As many of you know, I worked with a team of undergraduate students
> last year on refactoring portions of the BLT toolkit so that it would
> work with Tcl/Tk 8.4, 8.5, and beyond.....

Bob, you rock.

MSEdit

unread,
Oct 12, 2009, 4:20:53 AM10/12/09
to

Excellent work Bob and team,

I tried out the stripchart example and it works ok (even in a starpack
win 8.4.12, 8.5.7 and 8.6b1).

I had a problem with another example and will report back when I have
had time to check it out.

Have you kept all the options in the source code for BLT ? the graph
element has -ylow/-yhigh and -weight which although not well
documented are very useful.

Is this based on the blt2.4Z source ?

Martyn


Roger O

unread,
Oct 12, 2009, 4:30:25 AM10/12/09
to
I have downloaded this and would like to see what's up. Should I be
able to compile and link a C program against this? If so, how has the
naming been changed from the BLT style? A quick look at the code tells
me this is not a rename-recompile replacement. I understand that there
are no docs. But is there at least a little advice on how one could
try to evaluate it from code that was originally BLT?

Bob Techentin

unread,
Oct 12, 2009, 9:09:04 AM10/12/09
to
On Oct 12, 3:20 am, MSEdit <mse...@gmail.com> wrote:
>
> Is this based on the blt2.4Z source ?
>

Yes, RBC is based on BLT 2.4z with both patches applies.

Bob

Bob Techentin

unread,
Oct 12, 2009, 9:17:28 AM10/12/09
to

Good question, Roger. I've only been looking at it from the script
standpoint. But I believe that the RBC code is mostly just renamed
from BLT. (e.g., BLT => RBC, Blt => Rbc). They removed quite a bit
of cruft dating back to very old Tcl/Tk releases, and made the whole
thing TEA compliant. But the functions and calling conventions should
be pretty much the same as BLT.

Bob

MSEdit

unread,
Oct 12, 2009, 11:27:10 AM10/12/09
to

Bob, I renamed the linux version of the .so to be the same as the
windows version and modified the pkgIndex to replace .dll by [info
sharedlibextension], I now have a multiplatform starkit which runs on
Linux or Windows !!

My main application which uses BLT also uses the Tabset and Busy
elements. If I get time I will try to patch a version to use RBC to
realy try it out.


Thanks again to you and your team.

Martyn

Bob Techentin

unread,
Oct 12, 2009, 12:03:03 PM10/12/09
to
On Oct 12, 10:27 am, MSEdit <mse...@gmail.com> wrote:
> Bob, I renamed the linux version of the .so to be the same as the
> windows version and modified the pkgIndex to replace .dll by [info
> sharedlibextension], I now have a multiplatform starkit which runs on
> Linux or Windows !!

Way cool!

> My main application which uses BLT also uses the Tabset and Busy
> elements.  

I've been using Ttk:notebook instead of BLT tabsets, and I understand
that the BLT busy command is available outside of BLT.

Good luck,
Bob


MSEdit

unread,
Oct 12, 2009, 12:46:35 PM10/12/09
to
I have been looking for a replacement to the tabs mechanism/interface
but the users realy like it. ttk::notebook does not gracefully handle
what happens when there is no more space for the tabs (bwidget scrolls
as per FireFox) and blt adds multiple layers.

The tabsset functionality is for switching between multiple elements
which are not necessarily pages. I have downloaded the Busy stuff
already.

Do you have any Idea how/if/when the missing parts (zoomstack,
crosshairs, activelegend) will be added ?

I saw in the Readme that the undergraduates have graduated. Are they
still helping out ?

Martyn

Donal K. Fellows

unread,
Oct 12, 2009, 12:47:05 PM10/12/09
to
On 12 Oct, 09:27, MSEdit <mse...@gmail.com> wrote:
> My main application which uses BLT also uses the Tabset and Busy
> elements.

You shouldn't need those with Tk 8.6; the ttk::notebook widget (since
8.5) is a pretty reasonable replacement for Tabset (as I understand
it) and 8.6 includes the [tk busy] command, which should look fairly
similar to you...

Donal.

Bob Techentin

unread,
Oct 12, 2009, 4:34:36 PM10/12/09
to
On Oct 12, 11:46 am, MSEdit <mse...@gmail.com> wrote:
>
> Do you have any Idea how/if/when the missing parts (zoomstack,
> crosshairs, activelegend) will be added ?

Zoomstack won't work because I didn't ask the students to refactor
'busy.' I haven't made any effort to that end. (yet)

To the best of my knowledge, active legends and crosshairs are in
there. There are automated tests for those features. (Although I
haven't personally tried them.)

> I saw in the Readme that the undergraduates have graduated. Are they
> still helping out ?

I'm not expecting help from the students. I got what I wanted, and
they graduated. :-)

Bob


Donal K. Fellows

unread,
Oct 12, 2009, 8:43:53 PM10/12/09
to
On 12 Oct, 10:46, MSEdit <mse...@gmail.com> wrote:
> I have been looking for a replacement to the tabs mechanism/interface
> but the users realy like it. ttk::notebook does not gracefully handle
> what happens when there is no more space for the tabs (bwidget scrolls
> as per FireFox) and blt adds multiple layers.

You'll want to argue that with Joe English. AIUI, he feels that if
there are too many tabs for them to fit on the screen at once, you
shouldn't be using a tabbed notebook. (I'm sympathetic to this PoV; I
hate the other two...)

> The tabsset functionality is for switching between multiple elements
> which are not necessarily pages.  I have downloaded the Busy stuff
> already.

You can use a ttk notebook for that if you give it a style that
doesn't have the actual tabs...

Donal.

MSEdit

unread,
Oct 13, 2009, 4:24:51 AM10/13/09
to
I don't understand the connection between zoomstack and busy. The
graph widget is severly limited without the zoomstack ability to zoom
in on regions of the graph.

I just quickly tried the active legends and crosshairs because the
graph demos for BLT use them (as well as me) I will look through the
source to see how they are accessed and try again.

What does Joe English suggest as a UI concept to replace the tabs, all
the browsers use tabs and I don't see anyone saying its not good to
open more than 10 pages. I use tabs in an editor and find that
visually and conceptually it is an easy way to switch between files, I
use a list too but that does not work as well. Scrolling the tabs with
the mouse wheel is infinitly preferable however than the multi-tier
tabs. I actually use the tabs to switch between BLT graphs in a MDI
system which works well. Again I cannot use ttk::notebook for dynamic
page systems (pages added/removed by the user actions) because I
cannot tell my users 'its best not to open too many as it does not
look too good'. I can understand that Joe does not appreciate lots of
tabs but this rules out the use of the ttk::notebook for these
systems. Scrolling tabs also take up much less screen real-estate
than a tree/listbox.


Martyn

Bob Techentin

unread,
Oct 13, 2009, 7:58:22 AM10/13/09
to
On Oct 13, 3:24 am, MSEdit <mse...@gmail.com> wrote:
> I don't understand the connection between zoomstack and busy.  The
> graph widget is severly limited without the zoomstack ability to zoom
> in on regions of the graph.
>
> I just quickly tried the active legends and crosshairs because the
> graph demos for BLT use them (as well as me) I will look through the
> source to see how they are accessed and try again.
>

I don't understand it, either. The student team had their heads in
the code. Since they've moved on, I guess it is up to me to figure it
out.

I see crosshair functions in the automated tests. The BLT_Crosshairs
script was omitted from the library directory. I only just tried a
graph demo yesterday. It would work without those script calls, and
replacing table geometry management with grid. Maybe if I work with
those demo scripts a bit, I can figure out if those parts might work.

Bob


Uwe Klein

unread,
Oct 13, 2009, 8:11:53 AM10/13/09
to
Bob Techentin wrote:
> On Oct 13, 3:24 am, MSEdit <mse...@gmail.com> wrote:
>
>>I don't understand the connection between zoomstack and busy. The
>>graph widget is severly limited without the zoomstack ability to zoom
>>in on regions of the graph.
>>
>>I just quickly tried the active legends and crosshairs because the
>>graph demos for BLT use them (as well as me) I will look through the
>>source to see how they are accessed and try again.
>>
>
>
> I don't understand it, either. The student team had their heads in
> the code. Since they've moved on, I guess it is up to me to figure it
> out.

afair the bltZoomStack stuff is (completely) contained in graph.tcl
i.e. it is implemented as scriptonly

same goes for some other features.

# grep -i proc\ *blt:: graph.tcl
proc blt::LegendSelections { w } {
proc blt::legend::SetSelectionAnchor { w tagOrId } {
proc blt::legend::MoveFocus { w elem } {
proc blt::ActivateLegend { graph } {
proc blt::DeactivateLegend { graph } {
proc blt::HighlightLegend { graph } {
proc blt::Crosshairs { graph {event "Any-Motion"} {state "on"}} {
proc blt::InitStack { graph } {
proc blt::ZoomStack { graph {start "ButtonPress-1"} {reset "ButtonPress-3"} } {
proc blt::PrintKey { graph {event "Shift-ButtonRelease-3"} } {
proc blt::ClosestPoint { graph {event "Control-ButtonPress-2"} } {
proc blt::AddBindTag { widget tag } {
proc blt::RemoveBindTag { widget tag } {
proc blt::FindElement { graph x y } {
proc blt::FlashPoint { graph name index count } {
proc blt::GetCoords { graph x y index } {
proc blt::MarkPoint { graph index } {
proc blt::DestroyZoomTitle { graph } {
proc blt::PopZoom { graph } {
proc blt::PushZoom { graph } {
proc blt::ResetZoom { graph } {
proc blt::ZoomTitleNext { graph } {
proc blt::ZoomTitleLast { graph } {
proc blt::SetZoomPoint { graph x y } {
proc blt::MarchingAnts { graph offset } {
proc blt::Box { graph } {
proc blt::ResetPostScript { graph } {

uwe

Bob Techentin

unread,
Oct 13, 2009, 9:56:48 AM10/13/09
to
On Oct 13, 7:11 am, Uwe Klein <uwe_klein_habertw...@t-online.de>
wrote:

>
> afair the bltZoomStack stuff is (completely) contained in graph.tcl
> i.e. it is implemented as  scriptonly

Yes. I just looked at the code. It is all script. But I think the
namespaces might have been munged up a bit, which would explain why
changing application code from blt_Crosshairs to rbc_Crosshairs
wouldn't work.

blt::PushZoom and blt::PopZoom both surround an [update] with [busy
hold $graph] and [busy release $graph]. I guess the busy could just
be removed, but there would likely be some bad behavior.

I also see some instances of the blt::table command in the postscript
dialog. There are probably others. But we could probably make most
of this script code work, mostly. :-)

Bob


Roger O

unread,
Oct 15, 2009, 8:01:13 AM10/15/09
to
Using RBC, I have just compiled a C application that uses Blt/Rbc
vectors in the C code to manage data viewed via Tk scripts (managed by
the same application) using things from Blt like ::blt::notebook
and ::blt::stripchart. After renaming all the necessary items, I then
tried the application. It stops with this error:

invalid command name "::rbc::tabnotebook"

Should this command exist? Perhaps it is not the rbc namespace? I do
not see it in the list of what Rbc is (original post in this thread).
But I also do not see it in the list of what is not done.

I am using the blt/rbc tabnotebook because it has some nice features
(e.g., detach and reattach a tab). I can consider using a different
tab notebook system; however, as I need Blt (and other functionality)
I am kind of stuck at Tcl 8.4.12. The next possible release of Tcl I
can use is 8.5.5 - but then I cannot use Blt.

Anyway, I first want to sort out if the notebook command should be
available. When I know that I can, if needed, investigate
alternatives.

OOC, what is the eventual goal with RBC? Is this a split from Blt?
Does anyone know if the Blt author is interested in these changes?

Roger O

unread,
Oct 15, 2009, 8:31:40 AM10/15/09
to
Bad form to follow up my own post. But I am happy.

I replaced the calls to the ersatz notebook command with one from ttk,
and I have a running application.

It exercises:

- Creating vectors from C

- Making stripcharts and barcharts in scripts, and having them update
when the C code updates the vector they display.

I will test more. But to me this is a big step forward for using
Blt^h^h^Rbc with newer Tcl/tk releases. My tests were with 8.5.5, I
will, of course, try newer. Probably when openSUSE 11.2 is released.

If I have any issues, it is with the ttk notebook. It misses some nice
features that the Blt one has. But I guess that is a different issue.

Is there any technical reason the notebook was dropped? Was it a case
of who needs yet another notebook widget?

Bob Techentin

unread,
Oct 15, 2009, 10:24:51 AM10/15/09
to
On Oct 15, 7:31 am, Roger O <roger.oberholt...@gmail.com> wrote:
>
> Is there any technical reason the notebook was dropped? Was it a case
> of who needs yet another notebook widget?

There was no _technical_ reason for dropping BLT's notebook, table, or
treeview. I just didn't need them. And good (supported) replacements
exist for all of them. I wanted to concentrate on the unique parts of
BLT - the things that I can't get anywhere else.

At this point, Rbc is a fork of BLT. I did my best (as did others) to
contact George Howlett more than a year ago when we embarked on this
project, and we got no response. I still see CVS activity in the BLT
project on sourceforge, but I haven't found anyone who knows what is
going on there.

Good luck,
Bob

Tim Wallace

unread,
Oct 15, 2009, 10:52:37 AM10/15/09
to
My view is the same as Bob's. George hasn't released anything in years,
and I used to download a CVS snapshot every year or so and see if it
would magically work with newer versions of tcl, but no dice. The
latest one I looked at about a year ago seemed to have removed the
"grid" command and subsumed it in the "axis" command. This is too big a
change for me to have any interest in unofficial CVS snapshots any more.

We are using a patched-together version of an old CVS snapshot with 8.5,
but are 100% planning on going with Bob's version in the future!
Vectors and graphs are what we need.

--Tim

Uwe Klein

unread,
Oct 16, 2009, 6:46:15 AM10/16/09
to
Bob Techentin wrote:
> On Oct 15, 7:31 am, Roger O <roger.oberholt...@gmail.com> wrote:
>
>>Is there any technical reason the notebook was dropped? Was it a case
>>of who needs yet another notebook widget?
>
>
> There was no _technical_ reason for dropping BLT's notebook, table, or
> treeview. I just didn't need them. And good (supported) replacements
> exist for all of them. I wanted to concentrate on the unique parts of
> BLT - the things that I can't get anywhere else.

blt has quite a lot of factored out components.

plotting: graph, barchart, stripchart
vector, vector expr, spline,

hierarchical data:
treeview
tree ( object )

improving on MVC separation.

uwe

Jeff Hobbs

unread,
Oct 19, 2009, 2:48:06 PM10/19/09
to
On Oct 11, 8:34 am, Bob Techentin <techentin.rob...@mayo.edu> wrote:
> As many of you know, I worked with a team of undergraduate students
> last year on refactoring portions of the BLT toolkit so that it would
> work with Tcl/Tk 8.4, 8.5, and beyond.  I was particularly interested
> in the vectors and graphs, as that is what we use.  I also asked the
> team to work on winop (for snap) and the embedded eps portions.  The
> team delivered binaries and source code last May, and it seemed to
> work.  But as I dug a little deeper, there were some build
> dependencies, and the automated tests didn't work quite the way I
> expected.  I've managed to do a little more tweaking, and I think that
> it is ready for an alpha release.
>
>  http://www.sourceforge.net/projects/rbctoolkit/
>
> RBC is:
>  - BLT's vector, graph, barchart,  stripchart, winop, and eps
> components
>  - TEA compliant
>  - 3800+ automated test suite, plus many more manual tests
>  - Works (for me) on win32, linux 32 bit and linux 64 bit, Tcl/Tk 8.4,
> 8.5, and 8.6beta.
....

> But if you're willing to try it out, I'd be more than happy to accept
> any feedback.  Please use the sf.net trackers to document issues or
> problems.

Those who are interested in trying this out and don't want to figure
out the compile magic, you will not find this in the teapot. [teacup
install rbc] is all you need.

It doesn't include the demos, so if you want those, go ahead and
download the tarball and run the demos from there after installing rbc
as above.

Jeff

Bob Techentin

unread,
Oct 19, 2009, 3:38:13 PM10/19/09
to
On Oct 19, 1:48 pm, Jeff Hobbs <jeff.ho...@gmail.com> wrote:
>
> It doesn't include the demos, so if you want those, go ahead and
> download the tarball

Actually, the demos aren't in the tarball. You'll have to get them
from SVN. And only the 'graph1.tcl' tarball has been ported to RBC.

Bob

Donald Arseneau

unread,
Oct 20, 2009, 5:35:56 AM10/20/09
to
On Oct 19, 11:48 am, Jeff Hobbs <jeff.ho...@gmail.com> wrote:
> Those who are interested in trying this out and don't want to figure
> out the compile magic, you will not find this in the teapot. [teacup
> install rbc] is all you need.

Huh??? Do you mean "now"?

Donald Arseneau

Jeff Hobbs

unread,
Oct 20, 2009, 11:51:48 AM10/20/09
to

Doh! Yes, rbc 0.1 is _now_ in the teapot.

JHJL

unread,
Oct 21, 2009, 7:02:30 AM10/21/09
to
> techentin.rob...@mayo.edu

Hi Bob

Thanks for this early Xmas present! I have botched a quick-and dirty
way to get the ZoomStack working by doing the following in PopZoom and
PushZoom (graph.tcl)

# busy hold $graph
event generate $graph <Configure>
# busy release $graph

It works for me as they say. I stumbled on this by whilst
interactively trying to set the axis -min value, nothing happend until
I resized the window. I am not sure if <Configure> is the correct
event to use and will wait to see what our learned friends say

kind regard
Julian

JHJL

unread,
Oct 21, 2009, 8:29:58 AM10/21/09
to
> Julian- Hide quoted text -
>
> - Show quoted text -

Same trick works for ActiveLegends ie put event generate $graph
<Configure> in ActivateLegend, DeactivateLegend and HighlightLegend.

Not sure why it works, suspect BLT (RBC) minimises redraws ect to
improve performance and that the <Configure> forces it's hand...

Bob Techentin

unread,
Oct 21, 2009, 10:49:02 AM10/21/09
to
On Oct 21, 7:29 am, JHJL <j...@hippospace.com> wrote:
> I have botched a quick-and dirty way to get the
> ZoomStack working by doing the following in PopZoom and
> PushZoom (graph.tcl)
>
> # busy hold $graph
> event generate $graph <Configure>
> # busy release $graph
>

Nifty! I'll try that.

So the original code in PushZoom and PopZoom was:

busy hold $graph
update
busy release $graph

Are you including any sort of update, or just generating the event? I
also remember the "update considered harmful" issue, and I think it
might apply here. It might make sense to use [update idletasks].
I'll have to play around.

Thanks much,
Bob

JHJL

unread,
Oct 21, 2009, 11:03:37 AM10/21/09
to

1) I am commenting out the busy calls
2) I have commented out the update call as well

good luck !

MSEdit

unread,
Oct 21, 2009, 11:34:22 AM10/21/09
to

Hi,

I tried your trick of Configure <on windows> and it does not work for
me, resizing does work however, I will try other events. (One of my
window is not resizable).

This is not a complete solution however BLTs graph widget updates
without having to generate false events, Is there anyone out there
capable of seeing what has changed in the code ?

Martyn

JHJL

unread,
Oct 21, 2009, 11:59:03 AM10/21/09
to

Sorry it's not working for you, but as said it does for me and I am on
Windows XP using Tcl/Tk 8.5.6 (IRC). I realise this is not a fit and
proper solution, but am hoping this will prompt someone with deeper
insight to determine the real culprit and solution. I will try it on a
non-resizable window tomorrow when back in office.

regards
Julian

JHJL

unread,
Oct 22, 2009, 5:38:11 AM10/22/09
to

Martyn, I am using Tcl/Tk 8.5.6 on WindowsXP. I have made my toplevel
fixed size (using wm resizable . 0 0) and my <Configure> hack still
works (for me)...

Here is the code I am using (exuse any typos, I am hand copying for a
restricted machine to this one)

package require Tk
package require rbc

set g [rbc::graph .g -bd 1 -relief raised - title Demo]
pack $g -fill both -expand yes
wm resizable . 0 0

Rbc_Crosshairs $g
Rbc_ZoomStack $g
Rbc_ActiveLegend $g

$g grid on

rbc::vector create x
rbc::vector create y

x append 1 2 3 4 5
y append 100 20 320 500 50

$g element create xy -xdata x -ydata y -pixels 2


---------------
In graph.tcl I changed as follows

1) In "PopZoom" proc, after "ZoomTitleLast $graph", I commmented out
the "busy" calls and the "update" and inserted the following

event generate $graph <Configure>

2) Similarly, at the very end of the "PushZoom" proc, I commmented out
the "busy" calls and the "update" and inserted the following

event generate $graph <Configure>

3) At the very end of the "ActivateLegend", "DeactivateLegend" and
"HighlightLegend" procs I added the following

event generate $graph <Configure>


Hope this helps
regards
Julian


Bob Techentin

unread,
Oct 22, 2009, 8:54:06 AM10/22/09
to
On Oct 22, 4:38 am, JHJL <j...@hippospace.com> wrote:
> In graph.tcl I changed as follows
>
> 1) In "PopZoom" proc, after "ZoomTitleLast $graph", I commmented out
> the "busy" calls and the "update" and inserted the following
>
> event generate $graph <Configure>
>
> 2) Similarly, at the very end of the "PushZoom" proc, I commmented out
> the "busy" calls and the "update" and inserted the following
>
> event generate $graph <Configure>
>

Julian,

I made these changes and they seemed to work for me on Linux and
Windows. I checked them into svn, along with demos graph1.tcl and
graph3.tcl.

Bob

MSEdit

unread,
Oct 22, 2009, 8:54:38 AM10/22/09
to
Thanks Julian,

Your code does work but I still have problems with mine !

package require BLT
package require rbc
set RBC FALSE

proc SplashScreen {} {
global Config NoSplash RBC

set top .splash
set NoSplash FALSE
if {[winfo exists $top]} {return}
# Create a new popup window
toplevel $top -bd 1 -bg white -borderwidth 4 -relief ridge
wm withdraw $top
# Centre the help window on the main window
set wx [expr {([winfo screenwidth .]/2) - ([winfo reqwidth $top])/
2}]
set wy [expr {([winfo screenheight .]/2)- ([winfo reqheight $top])/
2}]
wm geometry $top +$wx+$wy

# Override the window manager (No window bar on top)
wm overrideredirect $top 1

update
set graph $top.g
if {$RBC} {
rbc::graph $graph -height 2i -width 4i -background white
} else {
blt::graph $graph -height 2i -width 4i -background white
}
pack $graph -side bottom -expand y -fill both
# Update to allow the window size to be recovered

wm deiconify $top
# Disallow all resizing
wm resizable $top 0 0
raise $top
focus -force $top

set datav(P) {8 16 0 0 8 16 16 16 12 8 4 8}
set datav(l) {4 8 0 0 8 0}
set datav(o) {12 8 4 8 0 0 8 0 12 8}
set datav(t) {4 8 0 0 4 8 8 8 0 8}

set logo "P l o t"
set positions {0 0 10 0 20 0 35 0}
set max 108
$graph legend configure -hide 1
$graph axis configure x -min -5 -max $max -hide 1 -major "-30 -20
-10 0 10 20 30 40 50 60 70 80 90 100"
$graph axis configure y -min -5 -max 21 -hide 1 -major ""
$graph grid configure -hide 0

bind $top <Button-1> "set NoSplash TRUE"
bind $top <Escape> "set NoSplash TRUE"

set idx 0
foreach el $logo {ox oy} $positions {
if {$NoSplash} {break}

if {$RBC} {
rbc::vector create xvec$idx yvec$idx
} else {
blt::vector create xvec$idx yvec$idx
}
$graph element create plot$idx -xdata xvec$idx -ydata yvec$idx
-linewidth 3 -fill blue -symbol ""

foreach {dx dy} $datav($el) {
set xvec${idx}(++end) [expr {$dx +$ox + 30}]
set yvec${idx}(++end) [expr {$dy +$oy}]
if {$RBC} {
event generate $graph <Configure>
} else {
update
}
after 25
}
incr idx
}

set afterid [after 3000 "set NoSplash TRUE"]
if {$NoSplash != "TRUE"} {
tkwait variable NoSplash
}
grab release $top
destroy $top
# Stop the after if it is still waiting
after cancel $afterid
if {$RBC} {
eval rbc::vector destroy [rbc::vector names *vec*]
} else {
eval blt::vector destroy [blt::vector names *vec*]
}
}

SplashScreen
exit

As I understand it the updte command basically handles any pending
events, so It appears that blt is posting redraw evends which are
handled by the update command but rbc is not posting any events and
the redraw has to be triggered by posting a false redraw event saying
that the display needs to be redrawn !


Martyn

Bob Techentin

unread,
Oct 24, 2009, 10:42:58 AM10/24/09
to
On Oct 22, 7:54 am, MSEdit <mse...@gmail.com> wrote:
> Thanks Julian,
>
> Your code does work but I still have problems with mine !

Martyn,

I messed around with your code a bit, and figured out why it wasn't
working. There is a but in RBC.

When you create vectors in a proc, RBC should create a local array
variable. But instead it is creating a global variable. So this code
-should- work.

proc addTrace {graph} {
vector create xvec yvec
$graph create element newtrace -xdata xvec -ydata yvec
for {set i 0} {$i<10} {incr i} {
# this code is correct and should work
set xvec(++end) $i
set yvec(++end) $i
# this code is incorrect but does work with RBC 0.1
set:: xvec(++end) $i
set ::yvec(++end) $i
}
}

(bug reports and maybe fixes to follow.)
Bob

MSEdit

unread,
Oct 25, 2009, 2:27:01 PM10/25/09
to

Bob, everything seems ok now I have several places where the -min/-max
are changed and I was looking at the wrong one for the tests.

You were right about the vectors and the global scope, This is also
true for BLT so I do not see how my code worked before, very curious.

Now if some kind soul could have a little peek at the update/Configure
problem.

Martyn

Bob Techentin

unread,
Oct 25, 2009, 8:23:51 PM10/25/09
to
On Oct 25, 1:27 pm, MSEdit <mse...@gmail.com> wrote:
>
> You were right about the vectors and the global scope, This is also
> true for BLT so I do not see how my code worked before, very curious.
>

I'm pretty sure that RBC is different from BLT. Since it was supposed
to be a port, and RBC is incompatible, then it is a bug. (Not that I
know how to fix it, yet.)

Bob

jdc

unread,
Oct 27, 2009, 5:24:03 AM10/27/09
to

> blt::PushZoom and blt::PopZoom both surround an [update] with [busy
> hold $graph] and [busy release $graph].  I guess the busy could just
> be removed, but there would likely be some bad behavior.

Or replace those by [tk busy] ?

Jos.

Bob Techentin

unread,
Oct 27, 2009, 9:06:24 AM10/27/09
to

I suppose that would work for Tk 8.5+ I've lived in 8.4-land for so
long, I forget all the goodies that I'm missing. :-}

Bob

Donal K. Fellows

unread,
Oct 27, 2009, 9:14:43 AM10/27/09
to
On 27 Oct, 13:06, Bob Techentin <techentin.rob...@mayo.edu> wrote:
> I suppose that would work for Tk 8.5+  I've lived in 8.4-land for so
> long, I forget all the goodies that I'm missing.  :-}

In this case, it's part of 8.6.

Donal.

0 new messages