« first day (1498 days earlier)      last day (1682 days later) » 
00:00 - 16:0016:00 - 00:00

4:05 PM
Weird... Access and the VBE just hung for no obvious reason. I was editing a line of code, hit the down-arrow and Not Responding. Gave it several minutes and nothing.
Here are the last few lines of the RD log - don't think this is an RD issue, but posting to be sure:
2018-07-13 11:59:07.0647;TRACE-2.2.0.3484;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.CodePaneRefactorRenameCommand was registered with id 49326;
2018-07-13 11:59:07.1115;TRACE-2.2.0.3484;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorEncapsulateFieldCommand was registered with id 49360;
2018-07-13 11:59:07.1478;TRACE-2.2.0.3484;Rubberduck.Common.Hotkeys.Hotkey;Hotkey for the associated command Rubberduck.UI.Command.Refactorings.RefactorMoveCloserToUsageCommand was regist
Decompile, compact & repair, just to be sure.
No code loss - I was simply cleaning up code inspections, so nothing I can't easily redo.
 
@FreeMan #4176 - I thought "down arrow" rang a bell.
 
not sure, @Comintern. I didn't lose any code, I just had the entire Access app & the VBE hang with Not Responding.
Possibly related, though, I suppose...
 
So I have a question about unit (integration?) test. The scenario is that I need to write a function to encapsulate the Excel's Range.Subtotal method for a bunch of reports that have similar but not identical formats. Since they get passed into as a parameter to the Subtotal method, I can't see any way to assert except by directly evaluating the range of that worksheet. Is this something that makes sense to write tests for?
 
4:24 PM
Maybe, but it would be an absurd amount of work. In theory, you could implement the _Range interface and use it like a Mock, but I'm guessing that it has some methods that can't be represented in VBA.
 
I was thinking of creating a temporary throwaway Excel file, then assert that after running Subtotal, that the Range is in correct shape and has the expected data.
Technically not a true unit test.
 
TBH "unit testing in VBA" had more to do with writing tests for OOP components than mocking spreadsheets
 
Yeah, that's more of an integration test.
It might point to a place that can be refactored to allow easier testing though.
 
That's my frustration, though. There's too much code that has to work with some OM.
Ha, Yes. I want to refactor this piece of HUGE function that's copy'n'pasta'd everywhere and split the common tasks into their own method
But then I got to thinking about writing a function to encapsulate the Subtotal then realized that testing it doesn't work out.
The bad is that it's fairly critical piece so I want to get a good coverage on it.
 
We'd talked about injecting mocks via the RD testing API using the gathered TypeLibs and using reflection to emit dummy interface implementations.
 
4:29 PM
But will that make sense, though? I'm basically just wrapping the Subtotal
so I'm at mercy of Excel's implementation, no?
 
test at the seams, assume the framework (i.e. object model) does its job as specified
 
^^
This is Excel, not Word. :-D
 
lol
what I mean is, you wouldn't write a test to validate that someList.Add(foo) indeed adds foo to a List<T>, right?
 
Yes, now that you mention it in that way, it sounds silly.
which means I have to validate what I'm putting in to the subtotal method call, so that needs to be faked. We can't do that just yet, right?
 
that's why you wrap it :)
 
4:39 PM
so I make yet another interface, ISubtotalable, create a Public SubTotal(...) stub, provide an implementation of that takes Range and convert it to ISubtotalable, then run it via the function. #NotThatHard
It's one thing to wrap an object. It's yet another thing to wrap a single method. :\
 
 
3 hours later…
7:23 PM
Looks like I'm missing a reference - Unable to get the Object property of the OLEObject class at Set FindActiveXControl = oleControl.Object in your UDF. — dwirony 4 mins ago
^ anyone has an idea how OLEObject.Object can throw that error with stdole2.tlb properly referenced?
 
7:49 PM
@MathieuGuindon IIR it will do that if the OLE object is disconnected (like an embedded document). No clue in the context of ActiveX controls.
Pretty sure OLEObject is just the container, and OLEObject.Object requests the actual instance from the server.
 
yeah.. problem was the control's name in the top-left was saying "foo", and "bar" in the properties toolwindow
Scratch that - I cannot reproduce the bug, and the problem is back. Looks to be something corrupted with my ActiveX files - I'll have to reinstall or something. Thanks though! — dwirony 52 secs ago
nope
 
well, instead of jiggling the handle, one could just use the content control? Haven't used it but I understand it's a bit more reliable.
Or, use it on a UF, too. That's also reliable.
 
8:04 PM
what's a content control in Excel-land?
 
oh no. I'm conflating the terms
lemme see...
I meant "Form Controls"
as opposed to "ActiveX Controls"
 
> Note: These have to be ActiveX controls for formatting purposes.
also form controls are a pain in the neck, they're really just glorified interactive shapes that look like controls
 
Really? That sucks.
 
that said activex controls are a pain in the neck, since they go corrupt as soon as you look at 'em sideways
 
I only used them once in Word years ago - seemed a bit better than the ActiveX control.
 
8:07 PM
I like that they're MSForms controls exposing the whole set of events. Form Controls can only be "attached" to a "macro"
 
I guess one'd have to find out how they do it in so-called "dictator app" --- again, not something I've seen but only heard about.
#FunFact: embedding MSForms controls in an ActiveX container makes it ~3-5x times slower.
 
"dictator app"?
 
Apparently some kind of "application" written entirely in Excel
where you disable all worksheets, present the user with menu and lock down everything, customize ribbon, etc. etc.
that you'd think it wasn't Excel (except for the splash).
Again, I never actually saw one in play but have heard of some ppl building it
 
IOW some VBA app whose author wished they were writing C#
 
ha.
I bet they were.
I don't even want to think about the IP problems they'll have.
As great as VBA & Office OMs are, they are lousy way to do shrinkwrapped products.
 
8:20 PM
might as well write ASP-Classic in notepad
 
LOL
 
@MathieuGuindon they won't mind installing IIS 3, too!
 
WTH is this person trying to do?
 
Here's a scenario where this would work.... you are running in Access or Excel, and you need to attach events to Outlook's events. That requires early binding. You do not want broken references due to mixed version installation. So set the project to be distributed without the reference and then added when verified that it can be activated at the "install" time and enable the module w/ the Outlook dependency (e.g. edit the #Const).... Convoluted and much better solved other ways.
 
8:26 PM
> But some Microsoft apps don't have VBE, such as Outlook and Publisher.
uh..
 
IKR? At least he figured out how to show the developer tab in the other ones.
 
got me wondering - are there any Office products with no VBE?
 
OneNote is one
 
Oh yes, that's right.
 
I'd say PowerPoint too, not because it doesn't have one, but because it might as well not for how useful it is.
 
8:28 PM
PPT doesn't have a macro recorder... which is annoying AF
 
it's also a relatively new product, post-2007 (read: MS red-hot raging hatred for anything VBA/VB6), IINM.
 
Yeah, and the API is poorly documented on top of that.
 
-1
Q: VBA Select Image and copy to next slide

VazelikiI want to create a mini game in Powerpoint 2016. In the first slide there are 6 different pictures (heroes) and the user is asked to select a hero. How can I transfer their selection (picture) to the next slide in the presentation?

you can make PPT games!
 
If you can come back with a legit scenario for where you must have VBA in PPT, I'd love to hear it.
 
Speaking of which, I need to finish my Excel game.
 
8:30 PM
Tetris?
 
Yep.
I'll probably do Breakout too.
 
Hello.
 
Hola hola.....Quick question... I have been using POSTMAN for API testing and viewing JSON responses but it is sooooooo slow. Any one use anything better please?
Slow to start that is.
I feel like it is sucking every bit of resource in the universe.
 
stop mining bitcoins!
:D
 
8:38 PM
Not sure why I shouted Postman.
:-)
 
slow? are you sure it's not cos of the API itself?
Postman and Fiddler are two tools I usually use, and performance hasn't been a problem.
 
Fiddler no probs. Postman just seems to take ages to start up. The calls are super quick. I googled and it seems a common problem but if you have no problems....
I guess it is not a bit related issue? :I have no idea so spew one out:
 
oh for starting up. Well just start it up and leave it running all day.
 
Lol. Yeah...I have done that today....I guess I can use resmon to look at what it is consuming.
@this Side note: You have any problems using the target process in Fiddler? I try drag and dropping the target icon onto a process and it does nothing.
I expected it to filter only for that process.
 
what is the process? A web server? An application?
 
8:52 PM
Have I got my language wrong? So if I have a webpage open in Chrome and I do some stuff on the page which results in traffic like GET/POST, I am considering all traffic involved with that as a process.
 
uh, you can't target chrome
think of the chrome as the client
fiddler gets you traces that is sent to the server
in which case would be.... IIS? Apache? Something else?
hmm. thinking about it, I'm doubtful what I said made sense.
 
I thought, in my general ignorance, I could view the landing page request and any it referred to where it was indicated as referrer.
 
what is the context here?
are you calling some remote API you don't own?
or are you testing your own API?
 
For Fiddler it is a case of when answering web-scraping questions on SO I often inspect the web traffic with Fiddler to see if I can use an XHR. As steps like making on page selections and pressing buttons may result in POST/GET requests, I would like to be able to filter the left pane view to only show the traffic related to that activity. I can select to view associated activity in the left pane, but not filter, which is what I thought the target icon was for.
 
9:06 PM
And it not API testing necessarily and definitely not my own.
@this Many thanks.
 
Ok the use case is different than what I used for, so hopefully that doc helps. You see there's a sidebar on left that should help you find the answer to your question, I think.
 
I thought, after watching a telerik youtube video I was supposed to use the target icon.
Appreciate the help as usual.
Off to do some homework.
 
 
1 hour later…
10:10 PM
Gah! What did I do to git in VS?
Git Bash says ^^^
VS says:
 
@Comintern just don't use TE.
 
Is it busted or something?
This feels like a regression to VS 2010
 
IDK, it's a mite too tempermental and insane for my taste.
that's why I use TGit instead.
 
I wonder if it's confused by having the repo on a Linux share.
Although I never had that problem before.
 
IDK, but I have seen what you see above before and I didn't have any Linux share.
(granted that was on a Windows VM running on a linux-based host but nothing visible to the Windows VM)
 
10:16 PM
What makes it obnoxious is that I can't use the VS comparison tools or revert changes quickly.
 
Well, at least w/ TGit, I can use the TortoiseGit to review changes/revert.
 
I'll check it out if I can't unbreak it.
@Comintern is not enjoying VS 2017 thus far.
 
10:58 PM
@Comintern I hear it's great for .net core =)
 
That's what I heard too. I think that's how I broke MSBuild...
 
11:14 PM
Take that Visual Studio...
 
does Oracle Virtualbox have snapshots?
would be quick to revert to a clean slate than to reinstall windows
 
Yeah, but I have other work on that instance.
 
11:40 PM
YESS!!!! got my mock CW container working!
Turns out that the null error I was getting earlier was because the moq resolver was a bit too eager. But golly, that was too obscure to track down the problem.
so happy now - hopefully over the weekend I'll make more more progress on fixing up the broken unit tests for the refactoring dialogs.
 
00:00 - 16:0016:00 - 00:00

« first day (1498 days earlier)      last day (1682 days later) »