[Wtr-general] Lists question
Attebery, Bill
Bill.Attebery at twtelecom.com
Tue Jul 25 11:00:22 EDT 2006
I didn't fully understand the syntax -- but reading it closer I see what
you mean now.
I read it reversed -- do block unless window contains Internet Explorer
(thus skipping all the IE windows) but it was really next (or skip)
block unless window contains Internet Explorer (thus only acting on IE
windows).
I'm clueless as to why it worked when I flipped the logic (on non-modal
IE windows at least, couldn't get modals to work) and doesn't work at
all for me the other way!? I think I'll do some more digging. If you
have some specific diagnostic code you'd like me to try, please forward.
Thanks
Bret
I made some time to do some digging into the code
(1.5.1.1054) and discovered this in the IE::_find method
class IE
...
def self._find(how, what)
shell = WIN32OLE.new("Shell.Application")
ieTemp = nil
shell.Windows.each do |window|
next unless (window.path =~ /Internet Explorer/
rescue false)
Thanks for digging in to the code and sharing what you
found. It's hard for me to understand where the logic error would be in
this code, however. I accept that you changed it and it worked, but the
=~ operator will return a number (= true) if there is a match, other
wise nil (= false). Thus that line should skip ahead to the next window
unless it is an Internet Explorer window. So it sounds right to me.
Bret
The content contained in this electronic message is not intended to
constitute formation of a contract binding TWTC. TWTC will be
contractually bound only upon execution, by an authorized officer, of
a contract including agreed terms and conditions or by express
application of its tariffs.
This message is intended only for the use of the individual or entity
to which it is addressed. If the reader of this message is not the
intended recipient, or the employee or agent responsible for
delivering the message to the intended recipient, you are hereby
notified that any dissemination, distribution or copying of this
message is strictly prohibited. If you have received this
communication in error, please notify us immediately by replying to
the sender of this E-Mail or by telephone.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/wtr-general/attachments/20060725/d6b78ec6/attachment.html
More information about the Wtr-general
mailing list