« first day (1905 days earlier)      last day (1275 days later) » 

12:01 AM
RELOAD!
[Phrancis/TwitterTools] 6 commits. 100 additions. 63 deletions.
[rubberduck-vba/Rubberduck] 12 commits. 2 opened issues. 2 closed issues. 7 issue comments. 268 additions. 2692 deletions.
[Minesweeper] Games Played: 95, Bombs Used: 50, Moves Performed: 11842, New Users: 163
 
@M.Doerner as long as assignments don't point to the last resolved thing in the call chain, all is good I think.
 
1:06 AM
~sigh~ why, C#?
?input == "abc"
true
mocked.Drives[input]
null
mocked.Drives["abc"]
{Castle.Proxies.DriveProxy}
    AvailableSpace: null
    DriveLetter: null
    DriveType: UnknownType
    FileSystem: null
    FreeSpace: null
    IsReady: false
    Mock (Castle.Proxies.DriveProxy): {Moq.Mock<Scripting.Drive>}
    Mock (Castle.Proxies.DriveProxy): {Moq.Mock<Scripting.Drive>}
    Mock: {Moq.Mock<Scripting.Drive>}
    Path: "foobar"
    RootFolder: null
    SerialNumber: 0
    ShareName: null
    TotalSize: null
 
Huh
...encoding?
(grasping at straws)
 
input = "abc"
"abc"
ds[input]
null
ds["abc"]
{Castle.Proxies.DriveProxy}
    AvailableSpace: null
    DriveLetter: null
    DriveType: UnknownType
    FileSystem: null
    FreeSpace: null
    IsReady: false
    Mock (Castle.Proxies.DriveProxy): {Moq.Mock<Scripting.Drive>}
    Mock (Castle.Proxies.DriveProxy): {Moq.Mock<Scripting.Drive>}
    Mock: {Moq.Mock<Scripting.Drive>}
    Path: "foobar"
    RootFolder: null
    SerialNumber: 0
    ShareName: null
    TotalSize: null
    VolumeName: null
the assignment should have had handled the encoding.... right?
 
it can't be that. Is the indexer mock-setup?
 
yes
 
stupid idea: could it be taking the argument literally?
 
1:16 AM
var mockDrive = mockDrives.SetupChildMock("Item", "abc");
i originally had var mockDrive = mockDrives.SetupChildMock("Item", provider.It.Is("abc"));
 
no mug, that doesn't make sense either
 
you gave me an idea, though, it mgiht be my It taht's flawed
trying with Moq's It
var mockDrive = mockDrives.SetupChildMock("Item", It.Is<string>(x => x == "abc"));
 
You're building expression trees - could be that somehow the input argument is taken as a literal that doesn't equal the literal expression "abc". The distinction is rather subtle between the two
 
var mockDrive = mockDrives.SetupChildMock("Item", provider.It.IsAny()); passes
 
there's that =)
 
1:22 AM
so it is working --- just not with a specific value
 
are you evaluating the expression somewhere?
 
i'm just dispatching the expressions to Moq
 
like, input needs to resolve to "abc"
hmm
 
well, that's not accurate
I do have to set up the epxression tree for invoking Moq's stuff
e.g. the equivalent of mockDrives.Setup(x => x["abc"]).Returns(mockDrive.Object)
This is the actual expression built:
"(mock, value0) => Convert(mock.As().Setup(x => x.get_Item(Is(p00 => (p00 == Convert(\"abc\")))))).Returns(value0)"
(note that this isn't one-one mapping, so there's lot of weird stuff that you might not see in an actual C#. oh the joy)
hmm.
 
1:33 AM
IKR?
 
 
2 hours later…
3:08 AM
@FreeMan I had that in mind when I made that statement. Xkcd has many references.
 
3:23 AM
@this a mouthful if you ask me
@this that weird stuff could become aliases
 
 
3 hours later…
6:01 AM
0
Q: Factory Class That Uses Reflection to Instantiate Objects by Class Name

TinManIn this SO post Dynamically choose class from string Alexander Platonov creates a Function on the fly and then uses Application.Run() to instantiate an Object by it's class name. Eureka Reflection in VBA!! How evil! How inspiring!! So that began my journey into the darkness. My quest for powe...

 
6:15 AM
Bed time or I’ll take inundate with more Sheldon links.
 
 
5 hours later…
10:54 AM
I have to say, hunting down a stack overflow exception is no fun.
 
11:18 AM
Arrgh, this is annoying: we get a SO because we use a recursive visitor on a structure that is one level too deep.
I just have no idea how that structure could get so deep.
And I do not really know which test case this is because the call stack is truncated.
 
12:13 PM
Oh, this is really subtle.
We have a problem with the resolution failed expressions we return when with expressions are involved.
That can lead to cycles.
 
 
1 hour later…
1:14 PM
Ok, I have changed things to produce an acyclic graph. However, it is not a tree.
It actually does not look that much different than before, but it is set up such that we actually collect all unresolved context, but not those only generated to join several unresolved expressions.
 
 
2 hours later…
4:20 PM
> Now, I have fixed the two remaining resolver issues I wanted to deal with in this PR, the `MemberNotOnInterfaceInspection` not working for procedure arguments (and, as I had to realize, in a lot more places) and generating non-undeclared array declarations instead of undeclared non-array declarations for ReDim statements on arrays without a previous declaration.

I also took the liberty to strip the parentheses from the `AsTypeName` of functions and properties returning an array. This was in
> Now, I have fixed the two remaining resolver issues I wanted to deal with in this PR, the `MemberNotOnInterfaceInspection` not working for procedure arguments (and, as I had to realize, in a lot more places) and generating non-undeclared array declarations instead of undeclared non-array declarations for ReDim statements on arrays without a previous declaration.

I also took the liberty to strip the parentheses from the `AsTypeName` of functions and properties returning an array. This was in
[rubberduck-vba/Rubberduck] build for commit 3a915a48 on unknown branch: AppVeyor build succeeded
 
4:40 PM
@Duga Forgot to commit my last changes.
 
The parens were more of a visual cue in the RD cmdbar that the selected variable/member is/returns an array though. Does the cmdbar label indicate IsArray status without it?
 
[rubberduck-vba/Rubberduck] build for commit 617b27f0 on unknown branch: AppVeyor build succeeded
 
5:17 PM
I don't know.
However, array variables never had parens in their AsTypeName.
Array variables show like bar() (variable:Long) and array returning functions showed as Foo (function:Long()).
That is really inconsitent.
Both should have Long() and none parentheses in the name.
Btw, there is no test specifying what the presentation should be.
 
5:36 PM
[rubberduck-vba/Rubberduck] build for commit 6aa489bb on unknown branch: AppVeyor build succeeded
 
5:55 PM
@M.Doerner ah, all good then - the parens must be added by the statuslabel currentselection formatting code
 
 
1 hour later…
6:58 PM
I found that already, in the ContextFormatter.
Do we want to preserve the current behaviour that the parens for variables are at the variable and not at the type?
It would be easy to switch it around or the add the parens in the type name.
 
7:13 PM
Both options would actually simplify the code.
I think I will add the parens to the type as not doing this would complicate my fix for the command bar text of array returning functions.
Oh, how I love convert to switch.
That makes thigs so much more obvious.
 
7:29 PM
@M.Doerner works for me! :)
 
Should I keep adding the parens after the identifier name for array variables?
Personally, I do not really care much.
 
not if they're after the type too
 
OK, then they are gone now.
I hope I did not mess up on the refactoring of the formatter.
 
7:52 PM
IIRC that formatter was quite a dreadful sight..
 
Well, when it was written, string interpolation did not exist yet.
 
8:16 PM
[rubberduck-vba/Rubberduck] build for commit 02bda4f7 on unknown branch: AppVeyor build succeeded
 
9:10 PM
May be of interest:
0
Q: VBA inheritance

Alexander PlatonovI heard a lot of that VBA is lacking inheritance. I did a little workaround and now it seems to me that it is exactly what inheritance does. I'm far from pro =) and may be missing something. So I would really appreciate your thoughts about possible downsides. I was very surprised when found that...

 
 
1 hour later…
10:15 PM
@QHarr wrote an answer, hope it helps
 
10:32 PM
@MathieuGuindon It does. Thank you.
 

« first day (1905 days earlier)      last day (1275 days later) »