« first day (2300 days earlier)      last day (880 days later) » 

12:01 AM
still employed, ..for now anyway :)
 
RELOAD!
[rubberduck-vba/Rubberduck] 2 opened issues. 1 issue comment.
[Zomis/FactorioMods] 2 commits. 119 additions. 20 deletions.
[Minesweeper] New Users: 13, Games Played: 127, Bombs Used: 88, Moves Performed: 18468
 
0
Q: How to speed up a treeview population in Access?

leopardxpreloadI have the following function that causes a significant visual jittering and lag in my access database - This is a treeview selection based on data in a table (tblDATA) with the fields: Object | Attribute | Property | Value I have tried echo and me.painting but figured my actual for loops need to...

 
'@TestMethod("GuardClauses")
Private Sub Create_GuardsNullBindingContext()
    Test.ExpectedErrNumber = GuardClauseErrors.ObjectCannotBeNothing
    On Error Resume Next
        BindingPath.Create Nothing, Test.Path
        ExpectError
    On Error GoTo 0
End Sub

'@TestMethod("GuardClauses")
Private Sub Create_GuardsEmptyPath()
    Test.ExpectedErrNumber = GuardClauseErrors.StringCannotBeEmpty
    On Error Resume Next
        BindingPath.Create Test.BindingContext, vbNullString
        ExpectError
I think I'm onto something here
I'd like ExpectError to be part of the "expected error" test template, but it kinda wants a Test struct:
Private Sub ExpectError()
    Dim Message As String
    If Err.Number = Test.ExpectedErrNumber Then
        If (Test.ExpectedErrSource = vbNullString) Or (Err.Source = Test.ExpectedErrSource) Then
            Test.ExpectedErrorCaught = True
        Else
            Message = "An error was raised, but not from the expected source. " & _
                      "Expected: '" & TypeName(Test.ConcreteSUT) & "'; Actual: '" & Err.Source & "'."
        End If
    ElseIf Err.Number <> 0 Then
        Message = "An error was raised, but not with the expected number. Expected: '" & Test.ExpectedErrNumbe
 
12:33 AM
I feel like a heel not reading your article yet. Every time I try to start the honey-do list hits hard.
 
no worries :)
 
1:04 AM
 
so uh, I think I have a bit of an over-streamlining issue here
'@TestMethod("Bindings")
Private Sub Resolve_SetsBindingSource()
    Assert.AreSame Test.BindingSource, Test.ConcreteSUT.Object
End Sub

'@TestMethod("Bindings")
Private Sub Resolve_SetsBindingPropertyName()
    Assert.AreEqual Test.PropertyName, Test.ConcreteSUT.PropertyName
End Sub
actually, the way to test functionality that's already executed in TestInitialize, is to explicitly spell out the test setup - not to just assert the test state
in this case, the Resolve method is invoked in BindingPath.Create
'@TestInitialize
Private Sub TestInitialize()
    Dim Context As TestBindingObject
    Set Context = New TestBindingObject

    Set Context.TestBindingObjectProperty = New TestBindingObject

    Test.Path = "TestBindingObjectProperty.TestStringProperty"
    Test.PropertyName = "TestStringProperty"
    Set Test.BindingSource = Context.TestBindingObjectProperty

    Set Test.BindingContext = Context
    Set Test.ConcreteSUT = BindingPath.Create(Test.BindingContext, Test.Path)
    Set Test.AbstractSUT = Test.ConcreteSUT
 
1:54 AM
@IvenBach re test naming scheme: I'm naming the test module per the SUT (e.g. here BindingPathTests), and the tests each begin with the method being tested followed by an underscore and the expected behavior. So far I've successfully avoided the boring GivenThisThenThat naming scheme =)
 
2:21 AM
@MathieuGuindon A very non-trivial article Mug. Wading my way through it.
Were it not for my RD contributions I'd entirely lost.
 
2:40 AM
I did well to tag it "advanced" then :)
showing a non-trivial example was exactly the idea though
basically that MVVM article is showing how MVVM might work in VBA, i.e. how to use this API / "framework" I'm working on
I've had several comments over time, asking for more meaty stuff
so, that was it
 
I think the whole plate for this article was meat. Except for that sliver where you mentioned the RHS-checking.
 
 
2 hours later…
5:00 AM
In compiled environments when a class depends on an interface in another assembly the only time the assembly youre working on needs to recompile the refenece to the other assembly is when the public interface changes?
 
 
4 hours later…
8:45 AM
@IvenBach this isn't specific to the class/interface -- any kind of changes in the referenced assembly will require the referencing assembly to be re-compiled.
There's an interesting behavior I wasn't aware until RD pointed it out. I'm getting lot of inspection results for this inspection. They all have the same message; Error: Member 'xxx' has a 'VB_VarHelpID' attribute with value(s) '-1', but no corresponding annotation.. The common thread is that those are WithEvents variable. Seems to me Access automatically adds it. I tested in Excel and apparently it doesn't there.
Actually, no, not just Access. It was reported as happening in Excel, too.
I'm of mind that we should be able to ignore the inspection but only when it's VB_VarHelpID = -1. I don't want to ignore the inspection for other situation (including when it's not -1 for a VB_VarHelpID).
 
9:11 AM
> Given the code:

```
Public Sub x()
Debug.Print "Done validating the configuration at " & Now()
End Sub
```

This yields an inspection:

```
Error: The expression 'Now()' requires a default member access, but the type 'Variant' does not have a suitable default member.
```

Note that if `Now()` is changed to `Now`, the inspection disappears.
 
 
2 hours later…
11:09 AM
> I will have to look into this. This result should never be returned for Variant, apart from the fact that this is not a default member access.
 
@MathieuGuindon Isn't using the _ in VBA method names frowned upon?
 
@FreeMan it'd be a problem if we wanted the test modules to implement interfaces. I doubt we have a legitimate reason to do that. But if you don't want to risk that, we can be creative.
Public Sub Test it()

End Sub
for example
 
11:29 AM
Ah, ThunderCode™ with an &nbsp or something in there, right?
 
>:D
 
 
6 hours later…
5:13 PM
Edge case. Refactoring a module variables name rewrites the entire modules contents. Do we currently have the ability to track where bookmarks have been placed? That way we can restore them after the renaming has occurred?
 
5:26 PM
Interesting point, @IvenBach. Surprised I've not run into that. Does it impact break points, too?
AvalonMentions++
 
It does also affect breakpoints.
I too am surprised I never had this occur till just now.
 
5:40 PM
@duga posts new feature request in 3... 2... 1...
 
> **Rubberduck version information**
Version 2.5.0.20232
OS: Microsoft Windows NT 10.0.18362.0, x64
Host Product: Microsoft Office 2016 x64
Host Version: 16.0.4978.1000
Host Executable: EXCEL.EXE

**Description**
As part of renaming the entire modules contents are rewritten. This unintentionally removes bookmarks and breakpoints from modules as part of the rewrite process.

**To Reproduce**
Steps to reproduce the behavior:
1. Create a module with a variable.
2. Place a bookmark and
 
actually, there might be a fairly old feature request by yours truly asking about restoring breakpoints after a refactor...
 
Feature or bug doubly documented is better than a "I'll log it later" comment in chat.
 
whelp, I've looked through all my open and closed issues and don't see one, so I guess this is new. Go Iven!
while rummaging about through my old bug reports, I noticed this one:
That didn't one box :( as expected Still doesn't work for me. Does it work for anyone else? It's been 4 years and at least 2 new machines since then.
Maybe MS broke/removed it. Have they touched the VBE in the last 4 years?
 
6:12 PM
thing is, breakpoints are nowhere in the VBE's object model
 
Gotta got spelunking for the proper bits in assembly to get that?
 
<pedant>There's no assembly. Just unmanaged code.</pedant>
But yeah.
there was some talk about using p-code but it's uncertain whether it helps or not.
 
I mean honestly #HHCIB?
Do we bring up host specific inspection results? Excel.Range.Find(...) reuses the last arguments for LookIn, LookAt, SearchOrder, and MatchByte. Worth bringing to the users attention as this just nipped me.
 
6:30 PM
yeah we do have few Excel specific inspections
note that there are 2 kind of specificity -- whether it's using Excel library or whether it's hosted by Excel
 
@IvenBach yep, I think that particular one's an open issue
 
Correct: github.com/rubberduck-vba/Rubberduck/issues/2333 by none other than Thunderframe. Predates my arrival by a few months.
 
6:49 PM
@IvenBach I did start looking into the in-mem layout of VBA at one point, I suspect there's some real gems in there, but it's wayne-level difficult to unravel.
its marginally easier using the VBA SDK, so you don't have a massive host address space to understand, but it's still... difficult.
In other news, I just signed back up with my university, I go back at the start of october.
 
Nice! New study?
 
no, finishing my BSc which I started in 2012 and got halfway through
next module is about web tech, but the syllabus looks ancient... PHP ffs... Just in it for the points :-(
oh, and the tuition fees have trebled since I was last studying :-(
 
well PHP is still used today so....
 
yep. glares at WP...
 
at least it's not JavaScript?
 
7:03 PM
Ohhh... that too
not even in node.js form either. no angular, nor react, just basic JS. Plus Html and CSS. Gotta learn the basics I guess...
 
yuck
 
yah, its gonna be a slog
otoh, the "proper" programming course they do (which I already completed) were Java, so I guess I shouldn;t expect great things :-)
 
FWIW, i think doing vanilla JS is the right thing to do
 
Just gonna focus on it being one of 6 to go :-)
 
if they teach you TypeScript and you get a buggy GitHub Month-Of-The-Flavor™ JavaScript TypeScript, you'll be bugged when it throws a obscure error.
 
7:07 PM
TBF, their algos module is proper comp-sci... Wasn't prepared for its intensity when I tried it, bailed...
@this yeah, fair point
 
gonna to know the actual workings before you can abstract, that's what I think.
 
Always makes me laugh when people hate on VB*... Why not send that hate where it's needed - Java, Javascript and PHP ;-)
going back to looking for gems in the VBA space though, quite tempted to do some more archeology. Feel like I've forgotten a fair chunk of what I found in the past. I should have written it up on the wiki...
There are docs out there on the interwebs that are rapidly disappearing, each with breadcrumbs. Some only exist on archive.org now
 
 
2 hours later…
9:45 PM
OMG IT BALANCES AT LAST!!!!
Querying the Shopify data to export Sage 300 journal entries, into a pretty complex GL structure - it's been months
 
i imagine reams of unit testing was needed
Congratulations!
 
@this ha! I wish! It's all T-SQL!!
 
why not tSQLt?
 
eh, the thing works for now - but yes absolutely needs to be ported to C# with tests and source control..
actually, IDK
it's a rather large script, but it'll read like plain common sense once cleaned up
 
nonetheless, be happy!
#WorthIt
 
9:57 PM
The sheer joy when I saw it all consistently added up!
So, deposits done. Now sales...
(Half-kidding: it's 95% done now)
So yeah, what a weight off!!
 
10:19 PM
@MathieuGuindon in your article you use Variant for some of the interfaces argument types. Was that done in order to allow whatever type is needed? Whether that’s a String, long, int or even object?
I think I had the realization you didn’t use object because that would exclude value types.
While .Net has everything inherit from object which is why that is .Nets generic type.
docs.microsoft.com/en-us/office/vba/language/reference/… mentions nothing but doesn’t include object.
 
10:55 PM
@IvenBach exactly this! =)
 
11:10 PM
I’ve learned more than I’ve realized.
Still feel like I’ve a long time to learn more. A lifetimes worth.
 

« first day (2300 days earlier)      last day (880 days later) »