aboutsummaryrefslogtreecommitdiffstats
path: root/ext/tk/lib/tkextlib/tile/tprogressbar.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkextlib/tile/tprogressbar.rb')
-rw-r--r--ext/tk/lib/tkextlib/tile/tprogressbar.rb24
1 files changed, 16 insertions, 8 deletions
diff --git a/ext/tk/lib/tkextlib/tile/tprogressbar.rb b/ext/tk/lib/tkextlib/tile/tprogressbar.rb
index 3f98660c83..36c1c75c23 100644
--- a/ext/tk/lib/tkextlib/tile/tprogressbar.rb
+++ b/ext/tk/lib/tkextlib/tile/tprogressbar.rb
@@ -28,18 +28,26 @@ class Tk::Tile::TProgressbar
[self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
end
- def step
- tk_send_without_enc('step').to_f
- end
- def step=(amount)
- tk_send_without_enc('step', amount)
+ def step(amount=None)
+ tk_send_without_enc('step', amount).to_f
end
+ #def step=(amount)
+ # tk_send_without_enc('step', amount)
+ #end
def start(interval=None)
- tk_call_without_enc('::tile::progressbar::start', @path, interval)
+ if Tk::Tile::TILE_SPEC_VERSION_ID < 5
+ tk_call_without_enc('::tile::progressbar::start', @path, interval)
+ else
+ tk_send_without_enc('start', interval)
+ end
end
- def stop
- tk_call_without_enc('::tile::progressbar::stop', @path)
+ def stop(amount=None)
+ if Tk::Tile::TILE_SPEC_VERSION_ID < 5
+ tk_call_without_enc('::tile::progressbar::stop', @path)
+ else
+ tk_send_without_enc('stop', amount)
+ end
end
end