« first day (1823 days earlier)      last day (1357 days later) » 
00:00 - 23:0023:00 - 00:00

12:01 AM
RELOAD!
[rubberduck-vba/Rubberduck] 36 commits. 1 closed issue. 3 issue comments. 94396 additions. 41447 deletions.
[Minesweeper] Games Played: 81, Bombs Used: 45, Moves Performed: 10155, New Users: 13
 
 
10 hours later…
10:18 AM
> 2019-06-03 12:06:23.8281;INFO-2.4.1.4627;Rubberduck.Common.LogLevelHelper;
Rubberduck version 2.4.1.4627 loading:
Operating System: Microsoft Windows NT 6.2.9200.0 x64
Host Product: Visual Basic x86
Host Version: 6.00.9782
Host Executable: VB6.EXE;


**Description**
There was already a bug with this problem fixed in #1178.
My problem is that our source code is totally mixed with
FontSize = 8,25
and
FontSize = 8.25
also in the same files. VB doesn't have any
 
10:44 AM
 
 
1 hour later…
12:08 PM
> I took the liberty to reformat this a bit and change the screenshotted code into text. This allows devs to just copy-paste it into their local environment for verification :)
 
12:28 PM
> As far as I can tell, this issue arises from how the lexer defines floating point literals: https://github.com/rubberduck-vba/Rubberduck/blob/99e90943d30196036caf0ede0924fd802d5f141d/Rubberduck.Parsing/Grammar/VBALexer.g4#L255-L261

Note the explicit use of `'.'` as a decimal point.

Considering how "early in the parsing pipeline" this is, any changes to the rule are potentially catastrophic.
A possible patch might be something along the following lines:

```diff
- | DECIMALLITERA
 
@Duga I'm not sure if one really can write 8.25 and 8,25 interchangeably in the VBA code itself. The example is from the .frm layout definition, which isn't visible VBA code once imported. So if that is true, we could only apply the rule when parsing the layout code, rather than the actual VBA code.
 
the problem is that we're using the same lexer definitions to my knowledge
MS-VBAL also defines floating-point literals in the exact same way as we do.
 
Does MS-VBAL cover the layout definition? I don't recall seeing a section for that
 
no, they don't
and the spec is apparently available as an "openspec" docs.microsoft.com/en-us/openspecs/…
it's needlessly hard to find that...
 
IKR?
Technically, that stuff might not be even a part of VBA specs
We already had to make some accommodations for its quirky grammar.
 
12:45 PM
they have an attached forum, but honestly it seems like there's no way to find information there
 
12:59 PM
I have a CSV file with a column header ID.format and I'm importing it into a table with a column IDformat. SSIS seems to pick up the CSV file header as ID format (space instead of .). It seems to work just fine - is there any reason to be concerned about the . in the column header?
That's the way the data comes from the provider. I had been changing it (remove the .) in my old way of processing, but if I don't need to do so, that's one more step I can skip...
also, there's some RD feature for marking a procedure deprecated, it appears that '@Deprecated is only available at the module level, not at the procedure level. Is there a procedure level version? '@DeprecatedProcedure doesn't seem to work either - it gives the same "module level only" warning.
 
1:29 PM
> The fade behind the headers probably shouldn't go all the way to white:
![2019-06-03 09_28_26-Rubberduck - Contact](https://user-images.githubusercontent.com/11889733/58805454-1997e980-85e2-11e9-9895-7fb95fbf1979.png)

Text is a bit hard to read on the longer strings...
 
2:02 PM
@Duga the fade-header should only be at the top, with the sub-headings being h3 or something
 
> I agree, we can't just parse a decimal separator interchangeably as a comma or a dot.

I think we might need a separate `VBAFormLayoutLexer` for this.
 
2:23 PM
@MathieuGuindon or, with that fairly light blue, make the text black.
 
no, I really want to do away with these abusive headings :)
 
and have a wall of text in its place?
 
@this thoughts?
 
2:39 PM
@this h2 or h3 headings instead
 
@FreeMan I am not sure what to think. For one thing I'd have expected it to simply bracket the crappy names. I also have seen various programs convert bad characters to either #, _, or $, but with a space? That's a surprise.
Were I in your shoe, I'd search out for an explicit documentation that this is the expected behavior in SSIS. If there isn't, my belts'n'suspenders would yell at me to do the explicit step because that might change.
 
@FreeMan @Obsolete("reason")
 
Replacing with a space did seem odd, that's why I asked. I think I'll just continue with my modification step, just to be on the safe side. It's really not difficult to do the one Find/Replace statement to take care of all the . in all the default column headers that they give us. Added bonus, I'll know exactly what I'm expecting.
 
FWIW I would totally alias the heck out of these column names to plain PascalCase
that's very easy to do in SSIS
 
@MathieuGuindon @Ahhhhhboslete.... got it! ;)
 
2:44 PM
you can rename any column in the output of your data source component
@Folks getting confused with the ! bang operator: stop it. The bang operator is shorthand notation for an implicit call to an object's default member, passing whatever follows as a string literal and making every single subsequent member call late-bound, i.e. you don't get intelisense, no compile-time validation, no parameter tooltips, nothing. Instead of Form!ControlName.Enabled, do Form.Controls("ControlName").Enabled. The bang operator needs to be thrown into Mt.Doom. — Mathieu Guindon 5 secs ago
 
> Shouldn't this
`Foo(123,152)`
not be
`Foo(123, 152)`
The space makes the difference.
But I see your point.
> That would be a pretty-printed version; however, AIUI, Foo(123,152) is grammatically valid and is documented so in MS-VBAL. The parser follows MS-VBAL, rather than the version you see in the IDE editor and thus is more lenient in that respect.
> The code you read in the VBE in a validated line of code isn't the code you typed in the editor: it's a translation of the compiled instruction - that's why/how the VBE "prettifies" code and "autocorrects" certain constructs; that space is an artifact of this translation, it's nowhere in the language specifications; an argument list - having parser logic de
> The code you read in the VBE in a validated line of code isn't the code you typed in the editor: it's a translation of the compiled instruction - that's why/how the VBE "prettifies" code and "autocorrects" certain constructs; that space is an artifact of this translation, it's nowhere in the language specifications; (see argument list) - having parser logic
> I understand. Thanks.
I still cannot use RD when I fix this errors as I get an OutOfMemory exception also.
> Is there anything I can do to improve this? e.g. set LARGEADDRESSAWARE on the VB6.exe?
We have 700 modules, forms, classes and usercontrols in one project and RD is very slow and then stops.

> 2019-06-03 12:51:04.7031;ERROR-2.4.1.4627;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 5).;System.AggregateException: One or more errors occurred. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Antlr4
 
3:05 PM
@RicardoA doesn't that make the code much clearer, explicit, and unambigious? What do you mean, "back to"? Back to early-bound code that the compiler can validate and call out a typo in? Yes, absolutely. — Mathieu Guindon 6 secs ago
@Duga so, either it fails to parse, or succeeds but can't cope with 700 modules... F'd either way...
 
> Is there anything I can do to improve this? e.g. set LARGEADDRESSAWARE on the VB6.exe?
We have 700 modules, forms, classes and usercontrols in one project and RD is very slow and then stops.

```
2019-06-03 12:51:04.7031;ERROR-2.4.1.4627;Rubberduck.Parsing.VBA.ParseCoordinator;Unexpected exception thrown in parsing run. (thread 5).;System.AggregateException: One or more errors occurred. ---> System.OutOfMemoryException: Exception of type 'System.OutOfMemoryException' was thrown.
at Ant
 
@MathieuGuindon welp
 
One could make a case that the project should be "sanitized" prior to parsing
e.g. don't have both 8.25 and 8,25 in different places.
then he'd only have OOM to deal with.
 
@this yea, they fixed that issue
 
Oh, okay, missed that.
 
3:14 PM
the OOM looks to be pretty unfixable though (apart from splitting the project)
RD doesn't even get to do anything useful, it's the parsing that outright fails...
 
> I think RD can (albeit painfully, perhaps) deal with ~80-100 modules, but 700+ is well beyond anything we've ever tested it with. I don't think RD can handle a 700-module project without a serious, massive re-design of the entire parsing backbone mechanics (specifically, Declaration and IdentifierReference)... which easily snowballs to pretty much everything in Rubberduck.
 
ugh. This code needs such a massive rewrite!
 
how the heck one works in the VBE with 700+ modules in the first place, beats me
 
esp. with the lack of namespace. That's a scary proposition
Think of what you'd get in an intellisense....
 
> @Tragen one thing that might help, could be to move some of these 700 modules into separately compiled libraries; that way RD would be creating fewer objects and would need to work with less of the user code at once. Surely you don't work with all 700 of these modules in one sitting? Consider compiling a subset into ActiveX DLLs, and referencing these libraries from the "main" project - a bit like Rubberduck itself: the solution is split in 18 separate projects...
 
3:26 PM
well the good news is that we can assume their project is, erm, modularized
 
@Duga but does it takes to referencing gracefully? I think VB6 still uses full path for referencing, which is awful for deployment.
 
yeah, well, too bad
write a tool that edits the .vbp?
hey we could write that tool...
 
?
I'm talking about end user deployment?
Or maybe I don't even know what I am talking about.
never has worked on a VB6 project for real
 
hm
I set up a "build server" at my previous gig
it pulled the latest diff off SVN (!), built the dll, and deployed it to 4 VMs
 
@MathieuGuindon set up or created?
 
3:30 PM
if all dev/build environments have the same folder structure (e.g. C:\Dev\Stuff), then all is good.
 
that's a pretty big if, TBH
 
hence a tool to rewrite the .vbp with a customizeable root folder path
:)
@Vogel612 created. it was my first real WPF app and first toying with DI/IoC :)
1
Q: WPF Path / "up" arrow gets 2px chopped off

Mathieu GuindonI'm working on a WPF user control that essentially is a pimped-up Expander control. In order to get the control to look identical whether it's running on Windows Classic or Aero theme, I've managed to set up a control template that pretty much mimicks the Aero up/down arrows. The "down" arrow lo...

#memories
 
@Duga Actually it's 21, not 18. :-) The other 3 you don't see because they are in a separate solution which is built automatically by the main solution.
 
3:45 PM
does that count the base-project?
 
Yeah. TBH I'd have kept them all in one solution if I could but no, VS has to be a PITA with certain types of project.
Hmm. I don't know if base project counts. It's just a template file that's imported in all projects, no?
(we also have meta base-project, too)
 
@this basically, yes.
 
So, no I didn't count those 2
 
4:13 PM
posted on June 03, 2019 by CommitStrip

 
@Feeds Why would a glazer machine even need internet...
 
@this Exactly the point, LOL.
 
@Duga Is there a possibility to do (roughly? exactly?) what VSCode does? Implement an out-of-process language server to do the heavy lifting, with a lightweight 'transceiver' running in the IDE's process. That way, VB6 / VBA-x86 can keep its tiny memory alloc, and we can use 64-bit addressing where it's needed.
Might be a daft suggestion, hence not posted to the issue :-)
 
we actually had more or less regular discussion around that
 
ah ok
not suggesting its trivial of course
 
4:19 PM
Make the parser an azure function.
We upload the code through HTTPS to the azure function and parse it and return a result :P
 
and add network latency to it?
 
yeah, would love to see the json response for a 10K-liner module's parse tree...
 
I can see us doing this as a local IPC but definitely not across internet.
 
Just kidding, but yeah, that would be funny.
 
@this Iirc it has a few options for library location. I vaguely recall it finding DLLs and OCXs if there's alongside the calling process on the filesystem. It was years ago though, I could be wrong
 
4:21 PM
@Hosch250 as funny as watching paint dry? :D
 
@this That can be pretty funny depending on what paint you used.
 
Just spitballing here, but if we used VSCode's actual language server protocol, in theory bits of RD could work in VSCode...
 
that's already been done I think - the only thing that works in VBA+VSCode, is syntax highlighting.
which is rather useless IMO
 
ah ok
yeah
 
if we could fork Roslyn and make it understand default members, then we'd be talking :)
 
4:29 PM
heh, PR incoming
uh, wait...
 
and you thought RD was a large solution mwahahahahaaha
^ me when I forked Roslyn a while back
 
4:41 PM
@MathieuGuindon if we could fork Roslyn, what's preventing us from making a private version of Roslyn?
 
I thought Roslyn was MS-PL, but apparently it's Apache-2.0, so we could use it..
 
I also imagine that a private version of Roslyn would add some bloat to the RD's installer
even if we used something akin to an extension DLL, it would still be a dependency that has to be installed.
 
juuust a bit :)
 
oh not much. Teensy-weensy.
Won't notice it all.
 
@this IIUC the parser bits remained closed-source (@Hosch250?)
 
4:52 PM
Some of it, yes.
 
5:02 PM
I think I remember reading somewhere that Roslyn can't be used for creating parsers for non-supported languages.. did that change?
 
5:27 PM
@this how else you going to sugar coat the lost packets?
 
 
1 hour later…
6:36 PM
aight... updating VS and then back to squashing a few bugs around inspections
 
does anyone have an idea what happened to the WPF expander controls for them to expand all groups at once?
 
I'm somewhat confused by that as well and tried to take a look at it yesterday...
gave up, though.
 
It broke?
#AlwaysHelpful!
 
@MathieuGuindon I updated the 2.4.2 project to make the Done column more useful for writing release notes.
 
actually, I think it may have been one of the last PRs @comintern submitted. I seem to recall he was working on updating all those forms and I think that was an unintended consequence.
 
6:42 PM
He's been MIA for a while now.
 
@IvenBach Yeah. sadz
mebbe trying to figure out what caused it is what sent him AWOL?
 
@FreeMan nah, must be the same kind of crazy NDA contract as last year
 
^
 
well, I hope anyway
 
6:44 PM
ah, that could be. #holdsouthope
 
If/When he does come back we need to make sure he knows to give us a heads up before AWOLing.
 
Meh... TBQH I don't think that's strictly necessary
 
@IvenBach what if the NDA contract specifically said "no heads up"?
^^
it's a OSS. People come and go.
 
Of course I'd like to have had a heads up, if only to reduce my worries, but we're not someone's employers..
AWOL doesn't make much sense for an OSS project without people getting paid...
 
"AWOL" as in he's gone and we don't know what happened and we miss him, not "AWOL" as in "Leave" as in he didn't have permission to go.
sheesh #pedants
@Vogel612 Possibly something to do with this comment?
 
6:48 PM
there is a reason why the 2nd monitor still has as a room tag
 
^ guess it applies here, too
(or: "hear to" depending on you're affinity for grammer)
that was hard to type
 
I am somewhat tempted to edit that...
 
:D
there, their, they're
 
Dr. EDWARD RICHTHOFEN is calling.
 
@FreeMan Please bare with grammatically illiterate.
 
6:51 PM
~puts head into hands
 
@Vogel612 googles sorta kinda gets it...
 
there's an extra video on that
 
AFAIR, the expander has some timing issues. It tries to determine something by traversing the visual tree at a time it is not fully constructed.
 
the examples used are rather gory, but what did one expect from something that's based off of the Call Of Duty Zombie game mode
 
@this I'd think that a strange NDA. "Can't advise others as to your whereabouts."
 
6:55 PM
@Vogel612 Frankly, as a native German speaker, you're doing a much better job writhing in pain from that than most American native English speakers would be.
 
@IvenBach If that didn't exist, we wouldn't have Roswell in the first place.
 
@IvenBach Additionally, if he did notify us, he would not, technically be AWOL, since we'd be aware.
 
@FreeMan because stuff like that is important
like... this is not only about being grammatically correct, it's about being exact
 
and that would be the result of being German, n'est pas?
;)
 
oui. c'est tout la raison.
 
6:57 PM
I thought it was Swiss who had the honor of being exact.
 
#ExceededMemoriesOfHighSchoolFrenchClass
 
@this yea. they are somewhat better at it, especially for large projects
CERN and all the tunnels through the alps are a testament to that
 
@this dunno, my dad said you could set your watch by the trains in Germany. If you thought the train was late, it was because your watch was fast.
 
@FreeMan Well...
 
yeah, more or less...
 
7:01 PM
@FreeMan pretty sure that Germany is to be replaced with Japan in that sentence
German trains are chronically late because of decade-long mismanagement for the rail network
 
@Vogel612 seems it was so in the late 60s when he was there... Obviously, it's changed.
on to a more useful topic...
@this I've got a flat file connection manager pointing to my data set. It was created using the original version of my downloaded CSV with a column titled ID.format which SSIS helpfully interpreted as ID format. I'm now modifying that column to replace the . with nothing, so the column name is now IDformat.
How do I get the connection manager to look at the new version of the file to note that the column headers have changed?
do I have to delete & recreate it from scratch?
 
@FreeMan why not just alias it as Mat suggested earlier?
you shouldn't have to make a new file, etc.
 
I'm not making a whole new file, just opening the DL'd CSV, search Rows(1) for . replace with <null>.
not the bestest way of going about it?
also, not 100% certain about the making of aliases...
really only about 3% sure of how to go about that
 
I don't have SSIS in front of me but if you opne up the file connection manager
there's a tab for .... Output Columns ?
click on that, and it shows you a list of the columns and data types
you can rename the columns there to whatever you prefer
 
ok... I've done that for the first column:
 
7:10 PM
yeah
 
but... in the raw CSV file that it's reading from the header has gone from ID.format to IDformat. Will SSIS still see the external column name with the space in it now that I've pulled the . from the source data header?
 
not especially thrilled that it's still ID format for External Column. I'd have expected it to be ID.format
@MathieuGuindon what do you think?
 
yeah. that was what I was thinking. Can force it to reread the source data to note that there's a column change or do I have to delete the connection manager to get it to reread it and see that the new header is IDformat?
 
@FreeMan no no, the point is that you just import the file as-is, without renaming the headers, and use the alias (as defined in Output Column column
To be clear, so the external column shows ID format because the file's header already has been modified?
If that's the case, then we want the original file with ID.format
 
@this no. I built the external connection off of the original CSV where the header was ID.format. SSIS translated that all by its lonesome to ID format. It made more sense to me to pull the . myself and make a more sensical column header
I've since updated my VBA code to modify the file to remove the . from the column header, but I can pull that one line and leave it.
earlier today, the concern was that it was A) weird, and B) possibly subject to change in the future
"it" being the translation from ID.format to ID format
 
7:15 PM
Ok, so SSIS is actually reading the file as ID.format but displaying ID format in the external column.
 
Yes.
 
Which we can fix by aliasing to IDformat in Output column which is basically the same thing.
 
which means that I shouldn't touch the header row before attempting to load the data, right?
 
@Vogel612 *tout à fait
 
Yeah, that's the idea. You'll be working with aliased columns downstream so you don't have to care about the original stupidity in CSV files.
 
7:17 PM
@this I'd flip them and have ID as a suffix
Assuming a FK is involved
 
@MathieuGuindon I was referring more to the fact that SSIS still shows it as ID format rather than ID.format in the External Column. I don't like that.
I expected the External column to show the names as-is in the source.
 
At some point in the future, the columns in my CSV may change. At that point, how do I update the connection manager? Do I delete it and recreate it from the new CSV file, then adjust all the downstream bits to do something appropriate with new columns and not look for deleted columns, or is there a way to force the connection manager to refresh from the current file?
 
> Each of these commits should basically be it's own PR, but the changes are somewhat insignificant, so I've bundled them.

Could be merged as is.
 
Ah! This answer seems appropriate
and... everything seems to have worked after doing that!
 
I'm the lame duck at this pond that doesn't speak French.
 
7:32 PM
0
Q: Excel VBA Userform to assist in the use of Index Match function

peter.domanicoI often use the Index Match function in daily reporting tasks. I was looking for a quicker way to utilize Index Match, as I find the formula cumbersome to enter. I ended up creating a userform that allows you to pull columns using Index Match between sheets in your open workbooks. You can downl...

 
@IvenBach I don't speak french.
I can barely read french, let alone write it
 
@IvenBach I remember vague snippets from high school junior high school French class. After several days in Paris, some of it came back to me, but not enough to be really useful, and mostly just in time to head to the airport to go to Vienna... (where my non-existant German would have been more useful.)
 
@Vogel612 BarelyRead > CantRead. Plus your English grammar exceeds my own in spite of the fact you're German and I'm 'Murican.
 
@IvenBach most of that barely reading comes from piecing it together with the bits of Latin I have left over and the formal register of English
I basically read French at a similar level as Spanish. I never had any education in Spanish
My Italian reading comprehension is interestingly even worse...
 
~.~ I just feel linguistically outgunned by Vogel...
On a more RD note if in the config file that's read there's no definition for the ToDoColumnHeaderOrder it returns null.
 
7:41 PM
well... did you expect something else?
 
Is it tabu to:
 
You'll want to define a useful default in the Settings, that should fix it
 
var toDoListSettings = _configService.Read().UserSettings.ToDoListSettings;
_columnHeaderInformation = toDoListSettings.ColumnHeaderInformation ?? new DefaultSettings<ToDoExplorerColumns, Properties.Settings>().Default;
 
@IvenBach yea, that's Tabu
merging the Defaults into the read configuration value is the job of the ConfigurationService (in addition to caching the merged result)
 
:derp: Tabu Taboo.
I have it reading the defaults in the ToDoListConfigProvider. That's working.
Let me straighten it out in my mind to articulate correctly.
 
7:45 PM
[rubberduck-vba/Rubberduck] build for commit e6eb67d7 on unknown branch: AppVeyor build succeeded
[rubberduck-vba/Rubberduck] build for commit e6eb67d7 on unknown branch: 64.23% (target 0%)
 
@Vogel612 When I'm starting up and the configProvider is reading the serialized values since there's no ToDoColumnHeaderOrder it's returning null as expected. Where do I appropriately check for a null occurrence and provide it a default value?
 
check the HotkeyConfigProvider or the ReferenceConfigProvider and the ConfigurationServiceBase. These should get you a good idea where to deal with that
While you're there, you can probably remove the WindowConfigProvider and the AutoCompleteConfigProvider classes
... I notice now: The CodeInspectionConfigProvider is probably the best example
 
I recall having to put in a defautl value in the ctor
 
github.com/rubberduck-vba/Rubberduck/blob/next/… is the hiccup. The defaults is just fine. It's the newValue that's having the issue.
Something feels odd. I don't have that in my repo.
 
8:01 PM
@IvenBach that might have been merged in with the settings provider smoothing PR that I merged yesterday
 
Let me figure out where my disconnect is.
Even in my own repo which I haven't sync'd for a bit I don't see the ConfigurationServiceBase. Duck detective time.
 
somewhat unrelatedly: I need a project with more than a few hundred inspection results... Grouping and Filtering is near-instantaneous with the largest project I have sitting around
 
^that's not a bad thing!
 
@IvenBach was added in PR #4914 on April 20
 
make a copy of a project and add a metric ton of o variable prefixes?
 
8:06 PM
@FreeMan it is if I need to stress-test the thing...
Then again ... 13k inspection results is never going to be quick...
 
sadly (?) I've whittled most of mine down to minimal inspections.
 
I think someone posted a sample here in chat some months ago
really should add it to wiki or something...
 
I was looking at the wrong branch on GH...
the _configService.Read() reads the config file. If there is no column ordering it returns null which I want it to be a default value.
Is null-coalescing like this appropriate in the ctor of the view model?
 
8:31 PM
no. Because the null-coalescing would be the responsibility of the thing that handles the settings
 
8:54 PM
Mkay. Will try again after lunch. M
 
9:18 PM
github.com/IvenBach/Rubberduck/blob/Issue2947_ToDoHeaderReorder/… is what I've understood is providing the settings. The issue I'm faced with is that's the base class and not the actual provider.
 
why is that an issue?
 
I was thinking it'd be the ToDoListConfigProvider that was the root cause.
 
I am still not following, sorry?
 
The ToDoListConfigProvider is providing the defaults github.com/IvenBach/Rubberduck/blob/Issue2947_ToDoHeaderReorder/…. It's in there I thought it would be barfing.
 
the point is not about where it's barfing..
 
9:22 PM
Since it's in the ConfigurationServiceBase class would a switch statement be appropriate to check for the specific type of and rectify it there?
 
no.
 
Then I've not understood at all.
 
ConfigurationServiceBase "must not" be coupled to specific settings
that's exactly the opposite of what it's intended for.
You need to override the Read method as well.
 
It's the base from which everything is derived from.
 
Something akin to the CodeInspectionConfigProvider should help you
 
9:24 PM
@IvenBach I think you're also forgetting that it's an abstract class with only part of stuff implemented.
It's up to the concrete to fill in the gaps by overriding the abstract parts.
 
@this that's not correct.
 
I'm again in over my head not fully understanding.
 
blargh - i thought it was abstract class
shoot me and scrub what I said.
 
it used to be :)
 
Ah, that's why. I'm outdated, then.
 
9:27 PM
I feel my PR will end up working without me being able to fully understand why.
:brain-tickle:
 
> I find myself starting a model (or proxy) like this a lot:
Private Type TModel
Property1 As String
Property2 As Long
MyCollection As Collection
MyObject As MyObjectModel
End Type
Private this as TModel
Then writing all the Get/Let procedures.
It sure would be nice to write the Type and this declarations and then hit a button to have the Get/Let procedures be automatically generated.
> I wonder whether this could be co-opted in the "Encapsulate Field" refactoring we already have...
 
@Duga I fear that will make the refactoring quite complex. Is there a reason why it needs to continue support the legacy way of encapsulating fields?
 
public class ToDoListConfigProvider : ConfigurationServiceBase<ToDoListSettings>
{
    private readonly IEnumerable<ToDoMarker> _defaultMarkers;
    private readonly ToDoExplorerColumns _columnHeadingsOrder;

    public ToDoListConfigProvider(IPersistenceService<ToDoListSettings> persister)
        : base(persister, new DefaultSettings<ToDoListSettings, Properties.Settings>())
    {
        _defaultMarkers = new DefaultSettings<ToDoMarker, Properties.Settings>().Defaults;
        _columnHeadingsOrder = new DefaultSettings<ToDoExplorerColumns, Properties.Settings>().Default;
 
> I don't really know what that means (co-opted in the "Encapsulate Field") ... but then I have only begun my RD journey. If you can point me in that direction I'll happily explore it.
> somewhat related: #4805, #875
 
@Vogel612 ^ is more along the lines of a proper provider? Where the FooBar*Provider overrides the base behavior with what ever is appropriate?
 
9:36 PM
if necessary, exactly
 
Thank you for being so patient/tolerant.
 
btw: instantiating DefaultSettings incurs IO overhead.
 
> @Vogel612 I think it should be a separate "Unwrap Private Type" refactoring, or something like it.
 
@Duga #ComingUpWithNames
 
@Vogel612 just so I'm clear, earlier I cited how GeneralSettings had a hard-coded setting of a default; would that need to be changed?
 
9:37 PM
@IvenBach you already have defaults available, so I'd change the content of the if-block to ReadDefaults().ColumnHeaderInformation or or even _columnHeadingsOrder
 
Just caught that.
 
@this not quite sure, TBH. I personally dislike putting defaults into code
 
So did I. It was a ugly, ugly hack and I never liked that but it was necessary to handle the edge case
 
on the other hand, at that place the behaviour is exactly specified and the .settings files are not really easy to read.
 
> @Vogel612 I think it should be a separate "Unwrap Private Type" refactoring, or something like it.

@SmileyFtW the operation is somewhat similar to that of the existing "Encapsulate Field" refactoring; Vogel is suggesting to enhance the existing refactoring with the ability to "unwrap" (I totally just came up with that) a private type into a bunch of properties.
 
9:39 PM
where they don't have a file at all. In that case, I think the defaults are not read or something like that.
The settings file does have that as a default but it isn't applied for reasons I can't quite remember.
 
@MathieuGuindon dibs on "Delegate Properties to Private Type"
 
That's a good name.
OTOH, if I already have a UDT, I am more of wanting to generate property stubs....
 
@this except if we formalize the Private Type TFoo + Private this As TFoo pattern, then we can actually generate the entire set of properties, not just stubs ;-)
the refactoring would be some kind of scripted "class builder" :)
 
yeah -- #Words -- not my day. #Mondays
 
actually that should be "Private Type Instance".
 
9:43 PM
The more I think about it, it needs to be its own refactoring.
 
But that's the inversion of what was originally requested.
 
Because there might be few cases --- 1) creating a new type altogether, 2) updating a type with new member, 3) converting legacy fields into type and maybe more.
 
so the original request was "Generate Delegating Property Stubs" or something
 
#875 was about taking a bunch of private fields, shoving them under a new private type, creating a new private field of that type, and rewriting the existing properties to use the new private field...
...which ...might be a tad complicated
 
9:44 PM
One more case -- convert a private member to a WithEvents variable which unfortunately cannot be a member of UDT
 
aye WithEvents (and As New?) need to be handled
 
Really, I think this fall under the heading of Module Level Variable Editor, or something like that.
or to use a verb form, Edit module-level variables
which would be understandable to an average VBA programmer and teach them some new trick (the private type + this pattern) in the process
 
> I am having a blast using RD and applying the principles I've found on the WordPress site. Thanks for everything y'all do.
4
 
Delegate properties to private type would make sense to those who has used Resharper but for those average VBA programmers? Might be talking in gobblegock.
 
man...
i just was taking a look at a table i made 3 years ago
back then i used to create a table in access, then export it to sql server
take a look at this highly important to my infrastructure ive created table, and the freaking pkey isnt a clustered index
which is absolutely dumb, because the way i use the table is to reference the pkey to get pieces of data...
sigh
 
10:12 PM
@KySoto alter table dbo.DumbTable add constraint PK_DumbTable primary key clustered (Id);
It's got identity specification?
ugh damn phone
anyway
ttgh
 
10:30 PM
Ooof. Battered and bruised but I think I have enough done for a PR on the ToDoExplorer column header order.
 
10:42 PM
:sparkley-eyed: I think I amended all those commit messages without FUBARing it up.
 
00:00 - 23:0023:00 - 00:00

« first day (1823 days earlier)      last day (1357 days later) »