TkDialogBox missing?

Discussion in 'Ruby' started by Josef Wolf, Aug 31, 2006.

  1. Josef Wolf

    Josef Wolf Guest

    Hello!

    I am pretty new to ruby, but I have used perl/Tk in my previous life ;-)
    I can't find ruby's aequivalent to perl's Tk::DialogBox. I need to
    implement something similar to firefox's "preferences" dialog. The
    TkDialog class don't look as if it can maintain arbitrary widgets.

    I have checked the archives and google, but could find only a thread[*]
    dated back to the year 2000.

    What is the current status? Are dialog boxes still not supported?
    Or am I just misunderstanding something? Maybe there's some sort of
    work-around?

    [*] http://blade.nagaokaut.ac.jp/cgi-bin/vframe.rb/ruby/ruby-talk/7548?7484-8460
     
    Josef Wolf, Aug 31, 2006
    #1
    1. Advertising

  2. From: Josef Wolf <>
    Subject: TkDialogBox missing?
    Date: Fri, 1 Sep 2006 07:50:34 +0900
    Message-ID: <>
    > I am pretty new to ruby, but I have used perl/Tk in my previous life ;-)
    > I can't find ruby's aequivalent to perl's Tk::DialogBox. I need to


    That is NOT a standard widget of Tcl/Tk.
    Probably, it is a perl/Tk specific one.

    I think that "Dialog" widget of BWidget extension is one of
    similar widgets. BWidget extension is written in pure Tcl/Tk.
    So, it is not difficult to install.
    Ruby/Tk supports BWidget extension by 'tkextlib/bwidget.rb'.

    # Of course, you can write such new widget class by your own. :)
    --
    Hidetoshi NAGAI ()
     
    Hidetoshi NAGAI, Sep 1, 2006
    #2
    1. Advertising

  3. Josef Wolf

    Josef Wolf Guest

    On Fri, Sep 01, 2006 at 12:01:13PM +0900, Hidetoshi NAGAI wrote:

    Thanks for your quick reply! (BTW: is Hidetishi your first name?)

    > From: Josef Wolf <>
    > > I am pretty new to ruby, but I have used perl/Tk in my previous life ;-)
    > > I can't find ruby's aequivalent to perl's Tk::DialogBox. I need to

    >
    > That is NOT a standard widget of Tcl/Tk.
    > Probably, it is a perl/Tk specific one.
    >
    > I think that "Dialog" widget of BWidget extension is one of
    > similar widgets. BWidget extension is written in pure Tcl/Tk.
    > So, it is not difficult to install.
    > Ruby/Tk supports BWidget extension by 'tkextlib/bwidget.rb'.


    It looks as if it is already installed on my suse box. But I can't find
    any documentation. I assume it is to be used similar to ruby/Tk?
    Anyway, I'll go dive into it. Thanks again!
     
    Josef Wolf, Sep 1, 2006
    #3
  4. Josef Wolf

    Josef Wolf Guest

    On Fri, Sep 01, 2006 at 03:00:34PM +0900, Josef Wolf wrote:
    > On Fri, Sep 01, 2006 at 12:01:13PM +0900, Hidetoshi NAGAI wrote:
    > > From: Josef Wolf <>
    > > > I am pretty new to ruby, but I have used perl/Tk in my previous life ;-)
    > > > I can't find ruby's aequivalent to perl's Tk::DialogBox. I need to

    > >
    > > That is NOT a standard widget of Tcl/Tk.
    > > Probably, it is a perl/Tk specific one.
    > >
    > > I think that "Dialog" widget of BWidget extension is one of
    > > similar widgets. BWidget extension is written in pure Tcl/Tk.
    > > So, it is not difficult to install.
    > > Ruby/Tk supports BWidget extension by 'tkextlib/bwidget.rb'.

    >
    > It looks as if it is already installed on my suse box. But I can't find
    > any documentation. I assume it is to be used similar to ruby/Tk?
    > Anyway, I'll go dive into it. Thanks again!


    I can't figure out how to use this widget properly. I have two major
    problems with it:

    1. Tk::BWidget::Dialog don't seem to have a "buttons" option? But
    without a "buttons" option, options like "cancel", "default" and
    "separator" don't really make sense, IMHO.

    2. It's draw() method returns the id of the widget instead of an indication
    which button was pressed.

    This is what I do:

    pressed=nil
    dia=Tk::BWidget::Dialog.new('parent'=>parent)
    label=Tk::BWidget::LabelEntry.new('parent'=>dia, 'label'=>'Entity',
    'text'=>'Hello').pack
    TkButton.new(dia,'text'=>'OK',
    'command'=>proc{dia.enddialog(dia); pressed="OK"}).pack
    TkButton.new(dia,'text'=>'Cancel',
    'command'=>proc{dia.enddialog(dia); pressed="Cancel"}).pack

    dia.draw

    Is it really meant to be used that way? I bet I am missing some very
    important details, but I can't figure out what it is.

    BTW: There seems to be one more widget set called iwidgets. Anybody knows
    what it is?
     
    Josef Wolf, Sep 3, 2006
    #4
  5. On Sep 3, 2006, at 8:50 AM, Josef Wolf wrote:

    > BTW: There seems to be one more widget set called iwidgets.
    > Anybody knows
    > what it is?


    The iwidget widget set is Ruby support for [incr Widgets]. You can
    find documentation at <http://incrtcl.sourceforge.net/iwidgets/>.
    This is Tk documentation, but the Ruby implementation seems to
    follows it closely.

    I have just began to experiment with [incr Widgets]. So far so good.
    They are higher level than the basic Tk widgets and seem to easy to use.

    Here is a list:

    buttonbox
    calendar
    canvasprintbox
    canvasprintdialog
    checkbox
    combobox
    dateentry
    datefield
    dialog
    dialogshell
    disjointlistbox
    entryfield
    extbutton
    extfileselectionbox
    extfileselectiondialog
    feedback
    fileselectionbox
    fileselectiondialog
    finddialog
    hierarchy
    hyperhelp
    labeledframe
    labeledwidget
    mainwindow
    menubar
    messagebox
    messagedialog
    notebook
    optionmenu
    panedwindow
    promptdialog
    pushbutton
    radiobox
    regexpfield
    scrolledcanvas
    scrolledframe
    scrolledhtml
    scrolledlistbox
    scrolledtext
    scrolledwidget
    selectionbox
    selectiondialog
    shell
    spindate
    spinint
    spinner
    spintime
    tabnotebook
    tabset
    timeentry
    timefield
    toolbar

    Regards, Morton
     
    Morton Goldberg, Sep 4, 2006
    #5
  6. Josef Wolf

    Josef Wolf Guest

    On Mon, Sep 04, 2006 at 11:30:01AM +0900, Morton Goldberg wrote:

    Thanks for your reply, Morton!

    > >BTW: There seems to be one more widget set called iwidgets.
    > > Anybody knows what it is?

    >
    > The iwidget widget set is Ruby support for [incr Widgets]. You can
    > find documentation at <http://incrtcl.sourceforge.net/iwidgets/>.


    This page mentions examples and tutorials, but I can't find them on
    this site. A google search did not reveal anything useful, too. Could
    you find anything useful?

    > This is Tk documentation, but the Ruby implementation seems to
    > follows it closely.
    >
    > I have just began to experiment with [incr Widgets]. So far so good.
    > They are higher level than the basic Tk widgets and seem to easy to use.


    Would you dare to share some examples how the ruby bindings are to be
    used?
     
    Josef Wolf, Sep 4, 2006
    #6
  7. From: Josef Wolf <>
    Subject: Re: TkDialogBox missing?
    Date: Sun, 3 Sep 2006 21:50:54 +0900
    Message-ID: <>
    > I can't figure out how to use this widget properly. I have two major
    > problems with it:


    Please run '<ruby-src>/ext/tk/sample/tkextlib/bwidget/demo.rb',
    and see '<ruby-src>/ext/tk/sample/tkextlib/bwidget/tmpldlg.rb'.

    > 1. Tk::BWidget::Dialog don't seem to have a "buttons" option? But
    > without a "buttons" option, options like "cancel", "default" and
    > "separator" don't really make sense, IMHO.


    Use Tk::BWidget::Dialog#add to add buttons.

    > 2. It's draw() method returns the id of the widget instead of an indication
    > which button was pressed.


    Please see the next example.
    ---------------------------------------------------------------------
    require 'tk'
    require 'tkextlib/bwidget'

    d = Tk::BWidget::Dialog.new:)relative=>Tk.root, :modal=>:local,
    :separator=>true, :title=>'Dialog Test',
    :side=>:bottom, :anchor=>:c,
    :default=>0, :cancel=>3)

    d.add:)text=>'btn0', :command=>proc{d.enddialog('btn0 is pressed')})
    d.add:)text=>'btn1', :command=>proc{d.enddialog('btn1 is pressed')})
    d.add:)text=>'btn2') # use default cmd => return a string of the index number
    d.add:)text=>'btn3', :command=>proc{d.enddialog('btn3 is pressed')})

    p d.current_itemconfiginfo(0)

    # f = d.get_frame
    d.get_frame{|f|
    TkLabel.new(f, :text=>'Here is a frame of the dialog').pack
    TkLabel.new(f, :text=>'Please lay-out your widgets here.').pack
    }

    TkButton.new:)text=>'show dialog', :command=>proc{p d.draw}).pack

    Tk.mainloop
    ---------------------------------------------------------------------

    > BTW: There seems to be one more widget set called iwidgets. Anybody knows
    > what it is?


    If you can use "iwidgets", it may be enough for your purpose to imitate
    '<ruby-src>/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb'.
    If you want to install "iwidgets" ([incr Widgets]) from its source,
    you have to compile it.
    However, BWidgets doesn't need compile, because it witten in pure Tcl/Tk.
    --
    Hidetoshi NAGAI ()
     
    Hidetoshi NAGAI, Sep 5, 2006
    #7
  8. On Sep 4, 2006, at 1:25 PM, Josef Wolf wrote:

    > On Mon, Sep 04, 2006 at 11:30:01AM +0900, Morton Goldberg wrote:
    >
    > Thanks for your reply, Morton!
    >
    >>> BTW: There seems to be one more widget set called iwidgets.
    >>> Anybody knows what it is?

    >>
    >> The iwidget widget set is Ruby support for [incr Widgets]. You can
    >> find documentation at <http://incrtcl.sourceforge.net/iwidgets/>.

    >
    > This page mentions examples and tutorials, but I can't find them on
    > this site. A google search did not reveal anything useful, too.
    > Could
    > you find anything useful?


    Did you try clicking on any of the widget names in the sidebar? When
    I click on the name of a widget, I get a tutorial with example code
    for that widget. In the lower right corner of the tutorial is a set
    of buttons that link to reference material for the given widget.
    Altogether I think this the [incr Widgets] are pretty well
    documented. I could wish Ruby/Tk were so well documented.

    >> This is Tk documentation, but the Ruby implementation seems to
    >> follows it closely.
    >>
    >> I have just began to experiment with [incr Widgets]. So far so good.
    >> They are higher level than the basic Tk widgets and seem to easy
    >> to use.

    >
    > Would you dare to share some examples how the ruby bindings are to be
    > used?


    I am new to both Ruby and Tk -- I have just started exploring, so I
    don't have much to offer. All I have done (and only for a two of the
    [incr Widgets]) is translate the web site's example code into Ruby/Tk
    and probably not very elegantly. With that disclaimer in mind, do you
    still want me to post my code?

    Regards, Morton
     
    Morton Goldberg, Sep 5, 2006
    #8
  9. From: Morton Goldberg <>
    Subject: Re: TkDialogBox missing?
    Date: Tue, 5 Sep 2006 14:13:47 +0900
    Message-ID: <>
    > I am new to both Ruby and Tk -- I have just started exploring, so I
    > don't have much to offer. All I have done (and only for a two of the
    > [incr Widgets]) is translate the web site's example code into Ruby/Tk
    > and probably not very elegantly. With that disclaimer in mind, do you
    > still want me to post my code?


    Do you have any requests for Iwidgets support of Ruby/Tk?
    --
    Hidetoshi NAGAI ()
     
    Hidetoshi NAGAI, Sep 5, 2006
    #9
  10. On Sep 5, 2006, at 6:12 AM, Hidetoshi NAGAI wrote:

    > From: Morton Goldberg <>
    > Subject: Re: TkDialogBox missing?
    > Date: Tue, 5 Sep 2006 14:13:47 +0900
    > Message-ID: <>
    >> I am new to both Ruby and Tk -- I have just started exploring, so I
    >> don't have much to offer. All I have done (and only for a two of the
    >> [incr Widgets]) is translate the web site's example code into Ruby/Tk
    >> and probably not very elegantly. With that disclaimer in mind, do you
    >> still want me to post my code?

    >
    > Do you have any requests for Iwidgets support of Ruby/Tk?
    > --
    > Hidetoshi NAGAI ()


    Not at this stage of my explorations. So far what little I've tried
    seems to work much as I expected. I really haven't gotten in deep
    enough so that anything I've done moves me to make a support request.
    There are still many [incr Widgets] with which I need to become
    familiar before I use them in a real application. When I reach the
    stage of building a real application, I think then I might find
    myself moved to request support, but not before.

    But thank you for asking.

    Regards, Morton
     
    Morton Goldberg, Sep 5, 2006
    #10
  11. Josef Wolf

    Josef Wolf Guest

    On Tue, Sep 05, 2006 at 02:13:47PM +0900, Morton Goldberg wrote:
    > On Sep 4, 2006, at 1:25 PM, Josef Wolf wrote:


    > >>The iwidget widget set is Ruby support for [incr Widgets]. You can
    > >>find documentation at <http://incrtcl.sourceforge.net/iwidgets/>.

    > >
    > >This page mentions examples and tutorials, but I can't find them on
    > >this site. A google search did not reveal anything useful, too.
    > >Could you find anything useful?

    >
    > Did you try clicking on any of the widget names in the sidebar?


    Yes, but for me, this looks more like a man page than a tutorial. ;-)

    > Altogether I think this the [incr Widgets] are pretty well
    > documented. I could wish Ruby/Tk were so well documented.


    Well, the iwidgets are documented for tcl. tcl documentation for Tk
    is available, too. ;-)

    > I am new to both Ruby and Tk -- I have just started exploring, so I
    > don't have much to offer. All I have done (and only for a two of the
    > [incr Widgets]) is translate the web site's example code into Ruby/Tk
    > and probably not very elegantly. With that disclaimer in mind, do you
    > still want me to post my code?


    We could try to reduce the documentation-vacuum by collecting some
    examples how to use them. The examples need not be perfect from the
    beginning. I bet many readers from this list would happily help
    improving the code :)
     
    Josef Wolf, Sep 5, 2006
    #11
  12. Josef Wolf

    Josef Wolf Guest

    On Tue, Sep 05, 2006 at 01:52:25PM +0900, Hidetoshi NAGAI wrote:

    > Please see the next example.


    Now with your example, it is pretty clear how it works. Thank you very
    much!

    > > BTW: There seems to be one more widget set called iwidgets. Anybody knows
    > > what it is?

    >
    > If you can use "iwidgets", it may be enough for your purpose to imitate
    > '<ruby-src>/ext/tk/sample/tkextlib/iwidgets/sample/dialog.rb'.
    >
    > If you want to install "iwidgets" ([incr Widgets]) from its source,
    > you have to compile it.


    I have not checked yet whether I can use them. But their bindings seem
    to be part of the ruby/tk package:

    $ rpm -qf /usr/lib/ruby/1.8/tkextlib/iwidgets.rb
    ruby-tk-1.8.2-11
    $ cat /etc/SuSE-release
    SUSE LINUX 10.0 (i586)
    VERSION = 10.0
    $
     
    Josef Wolf, Sep 5, 2006
    #12
  13. On Sep 5, 2006, at 12:50 PM, Josef Wolf wrote:

    > Yes, but for me, this looks more like a man page than a tutorial. ;-)


    A man page with sample code and a picture of the result? That's
    hardly your typical Unix man page :)

    >> Altogether I think this the [incr Widgets] are pretty well
    >> documented. I could wish Ruby/Tk were so well documented.

    >
    > Well, the iwidgets are documented for tcl. tcl documentation for Tk
    > is available, too. ;-)


    I refer to it regularly. I could wish Ruby/Tk were so well documented :)

    >> I am new to both Ruby and Tk -- I have just started exploring, so I
    >> don't have much to offer. All I have done (and only for a two of the
    >> [incr Widgets]) is translate the web site's example code into Ruby/Tk
    >> and probably not very elegantly. With that disclaimer in mind, do you
    >> still want me to post my code?

    >
    > We could try to reduce the documentation-vacuum by collecting some
    > examples how to use them. The examples need not be perfect from the
    > beginning. I bet many readers from this list would happily help
    > improving the code :)


    OK, I'll post and we'll see how it goes. I'll post each example in a
    new thread. I think that would be best.

    Regards, Morton
     
    Morton Goldberg, Sep 5, 2006
    #13
  14. Morton Goldberg wrote:
    > On Sep 5, 2006, at 12:50 PM, Josef Wolf wrote:
    >
    >> Yes, but for me, this looks more like a man page than a tutorial. ;-)

    >
    > A man page with sample code and a picture of the result? That's
    > hardly your typical Unix man page :)
    >
    >>> Altogether I think this the [incr Widgets] are pretty well
    >>> documented. I could wish Ruby/Tk were so well documented.

    >>
    >> Well, the iwidgets are documented for tcl. tcl documentation for Tk
    >> is available, too. ;-)

    >
    > I refer to it regularly. I could wish Ruby/Tk were so well documented :)
    >
    >>> I am new to both Ruby and Tk -- I have just started exploring, so I
    >>> don't have much to offer. All I have done (and only for a two of the
    >>> [incr Widgets]) is translate the web site's example code into Ruby/Tk
    >>> and probably not very elegantly. With that disclaimer in mind, do you
    >>> still want me to post my code?

    >>
    >> We could try to reduce the documentation-vacuum by collecting some
    >> examples how to use them. The examples need not be perfect from the
    >> beginning. I bet many readers from this list would happily help
    >> improving the code :)

    >
    > OK, I'll post and we'll see how it goes. I'll post each example in a
    > new thread. I think that would be best.
    >
    > Regards, Morton


    Hey all,

    I've been doing a LOT of Ruby/TK development lately using a combination
    of the builtin widgets and Tile. I was considering contributing back
    some documentation and I'd be interested in helping out.

    And, Hidetoshi NAGAI: I think I have found some bugs in the Tile
    bindings. Are you still the Ruby/Tk maintainer? I have monkey-patched my
    code, but I should probably submit the fixes to *someone*...

    Andrew - sorry for using ruby-forum (I'm lazy)

    --
    Posted via http://www.ruby-forum.com/.
     
    Andrew Thompson, Sep 6, 2006
    #14
  15. From: Josef Wolf <>
    Subject: Re: TkDialogBox missing?
    Date: Wed, 6 Sep 2006 02:11:01 +0900
    Message-ID: <>
    > I have not checked yet whether I can use them. But their bindings seem
    > to be part of the ruby/tk package:
    >
    > $ rpm -qf /usr/lib/ruby/1.8/tkextlib/iwidgets.rb
    > ruby-tk-1.8.2-11
    > $ cat /etc/SuSE-release
    > SUSE LINUX 10.0 (i586)
    > VERSION = 10.0
    > $


    It doesn't verify whether your Ruby/Tk can load Iwidgets extension or not.
    Please exec "ruby /usr/lib/ruby/1.8/tkextlib/pkc_checker.rb".
    If it denotes lack of libraries, you cannot use the extension.
    For example, the following shows that Iwidgets is NOT available.
    -------------------------------------------------------
    :
    :
    Ready : itcl.rb : require->{}
    *LACK : itcl/incr_tcl.rb : require->{} FAIL->[["Itcl", :package]]
    Ready : itcl/setup.rb : require->{}

    Ready : itk.rb : require->{}
    *LACK : itk/incr_tk.rb : require->{} FAIL->[["Itk", :package]]
    Ready : itk/setup.rb : require->{}

    *LACK : iwidgets.rb : require->{} FAIL->[["tkextlib/itcl", :require_ruby_lib],
    ["tkextlib/itk", :require_ruby_lib], ["Iwidgets", :package]]
    Ready : iwidgets/canvasprintbox.rb : require->{}
    Ready : iwidgets/buttonbox.rb : require->{}
    :
    :
    -------------------------------------------------------
    --
    Hidetoshi NAGAI ()
     
    Hidetoshi NAGAI, Sep 6, 2006
    #15
  16. From: Andrew Thompson <>
    Subject: Re: TkDialogBox missing?
    Date: Wed, 6 Sep 2006 08:41:17 +0900
    Message-ID: <>
    > I've been doing a LOT of Ruby/TK development lately using a combination
    > of the builtin widgets and Tile. I was considering contributing back
    > some documentation and I'd be interested in helping out.
    >
    > And, Hidetoshi NAGAI: I think I have found some bugs in the Tile
    > bindings. Are you still the Ruby/Tk maintainer? I have monkey-patched my
    > code, but I should probably submit the fixes to *someone*...


    Great! Please post here or send to me.
    --
    Hidetoshi NAGAI ()
     
    Hidetoshi NAGAI, Sep 6, 2006
    #16
  17. Josef Wolf

    Josef Wolf Guest

    On Wed, Sep 06, 2006 at 11:21:48AM +0900, Hidetoshi NAGAI wrote:
    > From: Josef Wolf <>


    > > I have not checked yet whether I can use them. But their bindings seem
    > > to be part of the ruby/tk package:
    > >
    > > $ rpm -qf /usr/lib/ruby/1.8/tkextlib/iwidgets.rb
    > > ruby-tk-1.8.2-11
    > > $ cat /etc/SuSE-release
    > > SUSE LINUX 10.0 (i586)
    > > VERSION = 10.0
    > > $

    >
    > It doesn't verify whether your Ruby/Tk can load Iwidgets extension or not.
    > Please exec "ruby /usr/lib/ruby/1.8/tkextlib/pkc_checker.rb".
    > If it denotes lack of libraries, you cannot use the extension.
    > For example, the following shows that Iwidgets is NOT available.
    > -------------------------------------------------------
    > :
    > :
    > Ready : itcl.rb : require->{}
    > *LACK : itcl/incr_tcl.rb : require->{} FAIL->[["Itcl", :package]]
    > Ready : itcl/setup.rb : require->{}
    >
    > Ready : itk.rb : require->{}
    > *LACK : itk/incr_tk.rb : require->{} FAIL->[["Itk", :package]]
    > Ready : itk/setup.rb : require->{}
    >
    > *LACK : iwidgets.rb : require->{} FAIL->[["tkextlib/itcl", :require_ruby_lib],
    > ["tkextlib/itk", :require_ruby_lib], ["Iwidgets", :package]]
    > Ready : iwidgets/canvasprintbox.rb : require->{}
    > Ready : iwidgets/buttonbox.rb : require->{}
    > :
    > :
    > -------------------------------------------------------


    $ ruby /usr/lib/ruby/1.8/tkextlib/pkg_checker.rb
    [ ... ]
    Ready : itcl.rb : require->{}
    Ready : itcl/incr_tcl.rb : require->{"Itcl"=>"3.3"}
    Ready : itcl/setup.rb : require->{}
    [ ... ]
    Ready : itk.rb : require->{}
    Ready : itk/incr_tk.rb : require->{"Itk"=>"3.3"}
    Ready : itk/setup.rb : require->{}

    Ready : iwidgets.rb : require->{"Iwidgets"=>"4.0.1"}
    Ready : iwidgets/canvasprintbox.rb : require->{}
    Ready : iwidgets/buttonbox.rb : require->{}
    [ ... ]
    Ready : iwidgets/timefield.rb : require->{}
    Ready : iwidgets/toolbar.rb : require->{}
    Ready : iwidgets/watch.rb : require->{}

    Looks like they are ready to be used?
     
    Josef Wolf, Sep 6, 2006
    #17
  18. Hidetoshi NAGAI wrote:
    >
    > Great! Please post here or send to me.


    Okay, it's been a while since I wrote these, so I'm not entirely sure
    what I ended up changing... if you have any questions, please ask...
    This was all minor tweaks I believe...

    #add the 'tab' method so we can do per-tab configuration
    class Tk::Tile::TNotebook
    def tab(idx, keys=nil)
    if keys and keys != None
    tk_send('tab', idx, *hash_kv(keys))
    else
    tk_send('tab', idx)
    end
    end
    def select(idx=nil)
    if idx
    tk_send('select', idx)
    else
    tk_send('select')
    end
    self
    end
    end

    class Tk::Tile::TCombobox
    def current
    number(tk_send_without_enc('current'))
    end
    end

    #insert should return the rowid
    class Tk::Tile::Treeview
    def insert(parent, idx, keys={})
    keys = _symbolkey2str(keys)
    id = keys.delete('id')
    if id
    tk_send('insert', parent, idx, '-id', id, *hash_kv(keys))
    else
    tk_send('insert', parent, idx, *hash_kv(keys))
    end
    end
    end

    Andrew

    --
    Posted via http://www.ruby-forum.com/.
     
    Andrew Thompson, Sep 6, 2006
    #18
  19. From: Josef Wolf <>
    Subject: Re: TkDialogBox missing?
    Date: Thu, 7 Sep 2006 01:40:35 +0900
    Message-ID: <>
    > $ ruby /usr/lib/ruby/1.8/tkextlib/pkg_checker.rb
    > [ ... ]
    > Ready : itcl.rb : require->{}
    > Ready : itcl/incr_tcl.rb : require->{"Itcl"=>"3.3"}
    > Ready : itcl/setup.rb : require->{}
    > [ ... ]
    > Ready : itk.rb : require->{}
    > Ready : itk/incr_tk.rb : require->{"Itk"=>"3.3"}
    > Ready : itk/setup.rb : require->{}
    >
    > Ready : iwidgets.rb : require->{"Iwidgets"=>"4.0.1"}
    > Ready : iwidgets/canvasprintbox.rb : require->{}
    > Ready : iwidgets/buttonbox.rb : require->{}
    > [ ... ]
    > Ready : iwidgets/timefield.rb : require->{}
    > Ready : iwidgets/toolbar.rb : require->{}
    > Ready : iwidgets/watch.rb : require->{}
    >
    > Looks like they are ready to be used?


    I think so.
    --
    Hidetoshi NAGAI ()
     
    Hidetoshi NAGAI, Sep 12, 2006
    #19
  20. From: Andrew Thompson <>
    Subject: Re: TkDialogBox missing?
    Date: Thu, 7 Sep 2006 03:23:04 +0900
    Message-ID: <>
    > Okay, it's been a while since I wrote these, so I'm not entirely sure
    > what I ended up changing... if you have any questions, please ask...


    Thank you for your patch. I have some questions.

    * Which version of Tile extension is your patch based on?

    * [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?

    * [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
    -------------------------------------------

    * [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
    -------------------------------------------
    --
    Hidetoshi NAGAI ()
     
    Hidetoshi NAGAI, Sep 12, 2006
    #20
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Paul Fox
    Replies:
    0
    Views:
    762
    Paul Fox
    Mar 5, 2004
  2. Mark Newby
    Replies:
    1
    Views:
    1,733
  3. CodeMonkey
    Replies:
    0
    Views:
    431
    CodeMonkey
    Oct 11, 2005
  4. Acceed See
    Replies:
    1
    Views:
    550
    Carl W.
    Apr 22, 2005
  5. Gary Herron
    Replies:
    2
    Views:
    699
    Bruno Desthuilliers
    Jul 4, 2006
Loading...

Share This Page