« first day (1317 days earlier)      last day (1863 days later) » 

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 5 commits. 2 opened issues. 12 issue comments. 19 additions. 13 deletions.
 
@Mat'sMug Lol, I was referring to the answer where they did the speed test and #Get came out on top, especially for long lines.
Though the speed test image appears to have gone missing in the past few years :(
Have a good weekend @Mat'sMug!
 
12:17 AM
You too!
 
“So if you want to go fast, if you want to get done quickly, if you want your code to be easy to write, make it easy to read.” - Robert C. Martin, Clean Code: A Handbook of Agile Software Craftsmanship
 
@puzzlepiece87 the answer under that gives an idea of what "large" stands for:
> Line Input works fine for small files. However, when file sizes reach around 90k
Loading 20GB into a string is unthinkable
You need to radically change the approach
 
^
 
12:41 AM
"There's nothing more permanent than a temporary hack." - Kyle Simpson
I'm wading through hack code.
At least all that I've learned in the last year of reading and from RD has made it much easier to refactor it properly.
 
For those who hate how Excel try to be smarter than you and chop off leading zeroes --- you might wanna to take this survey to give MSFT your $0.02:
 
@this Thanks for the mention a while back about qualifying Public Subs/Functions with the method they are in. Makes tracking down a lot easier.
Less cognitive load lets me focus on other stuff that matters more.
@this Which version of Excel is this in?
 
12:58 AM
been like that like... forever.
That's what prompted the survey: excel.uservoice.com/forums/…
 
@this that "feature" is why I never open a .csv in Excel
 
Yeah, it's annoying AF and has killed way too many innocent users
"Gee, I don't know what happened. I got the files like usual and I opened it up and it looked OK. I don't know why it keeps losing it only sometimes."
I really can't name even a single instance where they could say, "Oh boy I'm so glad Excel chopped off those silly leading zeroes. That really saved my time!"
 
1:15 AM
@this nice,...it's not submitting ffs
 
did you see questions duplicated?
 
Well 2 and 4 relate to 1 and 3, respectively for leading zeroes and scientific notation... So nope.
> How did you work around the issue?
By opening csv files in notepad++
 
1:44 AM
Oh come on, whenever you mock an interface that implements IEquatabl<T> with Moq, you have to override Equals both for object and T.
That just cost me about an hour to figure out.
 
2:11 AM
why are we setting the field _projects to null in the DetachEvents?
internal static void DetatchEvents()
        {
            if (_projects != null)
            {
                ComEventsHelper.Remove(_projects, VBProjectsEventsGuid, (int)ProjectEventDispId.ItemAdded, _projectAdded);
                ComEventsHelper.Remove(_projects, VBProjectsEventsGuid, (int)ProjectEventDispId.ItemRemoved, _projectRemoved);
                ComEventsHelper.Remove(_projects, VBProjectsEventsGuid, (int)ProjectEventDispId.ItemRenamed, _projectRenamed);
                ComEventsHelper.Remove(_projects, VBProjectsEventsGuid, (int)ProjectEventDispId.ItemActivated, _projectActiv
that seems a strange thing to do?
 
The next time a projects collection gets wrapped, _projects will get set again.
 
well, yeah but why in DetachEvents?
i mean, wouldn't Dispose be more logical?
 
The only reason for the variable to exist is to have to events attached.
 
ah
 
It is static.
 
 
3 hours later…
4:57 AM
> Look at these tests: https://github.com/rubberduck-vba/Rubberduck/pull/3695#discussion_r161249278.

We have one "body" and just one place that needs to change--the def type. The name does change, but that doesn't have to, IIUC. We can make that into one data-driven test, reduce a ton of typing, and make it clearer/more obvious what we are actually testing.
 
Porting my checkers app to WPF/XBAP.
Once I get it finished, I'll post it on Azure for you guys.
 
 
2 hours later…
6:58 AM
> Given the multitude of members that are unique (or relatively common) to each Access control type, and given that we don't want to miss usages like `Vulae`, it seems we have 2 options:

### 1 White-list the distinct list of members of *all* access controls
That would ignore the inspection for `ctl.Value` on a `Control`.
But that still doesn't solve the problem of the members of third-party controls

### 2 Allow the ignore annotation to specify the type *and* the members that are ignored
 
7:14 AM
> see VBA implicitly extends the IControl interface to controls in MSForms - RD doesn't #2592
> This code accesses the `FormatConditions` property of the `TextBox` control, but because `FormatConditions` is an object, and one of its members *is* accessed, the *Member Not On Interface* inspection is *not* triggered:

```vb
Dim accessTextBox As Access.Control
Set accessTextBox = Me.Text0
Debug.Print accessTextBox.FormatConditions.Count
```

This code accesses the `FormatConditions` property *without* accessing a subsequent member, and *does* trigger the inspection.

```vb
Dim
 
7:47 AM
0
Q: Coding Challenge: Maze Generator and Game

Thomas InzinaAfter creating a Grid based on user-input, a Depth-First Search and a Recursive Backtracker is used to carve out a Maze. The User then uses the Arrow Keys to solve the Maze. Note: The Worksheet_SelectionChange event ensure that the player can only make valid moves. Note: I paused the video...

 
8:11 AM
@M.Doerner, @this, @Mat'sMug with regards to the unique RCWs exposing some new leaks, I think these can now be ignored.

Having looked deeper, in each case, it was due to direct accesses of the regular RCWs, rather than going through the wrappers. In particular;
1) in the VBProjects/VBComponents constructor,
2) Window stored in the _dockableHosts dictionary

I was under the impression all uses of the RCWs go through the wrappers, but they don't, and so by changing only the
wrappers over to use the unique RCWs, the regular RCWs being accessed directly start leaking.
^ due to the regular RCWs no longer having ReleaseComObject called on them, as they no longer have a wrapper associated with them
 
8:29 AM
BTW, IF you were to go with unique RCWs, you also need to remove the 'rewrapping' flag used in the wrappers for supporting the casting of CommandBarControl to CommandBarPopup etc. The reason for this is that when you cast to the alternative interface, this converts to a regular RCW, which now needs to be wrapped as a unique RCW and disposed of properly. That would actually simplify the safe com wrapper a little.
 
8:52 AM
@this... sorry but the IConnectionPoint* thing was a red herring. It was the command bar leak due to the subtle difference noted above that was also leaking the IConnectionPointContainer pointer. By removing the rewrapping, that fixed the IConnectionPointContainer leak as well, so the CLR appears to release it appropriately when the main RCW is released, and so there's actually nothing to fix ;) sorry if you already started
 
 
1 hour later…
9:56 AM
> You've earned the "Popular Question" badge (Question with 1,000 views) for "Why is VBA.Collection.Count a method".
^ seems I'm not the only one asking WTF?
 
 
4 hours later…
1:48 PM
@WaynePhillipsEA Well, it still have to be fixed IMPOV because it's implemented as static which I think is very strange way to set up events. We have another issue where we are missing events because of that. That said, I was able to modify the VBProjects to receive events using the ICPC/ICP as an instance method. Whether it's leaky, I can't tell yet though I still get a clean exit.
 
+1 I certainly agree with that
I'm creating a little PR, if my first git encounter goes OK, for the unique RCWs
At the moment, the dockable host windows are stored in the dictionary here: _dockableHosts.Add(window, control);
For the unique RCWs, I need to avoid the raw window RCW here
 
Just to confirm - to obtain the ICPC, I cast the COM object. However I should not release the ICPC, right? I did that and got "RCW has separated" error. I do release ICP as part of disposing, however.
 
under the normal RCW rules, that's correct yes. When using the unique RCWs, it needs independant release
 
ok
ATM not making them unique; just want to get those silly statics out of the way.
 
yeah no worries
What do I need to implement on SafeCom wrapper to support using as a dictionary key? is it GetHashCode?
 
1:57 PM
given that ComSafe already has a ConcurrentDictionary I think you only need to add a getter on the ComSafe and its corresponding interface IComSafe
(assuming you are trying to iterate?)
 
no, not comsafe. I mean the safe-com wrappers
come to think of it... safecom and comsafe... we need better names :)
 
I mentioned ComSafe becuase you mentioned dictionary - I wanted to make sure we don't end up with two dictionaries but maybe I misunderstand.
That said, GetHashCode ought to work for identifying the object.
 
stupid question.... in vs2017 with git extension I've cloned, created a branch, made changes. how do I get it to compile? vs just keeps saying 'Item(s) saved'
 
Git shouldn't be involved with compiling - you compile just like you usually do
 
If I go Build > Rebuild solution or whatever, it does nothing.
 
2:10 PM
All git does is track changes made to the files; it has no other roles otherwise.
Hm.
Not even an error?
 
just restarted vs, and now it's working. dunno wtf was going on
 
2:55 PM
@M.Doerner on the VBENativeServices.cs we have a procedure UnhookEvents -- those calls static DetachEvents for both VBProjects and VBComponents. They are now instance. Will commenting them out suffice or do we need to add a field to hold the instance for the class?
 
3:15 PM
Hmm. Interesting. It looks like I'm beating the same road @comintern beat before me. github.com/rubberduck-vba/Rubberduck/pull/2677/commits/…
 
3:45 PM
His notes indicate that he made those changes to be thread-safe. However, simply making them static doesn't mean it's thread-safe. He later push another PR to "stop massive leaks": github.com/rubberduck-vba/Rubberduck/pull/2687
 
4:33 PM
> This restores the implementation of events as an instance member of their containing class rather than as a static methods. This may potentially fix the issues where we miss some VBComponents events because only the first registration are considered. Note that this is somehow a reversion to an earlier pull request - see @comintern PRs here: PR to make it thread-safe...
PR to plug memory leaks That said, there are still few differences -- 1) We build upon the SafeComWrapper, creating SafeEventedComWrapper which controls the disposal. 2) We implement the source interface directly, rather than using a separate sink, which simplify the instance management as there's now an one-one relationship between the source and the events. This is being put up for review by others before I proceed further on...
other and to help us decide if it's still warranted.
[rubberduck-vba/Rubberduck] build for commit 71d6b893 on unknown branch: AppVeyor build succeeded
 
5:18 PM
Oh hi, @Mat'sMug.
Just thinking about you.
In my WPF app, you said there is a config thing built in I should use?
I'm sort-of almost done porting my checkers app. I just need to tweak the UI a little bit.
And reinstate the settings.
Hi, @Mr.Xcoder.
 
AFAIK it "just works" ...you're using Properties > Settings.settings?
 
Not yet.
 
It's basically just a designer for app.config
 
I was using the roaming settings in the store app. I haven't got that ported yet.
 
Hi @Hosch250!
 
5:21 PM
Hello!
 
Welcome to our little war room =)
 
(Excuse my lurking)
 
I lurk all the time =)
 
Seems highly ironic, a code golfer in the middle of code reviewers, people that actually write good code :P
 
5:24 PM
Meh, we're reviewers, but in this room we're all just devs magicians
 
5:40 PM
@Hosch250 tbh I've no idea, never done a store app
 
Oh, I know how to do that.
I've got it, I think.
Just testing it a bit.
Also, I'll need to implement the settings-changed event myself, now :/
Oh, nice. It does have a settings changed event.
 
Only user-scoped settings can change at runtime though
 
Thanks. I was just wondering what was going on.
It's working now, as far as I have it :)
 
@M.Doerner, @Mat'sMug, @this... I'm giving up on the unique RCWs at the moment. Whilst it works easily without any leaks for the most part, there are loads of edge cases/side effects that are very difficult to track down the root cause. They can all be fixed, but I'm finding myself having to make minor changes throughout the whole codebase, including things like QMNs.
I am out of my comfort zone as I just don't know your codebase well enough... yet. I may well return to it in future.
But by then, you'll probably have a shim in place, and so won't need it anyway
 
@WaynePhillipsEA just so I'm clear - the unique RCW wrapper was supposed to fix what?
 
7:04 PM
@this. It would have prevented other managed add-ins from interfering with RD by wrongful calls to Marshal.ReleaseComObject or FinalReleaseComObject
Basically isolating RDs com interop
Easy in theory, according to the documentation, but the side effects are very subtle
 
[rubberduck-vba/Rubberduck] build for commit 2786682f on unknown branch: AppVeyor build succeeded
 
7:55 PM
@WaynePhillipsEA right... there were those things as well ....
didn't we have a plan to kinda tear QMNs to pieces?
 
I am currently working on removing the IVBComponent reference from the QMNs.
I just need a few more days.
 
8:20 PM
There is something I am not sure I understand. How could VBE library implement CommandBarControlEvents which has a Click event that can return a IDispatch representing the CommandBarControl, which we cast to Office's implementation of CommandBarControl. But if the host isn't an Office program, then what is it?
Furthermore, the declaration do not match.
This is how Microsoft Office's CommandBarControl implements its Click event:
x
        [id(0x00000001), helpcontext(0x00038271)]
        void Click(
                        [in] CommandBarButton* Ctrl,
                        [in, out] VARIANT_BOOL* CancelDefault);
In contrast, this is how the VBE expects the CommandBarControl's event to look like:
[id(0x00000001), helpcontext(0x0001876f)]
void Click(
                [in] IDispatch* CommandBarControl,
                [in] VARIANT_BOOL* handled,
                [in] VARIANT_BOOL* CancelDefault);
Anyone know what's the deal with that?
 
8:35 PM
Anyone else in the PMADN Access group in linkedin? There's a post mentioning mz tools and RD. And RD is getting a bit of a battering due to the crashing
 
8:48 PM
Been a while - will go there.
 
Me neither, but get the weekly emails, and it just caught my attention
 
Thoughts on the events above?
 
I'm only on my phone at the minute, but will have a look tomorrow.
 
ok
 
9:06 PM
@this Non-Office VBA hosts use the Office type library. That's why the CommandBar stuff is in that library.
 
so VBE implicitly has a dependency on Office?
 
That I can kind of understand. But I don't understand why/how it could have conflicting event click definition.
 
But just the Office typelib
 
Just different interfaces aren't they?
 
9:08 PM
Eg. CorelDRAW VBE will work, even if you don't have any version of Office installed.
 
You can have multiple source interfaces.
 
@WaynePhillipsEA VBE has no interfaces whatsoever for the CommandBarControl itself - that is defined inside MSO.dll. What I don't understand is that depending on which you ask, you get 2 parameters, one in/out, or you get 3 parameters, all in.
I thought the interfaces had to be uniform in how they define the method with same DispID
 
@this there was a change to CommandBarControl, where click event and mask properties were added, around Office 2000/2002. We had to deal with that for CorelDRAW, which used the old Office typelib
 
Not on different interfaces, no. Even disp interfaces have different IIDs
 
I wouldn't have bat an eyebrow if the Click had handled as the 3rd parameter since by then, the definition is sufficiently similar to allow casting at runtime.
 
9:13 PM
5
Q: What's the difference between CommandBarEvents.Click and CommandBarButton.Click in VBE?

ThunderFrameThe VBA and VB6 Add-In Object Models (VBIDE) expose a CommandBarEvents object that have a Click event, and the event signature is: Dim WithEvents CmdBarEvents As CommandBarEvents Private Sub CmdBarEvents_Click(ByVal CommandBarControl As Object, handled As Boolean, CancelDefault As Boolea...

Carlos Quintero answered the question...
 
Perfect, that explains the why, thanks @ThunderFrame. Not quite the how, though because I genuinely thought that if you assume a dispatched method to be same between two different interfaces, you better have the signature similar enough or you get problems.
 
@this you don't want to use the VBE CommandBarEvents unless you're host is using MSO.dll from Office 97.
 
It's late bound, so it could just try 3 args and then fall back to 2 on error, our vice versa Not likely though. More likely just two different interfaces. They don't have to be compatible.
 
Yeah, I looked again and I see we are using Office's interface.
 
IIRC, Chip Pearson's site has an article on attaching events for the VBE, but the article is so old, it relies on the VBE CommandBarEvents approach, so is out of date, and won't work on 64-bit.
 
9:20 PM
@this have you looked at the IIDs
If they have different IIDs then there are just two sets of supported event (source) interfaces for that object
And that's perfectly legal in COM
 
@WaynePhillipsEA they're different, of course. See, my confusion was that because VBE did not define the CommandBarControl, I assumed they were borrowing from the Office library though I did not see any references.
It did not help also that in Office there is no CommandBarControl -- there are CommandBarButton and some other stuff.
 
Just because it didn't expose them, doesn't mean it doesn't use them, internally.
Yeah it's all a bit hacked together
 
so earlier I thought they were all somehow sharing the source interfaces but I don't think that's the case anymore now that I have historical background (thanks, @ThunderFrame!)
"hacked" is putting it mildly. :)
one wonder if it was a project done by an disgruntled intern 20 years ago....
 
Well I suppose the whole of the VBE would fall into that category
 
Thanks for the enlightenment! BBL
 
9:28 PM
@this Same guy that wrote the Word object model?
 
Hey @ThunderFrame I'll get that license out to you tomorrow :)
 
@WaynePhillipsEA Thanks again
 
Welcome :) bbl
 

« first day (1317 days earlier)      last day (1863 days later) »