« first day (1908 days earlier)      last day (1272 days later) » 

12:01 AM
[rubberduck-vba/Rubberduck] 1 opened issue. 1 issue comment.
[Minesweeper] Games Played: 100, Bombs Used: 73, Moves Performed: 15594, New Users: 11
@IvenBach what Vogel said ;-)
12:15 AM
alright, let's see if I will get to wrangle this bad boy, indexed property tonight.
12:26 AM
just out of curiosity - if I'm installing a visualizer for VS, should I add it to the RD repo?
12:45 AM
a visualizer?
like, some code visualization tool we could use to back a dataviz feature in RD?
not quite
more helpful for me debugging the expressions
1 hour later…
1:59 AM
@this oooh! of course!
1 hour later…
@Duga Build failure incoming
3:35 AM
The expression visualizer does helps a lot in verifying what I'm doing:
[rubberduck-vba/Rubberduck] build for commit 619d39a0 on unknown branch: AppVeyor build failed
Unfortunately, I'm still at a loss as to why it only works with literal but not parameters/variables. It really should not matter, but...
3 hours later…
6:14 AM
> **Justification**
The logic found in Code Explorer, Test Explorer and Code Inspections has copying capabilities. All 3 have the same information being appended as part of the copying. Extract to a dedicated method for one maintenance location.

Create a method that will append all the information.

**Additional context**
From chat: https://chat.stackexchange.com/transcript/message/51480772#51480772 and https://chat.stackexchange.com/transcript/message/51482387#51482387 a
^ @M.Doerner and @MathieuGuindon. I didn't follow everything you were discussing but here's what I still have from local on my home machine. I'll see about redoing the last bits tomorrow.
night pond.</iven>
3 hours later…
9:38 AM
> I would have no problem with this at all. If its going to help you guys in any way at all, its worth doing.
9:57 AM
Monking @all
10:10 AM
10:36 AM
TIL that if you put "~" at the start of a string, and ask Excel to MATCH() it, it will fail.
I only have 1,000 Attachment names that start like that. sigh
1 hour later…
11:57 AM
@M.Doerner HTTGTB... Is that German for HTTP?
@Kaz Howdy!
@Kaz that sounds like... fun...
@FreeMan HTTGTB = high time to go to bed
@M.Doerner Ahhh.... my bad
@FreeMan I also learnt today that Excel has 2 different kinds of f****** space
CHR(32) and CHR(160).
And 2 different kinds of Apostrophe
@Kaz I've heard of an em space and and en space, but never an f space...
The apostrophes at least have slight differences (under a microscope). The spaces are just... spaces... that don't match to each other.
@FreeMan ^^
Kinda wish I'd known about these when I was making my data-file-from-hell
12:18 PM
@Kaz CHR(160) is a non-breaking space.
They do not separate words.
It seems that this code works now, but it times out on the .WaitForResponse line, even though I've got it set for 2 minutes!
Public Sub RESTtest()

  Dim restRequest As WinHttp.WinHttpRequest
  Set restRequest = New WinHttp.WinHttpRequest

  With restRequest
    .SetRequestHeader "Authorization", "Basic " & Base64Encode(SITE_ID & ":" & API_KEY)
    .Option(WinHttpRequestOption_EnableRedirects) = False
    .SetTimeouts 0, 0, 0, 60000
    .Send "{""response_type"":""json"",""location"":""104""}"
    .WaitForResponse 120000
    Debug.Print ".ResponseText: " & .ResponseText
When I do the query with Postman, it's generally coming back in under 10000msec
any tips?
testing w/o disabling redirects - maybe there's an issue there
without disabling redirects, I get:
.Status: 500
.StatusText: Internal Server Error
I note that Postman shows the response_type both in the Key section and the Body section, but the location is only in the Keys. Am I passing that in properly to match?
1:07 PM
Can I early bind this? Set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0")
Or, more importantly, if I've got Microsoft XML v6.0 referenced, do I specifically need Microsoft XML v3.0 to do this?
this being:
  Dim xmlDoc As Object
  Dim docNode As Variant
  Set xmlDoc = CreateObject("Msxml2.DOMDocument.3.0")
  Set docNode = xmlDoc.createElement("base64")
6.0 ≠ 3.0
and the progid are different. Unfortunately Microsoft screwed up and didn't use progid that made sense.
I can't recall it off hand, though. What I do remember is that supposedly the "version independent" progid MSXML2.DOMDocument is actually 3.0 even if you wanted 6.0.
It seems to Just Work™ by skipping the v3.0 and Dim xmlDoc As MSXML2.DOMDocument60: Set xmlDoc = New MSXML2.DOMDocument60
or, at least, not work any worse...
I'm simply using it for base64 encoding the ID/Key pair
doesn't seem to be an issue...
@Vogel612 I had a look at you draft PR. Why did you introduce an attribute for the annotations? To me, this looks more complicated than using some abstract properties.
yea, that's the old version of the redesign
I'm curious to see what you came up with in the new version.
1:41 PM
I gotta fix my mess around the broken annotations binding first, though
that's for later tonight :)
2:04 PM
@this (or anyone else) any ideas on where I'm going wrong? With Redirect disabled, I get a timeout. With it enabled (commenting the .Option() line), I get a 500 Internal Error
> I don't think so. The scenario I have is in anAdd-In file I have a module named "RibbonCallbacks" where the Ribbon "OnAction" (and possibly other) events reside. In a project that I am creating and prepping to turn into an Add-In I wanted to add a "RibbonCallbacks" module for the same reasons. I went to the VBIDE Properties pane and changed it there without issue.
> I don't think so. The scenario I have is in anAdd-In file I have a module named "RibbonCallbacks" where the Ribbon "OnAction" (and possibly other) events reside. In a project that I am creating and prepping to turn into an Add-In I wanted to add a "RibbonCallbacks" module for the same reasons. I went to the VBIDE Properties pane and changed the name of the module there without issue.
If I disable Automatically run inspections on parse then click the refresh icon on the CI window, does it do a full parse, or does it just update the inspection results?
It seems like it's taking quite a while, like it's parsing again, first.
is the response large?
Postman says
4.11MB in 8119 ms
I dunno if that's considered "large"
hmm. not sure either.
I'd double check the settings on WinHttp, since that's what you're using
2:15 PM
lol... thanks for asking!
and verify that it's within the parameters
I'd check 'em too, if I had any idea what I was looking for.
Ah, you mean to see if it's capable of taking that much data (by default, since I haven't made any (intentional) changes to that)?
I remember finding that MSXML/WinHttp/whatever can have silly defaults sometime
not sure if response size is one of them.
that's also why I hate working w/ web stuff in VBA - the library for sending & receiving web are crapatastic
Using C# I can find what I need quickly but with VBA, all I get is a massive crapload of "how do I scrape the web?!?"
@Duga does ribbon callback work across projects?!?
thanks for the tip. I'll start looking for silly defaults and try to make them less silly...
one more advice. Don't bother with SO on that topic. It's a wasteland
2:22 PM
actually, there are some parameters I can pass, so I'll try limiting the data I get back first - that'll be the easier method.
You should go directly to the source - MS documentation
@this no and that's the thing: the two projects have nothing to do with each other
which can be a bear to find/follow but that's the only hope of making sense why things are.
i.e. bug report is legit
I got some very helpful advice on SO yesterday that got me this far. MSDoc is useful, but somewhat hard to interpret (at least for me)
2:23 PM
Cool. I might have been unlucky then.
@MathieuGuindon Leave me to get distracted by irrelevant details. ;-) Yes, I expect that renaming shouldn't trip it up if there's no references, but when he was talking about ribbon callbacks, I can't see how it'd have worked the way he wanted to do (if I understood him correctly, having an add-in handle the callbacks for other projects?)
nah I think he's got a project and is working to turn it into an add-in
@Kaz brain tickle asks if you’ve doubled it up “~~FooBar” when trying to match. Are you also using 0 as the last argument?
@Kaz space character and &nbsp; yearp that was fun figuring out long ago
2:41 PM
This is the result of Debug.Print WinHttp.WinHttpRequest.GetAllResponseHeaders:
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Connection: close
Date: Tue, 27 Aug 2019 14:36:33 GMT
Pragma: no-cache
Content-Length: 0
Content-Type: text/html; charset=UTF-8
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Server: Apache
Set-Cookie: PHPSESSID=sce5o20s27cttifjhh2shksod5; path=/
Set-Cookie: PHPSESSID=iql2kar10qfrvc9vqo483047g1; path=/
X-Powered-By: AppointmentPlus
X-APWS-Version: v9.17.0
anything in there that would raise a flag?
the Connection: close is... confusing? is that telling it to close it when I'm done, or that it's already closed?
> Expires: Thu, 19 Nov 1981 08:52:00 GMT
hrm... That could be an issue.
Is that for the cookie expiration and is a belt-n-suspenders to go with the pragma: no-cache?
I think so
not familiar with cookies
^ That's all I got...
I'd ask my wife, but she doesn't know about that kind of cookie
2:44 PM
Did you just call your wife a blue monster?
lol she does pastries :)
like, very good ones
it's setting a PHP session cookie for API? How clean!
That also implies that you must repost the cookie if you follow up with other request to avoid errors
Note that in web browser (and Postman, I think), cookies are reposted automatically.
But in this case, yer on your own pal
When I changed to a different API call requesting less data, I actually get a response and I get data!!!!!!!
now, to figure out what to set to either limit what I'm requesting or increase the timeout and/or response field size.
REST APIs typically have a way to GET the number of items, and then a way to GET the items by page
2:54 PM
That's assuming it's well designed API to start with....
so you request some_resource_count.json, get a response that says "some_resource has 542 items", and you know you're getting 50 items per page, so you setup 11 iterations where you say "give me some_resource items but just page i"
@this yeah... guessing Shopify has me spoiled :)
IINM, Freeman's API is the one that returns an error on a 200
yeah, that
I have a response_type:json parameter that I'm sending, and in my headers, I'm getting back Content-Type: text/html; charset=UTF-8
Is that to be expected?
3:04 PM
evidently it doesn't do content negotiation
it's basically telling you "screw your JSON. I'll send you text/html whether you want it or not!"
yeah, I'm getting
which looks a lot like XML, not JSON to me...
that should have been xml, not html
1 min ago, by this
evidently it doesn't do content negotiation
but... when I do it via Postman, I'm most def getting JSON back...
"resource": "customers",
    "action": "getcustomers",
    "request": "GetCustomersAll",
    "result": "success",
    "count": "2159",
    "data": [
            "c_id": "104",
            "customer_id": "2994",
            "account": "",
            "last_name": "Last Name",
            "first_name": "First Name",
compare the request headers
it might not be response_type that it's considering
it might actually expect you to t write to the Content Type header
Yup - Postman has ... yeah, Content type
3:07 PM
There ya go
but, but, but... the doc says response_type
by the same folks who gives you a 200 for an error?
That should have been a red flag
.Send "{""Content-Type"":""JSON""}" ->> Content-Type: text/xml;charset=UTF-8
and the content is xml still?
3:11 PM
shouldn't that be application/json?
oh yeah. Postman should show that, too, no?
possibly "text/xml" is just a fallback default
(also, it is also possible that letter casing matters -- JSONjson
the postman always says:
3:12 PM
then you need to say text/json
not JSON
make your .Send use the same content type
I just tried .Send "{""Content-Type"":""text/json""}" and got the same result...
do I need to include hte charset?
okey doke!
3:14 PM
and see, that's what I'm talking about why REST is pretty crapatastic as a standard (for some values of "standard"). too much plumbing details to get wrong
eh that's just web in general
well, .Send "{""Content-Type"":""text/json"",""charset"":""UTF-8""}" still yields the same thing.
not sure that's right
I also did `.Send "{""Content-Type"":""text/json;charset=UTF-8""}" and had no joy
welp. WTF
3:16 PM
wait is that argument the header or the body?
it is getting the Charset part: Content-Type: text/xml;charset=UTF-8
that's going in the body
ah that won't work
then it doesn't belong there
seems to be the way Postman is doing it
3:17 PM
no no no, it's the request header :)
are you referring to the HTTP text? that's low level
the headers are separated from the body by a blank line in the HTTP text
but you are not working at that level
you must set the header separately via appropriate method...
.SetREquestHeader, I think.
does it need to be in the header and the body? ^
that Key section is the header
I see why you're confused, though. There's a header tab, too
3:19 PM
There's also this:
So all those Keys in the top section actually need to be assigned with .SetRequestHeader instead of in .Send()?
'cause I can do that...
been a while but I can't remember if that is the request header or the response header
you should not confuse the 2
Well, there's a .GetResponseHeader and a .SetRequestHeader on the WinHttpRequest object, so I don't think I can set a response header.
no, I'm referring to the fact that Postman will show you both
and I can't remember if hte header in the screenshot is the response or the request
ah, I see
I believe that the blue box here are the RequestHeaders and the green box are the ResponseHeaders
therefore, you should set your VBA SetRequestHeader to whatever you see in the blue box
since you have few of them, you need to call SetRequestHeader for each one of them
btw, the response_type in both header & body? Seems strange.
I bet it'd work just fine with nothing in the body.
3:32 PM
though maybe I'm missing this
since this shows an acutal Content-Type header
3:45 PM
@Vogel612 @MathieuGuindon Because I hastily/blindly/unthinkingly did it before leaving yesterday.
IDK maybe it's legtit - just wondering :)
(haven't looked at how the watermarking is implemented)
I now have this code, and it's still giving me XML:
  With restRequest
    .SetRequestHeader "Authorization", "Basic " & Base64Encode(SITE_ID & ":" & API_KEY)
    .SetRequestHeader "response_type", "json"
'    .SetRequestHeader "location", "104"
    .SetRequestHeader "Content-Type", "application/x-www-form-urlencoded"
    .Option(WinHttpRequestOption_EnableRedirects) = False
    .SetTimeouts 0, 0, 0, 60000
    .WaitForResponse 240000
I doubt it's correct. Everything is learning 80-95% of it as I'm doing it. #ItsMyFirstTime
most unfortunately, my coworker says they always get back to him on support requests in an hour or two. Mine's been sitting there > 24 hours with nothing but an auto-response.
@ticker Call DefineVars ...that has to be the scariest VBA instruction I've seen in a while.
3:47 PM
Maybe I've got them stumped, too.
@MathieuGuindon jinx
the young grasshopper has learned much from the bearded master
4:23 PM
VS no longer keeps solution explorer folders collapsed. Each project is expanded to show its contents, subsequent sub-directories are not expanded.
I know the collapse all button is available. I'd rather it remember how it was last set each time I open it.
I believe all that are in the .suo file
OK. I understand that working with my data coming back as json may be easier than xml, but I'm going to leave that battle for another day. I seem to be getting xml and Ima gonna run with it for now.
wanders off to find the XML handling libraries somewhere or other...
4:45 PM
fwiw, I'd argue that in context of VBA, it's easier to use XML than JSON.
AIUI, VBA-JSON still has too much rough edges anyway. But YMMV.
@this I'd support that argument
xquery vs thing(0)(0)(i)(0) is a no-brainer imo
@all, would like your opinion - I was looking at the overall architecture, and with mocking framework we have many more types dealing with TypeLib & COM stuff that aren't really connected to any particular project. Right now, we have them scattered among Rubberduck.Parsing, Rubberduck.Main and Rubberduck.VBEEditor. There is also some degree of overlaps in the common helper functions.
I'm thinking that all common utilities for dealing with TypeLibs & COM should be moved to their own project. We would only leave behind the specialized types (e.g. Com*** types which depends on parsing symbols, ComMock types and the VBIDE TypeLib API/extensions). Thoughts?
I'm all for clean-up, but IDK about adding yet another project to the solution
doesn't RD.VBEEditor intend to hold our internal VBE API?
Yeah.... Right now, the types in the parsing feels a bit of tacked on.
Yes and they will continue to do so.
I'm talking primarily about generic helper functions around the COM and TypeLib stuff.
parsing depends on vbeditor, so I've no issue moving them from parsing to there
main is worrying though. what's in main?
4:56 PM
I like the idea of putting (nearly) all the direct COM interaction into its own project.
However, that has to be its own PR.
^ me too - and that would be rd.vbeeditor
in main, mainly the mock types.
i think there is also one or two type I made hastily to help out with COM interaction in main
but that need to move eventually.
Moreover, the project should present some useful API to the remaniing projects so that no further COM interaction is required.
No, I do not think VBEditor is thr right place.
That is for the VBE COM API.
@this moving stuff out of main shouldn't be an issue
@M.Doerner ...which is COM interaction?
The other stuff is the direct COM interaction circumventing any API.
The stuff where we rummage around in the guts of the VBE and COM.
4:59 PM
In this case, VariantConverter would be a candidate for move.
For parsing, this folder feels really tacked on.
@MathieuGuindon @this IIRC in Main there is some stuff around the rubberduck API for VBA clients as well
Q: File still needs to be opened

joe daudaI am having trouble with a macro i created where it should automatically open the file it Vlookup's to. For some reason the vlookup doesnt pull the information until after i run the macro and double click the cell again and open the associated file. Is there anyway i can run a vlookup to multiple...

@M.Doerner yeah ...sounds very much like it belongs in a dedicated namespace under VBEditor to me?
Remember that TypeLib API aren't just for VBIDE stuff. In the case of Parsing, it's to analyze the external libraries, which can be done with the standard API.
only for types from VBE, do we need Wayne's enhanced API and for that reason, it should stay in VBEditor for sure.
The folder I linked to all are basically using TypeLib standard API, which is why I put it in parsing in the first place.
but as I said, feels very tacked on.
for some reason I thought Parsing was independent of VBEditor but I see that I'm mistaken. I suppose consolidating it all into VBEditor is OK
5:08 PM
LOL. why nobody thought of it?
TODO: Add a guitar riff sound when opening the WaynesWorld folder
.TypeLibApi is perhaps a better idea though
it's basically RD.VBEDitor.ComManagement.TypeLibs --- If we go ahead and dump everything into that project, it'd need to be difereniated --- .TypeLibExtended and .TypeLibStandard, maybe. But I still feel like we're making VBEditor know too much.
that would turn into a God project, no?
Rubberduck.ComManagement then
and keep Rubberduck.VBEditor focused on the VBIDE API wrapping
to clarify, you would want to move the types out of RD.VBEDitor.ComManagement into RD.ComManagement? e.g. ComSafe and ComMessagePumper? I wasn't really thinking about those types.
finally heard back from the tech support people on that API - "Sorry to hear that, I'll run some tests..."
great. thanks.
I've updated with the progress I've made int he last 30 hours or so - it's now a totally different question, but hey, at least I've got somebody that seems to be alive over there...
5:18 PM
@this RD.VBEDitor.ComManagement.TypeLibs -> RD.ComManagement.TypeLibs?
no, not all of the types, I think. The only one I actually want shared is a single method out of ComHelper that's currently in TypeLibs.Unmanaged (!)
in my mocking PR, I just copied the function I needed. Yay for copy pasta!
I don't think I have a case for needing the other types out of the TypeLibs, besides that one.
everything else really is focused on the VBE's extended type libs which should stay private because of all the unmanaged access
it's mainly the parsing folder & main that I have problem with
FWIW, I think the VBEditor project should be for the abstracts of VBE (and Office CommandBars) - general-purpose COM-handling code should be in its own project, Rubberduck.ComManagement sounds good to me.
hmm. IDK that VBE typelib stuff qualifies as "abstract". By that definition, they don't belong in VBEDitor either, but they would depend on VBEditor
Keep in mind that I'm mainly talking about standard typelib API, not the extended one that Wayne provdied.
5:27 PM
lol just seen this comment
Question for you when you have a moment Mug, regarding IExportable and copy command.
ha! thanks for the little edit there, @MathieuGuindon
I did note that it was Air Code™
5:42 PM
@IvenBach what's up?
@mansellan "the VBEditor project should be for the abstracts of VBE (and Office CommandBars)" - aye, that was its original intent & purpose
5:53 PM
which also kind of implies that COM & TypeLib may be pushing the scope a bit too much, no?
IMO, the safe COM wrappers are a natural fit there since they are strongly coupled to various VBIDE types. Same for the extended type lib - they aren't going anywhere without VBIDE types, either.
@MathieuGuindon Where is IExportable actually being implemented?
What is implementing it is the more pedantic question.
right-click the interface, pick "go to implementation"
5:57 PM
#TIL That's handy... Been using find all references.
not just handy - an essential feature for working in any OOP project!
I'm slow on the uptake.
After working on RD and programming for a while my process controls class is going to be much easier. :+1: again for the pond.
@Hosch250 linkedin wants me to congratulate you for your 3-year anniversary, so... congrats!
@IvenBach Ctrl + F12
wait that's find symbol
6:08 PM
Btw, find all references is Ctrl + k, r
hm, works just as well though
I have to admit that I no longer know where to find these functionalities on the UI.
I usually right-click. :\
ah, the shortcuts are listed in the context menus
They are, indeed.
6:10 PM
yeah, probably should pay a bit more attention, I guess.
I'm so thankful for those hotkeys.
That is how I learned them and then forgot where the items are in the context menu.
and VS' "find symbol" results toolwindow is "find symbol" regardless of whether you're using "find symbol" or "goto implementation" or "find all refernces"
kind of like RD's "search results" tw
Hm, goto implementation just gives me a dropdown tooltip.
Or is that done by R#?
yeah that's resharper
still much better than the vanilla tooling
but at least VS did end up implementing it
...after 10 years or so
6:17 PM
@M.Doerner cheers for my fellow keyboard enthusiast! We must drink to our victory over the mouse.
There are so many things in the VS context manu that it is really hard to find anything in particular.
BTW, Ctrl + r, m is extract method.
with R# anyway
Vanilla VS is a bit #Plain in that regards.</bad-dad-joke>
@IvenBach None of you young whippersnappers really knows what it is when Baskin Robbins only had vanilla or chocolate and that was choice enough!
but no you kids gonna insist on adding newfangled favors like strawberry! STRAWBERRY?!? I tell ya, the world's going to hell in a handbasket!
BR? How about Rite-Aid or Thrifty's?
6:26 PM
oh wow, does Thrifty's still exist?
I declare chocolate ice cream is of the devil. Long live vanilla!
and I think BR predated both by few decades.
orly? :checks:
I know Rite-Aid is still kicking, though
BR: 1945
Rite-Aid: 1962
Beat them by a near solid 20 years. #TIL
Dunkin' owns BR. Okay time to leave this rabbit hole.
6:52 PM
Do we want to have Declaration and TestMethodViewModel implement IExportable for the copy command?
IIRC we said a better approach would be to implement the interface on a separate set of types
e.g. ExportableDeclaration, ExportableTestMethodViewModel, ExportableInspectionResult
tfw all environments are borked, and there's no way in hell to repro the bug...
only 1 answer. ttqw.
that way Declaration doesn't need to grow some more
And have Declaration inherit from ExportableDeclaration, each one respectively?
no, more that DeclarationFormatter would take Declaration in its ctor
hmm. but what about derived types, @MathieuGuindon?
making a derived formatter for each declaration type seems too much?
6:57 PM
So for each type it would have an equivalent FooBarFormatter?
@this yes, this
@this pattern matching in a switch?
I've not done any kind of this design work before. This separation of each one ensure that we wouldn't have to go back to each Declaration, TestMethodViewModel etc... and update them all individually when we want formatting to have more capabilities?
the idea is to extend the type without modifying it (open/closed principle ;-)
I've a really limited understanding of that principle. Trying to better understand it.

« first day (1908 days earlier)      last day (1272 days later) »