> In a typical situation where a window procedure is overridden, when Add-in A is unloaded, it would set the window procedure to WndProcO, and then when Add-in B unloads, it would set the window procedure to WndProcA. Both actions are wrong, and the second action would lead to a crash if the add-in containing WndProcA has been unloaded.
could WM_REMOVING_WNDPROC be the droids message we're looking for?
hmm, I can't find any definitions for that constant other than in the referring article, but I did see a message 0x0090 that Spy++ can't identify, but that Google reveals as WM_UAHDESTROYWINDOW 0x0090
could that message be early enough in the teardown? Seems to occur before WM_DESTROY...
> "Ahem, um, yeah, this is the, um, window manager? (stifled laughter) And, um, like, we're just calling you to tell you, um, you're being destroyed. (giggle) So, um, you should like pack up your bags and (snort) sell all your furniture! (raucous laughter)"
I know the projects you are working on are far more complicated, but I am testing this method and it is cleaning up Excel properly. There is some good reasoning behind it too (from my limited understanding).
The only thing I have found with this process is that all variables (including the excel application) must go out of scope before running through the GC process. I tried declaring the app in the main environment where the methods were being called and this would cause Excel to hang, even if the process ended.
It will work though if the variable pointing to the application is quit and then set to null.
the problem with Rubberduck is that we're hosted in the COM application, so it's an entirely different issue.. one that's not quite clearly documented anywhere anyway.
What am I doing wrong? I am following the guide on MSDN (msdn.microsoft.com/en-us/library/…) but I cant fix this error (unless I make Records private, but I doubt that is the appropriate fix)
Wasnt there a super simple way of taking an object[] and converting it to an enumerable list? Something like List<Record> foo = bar[].Tolist() or am I missing something?
I am focusing on getting it into a collection of individual Record objects. I can worry about data types later
My assumption was that the new constructor could use the position of individual arguments to assume the property values, so first parameter of New would be bar[i, 1], second parameter bar[i, 2], etc.
For my purposes currently using all strings should work just fine. It isnt until I calculate averages and such (in other projects) that I have to worry about ints, doubles, etc.
So I have to create a collection of individual Record objects, and then pass it to a list?
that would cover try, catch, finally, and throw keywords, as well as System.Exception and a number of derived exception types
oh, and the handful of exceptions that can't be caught, too.
so at the end of this you should be familiar with: stack traces, rethrowing, when a finally block runs, in what order to catch exceptions, and which exception type you should never throw.
and you should be able to know when to throw NotImplementedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, ArgumentNullException, ...that's about all the built-in exception types you typically throw manually (YMMV).
and then you should be able to make your own exception types, too
bonus points if you can tell me how the framework is able to throw an OutOfMemoryException when the system is, well, out of memory
In all honesty, it is fun so far. All I have written is a basic query app that takes existing data and filters it to one criterion then exports it, but I am hoping that within a few weeks the outcome of the app will be far more robust
Related, an article today about escaping poverty in the US basically says the best shot is to have 20 years straight of good luck. Medical bills not included.
This isn't my responsibility to know (that's the approval team) but to sanity check my future pleading, nothing in GPLv3 would remotely require me to share things I work on with Rubberduck VBA with the world?
formerly because original .g4 grammar was GPL indeed, but now that the grammar has been pretty much entirely rewritten from scratchthe language specs, it's more due to Smart Indenter author/maintainer having agreed to GPL licensing
yeah but the RD resolver literally derives from ANTLR classes generated from that grammar: the correlation is strong. client code is just, well, consuming a public API.
@vogel are you saying that If I use a GPL3 text editor to write a document, the document is derivative work? Or, if the text editor has an API, and I consume that API, that consumption-code is derivative work?
We're so many miles past encouraging content creation that you can't see the point of reasonable content creation incentives anymore due to the curvature of the Earth
(Admittedly, the curvature of the Earth becomes visible after 50 miles or so :P)
Write your code initially so that it is correct, follows good design principles, and clearly expresses your intent. Optimize later only if you determine that it is not meeting the performance goals. Code that is optimized for performance is often more difficult to read and maintain. It is generally better to write code that is readable, robust, and maintainable even if it is slightly slower than the most optimized code that you could write.
It's taken me a while, but now I understand a lot of what's been said thanks to the time and effort of the RD team to help me learn. #ItCanBeTaught