win32ole events

  • Thread starter Fredrik Jagenheim
  • Start date
F

Fredrik Jagenheim

I found a couple of peculiar stuff in win32ole_events.

If I get my object like this:

# mainObject is WIN32OLE object
objects = mainObject.Objects
objectToUse = nil
objects.each { |object|
if object.Name == 'WhatILookFor'
objectToUse = object
break;
end
}

If I try and sign up objectToUse with an event-handler now, it won't
receive any events at all.

However, if I get it by using a count and then:
objectToUser = objects.Item(count)
it works.

Also, if I break the WIN32OLE_EVENTS.main_loop after I've received the
event I was interested in (using the 'throw :done' as seen in
pickaxe), when I restart the main_loop there won't be any more events
sent.

I've worked around both of these, but I'm not sure if the problem is
with win32ole_events or my usage of it, or perhaps the OLE server I'm
trying to use...

//F
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,575
Members
45,053
Latest member
billing-software

Latest Threads

Top