« first day (1278 days earlier)      last day (628 days later) » 

12:00 AM
> @IvenBach nice findings! Keep it up, I smell a bugfix PR coming! :smiley:
 
I'm swampied with getting my semi-fubard C#6/7-ification PR back into line.
 
RELOAD!
[rubberduck-vba/Rubberduck] 2 opened issues. 3 issue comments.
[Zomis/AdventOfCode2017] 1 commit. 546 additions.
[Zomis/factorio-posts] 6 commits. 41 additions. 22 deletions.
 
@IvenBach if possible, close these PR's and redo them to merge into the Staging branch instead of Next; that way they'll all go at once in Next
If not then.. just keep going =)
 
github.com/rubberduck-vba/Rubberduck/tree/staging is for large PR? Or is this an updated way to PR in?
An extra layer of protection against breaking the build via PR?
Something just feels wrong when I don't see the RD splash window. VBA feels nekked without it.
3
 
12:29 AM
Note to self and maybe you too: Sometimes you work so hard, for so long, that you don’t recognize you’ve already accomplished a dream you once thought impossible. Don’t forget to celebrate and be grateful.
 
12:40 AM
You're amassing your duckling army.
 
I thought it was appropriate... given the number of open issues, taking a step back and looking at what's there (that works) is kind of a motivational booster =)
FWIW every muscle of my back is in pain ATM, I'm not going to have a very long evening.
 
This is the price you pay for getting old.
You should just stay young, don't age.
 
Home Time.
 
2:04 AM
@Mat'sMug just so you know on the Github vine...like the sponsorship suggested earlier for Halloween. Here’s Christmas verison which GitHub partnered with a company 24pullrequests.com and alternate way to promote RD too.
 
 
2 hours later…
4:27 AM
 
0
Q: Private storage for at-rest data in VBA

thisOne major annoyance in VBA programming is that it's hard to keep a secret secret. In this particular case, it's the ADODB.Connection. For reasons not germane to the post, it is necessary to be able to re-create new instances of ADODB.Connection, which also implies filling in the connection string...

 
 
2 hours later…
6:41 AM
 
 
4 hours later…
10:52 AM
Hey, I have a question about error handling in case somebody knows about it
why if the error is raised on a class method, VBA bubbles up all the way to the module that was using this class? I need to handle the errors locally, anybody knows how?
 
@NelsonVides You can use an error handler:
On Error GoTo ErrHandler
   ' ... some code here

	GoTo CleanExit
ErrorHandler:
    Dim error As Variant ' don't know the type off-hand
    error = Err()
    Debug.Print error.Message
    Err.Clear()
CleanExit:
    On Error GoTo 0 ' clear error handler
End Sub
^^ something similar to that should work.
note that I've never written one of these, so it might be quite a bit off
 
11:28 AM
all looks fine, the annoying issue is when it comes back to the module and doesn't tell me in which like of my class method the error was raised :(
 
break on unhandled errors?
 
yeap, it's checked
Different question. Any of you have some nice article/online-course/book about SOLID and GRASP principles?
 
12:10 PM
Bubbling will happen if the innermost procedure has no error handler or it has threw an error inside its error handler and the calling procedure has its own error handler.
Or you can simply have no error handling at all
for a complicated application where you need a professional error handling, buying vbWatchdog may be worthwhile.
 
12:35 PM
Oh, never heard of this vbWatchdog!
How hard could it be to add such a functionality to Rubberduck? xD
 
Wayne wrote something named V-COM where he can more or less write a DLL builtin in C++ code, saved as base64 string inside the VBA class module, which is then loaded into the memory and thus is used like a real COM object. That's how his products works without requiring any external DLLs.
We also use another product from him for dynamically loading .NET runtime & a specified assembly at a certain path at runtime, so we don't have to reference anything in the VBA project and it still works. Heck, it even can raise events without early-binding (something that's impossible in straight VBA)
 
which product is that one that we use?
 
Sorry.... We = my company
not RD
Wayne does not license his products with GPL, so it's incompatible.
 
right, got it :)
who's Wayne?
Batman?
 
the guy behind vbWatchDog
and that.
he could very well be the batman give the stuff he knows about COM....
 
 
1 hour later…
2:00 PM
@PeterMTaylor "project was already suggested" ..nice! =)
 
2:14 PM
one nice thing about Mat's private This variable is that binary serialization is much easier and can be made generic.
 
2:47 PM
Anyone have a good resource on conditional data validation? X = Foo use List Foo, else, use List Bar? I know it has something to do with Indirect.
Currently I have a bunch of events doing the work, and I would like to trim that out as much as possible.
I might've found something actually, gonna give it a go and hope this doesn't blow up.
 
 
3 hours later…
6:18 PM
@BrandonBarney Fail Fast. Best way to learn?
 
It definitely doesnt hurt to fail if you can pick yourself back up and learn from it, but I definitely prefer having guidance over just throwing myself on my face and hoping to learn something from it.
 
Hey! Look at that large steamroller of a problem over there. Don't worry I'll stop it.
 
6:36 PM
lol
I have something super weird happening with my projects. Recently I started developing projects while they are housed in a network drive. Occasionally its like my VBProject gets rolled back. I feel like I am going crazy here or something.
A bunch of code I know I just edited is gone.
Actually, it may be happening after using RD's rename. Any way to test that? Almost as if the cache doesnt properly reflect the code before the rename is called?
 
7:02 PM
I work with a redirected desktop and haven't had any issues like that. Some goes with working on files that are remotely hosted.
 
Any known issues with the rename function in RD if Re-Parse isn't called before using Rename?
 
Let me check
As in you change or edit some code and the don't reparse before running Rename. That will most definitely cause some issues.
 
Yup, I rarely reparse before using something in RD. I didnt know there was a need to. Is there a good reason to not have RD call the re-parse on its own?
 
for me, it can take up to 5 seconds to parse
 
The time it takes to reparse can be prohibitive if it were to actively run on every keystroke.
 
7:07 PM
That's why we're all nagging Mat to get avalon code panes working. :)
 
For me on a couple files it's 7-10 seconds. I've had a couple with 15 seconds.
 
Not reparse on every keystroke, but only before allowing a command such as 'Rename'
 
TBH, one'd think it'd be automatic
 
It could be called before displaying the window.
 
but then again, I'm not sure it is always reliable.
 
7:08 PM
I would think it to be automatic as well.
 
Somethings nagging me as to why but I can't remember.
 
yeah before the dialog would work
 
Which is why I never though to run it before using rename.
I will now of course, but there any many users who won't realize thats happening.
 
^
Any time I need to use RD to do something I make sure to reparse.
 
It just seems so clunky.
 
7:09 PM
i have to agree
see the command available, ok I can do it now
 
Exactly
 
Open an issue for it, that way it's not forgotten in the anals annals of time.
 
^ !
 
^^ I'm glad you fixed that lol
 
cough words... cough
Wondered about the red squiggly.
 
7:11 PM
for "annal"? Dictionary not always the smortest
 
> RD should prevent the user from using Rename until the project has been re-parsed. Ideally, RD would re-parse before allowing for a Rename (ideally, check if a reparse is needed first), but at the least there should be a warning, or a disabling of the option. Not reparsing beforehand can result in code changes being removed once the RD rename runs.
> Clean parse with code.
![cleanparse](https://user-images.githubusercontent.com/26076874/33625842-c8017dd4-d9ad-11e7-8979-0fc35c3c2489.PNG)

Some edits made without reparsing
![lineschangedwithoutparse](https://user-images.githubusercontent.com/26076874/33625845-cd7a73f6-d9ad-11e7-993a-ad769b1f55d2.PNG)

Running `Rename` without reparse produces. `bar` changed to `duk`. Note elimination of `SomeMethodCalled` along with lines being squashed back together.
![renamerun](https://user-images.
 
@Duga @BrandonBarney I often forget MVCE.
 
7:36 PM
> The components dialog seen below comes up any time I use the `Find Symbol` hotkey for the first time. Thereafter `Find Symbol` is displayed. ![image](https://user-images.githubusercontent.com/26076874/33626640-094dce30-d9b0-11e7-979a-0e7fbdc0b734.png)

Rubberduck version: Version 2.1.1.2502
Operating System: Microsoft Windows NT 6.1.7601 Service Pack 1, x64
Host Product: Microsoft Office 2013 x86
Host Version: 15.0.4971.1000
Host Executable: EXCEL.EXE

I need to close Excel down compl
 
8:24 PM
#TIL #PivotTableSlicer
 
 
1 hour later…
9:48 PM
?TypeName(StrPtr("abc"))
Long
shouldn't be surprised but gee whiz, do they have to make it extra fun to guess?
 
10:05 PM
@this I assume 64-bit windows would be LongPtr?
 
in the object browser it does show as returning a LongPtr (even on a 32-bit application)
 
and a Long in VBA 6.x
 
so somehow, it is able to know that there's a LongPtr being returned by that function but TypeName can only see the resolved type. AIUI, LongPtr is not a real type but merely an alias
Right.
 
Hi @Smith
 
@Smith Welcome to the pond.
 
10:08 PM
IDK how the object browser knows but if it can know, then it seems to me that TypeName should be able to know that it's going to be a LongPtr. BTW, TypeName(aVariableDimdAsALongPtr) will return a Long, too. (at least for a 32-bit Office application)
Welcome, Smith
 
Hey there, @ThunderFrame, @this. Don't mind me, I have no idea how I ended up here. Didn't even know that stackoverflow had chat rooms until a few minutes ago.
 
No worries. You found the besterest room there is.
 
10:29 PM
Oh of course I did, I found my way here from @Mat'sMug's profile. I finally figured out the ridiculous error that has been haunting me for the last two weeks and the cause was so incredibly stupid that I was looking for some insight from a higher power
 
Stick around this pond and you'll learn lots more.
 
10:42 PM
@Smith would love to hear what the problem was, and what the fix was
 
0
Q: VBA Delete Duplicates

ShahzebI am using this code to delete duplicates, however, for a large set of data this is too slow. dim dup as variant, r as long, lncheckduplicatescolumn as long With wb_DST.Sheets(sWs_DST) lncheckduplicatescolumn = .Cells(.Rows.Count, "A").End(xlUp).row for r = lncheckduplicatescolumn to 2 ste...

 
it might be something we can build into Rubberduck
 
@ThunderFrame I presume you mean reflecting the data type, not deleting duplicating. :) Well, VBA is in a dire need of a reflection API but that's whole another project....
 
huh, this doesn't compile:
    public enum FormPropMaskDefaults
    {
        Unused1,
        BackColor = 0x8000000F, //// 2.5.3 BackColor - COLOR_BTNFACE from the system palette
    }
but this does:
    public enum FormPropMaskDefaults : uint
    {
        Unused1,
        BackColor = 0x8000000F, //// 2.5.3 BackColor - COLOR_BTNFACE from the system palette
    }
Is that the required way to allow an enum to specify uint values?
 
@ThunderFrame I must be blind. I don't see a difference?
 
10:46 PM
2nd one inherits from uint
 
oooh!
Totally missed that
Yeah my blind day today.
hmm but why the F, though?
If this is right, you're asking for a float literals
and you're trying to stuff it in an integer enum?
 
@this - but enum docs say "The approved types for an enum are byte, sbyte, short, ushort, int, uint, long, or ulong. "
I want to specify a uint, in hex.
 
yeah the point is that you are forcing an unnecessary implicit cast from a float to .... whatever?
if you removed the F, does same thing happen?
(TBH, I never had to add a type character in my C# so far.... But then again, I'm very lucky unlucky).
 
@this F is a hex literal, not a float hint
(I hope)
 
not according to the link i passed above
oh wait
i bet that's it.
could it be misinterpreting the last F as a type declaration?
which would be very lame....
 
11:15 PM
@ThunderFrame, I'm happy to oblige, someone needs to hear this story.

I was receiving an error randomly in my userform when hitting a command button, the super descriptive "The object Invoked has disconnected from its clients". Which, for some reason, causes Excel to behave very erratically after it happens. And I could not for the life of me figure out what was causing it, because it happened after the sub ran. It'd run everything just fine, and then just error out and throw me out of the userform completely. I'd get the error on the line for frm.show vbModal.
 
11:40 PM
@Hosch250 I'm wrecking my duck-sized peanut trying to work through hangman. Progress is being made.
 
LOL, OK.
@ThunderFrame Correct.
@ThunderFrame Yes, that is correct.
All enums are int by default. The only way to override it is to specify the type like that.
 
@Hosch250 thanks
 
So, what's the problem here?
You are putting a too-large integer into an int enum. I'd kind of glad that it does error out :)
 
seems I still have to cast the uint inheriting enum, when using the enum...
 
@this Nope, it is not interpreting it as a float.
@ThunderFrame Correct.
Because 0x8000000F is ‭2,147,483,663‬.
The largest an int can go is 2,147,483,647.
Notice that the first is greater than the second by 16 points.
Or whatever you call an integer step...
Therefore, you can't put that value in an int enum, but only a uint or long or ulong enum.
Because those values are large enough to hold it.
 
11:49 PM
yep - it's just that the enum docs were clear about being able to use uint, but not how to go about implementing it
 
Basically, that value results in an integer overflow in a normal int :P
That's because next to no one needs to actually do it :P
I learned how when writing Roslyn analyzers.
 
google/SU got me the inheritance syntax, but wasn't sure if that was the right/preferred approach
 
Yup, it's right.
Basically, if you can do something like that in C#, it's the only way to do it.
 
@Hosch250 I feel special now...
 
> That's how v1.x worked: before you could use any feature it would reparse, showing a blocking dialog so that there weren't code changes during the parse. As 2.x introduced asynchronous parsing the blocking dialog was eliminated, a manual *refresh* button was added, and the user is now in charge of deciding when RD should parse.

Now that the parser only processes modules that need to be processed, the cost of a reparse has significantly dropped, but we would have to reimplement the blocking
 

« first day (1278 days earlier)      last day (628 days later) »