Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > TkDialogBox missing?

Reply
Thread Tools

TkDialogBox missing?

 
 
Andrew Thompson
Guest
Posts: n/a
 
      09-12-2006
Hidetoshi NAGAI wrote:
> Thank you for your patch. I have some questions.
>
> * Which version of Tile extension is your patch based on?

).7.6, which seems to be the latest.
>
> * [about Tk::Tile::TNotebook#tab]
> There are Tk::Tile::TNotebook#tabconfigure, tabconfiginfo, tabcget,
> and current_tabconfiginfo (similar as item configuration strategy on
> other widgets). Aren't those enough?

Umm, I guess I missed those. If they work the same then that's fine.
>
> * [about Tk::Tile::TNotebook#select]
> How about adding new method "Tk::Tile::TNotebook#selected"?
> -------------------------------------------
> class Tk::Tile::TNotebook
> def selected
> num_or_str(tk_send_without_enc('select'))
> end
> end

That's fine too, I was just keeping the API the same as in the tile
documentation.
> -------------------------------------------
>
> * [about Tk::Tile::Treeview#insert]
> Is the following OK?
> -------------------------------------------
> class Tk::Tile::Treeview
> def insert(parent, idx, keys={})
> keys = _symbolkey2str(keys)
> id = keys.delete('id')
> if id
> num_or_str(tk_send('insert', parent, idx, '-id', id,
> *hash_kv(keys)))
> else
> num_or_str(tk_send('insert', parent, idx, *hash_kv(keys)))
> end
> end
> end
> -------------------------------------------

Again looks fine to me. I'll test them all out and let you know.

Many thanks,

Andrew


--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Andrew Thompson
Guest
Posts: n/a
 
      09-14-2006
I'm having issues with using 'itemconfigure' on a tab:

irb(main):007:0> tabs.itemconfigure(0, :compound=>:text)
ArgumentError: wrong number of arguments (1 for 0)
from /usr/local/lib/ruby/1.8/tk/itemconfig.rb:232:in
`__item_methodcall_optkeys'
from /usr/local/lib/ruby/1.8/tk/itemconfig.rb:232:in
`itemconfigure'
from (irb):7
irb(main):008:0>

I'm guessing I'm not getting the API call right, but I can't seem to
figure out what kinda syntax it wants. Other than that, your suggested
changes work great.

Andrew

--
Posted via http://www.ruby-forum.com/.

 
Reply With Quote
 
 
 
 
Hidetoshi NAGAI
Guest
Posts: n/a
 
      09-15-2006
I'm sorry for the belated reply to your old mail.

From: Andrew Thompson <(E-Mail Removed)>
Subject: Re: TkDialogBox missing?
Date: Fri, 15 Sep 2006 06:24:33 +0900
Message-ID: <(E-Mail Removed)>
> I'm having issues with using 'itemconfigure' on a tab:
>
> irb(main):007:0> tabs.itemconfigure(0, :compound=>:text)
> ArgumentError: wrong number of arguments (1 for 0)
> from /usr/local/lib/ruby/1.8/tk/itemconfig.rb:232:in
> `__item_methodcall_optkeys'
> from /usr/local/lib/ruby/1.8/tk/itemconfig.rb:232:in
> `itemconfigure'
> from (irb):7
> irb(main):008:0>


Very sorry. That's a disgraceful bug. Please try this patch.

--- tnotebook.rb.~1.1.2.7.~ 2005-12-08 17:03:25.000000000 +0900
+++ tnotebook.rb 2006-09-15 12:19:56.000000000 +0900
@@ -27,15 +27,15 @@
end
private :__item_config_cmd

- def __item_listval_optkeys
+ def __item_listval_optkeys(id)
[]
end
private :__item_listval_optkeys

- def __item_methodcall_optkeys # { key=>method, ... }
+ def __item_methodcall_optkeys(id) # { key=>method, ... }
{}
end
- private :__item_listval_optkeys
+ private :__item_methodcall_optkeys

#alias tabcget itemcget
alias tabconfigure itemconfigure

--
Hidetoshi NAGAI ((E-Mail Removed))

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments