>> You are dodging the issue aaaagain. The issue is not only
>> that your approach takes more code, it is also that your
>> approach is over kill and overhead.
Sorry, I'm not dodging the issue, you're just in denial
about the fact that your ideas about programming is
just more of the typical VB mindset, where it doesn't
matter how much garbage code is generated and must
execute, to make things easy for you, or what it costs
the end-user in the long run.
Also, you don't seem to understand what 'overhead' is.
Overhead is code that executes needlessly only so that
you don't have to write a few more lines of it.
>> With your code, each inactive document is listening for
>> an XREF command that will never EVER come.
Sorry, but you're mistaken again.
Documents that are not active cannot listen for events,
because they are not active. When a document is not
active, none of the things that trigger its events can
occur to start with, because the document is NOT ACTIVE.
Documents that are not active, are in a state of suspended
execution (or perhaps you might understand it better if we
say 'suspended animation'). In other words, the code that
continuously runs and listens for events, is not running
when a document is not active.
Perhaps you should consider familiarizing yourself with
a single-threaded cooperative fiber mode application, and
how only one of the lightweight threads associated with
each of its documents can execute at any given time.
To delve further into your misunderstanding of how events
work in general, a document is always listening for events
(like an "XREF command"), whether there are handlers for
those events, or not.
Duh.
>> FORGET WithEvents, it's confusing you.
No, I think its more a case everything is confusing you,
starting with the multiple instances of your class that
you tried to slither out of having to admit you didn't
even realize was happening.
--
http://www.caddzone.com
AcadXTabs: MDI Document Tabs for AutoCAD 2008
Supporting AutoCAD 2000 through 2008
http://www.acadxtabs.com