# BLT::Tabnotebook - tabnotebook.tcl not found

**URL:** <https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846>\
**Category:** Ruby\
**Created:** [November 21, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846 "2008-11-21T20:01:46Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![pmak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@pmak](https://www.ruby-forum.com/u/pmak)\
**Post date:** [November 21, 2008, 8:01pm UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846/1 "2008-11-21T20:01:46Z")

</div>

Hi,

I tried to use BLT::Tabnotebook to put my existing Tk components in  
Tabs, but it just doesn’t work.  
A simple example:

> require ‘tk’  
> require ‘tkextlib/blt’
> 
> parent = Tk::BLT::Tile::Frame.new
> 
> Tk::BLT::Tile::Label.new(parent)
> 
> Tk::BLT::Tabnotebook.new(parent)

gives

/usr/lib/ruby/1.8/tk.rb:1807:in `_invoke_without_enc': couldn't read file "tabnotebook.tcl": no such file or directory (RuntimeError) from /usr/lib/ruby/1.8/tk.rb:1807:in`\_ip\_invoke\_core’  
from /usr/lib/ruby/1.8/tk.rb:1843:in `_tk_call_core' from /usr/lib/ruby/1.8/tk.rb:1871:in`tk\_call\_without\_enc’  
from /usr/lib/ruby/1.8/tk.rb:4920:in `create_self' from /usr/lib/ruby/1.8/tk.rb:4875:in`initialize’  
from /home/philip/workspaces/ruby/test/tabtest.rb:8:in `new’  
from /home/philip/workspaces/ruby/test/tabtest.rb:8

So, what did I do wrong? There’s a tabnotebook.tcl in /usr/lib/blt2.4 .

---

<div class="post-metadata">

**Author:** ![pmak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@pmak](https://www.ruby-forum.com/u/pmak)\
**Post date:** [November 22, 2008, 2:30am UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846/2 "2008-11-22T02:30:52Z")

</div>

From: Philip Müller [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: BLT::Tabnotebook - tabnotebook.tcl not found  
Date: Sat, 22 Nov 2008 03:57:43 +0900  
Message-ID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> I tried to use BLT::Tabnotebook to put my existing Tk components in  
> Tabs, but it just doesn’t work.

I’m very sorry. Probably, it depends on a bug on tkextlib/blt.rb.  
Please try the following patch.

# Index: blt/vector.rb

— blt/vector.rb (revision 20298)  
+++ blt/vector.rb (working copy)  
@@ -49,11 +49,11 @@  
size = size.join(‘:’)  
end  
if size

- 

```
   @id = INTERP._invoke('::blt::vector', 'create',

```

- 

```
                        "#auto(#{size})", *hash_kv(keys))

```

- 

```
   @id = TkCore::INTERP._invoke('::blt::vector', 'create',

```

- 

```
                                "#auto(#{size})", *hash_kv(keys))
 else

```

- 

```
   @id = INTERP._invoke('::blt::vector', 'create',

```

- 

```
                        "#auto", *hash_kv(keys))

```

- 

```
   @id = TkCore::INTERP._invoke('::blt::vector', 'create',

```

- 

```
                                "#auto", *hash_kv(keys))
 end

 TkVar_ID_TBL.mutex.synchronize{

```

@@ -68,7 +68,7 @@  
@trace\_opts = nil

```
   # teach Tk-ip that @id is global var

```

- 

```
 INTERP._invoke_without_enc('global', @id)

```

- 

```
 TkCore::INTERP._invoke_without_enc('global', @id)

```

end

def destroy  
@@ -250,7 +250,7 @@  
@trace\_opts = nil

```
 # teach Tk-ip that @id is global var

```

- 

```
 INTERP._invoke_without_enc('global', @id)

```

- 

```
 TkCore::INTERP._invoke_without_enc('global', @id)

```

end  
end  
end  
Index: blt.rb  
===================================================================  
— blt.rb (revision 20298)  
+++ blt.rb (working copy)  
@@ -26,14 +26,14 @@  
PATCH\_LEVEL = tk\_call(‘set’, ‘blt\_patchLevel’)

begin

- 

```
 lib = INTERP._invoke('set', 'blt_library')

```

- 

```
 lib = TkCore::INTERP._invoke('set', 'blt_library')

```

rescue  
lib = ‘’  
end  
LIBRARY = TkVarAccess.new(‘blt\_library’, lib)

begin

- 

```
 lib = INTERP._invoke('set', 'blt_libPath')

```

- 

```
 lib = TkCore::INTERP._invoke('set', 'blt_libPath')

```

rescue  
lib = ‘’  
end

---

<div class="post-metadata">

**Author:** ![pmak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@pmak](https://www.ruby-forum.com/u/pmak)\
**Post date:** [November 24, 2008, 12:24am UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846/3 "2008-11-24T00:24:43Z")

</div>

From: Philip Müller [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: BLT::Tabnotebook - tabnotebook.tcl not found  
Date: Sun, 23 Nov 2008 04:25:27 +0900  
Message-ID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> /usr/lib/ruby/1.8/tk.rb:2762:in `\_\_invoke’: unknown option  
> “blt\_tabset\_tab00000” (RuntimeError)  
> (snip)  
> Is this my fault this time?

I’m sorry. It’s MY fault.  
I misunderstood the relation between Tabset and Tabnotebook.  
So, tabnotebook.rb doesn’t work properly.  
I’ll rewrite tabnotebook.rb. Please give me a few days.

---

<div class="post-metadata">

**Author:** ![pmak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@pmak](https://www.ruby-forum.com/u/pmak)\
**Post date:** [November 22, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846/4 "2008-11-22T20:29:40Z")

</div>

Hi,

thanks, Tabnotebook.new works now.  
However, if I do this

> require ‘tk’  
> require ‘tkextlib/blt’
> 
> parent = Tk::BLT::Tile::Frame.new
> 
> nb = Tk::BLT::Tabnotebook.new(parent)
> 
> tab = Tk::BLT::Tabset::Tab.new(nb)

I get

/usr/lib/ruby/1.8/tk.rb:2762:in `__invoke': unknown option "blt_tabset_tab00000" (RuntimeError) from /usr/lib/ruby/1.8/tk.rb:2762:in`\_invoke’  
from /usr/lib/ruby/1.8/tk.rb:1809:in `_ip_invoke_core' from /usr/lib/ruby/1.8/tk.rb:1843:in`\_tk\_call\_core’  
from /usr/lib/ruby/1.8/tk.rb:1867:in `tk_call' from /usr/lib/ruby/1.8/tkextlib/blt/tabset.rb:88:in`initialize’  
from /usr/lib/ruby/1.8/tkextlib/blt/tabset.rb:54:in `new' from /usr/lib/ruby/1.8/tkextlib/blt/tabset.rb:53:in`instance\_eval’  
from /usr/lib/ruby/1.8/tkextlib/blt/tabset.rb:53:in `new' from /usr/lib/ruby/1.8/tkextlib/blt/tabset.rb:48:in`synchronize’  
from /usr/lib/ruby/1.8/tkextlib/blt/tabset.rb:48:in `new’  
from /home/philip/workspaces/ruby/test/tabtest.rb:8

Is this my fault this time?  
I don’t really know how to use the Tabnotebook and tabs. Could you give  
me some hints?

---

<div class="post-metadata">

**Author:** ![pmak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@pmak](https://www.ruby-forum.com/u/pmak)\
**Post date:** [November 24, 2008, 8:12pm UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846/5 "2008-11-24T20:12:14Z")

</div>

From: Hidetoshi NAGAI [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: BLT::Tabnotebook - tabnotebook.tcl not found  
Date: Mon, 24 Nov 2008 08:19:44 +0900  
Message-ID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> I’ll rewrite tabnotebook.rb. Please give me a few days.

Please try the following patch.  
And now, please use Tk::BLT::Tabnotebook::Tab for Tabnotebook objects.  
^^^^^^^^^^^

# Index: ext/tk/lib/tkextlib/blt/tabset.rb

— ext/tk/lib/tkextlib/blt/tabset.rb (revision 20347)  
+++ ext/tk/lib/tkextlib/blt/tabset.rb (working copy)  
@@ -27,7 +27,7 @@  
tpath = tabset.path  
TabID\_TBL.mutex.synchronize{  
if TabID\_TBL[tpath]

- 

```
       TabID_TBL[tpath][id]? TabID_TBL[tpath]: id

```

- 

```
       TabID_TBL[tpath][id]? TabID_TBL[tpath][id]: id
     else
       id
     end

```

@@ -48,6 +48,13 @@  
TabID\_TBL.mutex.synchronize{  
if name && TabID\_TBL[parent.path] &&  
TabID\_TBL[parent.path][name]  
obj = TabID\_TBL[parent.path][name]

- 

```
       if pos

```

- 

```
         if pos.to_s == 'end'

```

- 

```
           obj.move_after('end')

```

- 

```
         else

```

- 

```
           obj.move_before(pos)

```

- 

```
         end

```

- 

```
       end
       obj.configure if keys && ! keys.empty?
     else
       (obj = self.allocate).instance_eval{

```

@@ -69,9 +76,9 @@  
if pos  
idx = tk\_call(@tpath, ‘index’, ‘-name’, @id)  
if pos.to\_s == ‘end’

- 

```
           tk_call(@tpath, idx, 'moveto', 'after', 'end')

```

- 

```
           tk_call(@tpath, 'move', idx, 'after', 'end')
         else

```

- 

```
           tk_call(@tpath, idx, 'moveto', 'before', pos)

```

- 

```
           tk_call(@tpath, 'move', idx, 'before', pos)
         end
       end
       tk_call(@tpath, 'tab', 'configure', @id, keys)

```

@@ -80,11 +87,11 @@  
tk\_call(@tpath, ‘insert’, pos, @id, keys)  
end  
else

- 

```
     pos = 'end' unless pos
     TabsetTab_ID.mutex.synchronize{
       @path = @id = TabsetTab_ID.join(TkCore::INTERP._ip_id_)
       TabsetTab_ID[1].succ!
     }

```

- 

```
     pos = 'end' unless pos
     tk_call(@tpath, 'insert', pos, @id, keys)
   end
 end

```

@@ -173,10 +180,10 @@  
end

```
   def perforation_highlight(mode)

```

- 

```
   @t.perforation.highlight(self.index, mode)

```

- 

```
   @t.perforation_highlight(self.index, mode)
 end
 def perforation_invoke()

```

- 

```
   @t.perforation.invoke(self.index)

```

- 

```
   @t.perforation_invoke(self.index)
 end

 def see()

```

@@ -335,19 +342,43 @@  
end

```
 def get_tab(index)

```

- 

```
 Tk::BLT::Tabset::Tab.id2obj(tk_send_without_enc('get', 

```

tagindex(index)))

- 

```
 if (idx = tk_send_without_enc('get', tagindex(index))).empty?

```

- 

```
   nil

```

- 

```
 else

```

- 

```
   Tk::BLT::Tabset::Tab.id2obj(self, idx)

```

- 

```
 end

```

end

- def get\_tabobj(index)

- 

```
 if (idx = tk_send_without_enc('get', tagindex(index))).empty?

```

- 

```
   nil

```

- 

```
 else

```

- 

```
  Tk::BLT::Tabset::Tab.new(self, nil, name, {})

```

- 

```
 end

```

- end

- 

```
 num_or_str(tk_send('index', '-mame', tagid(tab)))

```

- 

```
 num_or_str(tk_send('index', '-name', tagid(tab)))

```

end

def insert(pos, tab, keys={})

- 

```
 pos = 'end' if pos.nil?
 Tk::BLT::Tabset::Tab.new(self, tagindex(pos), tagid(tab), keys)

```

end

- def insert\_tabs(pos, \*tabs)

- 

```
 pos = 'end' if pos.nil?

```

- 

```
 if tabs[-1].kind_of?(Hash)

```

- 

```
   keys = tabs.pop

```

- 

```
 else

```

- 

```
   keys = {}

```

- 

```
 end

```

- 

```
 fail ArgumentError, 'no tabs is given' if tabs.empty?

```

- 

```
 tabs.map!{|tab| tagid(tab)}

```

- 

```
 tk_send('insert', tagindex(pos), *(tabs + [keys]))

```

- 

```
 tabs.collect{|tab| Tk::BLT::Tabset::Tab.new(self, nil, 

```

tagid(tab))}

- end

- 

Tk::BLT::Tabset::Tab.id2obj(num\_or\_str(tk\_send\_without\_enc(‘nearest’, x,  
y)))

- 

```
 Tk::BLT::Tabset::Tab.id2obj(self, 

```

num\_or\_str(tk\_send\_without\_enc(‘nearest’, x, y)))  
end

- def perforation\_highlight(index, mode)
- 

```
 tk_send('perforation', 'highlight', tagindex(index), mode)

```

- def perforation\_activate(mode)
- 

```
 tk_send('perforation', 'activate', mode)
 self

```

end

- def perforation\_invoke(index)
- 

```
 tk_send('perforation', 'invoke', tagindex(index))

```

- def perforation\_highlight(index, \*args)

- 

```
 if args.empty?

```

- 

```
   # index --> mode

```

- 

```
   tk_send('perforation', 'highlight', index)

```

- 

```
 elsif args.size == 1

```

- 

```
   # args[0] --> mode

```

- 

```
   tk_send('perforation', 'highlight', tagindex(index), args[0])

```

- 

```
 else # Error: call to get Tcl's error message

```

- 

```
   tk_send('perforation', 'highlight', tagindex(index), *args)

```

- 

```
 end

```

- 

```
 self

```

end

- def perforation\_invoke(index=nil)

- 

```
 if index

```

- 

```
   tk_send('perforation', 'invoke', tagindex(index))

```

- 

```
 else

```

- 

```
   tk_send('perforation', 'invoke')

```

- 

```
 end

```

- end

- def tab\_dockall

- 

```
 tk_send('tab', 'dockall')

```

- 

```
 self

```

- end

- def tab\_names(pat=None)  
simplelist(tk\_send(‘tab’, ‘names’, pat)).collect{|name|

- 

```
   Tk::BLT::Tabset::Tab.id2obj(name)

```

- 

```
   Tk::BLT::Tabset::Tab.id2obj(self, name)
 }

```

end

- def tab\_tearoff(index, name=None)
- 

```
 window(tk_send('tab', 'tearoff', tagindex(index), name))

```

- def tab\_objs(pat=None)

- 

```
 simplelist(tk_send('tab', 'names', pat)).collect{|name|

```

- 

```
   Tk::BLT::Tabset::Tab.new(self, nil, name, {})

```

- 

```
 }

```

end

- def tab\_ids(pat=None)

- 

```
 simplelist(tk_send('tab', 'names', pat))

```

- end

- 
- def tab\_pageheight

- 

```
 number(tk_send('tab', 'pageheight'))

```

- end

- 
- def tab\_pagewidth

- 

```
 number(tk_send('tab', 'pagewidth'))

```

- end

- 
- def tab\_tearoff(index, parent=None)

- 

```
 window(tk_send('tab', 'tearoff', tagindex(index), parent))

```

- end

- def xscrollcommand(cmd=Proc.new)  
configure\_cmd ‘scrollcommand’, cmd  
self  
Index: ext/tk/lib/tkextlib/blt/tabnotebook.rb  
===================================================================  
— ext/tk/lib/tkextlib/blt/tabnotebook.rb (revision 20347)  
+++ ext/tk/lib/tkextlib/blt/tabnotebook.rb (working copy)  
@@ -13,9 +13,98 @@  
WidgetClassName = ‘Tabnotebook’.freeze  
WidgetClassNames[WidgetClassName] = self

- class Tab \< Tk::BLT::Tabset::Tab

- 

```
 def self.new(parent, pos=nil, name=nil, keys={})

```

- 

```
   if pos.kind_of?(Hash)

```

- 

```
     keys = pos

```

- 

```
     name = nil

```

- 

```
     pos = nil

```

- 

```
   end

```

- 

```
   if name.kind_of?(Hash)

```

- 

```
     keys = name

```

- 

```
     name = nil

```

- 

```
   end

```

- 

```
   obj = nil

```

- 

```
   TabID_TBL.mutex.synchronize{

```

- 

```
     if name && TabID_TBL[parent.path] && 

```

TabID\_TBL[parent.path][name]

- 

```
       obj = TabID_TBL[parent.path][name]

```

- 

```
       if pos

```

- 

```
         if pos.to_s == 'end'

```

- 

```
           obj.move_after('end')

```

- 

```
         else

```

- 

```
           obj.move_before(pos)

```

- 

```
         end

```

- 

```
       end

```

- 

```
       obj.configure if keys && ! keys.empty?

```

- 

```
     else

```

- 

```
       (obj = self.allocate).instance_eval{

```

- 

```
         initialize(parent, pos, name, keys)

```

- 

```
         TabID_TBL[@tpath] = {} unless TabID_TBL[@tpath]

```

- 

```
         TabID_TBL[@tpath][@id] = self

```

- 

```
       }

```

- 

```
     end

```

- 

```
   }

```

- 

```
   obj

```

- 

```
 end

```

- 
- 

```
 def initialize(parent, pos, name, keys)

```

- 

```
   @t = parent

```

- 

```
   @tpath = parent.path

```

- 

```
   if name

```

- 

```
     @path = @id = name

```

- 

```
     unless (list(tk_call(@tpath, 'tab', 'names', @id)).empty?)

```

- 

```
       if pos

```

- 

```
         idx = tk_call(@tpath, 'index', @id)

```

- 

```
         if pos.to_s == 'end'

```

- 

```
           tk_call(@tpath, 'move', idx, 'after', 'end')

```

- 

```
         else

```

- 

```
           tk_call(@tpath, 'move', idx, 'before', pos)

```

- 

```
         end

```

- 

```
       end

```

- 

```
       tk_call(@tpath, 'tab', 'configure', @id, keys)

```

- 

```
     else

```

- 

```
       fail ArgumentError, "can't find tab \"#{@id}\" in #{@t}"

```

- 

```
     end

```

- 

```
   else

```

- 

```
     pos = 'end' unless pos

```

- 

```
     @path = @id = tk_call(@tpath, 'insert', pos, keys)

```

- 

```
   end

```

- 

```
 end

```

- end
- 
- #######################################
- def get\_tab(index)

- 

```
 Tk::BLT::Tabset::Tab.id2obj(tk_send_without_enc('id', 

```

tagindex(index)))

- 

```
 if (idx = tk_send_without_enc('id', tagindex(index))).empty?

```

- 

```
   nil

```

- 

```
 else

```

- 

```
   Tk::BLT::Tabset::Tab.id2obj(self, idx)

```

- 

```
 end

```

end  
alias get\_id get\_tab
- 
- def get\_tabobj(index)
- 

```
 if (idx = tk_send_without_enc('id', tagindex(index))).empty?

```

- 

```
   nil

```

- 

```
 else

```

- 

```
   Tk::BLT::Tabnotebook::Tab.new(self, nil, idx)

```

- 

```
 end

```

- end
- 
- alias index\_name index
- 
- def insert(pos=nil, keys={})
- 

```
 if pos.kind_of?(Hash)

```

- 

```
   keys = pos

```

- 

```
   pos = nil

```

- 

```
 end

```

- 

```
 pos = 'end' if pos.nil?

```

- 

```
 Tk::BLT::Tabnotebook::Tab.new(self, nil,

```

- 

```
                               tk_send('insert', tagindex(pos), 

```

keys))  
+

- end
- undef :insert\_tabs
- 
- undef :tab\_pageheight, :tab\_pagewidth  
end  
end

---

<div class="post-metadata">

**Author:** ![pmak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@pmak](https://www.ruby-forum.com/u/pmak)\
**Post date:** [November 27, 2008, 4:48am UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846/6 "2008-11-27T04:48:15Z")

</div>

From: Philip Müller [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: Re: BLT::Tabnotebook - tabnotebook.tcl not found  
Date: Thu, 27 Nov 2008 06:39:32 +0900  
Message-ID: [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

> > t1 = Tk::BLT::Tabnotebook::Tab.new(nb)  
> > Tk::BLT::Tile::Label.new(t1)

## A Tab object cannot be a parent of other widet. Please use a Tabnotebook object as a parent of contents. For example, the following will work.

require ‘tk’  
require ‘tkextlib/blt’

nb = Tk::BLT::Tabnotebook.new(TkRoot.new).pack

## t1 = Tk::BLT::Tabnotebook::Tab.new(nb) t1.window = Tk::BLT::Tile::Label.new(nb)

## And, the following will work, too.

nb = Tk::BLT::Tabnotebook.new(TkRoot.new).pack

t1 = nb.insert(:end, :text=\>‘LABEL1’,  
:window=\>Tk::BLT::Tile::Label.new(nb, :text=\>‘fooooo’))  
t2 = nb.insert(:end, :text=\>‘LABEL2’,  
:window=\>Tk::BLT::Tile::Label.new(nb, :text=\>‘baaaaa’))

---

<div class="post-metadata">

**Author:** ![pmak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@pmak](https://www.ruby-forum.com/u/pmak)\
**Post date:** [November 27, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846/7 "2008-11-27T19:52:52Z")

</div>

It works!

Thank you very much for all that patching and the example.

Best Regards

Philip

---

<div class="post-metadata">

**Author:** ![pmak](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/5fc32e/32.png) [@pmak](https://www.ruby-forum.com/u/pmak)\
**Post date:** [November 26, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/blt-tabnotebook-tabnotebook-tcl-not-found/153846/8 "2008-11-26T22:44:08Z")

</div>

Hi,  
thanks for the patches!

We can now create tabs. However, when we try to insert elements into the  
tabs, we still get errors.

E.g.:

> require ‘tk’  
> require ‘tkextlib/blt’
> 
> nb = Tk::BLT::Tabnotebook.new(TkRoot.new).pack
> 
> t1 = Tk::BLT::Tabnotebook::Tab.new(nb)  
> Tk::BLT::Tile::Label.new(t1)

alternatively (gives the same error):

> Tk::BLT::Tile::Label.new(nb.get\_tab(0))

error message:

/usr/lib/ruby/1.8/tk.rb:1807:in `_invoke_without_enc': bad window path name "tab0" (RuntimeError) from /usr/lib/ruby/1.8/tk.rb:1807:in`\_ip\_invoke\_core’  
from /usr/lib/ruby/1.8/tk.rb:1843:in `_tk_call_core' from /usr/lib/ruby/1.8/tk.rb:1871:in`tk\_call\_without\_enc’  
from /usr/lib/ruby/1.8/tk.rb:4920:in `create_self' from /usr/lib/ruby/1.8/tk.rb:4875:in`initialize’  
from /home/philip/workspaces/ruby/test/tabtest.rb:11:in `new’  
from /home/philip/workspaces/ruby/test/tabtest.rb:11
