From b84ff5ccb390581242c34f67453802c34b97dcea Mon Sep 17 00:00:00 2001 From: suke Date: Sun, 7 Jan 2007 08:56:04 +0000 Subject: add some test. update comment for rdoc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11507 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/win32ole/win32ole.c | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) (limited to 'ext') diff --git a/ext/win32ole/win32ole.c b/ext/win32ole/win32ole.c index ea2fe62c4c..053bb2f813 100644 --- a/ext/win32ole/win32ole.c +++ b/ext/win32ole/win32ole.c @@ -2746,10 +2746,20 @@ fole_setproperty2(VALUE self, VALUE dispid, VALUE args, VALUE types) /* * call-seq: - * WIN32OLE['property']=val - * WIN32OLE.setproperty('property', [arg1, arg2,...] val) + * WIN32OLE[a1, a2, ...]=val * - * Sets property of OLE object. + * Sets the value to WIN32OLE object specified by a1, a2, ... + * + * dict = WIN32OLE.new('Scripting.Dictionary') + * dict.add('ruby', 'RUBY') + * dict['ruby'] = 'Ruby' + * puts dict['ruby'] # => 'Ruby' + * + * Remark: You can not use this method to set the property value. + * + * excel = WIN32OLE.new('Excel.Application') + * # excel['Visible'] = true # This is error !!! + * excel.Visible = true # You should to use this style to set the property. * */ static VALUE @@ -2780,12 +2790,19 @@ fole_setproperty(int argc, VALUE *argv, VALUE self) /* * call-seq: - * WIN32OLE['property'] + * WIN32OLE[a1,a2,...] * - * Returns property of OLE object. + * Returns the value of Collection specified by a1, a2,.... * + * dict = WIN32OLE.new('Scripting.Dictionary') + * dict.add('ruby', 'Ruby') + * puts dict['ruby'] # => 'Ruby' (same as `puts dict.item('ruby')') + * + * Remark: You can not use this method to get the property. * excel = WIN32OLE.new('Excel.Application') - * puts excel['Visible'] # => false + * # puts excel['Visible'] This is error !!! + * puts excel.Visible # You should to use this style to get the property. + * */ static VALUE fole_getproperty_with_bracket(int argc, VALUE *argv, VALUE self) -- cgit v1.2.3