« first day (1781 days earlier)      last day (34 days later) » 

12:01 AM
[bruglesco/FleetCommand] 6 commits. 277 additions. 162 deletions.
[rubberduck-vba/Rubberduck] 3 issue comments.
[Minesweeper] Games Played: 63, Bombs Used: 35, Moves Performed: 8350, New Users: 7
7 hours later…
6:36 AM
Hope everyone had a good safe sane Easter weekend
2 hours later…
8:12 AM
> @Vogel612 : I just tried version
I still get 13k inspection results instead of ~860 with
Expanding any of the result groups still hangs for ~30 secs and then crashes the host application.
So, no changes from v2.4.1.4661 for me.
3 hours later…
11:11 AM
@IvenBach: Yeah :-) Relaxing one. Stargate SG1 and visiting friend. Don't especially celebrate easter anymore.
Hey :)
On the RD note: if I want to have faster parsing time, it came to me that even the Test_Module will slow it down. Can I just "ignore" this/these modules? If there something like
Or it is ignored, because there is
And one other thing. Can anyone try this?
Open VBA ide, have at least one module, begin to rename the module
Have cursor at the end of the string
Press Backspace. --> In my case, there is really big lag when deleting (backspacing) each letter.
When I have the cursor at start of the string and pres DEL, it behaves normally.

So... If it's only in my case or others have it the same.
11:27 AM
Morning all!
Here's what's happening
Morning :-)
Quick question, just to be sure I understand 100%. When we say "code behind" for an Access form, for example, we're talking about the code that's displayed when I click the little ... icon that appears on the On Click property of a button (for example). Right?
^that guy
@Duga yay me! (was shocked that I hadn't done so before.)
Also yay me! I managed to clone the code to my desktop from the git-bash shell in only 2 attempts! (I didn't realize that it would create the Battleship directory for me, so I hand Battleship\Battleship, which I didn't want...)
12:13 PM
@FreeMan Yes.
FWIW - the form itself is a class, and for each control you place, it's as if it had Private WithEvents <name of control> As Access.<control type> implicitly added to the class, all which composes the form's module.
12:33 PM
@this thanks. That is what I thought, but I've been known to toss terms around before without fully understanding what I was talking about, and that can get... awkward...
The best way to eliminate code behind is with a MVC or MVVM pattern, right?
I'm not sure you "eliminate" code-behind with any of those patterns. What you do get out of the pattern is ability to test your UI logic without, well the UI. For a VBA userform, MVP works well. For Access forms that are meant to be used bound.... I haven't decided on a good approach because the binding and the testability doesn't go hand in hand.
12:52 PM
I'm also looking to be able to easily import/export code from Access so I can use git.
and according to Chris, "we can’t import the code behinds of Forms, Worksheets, and the “ThisWorkbook” class back in"
which kinda sucks...
Not true for Access
I mean OASIS or Ivercy wouldn't even exist if that wasn't possible
The problem, however, is that you have to use the host's OM to do the export/import and RD is meant to be a host-agnostic VBE add-in.
As an VBE add-in, the task is definitely difficult. As an Access add-in, no sweat.
12:55 PM
@this ok, that makes sense. Now that I read it more carefully "Worksheets and 'ThisWorkbook'" do tend to indicate Excel, but I took "Forms" to be all Office forms
Userforms ≠ Access forms
They are two totally different beasts.
Yeah - I haven't done any userforms, just Access forms, so I'm not super familiar with 'em...
@this by "host" you mean Access/Excel/Whatever, not OASIS or Ivercy, right?
Keep in mind that "Office forms" most likely mean Userforms.
Correct. They all are basically just doing Application.SaveAsText acForm, "form name", "C:\path\to\file.frm"
I tend to only use forms in Access, so...
@this hrm, so I may not have a universal Office Import/Export routine...
So in a strict sense, you don't even need OASIS or Ivercy - you can write your own VBA script to export / import everything using Application.SaveAsText or Application.LoadFromText. And Yes, it's only good for Access.
The reason being was that Access used to support source code control, and those 2 commands are what enable that feature. The native support has been removed but the functionality lives on, hence the third party addins like OASIS or Ivercy.
AFAIK, no other Office products ever supported SCC.
12:59 PM
I started with this that Chris posted waaaay before RD had attempted to implement any sort of VCS integration. It seems to imply that the code provided will import/export for any Office app
just not the document modules. ;-)
@this good LORD! How long ago was that???
that = the removal of SCC support? Access 2010, I think.
Really, it was crap. It was written with VSS in mind.
really? Why... answers question before asked
and that checkout-checkin model of VSS isn't amendable to the git's model.
1:01 PM
Even so, if you could get text files exported/imported, you could use any VCS on the back end...
oh well, ancient history.
So it really doesn't matter that the native integration was removed.
Ivercy tries to replicate that native integration whereas OASIS simply just provides its own interface.
To summarize: I don't use userforms in my Excel app (and don't really plan to), additionally, I have no code behind in any of my worksheets, so I'm good with Chris' code for Excel.
I don't use Userforms in Access, but I do use Access forms, and I do have code behind. Application.SaveAsText ... will cover me there as well for importing both the form definition and the code behind?
Yay!!! I don't mind having to totally different implementations, so long as the interface is consistent. :) old dog, learning new tricks
for OASIS-SVN, I come up with dev2dev.de and oasis-open.org. Which is it that you're referring to? (Or are those the same, one's just in German?)
One reason I like OASIS is that it helps with all the extra handling --- stripping out data that really don't belong in source code for one thing.
1:07 PM
sigh... grabs German-English dictionary...
no there's an english site
clicks Google link, gets served page in English
> I'm not sure you "eliminate" code-behind with any of those patterns.
Is it recommended to reduce the code behind to a bare minimum, or is that a cargo cult of a different sort?
if there's going to be any code behind, it has to be something that is UI-y.
Private Sub Button_Click
End Sub
sumpin like that? Where ButtonClickHandler exists in some *.CLS or *.BAS somewhere else...
Or is that going too far over the top? #ItDepends...
Maybe but now that just fees like lasagna code.
1:18 PM
loves lasagna! Has new life goal!
In a MVP, you dispatch UI events to the presenter, the presenter handles the business logic and tells the view what to do.
I'm just getting into Mat's Battleship articles/code, so I'm a bit behind the curve, but wouldn't that, essentially, be what my sample code did?
What I've got elsewhere:
Private Sub Checkbox_Click
  SetGroupAccess Me.Field1
  SetGroupAccess Me.Field2
  SetGroupAccess Me.Field3
End Sub
SetGroupAccess then looks at the form to determine what the various settings should be and sets the visible/enabled properties for the passed field as appropriate.
2 hours later…
3:38 PM
@SonGokussj4 backspace keypresses are handled by autocompletion services in code panes... but the keyhook shouldn't be firing unless you're typing in a code pane. That said renaming modules should be refactor/rename, that way you don't break code that qualifies calls into that module ;-)
@FreeMan that is literally this question:
Q: Are there disadvantages in putting code into Userforms instead of modules?

Lucas Raphael PianegondaAre there disadvantages in putting code into a VBA Userform instead of into a "normal" module? This might be a simple question but I have not found a conclusive answer to it while searching the web and stackoverflow. Background: I am developing a Front-End Application of a database in Excel-VB...

Offloading code-behind to another module is basically taking a situation where you have a form doing all the work and turning it into a situation where you have a module that knows way too much about how a particular form is made.
i.e. that module wants to be the form's code-behind
@this Not true. ODE has a plugin, at least for Excel. It is very, very poor however.
so it actually exports/imports Excel documents?
Didn't know
@this Ah no, just code modules iirc
With Access, you can export the forms and reports. I am not aware of any other hosts providing that functionality.
me either
and the ODE plugin looks like it was thrown together by an intern in an afternoon.
3:50 PM
i'm sure ODE just wraps the VBComponent.Export and VBComponents.Import
it has some toolwindows to show checkout status, and links into the VSS provider
but yes, essentially that's all it's doing
4:17 PM
@MathieuGuindon Okay, so A) I'll rename modules from now by Refactoring.
BUT B) this is happening in all fields. And I work heavily with .Tag property. It's the same there.
@SonGokussj4 I'll try setting up a breakpoint in the AC service and see if it's involved in that delay; it shouldn't be though.
@MathieuGuindon Do your magic. :-) I'm lost in this sentence.
@SonGokussj4 if you go to autocompletion settings and disable it (the "master" checkbox at the top), do you still get that backspace delay in the properties toolwindow?
4:34 PM
@MathieuGuindon yes. I even tried to exit excel and start it again. Autocomplete is disabled
@MathieuGuindon Interestingly enough (and that's why I asked for someone else to try), it's happening even when I disabled "startup/loaded" of Rubberduck from Add-is / Add-in Manager
So it seems it's my thing on the local computer. I'll try it tomorrow at work.
4:49 PM
That's good news then! Not a RD bug! =)
Weird and weirder.
a) tried it on my ntb (office 365) - the same
b) tried it on my local pc (office 2019) and opened entirely new file with only one form. The same problem

I suppose it's not RD :-) Or the installation of RD did something to my office but this I highly doubt... I will look for this on google.
Yeah. Glad it's not RD bug :-)
5:35 PM
@MathieuGuindon I've read that before. I actually starred it. I'd forgotten all about it. hangs head in shame and shows self to the door
5:49 PM
So the key to the code-behind is here:
Private Type TView
    Model As FilterModel    '<-------
    IsCancelled As Boolean
End Type
The model is actually referenced in the code behind, and methods in the model (IsValid) may be referenced in the code behind, but all of the gubbins of the model could change, and so long as it exposes an IsValid the form itself won't know or care.
the forms should basically only write/read to/from the model and when done, give it back.
Keep in mind, that's good as long you aren't binding
With a bound form, MVP no longer make sense.
While you can create unbound forms in Access and therefore use MVP pattern, if you are doing this all the time, one starts to ask why even bother with Access? Might as well write it in C# instead.
In the case where there are various and sundry options on a form, some of which enable other options, checking the options and setting the appropriate .Enabled flags would belong in the Model in something like a Validate method that would be called by each checkbox the way the TextBox1_Change method in that example is - Assign the form field to the corresponding Model property, then Validate
light bulb glows slightly brighter
the whole point of MV* patterns is to separate the data (the model) from the UI stuff
if you're doing If SomeForm.SomeCheckbox Then in some other module, you're doing it wrong™.
You want to have If SomeModel.IsChecked Then instead because then you can just pass a model with whatever data it needs to have, without caring how the model was actually made.
6:05 PM
the bell of understanding rings faintly
Now, if all of this will stick whilst I get distracted by something else urgent that's about to hit...
To keep this simple, when you're wondering if it's the right thing to do - simply ask yourself: "must I open a form in order to run this code?"
if the answer is yes, then you know that this code is too tightly coupled to the form.
Private Sub DoIt() : OpenMyFormToCollectInput : <rest of doing stuff> : End Sub <= big smell.
You want this instead:
Private Sub DoIt(SomeModel As Something) : <rest of doing stuff> End Sub
The model is just the data shown in the fields on the form. It's not necessarily "data" as in something coming from or going to a DB, it could simply be the configuration information for how to run this report you're about to run.
Not going to ask how to apply (or not, or modify) this to bound forms in Access - at the moment, I don't really have any, and I'm starting to grasp the concept - I don't want to throw in other stuff to muddy the waters yet.
don't worry, I don't have a good answer for bound forms in Access.
only few rough ideas but I've yet to put it to test
6:16 PM
The model does have to mirror the form, though, right? It's got to hold all the data presented on the form and has to know what to do with each bit of it, so they're tightly coupled. It's just that the form itself doesn't care how the data is handled. It's kinda the mainframe dumb terminal of the GUI world - Put this here & show the user, then let me know when he's done something with it, I'll take it from there.
at least the data that's relevant to the process.
but yeah
it's rare but there can be "data" that aren't part of model -- an example would be some logic to enable/disable a control on the form based on the selection on another control.
the model doesn't need to "know" about that enabled/disabled; the two controls' value will be most likely copied to the model and that's usually enough
@FreeMan the way I see it it's the form/view that's "mirrorring" the model - its job being quite literally to provide an interface for the user (ergo, user interface) to interact with the model
IOW a form is just one of many possible ways for the rest of the code to collect input or produce output, and the rest of the code shouldn't have to pop any actual dialog to be able to work.
Just like Battleship doesn't need any worksheet UI to be playable - as long as the controller can talk to something that can act as an IGridView, it's happy to talk to and interact with it. No discrimination!
6:37 PM
@MathieuGuindon Makes sense. Us old-skool guys, though, tend to think in the "Form->Action" methodology, and in that respect, my way made sense to me.
I definitely get the point, though.
I guess the model is "Here's the data & actions that a user would need to see". While the form is "Here's a way of looking at (some of) the data in the model and a way of invoking (some of) the actions". right?
IDK. When you click the Do It button, you should be handing off the model to some other class that is responsible for well, doing it.
so the model itself really doesn't have "actions"
actions are represented in classes and those classes need the data from model.
The model is just data and the knowledge of what valid/usable data looks like
Actions belong on whatever component knows about both the view and the model - whether you call that a presenter, a controller, or whatever else
I was thinking about that -- a controller would directly execute the action, whereas a presenter would simply return the result, no?
6:43 PM
I was thinking of actions = IsValid, or Validate, or EnableProperControls, more than RunTheReport or ImportTheData
those are more "validation" (two of the name has it in the name...) ;-)
and even so, whether model should do validations is debatable (some will argue it's view's job to validate, etc. etc.)
reviews list, agrees with @this, those were the "actions" I was thinking of. I realize that wasn't clear from what I typed
If the View is validating data, isn't that overstepping its bounds of "Show stuff to the user (UI)"?
No no no no, not data
validating what you can do on the form itself.
ah, validate option combinations
6:46 PM
ok - fine-ish line
if you needed to validate against some other data, I would argue that it's model's thing.
yes, not a hard and fast rule.
I think I'm getting it.
With emphasis on think.
Based on earlier conversation, Application.SaveAsText will export my Access code behind, no matter how MVP compliant it is or isn't, and somewhere, there are some other commands to export/import other code modules.
it's actually the same command (if you're sticking to Access' OM)
but yes
Step 1 is to write that up so I can get the code into git. Step 2 is to properly MV[C|P] a new interface for the new stuff I need to do. Step 3 is to refactor old stuff into a proper MV[C|P] model
but I think the command Application.SaveAsText acModule, "some module", "some path" is just a thin wrapper over VBComponent.Export
6:50 PM
Only difference between MVC & MVP is whether you chose to have a "Controller" or a "Presenter" and the main difference between those is spelling. Correct?
whereas Application.SaveAsText acForm, "some form", "some path" would be its own thing.
well, no
notes difference between acModule and acForm
MVC is more commonly used in a server-client interaction --- a web application for example
since controller is more "active" in deciding what to do next
whereas presenter, in my mind is more passive - it only presents a form for user to interact then provide the result but does nothing further. It's up to the whoever activated the presenter to do something about it.
light bulb of understanding flickers...
I though the View was what you just described as the Presenter
take the above with a huge grain of salt. I don't think everyone has a crystal idea of what MVC, MVP and MVVM should be.
presenter basically instantiates the view, sets it up with the model, then show it
(hence, presenting)
6:53 PM
@this had to read that twice to recognize "everyone", not "anyone"
I say that because in my reading, many people are just as fuzzy in describing the difference between the 3 patterns
it does not help that RD itself has to use both MVP and MVVM patterns. #FunTimes
Because WinForms can only do MVP whereas WPF is better with MVVM. Note that MVC doesn't apply here because we aren't a web app.
bookmarked this. Gonna have to come back to it 'cause that urgent thing has popped up.
back asap...
Some say "learn by doing" is the best learning style. In programming, it's "learn by breaking".
@this meh, depends if you want/need to run unit tests against the model to see if validations work as they should =)
7:27 PM
Visual Studio is being an idiot
@TweetingDuck And that's why you don't learn on multi-million line projects.
How can I get IntelliSense within XAML to not be a complete moron?
@Vogel612 Open a ticket with VS? It's always been moronic.
p sure I don't have anything remotely close to a decent repro
but it only happens with custom user controls
Along those lines... It appears that SQL Server doesn't like WHERE column LIKE '%;%' for finding rows with a semi-colon in them...
7:35 PM
@IvenBach you're currently experimenting with XAML and usercontrols right?
could you check for me whether referring to a user control in a clr-namespace in the current assembly results in an Input string was not in the correct format message?
so basically have xmlns:controls="clr-namespace:Foo.Bar;assembly=" and include something from controls in the XAML
@Vogel612 R# :-)
@MathieuGuindon it's enabled by default, right?
I ask because I still find it questionable
p sure that the issue is so deep inside the guts of the designer that R# won't be able to work around it (short of completely replacing IntelliSense)
also it seems my hunch was correct :/
what a pain
The XAML designer can't deal with wildcard versions in the new project format.
Oh well
8:45 PM
@Vogel612 Just got back from lunch. Still want me to test this out?
nah, I found the reason it breaks
thanks for checking in though :)
you don't have a holiday the day after easter??
No. I am taking off tomorrow and Wednesday to go see my idol.
not all muricans observe Easter. In my case, we had the last Friday off, on account of it being a Good Friday.
But I think on the average there is no extra holidays for the Easter weekend.
Interesting... Germany has both the friday before as well as the monday after easter as a nationwide holiday
The friday before even is one of the strict holidays where there's "Tanzverbot"
'Murica has a lot fewer holidays compared to other countries.
8:50 PM
It's like... "You have a mandatory free day today. BUT YOU MUST NOT HAVE FUN!!!"
Dancing bans are legal or religious prohibitions against dancing, which have been applied at various times in various jurisdictions around the world. Even more controversial than recreational or artistic dancing have been sexually suggestive forms such as lap dancing, topless dancing, and rave dancing. == Legal bans == Tanzverbot is the German term for "dancing ban". In Germany and Switzerland, dancing on some holidays is banned by most state or canton governments. These occasions are certain Christian and secular holidays aimed at mourning or contemplation, such as Good Friday, All Saints' Day...
That kind of ban?
ya, that one exactly
I can understand the no lap/topless dancing.
that's not covered under the Tanzverbot rules, actually
and of course lower saxony has a "From 5AM to midnight, but only in places with at least 40% of the populace registered as catholics"
8:56 PM
that feels a bit too..... specific.
@this and it only applies to a single holiday in a single state
@Vogel612 If thou art Catholic, thou shalt not dance if thine proportion to the average populous is greater than 4 in 10 and from the early morning til midnight.
That's a whole lot of WTF SMH going on.
But only on "Allerseelen" which is protected in the Saarland as well, but not in any other state.
I would hope that kind of law wouldn't carry around here but.....
8:58 PM
not only you be shaking your head there
@this I'm reasonably sure there is some laws like that in some state in the us
I'd honestly expect Texas to have some law like that
@Vogel612 The only religious national holiday US has is Christmas.
hence my "hope".
@Hosch250 ~sighh And of course they pick the fourth- or fifthmost important holiday..
I've yet to encounter unusual laws in Texas - the one I'm aware of is general prohibition on sale of alcohol on Sunday mornings
which isn't that uncommon.
@Vogel612 Texas has lots of guns, but they aren't weird otherwise, really.
9:00 PM
@Hosch250 Kneejerk reaction is "Nuh-uh. Easter." except it falls on a Sunday... :derp:
@IvenBach Easter is not a national holiday anyway.
@Hosch250 didn't they have a really strong evangelical demographic?
A fair number of companies observe Good Friday or Easter Monday.
I remember someone telling me that in Vermont (?), you absolutely cannot buy even beers from a grocery store; you had to go to a liquor store for that and they are closed on weekends by fiat.
@Vogel612 Not that I've heard of.
9:01 PM
hum... then I'm probably misremembering
I mean, maybe more so than California, but nothing too weird overall.
And even then, wacko groups are usually small pockets anyway.
@Vogel612 There is definitely much more religion than up north around here but nothing that's enforced by fiat (at least as far as I am aware of)
> Das „Tanzverbot“ betrifft in der Regel nicht nur Tanz-, sondern auch andere öffentliche Veranstaltungen wie beispielsweise Sportveranstaltungen,[...]
That's why there was no Bundesliga last Friday.
We can agree all the countries which we live in have plenty of WTF parts.
Those in 'Murica just happen a lot more in Florida.
9:07 PM
yea, that thing is also completely incomprehensible to me...
they should have just called it the WTF-land
Why in the world are arrest records public??
so you can shun them?
or so you can kick them in belly, point at them and haw-haw?
Originally, it didn't matter.
Back in the day, everyone knew everyone. And odds were good they'd helped with the arrest.
9:08 PM
yea, the internet rapidly changed how private the public record was
So, it was already public.
But, you could escape that by moving to the next state or two.
Public nowadays means globally public at everyone's fingertips, not just available to everyone who'd form the judge, jury, victim, neighbor, etc.
9:56 PM
okay, I think I have a semi-workable state for a SearchBox component that avoids the localization problem ...
now I just need to get the hint text to display properly
10:37 PM
> This PR introduces a component for search boxes, based on the in use code in Code Explorer and A/RRD.

On the side, this should also fix project recognition for Rubberduck.JunkDrawer as a new csproj-format project by introducing a TargetFramework.
Also there's some minor moving of files in the Controls folder, which is steadily growing.
Would be kinda funny if some test now failed
but that doesn't concern me right now, I'm very much due for bedtime.
10:55 PM
@FreeMan once you're comfortable with git things become a lot better. I forced myself recently to use it a lot more and whoo boy is it like night/day.
[rubberduck-vba/Rubberduck] build for commit 702f18c4 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4929?src=pr&el=h1) Report
> Merging [#4929](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4929?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/dd68164d6368ff48a0c7dd7bc690bc102a939f86?src=pr&el=desc) will **decrease** coverage by `0.09%`.
> The diff coverage is `0%`.

@@ Coverage Diff @@
## next #4929 +/- ##
[rubberduck-vba/Rubberduck] build for commit 702f18c4 on unknown branch: 64.47% (target 0%)
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4929?src=pr&el=h1) Report
> Merging [#4929](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/4929?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/dd68164d6368ff48a0c7dd7bc690bc102a939f86?src=pr&el=desc) will **decrease** coverage by `0.09%`.
> The diff coverage is `0%`.

@@ Coverage Diff @@
## next #4929 +/- ##

« first day (1781 days earlier)      last day (34 days later) »