« first day (838 days earlier)      last day (2342 days later) » 

 
2 hours later…
2:28 AM
Um, for those not in the know. What's the deal with "shim"? Sounds like an Irish leprechaun starting a conversation.
 
lol
 
It's the opposite of a shiv.
@PeterMTaylor Shim (computing).
 
so how does one shim IDTExtensibility2 anyway?
we should rename _Extension to _Connect
or heck, just Connect, and change the ProgId to Rubberduck.Connect
frantically googling for shim wizard vs2013 / "IDTExtensibility2 shim", found my CR post on page 2
 
3:01 AM
MS has a COM shim wizard? That's telling in and of itself.
 
for VS2005 and 2008 apparently
and 2010
I'm missing something
 
I think your custom flag just got handled:
+1 4 mins ago undownvoted An excel macro to automatically number and indent vba code
@Mat'sMug It appears to be related to adding ribbons.
 
3:26 AM
flag still pending... might get dismissed
 
Ah. I probably got un-serial-downvoted.
 
oh
oh that's right
darn
 
Odd that it would apply to multiple answers on the same question, but my guess is that it wasn't designed for that question.
 
the whole site wasn't designed for that question ;-)
2
 
LOL
How did I end up trying to explain that adInteger = DB_I2 = Integer to somebody that hasn't ever use parameterised queries before?
 
3:31 AM
that might make a good puzzling.se question...
 
It's been so long since I've hard coded something like that it almost hurts to build an ADODB.Command without dynamically generating the INSERT statement from the schema.
 
huh?
 
Oh, I usually just have a helper function that I pass a table name to that spits back a parameterized query for me.
 
@Comintern oh, for the field names.. ...right?
 
Field names, parameters, data types, the whole 9 yards.
I use something like this and generate the ADODB.Command from what .OpenSchema spits back:
2
A: Using VBA to retrieve Column Headers from Excel files

CominternYou can query them with ADO (adjust the connection string as needed): 'Requires reference to Microsoft ActiveX Data Objects #.# Library Private Function GetHeaders(filepath As String) As String() Dim output() As String Dim ado As New ADODB.Connection output = Split(vbNullString) ...

 
3:37 AM
crap, I need to implement schema discovery and parameter type validations in my SqlCommand class now! :D
 
I hate writing parameterised ADO command code, so I automated the process.
It's so much easier.
 
I just do SqlCommand.Execute("SELECT Foo, Bar WHERE Baz = ?;", 42) and I generate a Command with an integer Parameter
 
Especially with the c# System.Data classes.
 
haven't written ADO code in a long while... I think I just default to EF in .net
 
I do something like using(var insert = GetInsertQuery(connection, tableName)
 
3:40 AM
wah
 
GetInsertQuery builds an SqlCommand
Then inside the using block, insert.Parameters["fieldx"].Value = foo; insert.Execute
 
Trust me, when you work with a different DB schema every week, it saves a ton of time.
 
@Duga that's @june1992 =)
@Comintern I can definitely picture that!
 
Entity is nice when you designed the database, but so few devs actually configure things like key constraints that setting up a DB first Entity is a PITA 99% of the time if you didn't develop the DB itself.
 
3:45 AM
with C# 6 I think you could do insert.Parameters[nameof(dto.FieldName)].Value = dto.FieldName;
 
Yeah, but for ODBC providers you need to get the parameter data types set correctly or it'll bomb.
 
I'd use a bit of reflection and some type mappings
 
Type mappings for sure - but schema discovery is basically database reflection.
 
oh right, you already have the types! is Parameters[name] generic?
 
where would be a good File to start looking at to understand Rubberduck ?
 
3:50 AM
Rubberduck.App is where everything starts. well not true, everything starts in Rubberduck._Extension, but App is more interesting I think.
 
Parameters[name] is just indexing the parameters collection.
 
makes sense
 
I set the parameter name to the field name. That way I can generate the command, then just set the values. I've played around with emitting a class, but that was more work than I could justify for what I typically use it for.
 
well, if you don't mind the performance hit, it would make a nice little tool with a pretty API
reminds me of when I wrote some Linq-to-Sage provider to hide the ugliness of Sage300's API
 
How long would it take for me to understand all this ? I really want to contribute btw just wondering if i should have gotten it by now ?
 
3:55 AM
Yeah, I'll probably poke at it more when work slows down. We use ctree in our C++ product, and our schema changes every release. I do data conversions, so I built a version agnostic toolchain via OLEDB so I didn't have to screw around with it every major version release.
@june1992 I still don't get parts of it.
...granted I haven't looked at parts of it...
 
^ and he gets the most ridiculously obscure Win32 API /COM stuff you wouldn't even dream of
 
lol
 
ha
 
Time to start working on the Linq-to-COM provider.
3
var target = Win32.FirstOrDefault(x => x.hWnd == foo && x.IsMinimized);
 
@june1992 depends which "level" you want to start to play with: there's everything from deep COM interactions and even the VBA language's formal grammar definition, to higher-level inspections - looking at the implementations of the code inspections will give you a good idea of the lower-level code's raison d'être
 
4:02 AM
What is COM ? I seen that before maybe thats the part I don't get ... I know I should google COM but can anyone explain what that is ? I'm sure I'll get what this is then..
 
you could see it as the pre-.net way
 
@june1992 This will tell you everything you ever wanted to know and more: scottge.files.wordpress.com/2015/05/com_spec.pdf
Gotta love this line in an accepted answer... "Note: The answer by Comintern is probably (definitely!) better than mine. "
4
 
Microsoft Office is running on COM, so is Visual Studio and the VBA IDE we're enhancing
but we're writing C# - managed code that runs on .NET; we're interacting with COM via interop assemblies
 
How can were interact with those assemblies ? Obviously in code but not sure how.
 
DLL's.
We reference the assemblies in our code.
 
4:10 AM
e.g. we're dealing with VBProject and CodePane objects
on the surface, they look just like normal .net objects
 
When you add a reference to a non-managed dll, the compiler generates an Interop assembly for it.
 
> A COM Shim is an ActiveX dll, written in C++, that acts as a native add-in, and loads the Common Language Runtime (CLR) of .NET, creates an AppDomain, and loads the .NET-based add-in. Calls to the native C++ add-in (OnConnection, OnDisconnection, etc.) are passed to the managed (.NET) add-in.
okay I don't want a shim anymore
3
 
The Interop assembly is responsible for marshalling between the unmanaged and managed code.
 
and what is an add-in . I hope I am not asking to many questions ..
 
@june1992 Nope, just the type of ones I had to ask, and still have to ask (about COM...).
 
4:14 AM
@Mat'sMug I'm guessing it can't be managed C++ either. If it's a just simple wrapper, I might be able to code something like that, but the build process would be absurd - you'd need to compile specifically for 32 and 64 bit hosts and either dynamically select at runtime or separate the assemblies by bittedness. Sounds like a supreme PITA.
 
Basically, an addin is a sort of something that can be installed to provide additional features.
 
It has to implement a certain interface so the parent program can interact with it.
Night.
 
@Comintern absolutely
'night @Hosch250
 
4:54 AM
Thanks for helpful clarification and reference @Comintern +1 for you. ;)
 
5:07 AM
TTGTB
 
[retailcoder/Rubberduck] retailcoder pushed commit db9e9d90 to next: adding some AST node classes (WIP)
 
 
4 hours later…
8:46 AM
[ckuhn203/VBEX] sebcyg starred us
3
 
 
4 hours later…
12:58 PM
 
1:14 PM
 
1:31 PM
2^8 stars
 
 
2 hours later…
3:27 PM
Woot!
Woot! Our @github repository's star count is now overflowing a Byte! 256 stars! Thanks for the encouragement, it's awesome! =)
 
3:53 PM
I have an old computer and have visual studio 2010. It won't let me open the solution. Any ideas on how I can test this app if and once I learn some of the code and I can contribute ?
And also how can I find to fix compiler errors programmaticlly I have searched google but nothin
 
Can you get VS2013 Community edition? (a free download)
This wiki page should get you started
RD is targeting .net 4.5, not sure if VS2010 can handle it (those would be the "compiler errors", e.g. async and await keywords weren't in the language until .net 4.5)
 
 
3 hours later…
6:50 PM
How do I get the Rubberduck.dll file . It says its missing in my path. It says retry or set the OutputPath and AssemblyName properties appropriately to point at the correct location for the target assembly .
From the \Rubberduck-next\ReatilCoder.VBE\bin\debug\. The Rubberduck.dll is not there or its missing.
 
7:26 PM
it will be there after a successful build :-)
 
8:19 PM
well I made a build but it came out with a couple of warnings and errors Im guessing since its not finished yet. But still gives me that warning box or message box i mean
 
8:39 PM
@june1992 there's a number of warnings, but compiler errors indicate a failed build. If you're on VS2010 I don't think you can build the solution
 
I am on VS2013.
@Mat'sMug
Warning 2 Could not resolve this reference. Could not locate the assembly "Microsoft.Vbe.Interop.Forms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors. Rubberduck.Parsing
this is one warning . sorry there were no errors just warnings there is another though
 
Hmm the library should be in the /libs folder..
 
are you talking about the rubberduck.dll ?
 
8:55 PM
Microsoft.Vbe.Interop.Forms
Rubberduck.dll would be part of the build output
 
yeah I am getting an error about that also
Error 1 The type or namespace name 'Forms' does not exist in the namespace 'Microsoft.Vbe.Interop' (are you missing an assembly reference?) C:\Users\junior\Documents\Visual Studio 2013\Projects\Rubberduck-next\Rubberduck.Parsing\Symbols\DeclarationSymbolsListe‌​ner.cs 3 29 Rubberduck.Parsing
 
@Mat'sMug Is Office being installed a prerequisite?
 
Verify all projects' references, looks like some of them are broken. All dependencies are in the /libs folder (or nuget packages)
@ThunderFrame good question... I don't think so
It helps for debugging though ;-)
 
IIRC - @Vogel612 builds w/o Office?
 
I'm still at the hospital, with 11% battery on my phone... bad timing :-/
the kids survived their operation :-)
now I have twin zombies
 
9:01 PM
I had a battle at work yesterday. Colleague was insisting that Option Explicit makes his life hard.
 
@ThunderFrame slap him. then slap him again. then again.
7
not using Option Explicit makes everyone else's life even harder ffs
 
@ThunderFrame correct
but for now my computer's power pack isn't running round ...
and it's even going through headphones with music on them
I'll need to fix that first ...
 
Glad your kids are well and settled @Mat'sMug.
 
9:17 PM
thanks!
 
9:52 PM
Anyone want to see a gutted power pack?
Unfortunately I can't replace the fan right now >:(
 
10:51 PM
hmmm ... fixed
well fixed enough. It doesn't make annoying noises anymore
 
No more 12V in the ear?
 
11:10 PM
Is that how you cut your hand?
 

« first day (838 days earlier)      last day (2342 days later) »