« first day (2538 days earlier)      last day (29 days later) » 

12:00 AM
Where would I look for that? I don’t want to duplicate any work that has already been done.
[rubberduck-vba/Rubberduck] 6 commits. 2 opened issues. 2 closed issues. 4 issue comments. 46 additions. 20 deletions.
[Minesweeper] Games Played: 90, Bombs Used: 52, Moves Performed: 12132, New Users: 12
For importing component, I guess this?
But I'm asking myself, why is this so coupled to the CE?
Stated another way "Why is it taking a CEnode?"
But this wraps another service which is better:
that should get you the component with the attributes and you would only need to provide the appropriate annotations in the module's code and the name
for adding attributes, including the folder, you probably can borrow the UI from the add annotation
@MathieuGuindon any idea why the CE's add component service (wraps an add component service) then add coupling?
12:46 AM
Hrm... I'm not grasping the concept.
@this to suspend any parser task while it's doing that, no?
@IvenBach no - a xml binding is always for a property of the ViewModel
It's binding to an AddStdModuleCommand property on the CE VM
...which is an instance of the AddStdModuleCommand class
1:09 AM
The Code explorer has an instance of CodeExplorerViewModel assigned to its design time DataContext.
I can't find where actual DataContext is assigned.
If I just accept the fact that it does have a data context that's the same as its design instance when I F12 and go to the definition of AddStdModuleCommand it does take me to the property on the ViewModel.
Placing the cursor on the property type and navigating to the definition takes me to github.com/rubberduck-vba/Rubberduck/blob/next/Rubberduck.Core/…
I want the capability to add a new component with a folder and attributes defined I want to define that functionality on the base class github.com/rubberduck-vba/Rubberduck/blob/next/Rubberduck.Core/…
1:25 AM
That base classes defined member github.com/rubberduck-vba/Rubberduck/blob/next/Rubberduck.Core/… is taking a code explorer node.
That is more limiting than the other add component service this linked to.
Makes sense for a CE command though
Oh.... my disconnect is because they are two different types.
This isn't very different than how FindAllReferences CE command takes a CE node but the code pane command takes a Declaration, no?
I don’t know. Had to step out with family and I’m working off memory from what I was doing.
no worries, there's indeed a bit of an inheritance hierarchy with the CE commands
1:32 AM
From what I’ve understood it’s assumed the CE commands are assuming that there is a pre-existing node that it will be working from.
@IvenBach IIRC that's rather low-level because all docked toolwindows need a VM, so it could be at the base presenter level
@IvenBach yep, they're supposed to work off the selected node
(or the current project node, whatever is relevant)
The other link this provided can work with a non-CE node. IE something that has not yet been created.
In the CE you'd want your parameter to be the current project, no?
That permits the ability to predefined the attributes and/or annotations before creating the file which would then be imported.
I'm not seeing how working off a CE node is a problem
You need to know somehow what project to add the component to
...and whatever node is selected, it belongs to the project you want to add a component to
1:39 AM
For my specific instance I want to add a folder annotation and name the component before it is created.
IE not use the default name.
This was generalizing the functionality.
you can do that independent of where the project came from, whether it's a CE node or a ProjectDeclaration from the PE
How can that be done?
Like @this said: you generate a temp file and import it
the "you import it" part implies working with a VBComponents collection at some point
So you what you need to know to fire up that command, is what project to add it under
1:43 AM
I’ll try that later tonight when I get back.
Sorry for having to step out while you were explaining.
1 hour later…
2:52 AM
and... blackboxed
next step...
A: Git: How to squash all commits on branch

VonCAnother way to squash all your commits is to reset the index to master: git checkout yourBranch git reset $(git merge-base master yourBranch) git add -A git commit -m "one commit on yourBranch" This isn't perfect as it implies you know from which branch "yourBranch" is coming from. Note: f...

3:41 AM
Answer to my earlier question; turns out that I didn't need synchronization contexts or anything. COM just handles it just fine even if I'm calling from a different thread.
3 hours later…
6:32 AM
I don't understand exactly how to do input validation. Specifically when I read about the "business layer" I frequently see mention of using it to validate the user inputs before persisting but I also see a lot of emphasis on validations within the presentation classes. Is the simple answer that you validate as much as you can in presentation and if business requirements exist so that validation needs information that isn't appropriate to send to view to have those in business?
The shorter way I can ask this: is it necessarily a problem if I don't have any input validation in business layer (at least for some instances) and use it merely as adapter between view and data access?
6:51 AM
@theVBE-it'srightforme not necessarily, but remember to never trust the client. Software that the user can modify (and yes that includes binaries) should be assumed to give you unvalidated data
3 hours later…
9:33 AM
> OK success completing parse on a somewhat smaller project. Will return to this larger project once I have a better understanding of RD and filing issue when I can do so meaningfully.
2 hours later…
11:08 AM
@IvenBach You da bestestest!
1 hour later…
12:16 PM
12:37 PM
@this hm now that makes me wonder what the problem was with events not firing in the old Rubberduck.API stuff...
hm, don't recall that problem.
IINM, we only had one event and based on this comment it was fixed
1 hour later…
2:15 PM
> **Rubberduck version information**
OS: Microsoft Windows NT 10.0.18363.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.5110.1000
Host Executable: MSACCESS.EXE

When doing a `Encapsulate Field` refactoring, enabling `Wrap in Private type` and selecting an _existing_ type, the new `Get`/`Let` properties are added above "this line". Unfortunately, annotations (like my `'@Description ("")`) do not remain "attached" to the `Pro
> **Rubberduck version information**
Works: Version
OS: Microsoft Windows NT 10.0.18363.0, x64
Host Product: Microsoft Office x64
Host Version: 16.0.13127.21506
Host Executable: MSACCESS.EXE

After upgrading to or latest, I get a "resolver error" upon compiling for some Access Databases. No other changes were made to the database, database compiles fine, and compiling does not show any errors.
2:30 PM
@FreeMan uh... have you seen my rubberducking about not being able to figure it out. May want to rethink any praise until after I get something working.
Oh, that's what you were working on? :(
No, really, you're working on it (which is far more than I'm doing), and I'm thrilled!
@Duga Cut n' Paste the annotation to the right place. Easy to lose, though, if you're not paying attention...
^would that be "Cutpy/pasta"?
3:00 PM
Public Property Let LineOfBusiness(ByVal RHS As BusinessTypes) I thought RHS has been replaced with inValue or something similar (but not Value) in the Encapsulate Field refactoring. Or is that just on the To Do list?
was that via the refactoring or via VBIDE?
come to think of it, I think we ended up using RHS because of localization issues
hrm. maybe RHS should be whitelisted by default so it's ignored by the MeaningfulNames inspection, then.
3:27 PM
According to docs.Microsoft...
> A Collection object is an ordered set of items that can be referred to as a unit.
The order of a collection is the order in which items are added, right? There's no "automagical" sorting involved, and if I want it sorted, I have to do it myself.
The theory is that the VBA.Collection is a linked list
so there's an implicit ordering
And the main advantage of a Scripting.Dictionary over a VBA.Collection is that the Dictionary has an Exists() method, so I can ensure I'm not inserting duplicates?
Are there other pro/cons of one over t'other?
@this There's also .Add before and .Add after so one can create the order desired on the fly...
yeah, linked list let you do just that.
read the linked article (which also links to the scripting dictionary as a hashtable). ;-)
3:42 PM
So Collection is the cheap date because you get her for free in the VBA7.DLL, while Dictionary will cost you a drink or two to include the Scripting Runtime, however, Dictionary is fast and easy, whereas a Collection will take some time and finessing to get where you want her to go.
Is there ever a reason to use Collection instead of Dictionary?
I guess if you want to avoid the overhead of the hash function and you're only ever interested in processing the entire list from beginning to end. Of course, if performance is that critical, it's time to leave VBA behind anyway...
or delegate the work to a compiled DLL
> leave VBA behind anyway
not quite the same if you still have your VBA based application and DLL
"leave" implies total scrapping of the entire VBA project
btw,thought about it, and I think there is no reason where you must or should use a collection over a dictionary.
that said, I happily use collection when all I need is some place to keep WithEvent'd variables alive
in this case, I'm usually just adding and almost never iterating except to clear the collection.
Also, FWIW -- if you do not want to leave VBA or deal with the overhead of wrangling a DLL, ADODB.Recordset may be your best choice for supporting arbitrary sorting & filtering.
4:00 PM
Ah, good point on .Recordset. I never think about that except when returning data from a table. I don't think about the fact that I can just declare a .Recordset and use it!
Don't have any particular need of sorting or filtering at this particular time, just trying to get the Dictionary/Collection differences stuck in my head...
It appears that I can extract an interface from a class module, but there doesn't seem to be a way to make a boilerplate implementation from an interface. :(
I really think it all comes down to whether you want to pay for that extra drink.
in my case, I've already bought Scripting and ADODB for this project, so all my options are "free" from here on out... ;)
Tim Hall worked around that (sort of) by creating a VBA class that wraps a late-bound Scripting.Dictionary.
In which case his "workaround" is just extra boilerplate. ;-)
@FreeMan not sure I follow. You surely are not implementing stuff in an interface?
I started out with an @Interface annotation, the started declaring my variables. I did Encapsulate Field to get my methods (which creates the default Get/Let with applicable code), then forgot what I was doing and started writing in more implementation details.
Now I need to create an Implementation of the Interface, and copy/pasta all the already written code into it... :/
so yeah, I started implementing in my interface 'cause I forgot where I was.
wouldn't it be easier to refactor by removing the interface annotation, extract interface from the "implemented interface"?
4:07 PM
'twould be nice if there was a boilerplate Implement this Interface option somewhere...
well, yeah, I thought about that, too...
(may need to rename the interface temporarily)
Yeah, that too...
Just to be sure... If I have an interface with properties X, Y, Z, I can have an implementation that adds properties A, B, C, right? Just so long as it implements X, Y, Z, I'm good...
4:49 PM
> The version check is a red herring; it fires asynchronously at startup, and both logs have it:

2021-05-18 10:11:39.2286;INFO-;Rubberduck.UI.Command.VersionCheckCommand;Executing version check...;

2021-05-18 10:13:36.7619;INFO-;Rubberduck.UI.Command.VersionCheckCommand;Executing version check...;

Looking at the failed log, there is a parser error in `Form_frmAddNewFAN` on the `[` token at line 18, column 16, and various other similar errors in ot
5:23 PM
> @retailcoder, yes, both logs are from the same RD Version to see if it was something I was missing.

I did not manually stop RD at any point; I saw the manual shutdown note, and was perplexed at this, as I didn't do it.

I'll take a look at those mentioned modules/code and see if they have any obvious code at those locations. We do use `[]` for some code, sometimes where we shouldn't (`Tempvars` most commonly) sometimes where it should be irrelevant (Comment text, or strings, etc.).
> Changing project name to one without spaces makes no difference.

I'll now attempt to isolate a few code modules and recompile those specific forms.
> Ok, I severed out a few modules and forms that cause issue; but in an isolated environment, they parse just fine.

Just for fun, I added a ton of spaces to the project name in this newly shrunk version, and it parses just fine, too.

I'm stumped; literally no change was made to my code base and 2.5.2 won't compile on my larger project.
> [RubberduckLog.txt](https://github.com/rubberduck-vba/Rubberduck/files/6503267/RubberduckLog.txt)

Uploaded a few logs for the single form; note that I ran parse numerous times, and they all succeeded.
> [RubberduckLog.txt](https://github.com/rubberduck-vba/Rubberduck/files/6503267/RubberduckLog.txt)

Uploaded a few logs for the single form; note that I ran parse numerous times, and they all succeeded ("Ready" was shown).
> Thanks for looking into reproducing this issue!

> I hope that's not an issue, as it seems limiting that I can't use spaces for the name.

It very likely isn't, but since the project's name is a programmatic identifier, it is somewhat expected to adhere to the language specifications as far as identifier names are concerned - note that this has nothing to do with the host document's file name, which is entirely independent of the `(Name)` property of the `VBProject`. I would 100% recommend
> Thanks for the tip about the name; fair point on that, and I'll discuss with the prior owner/manager of the code base (I inherited it), on changing it, and if it's going to cause compatibility/linking headaches if we change it willy nilly.

Yes; it does show an issue with the `empty if block`; it does show that error, and we've resolved a large number of others with similar issues; but being this is inherited, and it 'was' working, I'm trying to only revamp things that are actively broken or
6:06 PM
> **Justification**
I have about 20 modules per project, all with a number of global variables- many are kept in their own modules to avoid corruption (e.g the ribbon pointer). During development some such variables get left (unnecessarily). Inspecting the code for those manual variables is time intensive and error prone.

Rubberduck should pick up all private and public variables at the top of every module and list by module: the line of code where they are defined , with c
> **Justification**
When Rubberduck is Loaded on startup then the VBE start is slowed down massively, even when Rubberduck is not used so I leave it off and have to load it through the addin manager when I need it, which is also cumbersome.

When Rubberduck is loaded at startup it should load a stub only so that Rubberduck mneu text appears but is not fully loaded. Then when Rubberduck text in the menu at the top is pressed (Alt b) it loads the rest of itself (or it loads it
> Several changes were made between 2.5.1 and 2.5.2 regarding default member resolution; Rubberduck is digging deeper and resolving more implicit and late-bound code than before, but apparently something broke somewhere.

`TypeBindingContext.cs` was last modified 2019-08-18, so almost exactly a whole year _before_ 2.5.1; the fact that the stack trace includes `TypeHierarchyPass.AddImplementedInterface` (last modified 2020-09-30, about a month _after_ 2.5.1) *could* be a clue.

Perhaps all th
@Duga that's a false star ... accidentally un-starred and re-starred, my bad.
6:32 PM
> I believe the *Code Explorer*'s "Copy to Clipboard" functionality fulfills this need, at least partially; you can paste the copied declarations into Excel and, with a few little manipulations, end up with a table that lists literally everything that has a name in your project:

![a table in Excel with all the declarations of the Battleship project](https://user-images.githubusercontent.com/5751684/118704444-1f922f80-b7e5-11eb-8c10-39cc766c101b.png)

Inspection results can be regrouped by i
> I believe the *Code Explorer*'s "Copy to Clipboard" functionality fulfills this need, at least partially; you can paste the copied declarations into Excel and, with a few little manipulations, end up with a table that lists literally everything that has a name in your project:

![a table in Excel with all the declarations of the Battleship project](https://user-images.githubusercontent.com/5751684/118704444-1f922f80-b7e5-11eb-8c10-39cc766c101b.png)

Inspection results can be regrouped by i
6:44 PM
Hrm... The option to add a WPF xaml control has disappeared.
It's not pretty but I can now add a component and rename it before it refreshes.
@Duga pull requests are welcome, if you figure out a way to "partially load" RD you get a cookie. very likely won't involve messing with MSO CommandBars though.
@MathieuGuindon HHCIB ;)
Oh. I remember. Very.
7:02 PM
@mansellan probably thinks we're sleep-waiting while the Splash screen is being displayed, too.
eh, I shouldn't be this bitter ..RD does have perf issues. It's just the magical thinking "hey what if you just did X?" that gets me.
not wiring up a dockable presenter for each toolwindow could be a small perf boost if we're lucky. AvalonMentions++;
7:41 PM
@Duga I think two of the things that take quite long at startup is loading the CLR and loading the RD binary into the CLR. We really cannot do much there unless we want to deal hassle of incrementally dynamically loading assemblies.
From my personal experience, I know that having RD installed on a network drive massively increases the startup time.
Anyway, compared to VS, RD loads really fast.
VBE users are just too spoiled by the load time of an editor with next to no modern IDE features.
Rather than putting effort into making the initial load faster, I would rather invest into speeding up parsing.
It would be a dream to end up at the target rustanalyzer is aiming for for reparses, i.e. 30ms. However, I think even the COM interop we have to go through is already too slow for that.
@M.Doerner so much this... get any of them in front of VS+R# and watch complains go "oh. oh wow. had no idea."
I still think that it is impressive what they did with the VBE back then.
The incremental parsing, transpiling and running of partially compiled code was quite an achievement.
totally. just sucks that there's zero extensibility hooks into it!
Well, it was 30 years ago.
And I think the code is not fit for somebody hooking into it.
I think there are hacks upon hacks upon hacks in there.
7:54 PM
MS is kind of known for this.
It is basically the first thing I read when I searched for books on OSs, when I was ineterested to learn a bit more about how exactly they work.
The statement basically was, look at one of these two books to learn the theory, then look at real OSs. Start with Linux and see how the theory is applied, then at Windows for another approach and shudder looking at all the compromises made and hacks used.
hehe... reminiscent of that quote about how we build code & cities on top of ruins...
There's a reason why everyone uses JavaScript today to drive web applications.
FWIW, Joel Spolsky would have been in favor of the "compromises and hacks"
It is usually not the best solution that wins and takes over the marked but the one that fills a gap at exactly the right time.
Really, I think those compromises are one of the two main reasons why windows took over the consumer market.
8:04 PM
@Duga the title reminded me of this:
As far as I am aware quite a few of them are there to guarantee backwards compatibility.
BTW, the other main reason I was thinking of is Driect3D.
@M.Doerner ha the Sim City story!
Yes. I found the tidbit about fixing a bug in SimCity by special casing the Windows API What Mat sez
I actually read the book by Raymond Chen. That goes on about the topic quite a bit.
Even in XP they still did backwards compatibility stuff for windows 3.1.
The old new thing, right?
8:07 PM
Yep, that one.
Technically, it is just his blog in printed form.
8:31 PM
SO ads are about to have a shake-up, apparently
Q: The future of Community Promotion, Open Source, and Hot Network Questions Ads

JNatIt's now May, and if Community Promotion or Open Source Ads are something you care about, you may have noticed that there hasn't been a 2021 refresh yet. In case you missed this post, please check it out for some details about why the refresh was pushed back, and why a project around the rethinki...

from the blog:
> Community Promotion/Open Source Ads are an initiative we’ve had for 11 years, but we haven’t revised it a single time since we kicked it off. Additionally, the program uses code no one maintains, and the Ads team would like to get rid of it. Both of these things prompt a revision of the program as a whole before being able to refresh it for 2021.
someone has a piece of crumbling hacks built on top of hacks, it seems :)
2 hours later…
10:44 PM
> I did some more digging, and I'm reasonably sure that the `+` operator it's screaming about comes from a message box declaration where we're declaring the `msgbox buttons` settings and using more than one option.

From the same form as before, in here we've set the `msgbox` to yes/no (`vbYesNo`), and the "information" exclamation (`vbinformation`), and set "no" as default (`vbdefa
Evening ducks. I have a question that about something you may, or may not, have come across. Within the last month or two, I think, using querySelectorAll method of MSHTML.HTMLDocument always returns null for nodeList length when you set the returned nodeList into a variable. E.g. pick any page and do Dim elem As Object: Set elem = html.querySelectorAll("a"). ?elem.Length => (null) instead of returning the number of anchor elements on the page. This is new behaviour.
It has occurred on all pages I have tested so far. I assume something is now broken under the hood in MSHTML.
> As a quick test to confirm... in your original project, change the + to Or operator and see if this makes a difference.
I don't know how much you use this particular class and method but thought I would ask here. Is it also something one might ask on StackOverflow?
If you don't set the return into a variable then you can continue to iterate the returned nodeList.
You can't use With to hold a reference either
So, in effect, you are forced to re-parse for every element in the nodeList :-(
TBH, I've not used MSHTML for very long time and I don't think many do so I can see it going more batty with each Windows update. I think that is a good question for SO.
Thinking it through, I assume MSHTML itself isn't updated right? I have Office 2019 without any updates as it is a one off payment
10:53 PM
> To confirm, you're saying change to the following? There's nigh 200 instances of this, and it's how almost every instance I've seen msgboxes declared where using more than one "button option".

MsgBox("Some dumb text", vbYesNo OR vbInformation OR vbDefaultButton2, "A TITLE!")
> To confirm, you're saying change to the following? There's nigh 200 instances of this, and it's how almost every instance I've seen online for msgboxes declared where using more than one "button option".

MsgBox("Some dumb text", vbYesNo OR vbInformation OR vbDefaultButton2, "A TITLE!")
So, I am wondering what would cause the actual break?
I believe IE is actually involved under the hood with MSXML2 and wonder if the actual request to get the content that is fed into the HTMLDocument somehow plays a part?
IE is so defunct now that would make more sense
> To confirm, you're saying change to the following? There's nigh 200 instances of this, and it's how almost every instance I've seen online for msgboxes declared where using more than one "button option", not to mention [Microsoft's own examples](https://support.microsoft.com/en-us/office/msgbox-function-e23511c8-4157-4e09-93a6-ba9f1749f4c0).

MsgBox("Some dumb text", vbYesNo OR vbInformation OR vbDefaultButton2, "A TITLE!")
How do I demo research on this? There seems to be nothing on the web - that have found so far.
@QHarr yeah, IE is what is being used. It's unsupported and slowly dying. It would be worthwhile to use a modern web parsing tool. There is one written in VBA: github.com/VBA-tools/VBA-Web
But I always recommend using something other than VBA
@HackSlash Thanks. Me 2. But this, at least for me personally, has massive implications for 1000+ answers. I would need to update them at least with as minimal now broken use x .......:-0
@HackSlash Do you have any links to references that IE is used under the hood please? I am sure I read it once upon a time but have never been able to find a reference to it again. That would help me in writing a question to post.
The other thing is, I am unsure how IE ties in. Bet MS won't have produced a nice little diagram showing the flow....
11:05 PM
The DLL is: mshtml.dll
The binary clearly states it is IE11
You star! Thanks,
That API reference should come with a warning that it will make your eyes bleed
Lol...... will be interesting. I need to find the interface class by the looks of it, which should be interesting.
I know the final output is DispStaticNodeList
What would be the logical approach to hunt down the interface? Read the documentation for querySelectorAll and see if it mentions the implementation details?
> Microsoft's examples is not... exemplary.

`Or` is actually the correct operator to use in those cases. However, it has the same results as long you don't accidentally add same flag. But the real point here is to test whether the use of `+` operator is in fact the issue or not. It might not be necessary to replace all; if the logs has one less incident that would be a sign that it's really a problem relating to that operator or if we need to look somewhere. Alternatively, use a copy and F &
11:27 PM
> Fair point; I'll give that a shot and retry.
11:46 PM
[rubberduck-vba/Rubberduck]: 1339 stars vs. [decalage2/oletools]: 1546 stars
11:57 PM
> Given where the error occurs, this should not have anything to do with the `+` in the message boxes. Actually, I think it is not related to the code at all.
My best guess at the moment is that there are some funky base type names in the internal type library. However, I will have to investigate a bit in order to see whether I can reproduce this in Access.
This would also explain why there was no problem before since we only started to pull those base types from the type lib after 2.5.1

> To be clear, Rubberduck throwing on that + operator would be a bug indeed: "if the VBE understands it, so should Rubberduck" has been a guiding principle all along, and that operator is perfectly fine and legal there ...that said it does look like a good plausible lead.
> To be clear, Rubberduck throwing on that + operator would be a bug indeed: "if the VBE understands it, so should Rubberduck" has been a guiding principle all along, and that operator is perfectly fine and legal there ...that said it does look like a good plausible lead.
@Duga now that makes much more sense

« first day (2538 days earlier)      last day (29 days later) »