« first day (2296 days earlier)      last day (884 days later) » 

12:01 AM
RELOAD!
[rubberduck-vba/examples] 1 opened issue.
[rubberduck-vba/Rubberduck] 4 commits. 487 additions. 304 deletions.
[Minesweeper] Games Played: 106, Bombs Used: 78, Moves Performed: 14709, New Users: 10
 
 
17 hours later…
4:51 PM
Urk. I had a VBA class that didn't have an interface and didn't need a factory. Now I'm considering adding an interface & factory but that would impact the existing calling code....
 
5:38 PM
As Optional ;)
 
nah. had some more thinking and will add a 2nd instance that acts as factory/collection, so the original code won't have to change but new code can use the new factory going fwd
 
---------------------------
Microsoft Visual Basic for Applications
---------------------------
Compile error:

Circular dependencies between modules
---------------------------
OK   Help
---------------------------
I can't figure out for the life of my why...
 
gotta love dem descriptive error message that doesn't tell you where the problem is
wouldn't it be easier to start by eliminating the modules you recently modified?
 
:barf: because it's not. It couldn't resolve the parameter type and mumble mumble guessed it was dependency?
I added a member to an interface and subsequently added it to its inheriting members.
 
MCVE?
 
5:54 PM
Will have to circle back for that, if I do.
^ Iven Reminder: SiteProxy and ISiteProxy.
 
6:14 PM
I'm pretty sure the culprit is more likely with a member name, not a parameter.
 
 
2 hours later…
8:12 PM
@IvenBach most likely, the interface was extracted from the class, and one of the members is an enum type and the enum is defined in the class module. When the class starts implementing the extracted interface, ..circular dependency - and now you know why I always define the enums in the interface class =)
@this I'm 99% sure it's an enum parameter =)
 
Yes, you are right. I forgot that I ran into this once.
probably should make extract refactoring a bit smarter in that area
 
At first it felt wrong. Like defining an Enum type in a worksheets code behind. However after thinking about it for a bit defining it on the interface isn't an issue. That's because the interface Enum definition can't get duplicated, unlike a worksheets Enum can.
Oh... This wasn't from a refactoring command. This is all Iven manually doing it.
 
yep and enums are not really supposed to be connected to an object
 
@IvenBach lol we would've never known
 
I learn lessons the hard way, So as not to forget them.
 
8:17 PM
interface class module make it convenient. having an enum-only standard module is...
 
Is there an IEquatable for VBA?
 
I get bitten every now & then with public members using/returning private types, too
 
well, suffice to say, if you're looking at a VB* project and it has a Constants module, you should prepare to cry.
 
@IvenBach there is if you make one!
 
@IvenBach It could!
 
8:18 PM
looks at VBA standard library, cries
 
That's what I currently doing for my cowboy coding edit.
 
@MathieuGuindon nuggetsMentions++;
 
Ha!
@IvenBach not only that - the class/es implementing that interface is/are going to need to respect the types involved in the interface members; if an interface needs to return an enum type defined by user code, then whatever module defines that enum is forever forbidden to ever interact with that interface!
that generally leaves two places: some Constants standard module, or the interface that uses the enum
 
Because it's defined in there and it'd create the circular reference.
 
8:25 PM
and I vigorously reject Constants module. I will module-shame anybody who has one!
 
This pig duck can be taught.
 
:-p
 
@this starts declaring all enums in ThisWorkbook
 
Please don't look at my janky code then... There's plenty that makes baby Jesus cry salty salty tears.
@MathieuGuindon LOL. Premade public module.
 
Global instance of an object representing the host document itself... makes it kinda worse I think ;-)
perk: you can't declare a Public Const in a class module... which ThisWorkbook is
dang, it's actually arguably a pretty good place to shove wheredayago enums
 
8:30 PM
I don't have such thing in Access VBA project, though
@MathieuGuindon do you remember anything about MsAdodcLib library or Adodc object?
 
 
1 hour later…
10:01 PM
Is it taboo to use a Property instead of a Function for a class member if you know that all required properties to return a value are valid?
 
 
1 hour later…
11:28 PM
@this doesn't ring any bells
@IvenBach depends. If the body is trivial and can't throw any errors then it's a good candidate for a (private?) getter
and the function is parameterless
 
IIRC they are all parameterless, and trivial.
 
I mean, don't parameterize a property get procedure unless you're making an indexed property =)
so yeah, no taboo at all!
 
Indexed property?
 
custom collection, yeah
 
The ability to hover over properties and see the result is very helpful.
#TIL 32.| and leaving the line changes it to 32# meaning its a double.
Dunno why that made me happy knowing what the appearing # meant.
 

« first day (2296 days earlier)      last day (884 days later) »