[sikuli] 325/385: Basics: sikulix.rb: fixed an exception processing for 'undotted' methods and args number for lambdas
Gilles Filippini
pini at moszumanska.debian.org
Sun Jun 29 19:26:29 UTC 2014
This is an automated email from the git hooks/post-receive script.
pini pushed a commit to tag upstream/1.1.0_beta1
in repository sikuli.
commit 2cb48c3b706be778b1e52ac19c206a235148a0b3
Author: rssdev10 <rssdev10 at gmail.com>
Date: Sun Mar 23 11:42:25 2014 +0400
Basics: sikulix.rb: fixed an exception processing for 'undotted' methods and args number for lambdas
---
Basics/src/main/resources/Lib/sikulix.rb | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/Basics/src/main/resources/Lib/sikulix.rb b/Basics/src/main/resources/Lib/sikulix.rb
index 9f93711..cb3ce84 100755
--- a/Basics/src/main/resources/Lib/sikulix.rb
+++ b/Basics/src/main/resources/Lib/sikulix.rb
@@ -71,7 +71,7 @@ module SikuliX4Ruby
def initialize(block); super(); @block=block; end;
%w(appeared vanished changed).each do |name|
define_method(name) do |*args|
- @block.call *args
+ @block.call *(args.first @block.arity)
end
end
end
@@ -106,7 +106,7 @@ module SikuliX4Ruby
native_exception_protect Region,
[:find, :findAll, :wait, :waitVanish, :exists,
:click, :doubleClick, :rightClick, :hover, :dragDrop,
- :type, :paste]
+ :type, :paste, :observe]
# default screen object for "undotted" methods
$SIKULI_SCREEN = Screen.new
@@ -136,9 +136,9 @@ def self.method_missing name, *args, &block
#Object.send(:define_method, name){ |*args| method.call *args }
return ret
else
- raise "undotted method missing"
+ raise "undotted method '#{name}' missing"
end
- rescue Exception => e
+ rescue NativeException => e
raise "SikuliX4Ruby: Problem (#{e})\nwith undotted method: #{name} (#{args})"
end
end
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/sikuli.git
More information about the pkg-java-commits
mailing list