« first day (347 days earlier)      last day (2833 days later) » 
00:00 - 16:0016:00 - 00:00

4:01 PM
@Hosch250 you might need to go 1 parent up
 
But then I leave the scope of the method, into the class scope, and that will mess things up.
 
not sure I follow here. Public Sub is part of the SubStmtContext
and RaiseEvent is part of the RaiseEventStmtContext
 
I don't know, it but isn't picking it up.
@Mat'sMug Where are you getting the icons? I'm trying to add the icon, but I'm not seeing the reorder parameters icon anywhere.
 
Resources/Microsoft
 
4:16 PM
OK.
 
I need to make them transparent PNG's
...but I'm not sure I'm allowed
OTOH I'm not sure we have a legit license to even use these icons anyway
 
Got it.
 
@Mat'sMug Microsoft uses GPL, right?
:)
 
think so
 
[retailcoder/Rubberduck] Hosch250 pushed commit 4bc94219 to next: Reorder Parameter gets Icon
\[[**retailcoder/Rubberduck**](https://github.com/retailcoder/Rubberduck)\] [**Hosch250**](https://github.com/Hosch250) pushed commit [**2904897b**](https://github.com/retailcoder/Rubberduck/commit/2904897b911e023e74bd4eba26e21310ba954df5) to [**next**](https://github.com/retailcoder/Rubberduck/tree/next): Merge pull request #526 from Hosch250/next

Reorder Parameter gets Icon
 
4:24 PM
Almost 2/3 done with 1.4.
 
4:38 PM
> For that matter, we might as well have a warning that classes are named the default "ClassX".
 
@Duga what about CommandButton1 and TextBox1?
#TheresNoEndToThis!
but I agree
 
@Mat'sMug Quick question about github.com/retailcoder/Rubberduck/issues/457
Does that only need to be changed in one location?
The TestModuleEmptyTemplate of NewUnitTestModuleCommand.cs?
 
> Related: #31 Use Meaningful Names inspection
 
I just fixed that, but does it take more than that?
 
@Hosch250 here
 
4:43 PM
Yeah, just changed that.
 
that should be the only place to change it
 
What about existing unit tests?
 
too bad
 
OK.
 
@RubberDuck right?
 
4:46 PM
[retailcoder/Rubberduck] Hosch250 pushed commit 7b8210de to next: New unit tests work, old broken
\[[**retailcoder/Rubberduck**](https://github.com/retailcoder/Rubberduck)\] [**Hosch250**](https://github.com/Hosch250) pushed commit [**b081d154**](https://github.com/retailcoder/Rubberduck/commit/b081d154608ceb42ab0c637bffa99383292d4184) to [**next**](https://github.com/retailcoder/Rubberduck/tree/next): Merge pull request #527 from Hosch250/next

New unit tests work, old broken
 
1.4 is 66% complete.
 
lol don't get too excited ;)
 
No, but it better be getting close if we release on the 30th.
Any ideas where to register for the CTRL-Z shortcut?
Also, does refreshing the parse result only refresh the changed data?
 
@Hosch250 nope
 
OK.
It can't be that hard, unless you don't know what to do...
 
4:50 PM
@Hosch250 parser doesn't re-run on a module if its contents' hashcode still matches the cached value.
 
OK.
That is great.
 
but identifier resolution still walks all parse trees.
 
OK.
 
@Mat'sMug right what? I'm just catching up here.
 
7 mins ago, by Mat's Mug
too bad
 
4:52 PM
Are we going to update existing unit tests, or no?
 
Ahh yes. That's the one and only change that needs made.
 
OK, made it.
 
@Hosch250 No. It's an API breakage.
 
OK.
 
Besides, shouldn't the rename refactoring handle it pretty well?
 
4:53 PM
Not sure.
 
Just need to be sure to doc it well in the release notes.
 
@RubberDuck uh...
 
lol. Should I have not asked that?
 
well there's no Declaration object for stuff that's referenced
so no
 
Awwww... bummer.
 
4:56 PM
otherwise one could rename ADODB.Recordset to ADODB.YoMama
 
That could be fun.
For some values of fun.
2
 
so, it's not a bug, it's a feature :)
2
 
Don't get to say that often enough.
 
9
A: How to get the "KeyPress" event from a Word 2010 Addin (developed in C#)?

Denis WesselsUnfortunately there is nothing built-in in the Word API or VSTO which can pick up key strokes, more info on this can be found here I've been searching for a feasible solution for some time but the best I could come up with was handling it through Windows API using hooks, it's likely you will rea...

@Mat'sMug Does that look right?
 
looks like our only hope, yes
 
5:04 PM
Favorited to keep it handy.
 
bookmarked
 
@RubberDuck Oh, OK.
 
Just be careful changing any of that code. We didn't write it and I honestly don't understand it with 100% certainty.
 
OK.
 
5:05 PM
@RubberDuck go to work for MS
 
@RubberDuck that's for picking up keypresses on the docked toolwindow, no?
 
I get the general gist of it and all, but...
 
the override is that of a UserControl - what we're looking at is a "key listener" for picking up keypresses in the code pane
 
I added key press handlers in my app, so I understand a lot of it.
 
@Mat'sMug yes, but there's code that let's us get a handle on a code pane. and the same theroy could be used to capture the keypresses.
 
5:06 PM
OK, I won't touch that then.
 
@Hosch250 if you go in there, bear in mind that we'll want to use that to completely change the way we determine if a module is "dirty" or not
 
Lunch time, and maybe chasing rare birds this afternoon.
 
reading the whole module's content into a string just to get a hashcode is costy
 
Will read a bit longer, and maybe post on SO if I need to.
 
5:08 PM
@RubberDuck oh
 
I'm not saying that the SO code isn't the right way to go. Just that we have some code that might be useful.
 
Yeah.
 
so basically we had all the pieces lying right there in our faces all this time, huh?
 
Is there anyway to just reparse the active pane?
No, that wouldn't work, I don't think.
I don't think CTRL-Z makes the edited pane the active one.
No, it doesn't.
 
@Mat'sMug Yeah, which I knew just haven't had time for (or been brave enough) to tackle yet.
 
5:15 PM
@Hosch250 You keep saying Ctrl-Z, I keep hearing Undo. Am I missing something?
2
 
> @Hosch250 @retailcoder I'd still like to hear thoughts about how else I could go about the SC integration in regards to this.
 
@Hosch250 the problem to solve is knowing which modules were modified since the last parse.
And then the other problem would be to avoid walking all parse trees to resolve identifier references.
^^ that's what really costs actually
 
@Mat'sMug sounds like a job for a visitor. You could specify which ones to walk.
Trouble would be figuring out how to tell it which ones to visit.
 
@RubberDuck by parse tree I mean module
 
Oh.
Nevermind. =)
 
5:22 PM
There's one parse tree per module
 
sigh
Dude..... I told you already.
 
With a key listener we could use pauses in typing to launch parsing+resolving on a background thread
 
good feedback on comments and splitting out some of the statements into a function; something I should probably be doing more. I don't understand why DoEvents is "hacky". Can you recommend a better method than DoEvents that would not be "hacky"? What I meant about finding in testing is I was having a problem where occasionally properties weren't being captured. This was tough to troubleshoot because sometimes .Get2 executes immediately - but other times it takes upwards of 2 minutes to return. VBA does not wait for this return, which I solved with the DoEvents loop. — CBRF23 1 min ago
 
@CBRF23 VBA runs on a single thread, it cannot possibly be awaiting (as in async/await) an API call. — Mat's Mug 11 secs ago
 
@Mat'sMug Yeah. I know... the whole of it is weird and he needs to ask on SO about that.
 
5:28 PM
Could be that the api is async though
 
And it's returning through a ref param.
I think that's the source of the problem. I recommended that he use the version that returns a bool to see if that would block it.
 
Exactly
 
Busy working on the reorder parameters now, leaving in a few minutes.
I made a change which both broke it and sped it up by a TON.
I don't get why it broke it yet - it shouldn't have.
Will finish soon (hopefully).
@RubberDuck (in response to message on GitHub) - I don't have any comments - I don't know the details.
 
@Hosch250 something like this: Sub Process() : Exit Sub : End Sub?
Fast, yet not quite working as desired...
 
No.
 
5:43 PM
:)
 
@Hosch250 sounds like you're skipping the "parse" part ;-)
I mean, that would break it and speed it up by quite a bit
 
6:04 PM
> Not quite true. You can call functions via their actual pointers using the WinAPI.
@RubberDuck but that has limitations that the Delegate class overcomes ;-)
 
6:16 PM
"If you're not empowered to do your best work, find a place where you are." - @anoemi from @StackExchange #CMXSummit
Sheets is a Collection of sheets of type Worksheet and Chart. #Excel #VBA http://t.co/Z71M7oDEWY
 
@StackExchange Clear like mud.
52
A: What is your best programmer joke?

ZeeDocumentation is like sex. When it's good, it's very good. When it's bad, it's better than nothing.

2
 
@Phrancis lol it's actually a very good advice. Many VBA programmers iterate the Sheets collection and then ask on SO when their code blows up because one of their sheets is actually a chart.
 
Ahh
 
6:39 PM
> @ckuhn203 I don't see the issue when it comes to source control. Could you please elaborate? Were you expecting to create a folder in the repo with the name of the project and put all source into that folder? If the user wants to leave the project called `VBAProject` let them. If they run into conflicts later because they need to maintain two projects in a single repo then they'll be forced to rename it when they need to.

Like with what @Hosch250 said, and as @retailcoder pointed to #31, th
 
> Rubberduck shouldn't explode just because I didn't want to use meaningful names from the start.
he has a point ^^
 
I know he has a point, but right now, I don't see a way around it.
That's why I'm asking.
 
TBH I'm not sure what you're asking exactly
where are the files exported to?
I think I have an idea
 
> VBProject.Filename refers to the file name of the Office document that contains the VBA code. Perhaps we can use that path and sanitize the name of the document, create a subfolder with that sanitized name (perhaps suffixed with .VBA), and problem solved?
 
if the project isn't saved, it can't be under source control, right?
 
6:50 PM
> @robodude666 right now, when the Source Control panel is first loaded, RD tries to find a repository in the user settings that matches the project that is currently active. For reference, [this is the `IRepository` interface][1] that is used to serialize the data.

public interface IRepository
{
string Name { get; }
string LocalLocation { get; }
string RemoteLocation { get; }
}

Now, when the UI gets loaded, it matches the `VBProject.Name` to the `R
 
@Duga Maybe...
@Mat'sMug Why not? Of course it can be. It can be exported to a repository and live there. It would just need to be imported into a new VBProject when you want to work with it again.
 
then Filename wouldn't work.
I think it's a fair enough restriction to have, asking user to save before they can commit.
requiring a physical location somewhere for the VBProject's host document helps I find.
 
> For the record, I'm not suggesting that any of those other "issues" be a show stopper, but as currently designed, not naming your project is a show stopper if you want to leverage the integrated source control feature. It would affect just this feature.
> I find requiring the user to save their Office document somewhere is fair enough of a restriction to impose; it would move the problem from VBProject.Name to VBProject.Filename, and the latter can only be unique on a given computer. The only thing is that you can no longer have a repository for a project that you didn't save somewhere, which I would have no problem with as a user.
> That sounds fair enough to me. Any suggestions on how to handle a host document being moved?
> If the host document cannot be found, that's when you prompt the user for it :wink:
> And re-write the existing sourcecontrol.rubberduck entry. Sounds like a plan. Definitely worth trying.
 
good grief I'm bored today.
I don't like baby sitting hacked together one off scripts.
 
that makes two of us.
 
7:00 PM
Misery loves company.
 
@Phrancis And I thought following commentary here was a time sink...
 
@RubberDuck In-between boring and tedious tasks here, I've been doing research for the new mod Mythos we are working on
 
I'm just sitting here wondering when I'll get my "meet my fate" meeting invite.
 
@RubberDuck it's when now? thought it was if...
 
@Mat'sMug Everyone gets a meeting one way or another.
Everyone in my area has already gotten their meeting invite. All the meetings are supposed to be tomorrow.
 
7:10 PM
and you haven't had one? (don't tell anyone around you!)
 
No. I've not gotten my invite yet.
Well, that's the thing. It's a restructure, so everyone has a meeting to find out what their new role will be or if they even have one.
My boss isn't here today, so... not really sure what to do at this point.
 
@RubberDuck freshen up the resume. One way or the other, that won't hurt.
 
@FreeMan I did. Been looking for over a month. Exactly one bite, but that was for a 3 month contract.
I couldn't take it because... well... I didn't know if I'd be throwing away full time work.
 
don't you have RD on your work laptop?
 
No. Removed it after the conference.
 
7:16 PM
ah
 
With the last job, there was a major restructuring closing of an office. They left a few of us working from home. Took a year of steady looking, but I found the current position. It'll work out...
 
Figured I get distracted enough as it is.
I'm sure it will @FreeMan. I'm just worried that I won't get to code for a living anymore.
That would seriously crush me.
 
@RubberDuck something will come along - I've had to look far to many times to believe it won't
@RubberDuck Nah, it'd just be a short term annoyance.
 
I don't code for a living anymore, and I'm still happy! There's a life after code!
 
@Mat'sMug blasphemy
=;)-
 
7:20 PM
actually what worries me most is that if anything goes boom with the job I have now, that I'd have to take a paycut to get back into coding
how much does a VBA/VB6/C# programmer make anyway?
 
A C# programmer makes what I do already at an entry level.
VBA/VB6 seems to be way undervalued.
2
And it also doesn't help that "I'm not IT"
pffffftttttt. Could have fooled me.
 
"I'm not IT" either
 
I laughed at the last person who told me that. Like, literally laughed in their face.
Because the last time I checked, I write code every day.
 
7:46 PM
-1
Q: DAO recordset effiency

mrbungleI have a form that consists of about 60 fields that all update when choosing a different customer from a drop down. I feel like my current way is not the best way as it takes about 30 seconds to update when changing customers. Currently I have Private Sub ClientSelection_AfterUpdate() On Error...

 
Ah, I somehow missed the ms-access tag
All yours bored buddy
 
Yeah. I honestly don't know how to fix it rightly... I don't DAO. I ADODB...
 
Doesn't Access use DAO?
#IHateAccess
 
Yeah, internally it does, but I rarely interact with DAO recordsets. Everything is on my server where ADODB is easier to work with 99% of the time.
Although, because Access loves DAO, sometimes it's just the right choice.
 
8:01 PM
Does it not support parameterized queries?
 
No. It does not.
 
no shit
 
No shit.
 
D:
 
8:11 PM
But it's also not the SQL injection nightmare you would think it is. Damn near everything is a malformed query...
2
 
((parenthesis) ((Access) (likes)) its (parentheses)) (((It) (also)([has a]) strong ((love) of) [square](brackets)))
3
 
21 mins ago, by Mat's Mug
#IHateAccess
 
((I thought)(that was(Lisp))(there(for a(moment))))
 
((that)() to[o])
 
Okay. Had a great talk with a guy that turned me down for a job. I need to revamp my resume a bit.
And I just my date with destiny too.
10:00 tomorrow.
 
8:24 PM
best of luck mate
 
ditto
 
@RubberDuck Nice of him to talk with you about it.
 
@FreeMan It was. He might have just given me what I need to get my foot in the door somewhere.
 
**3
 
He also asked me to send him an updated copy for him to put on file. He has something coming up in August and if one of the jr devs they just hired don't work out, he said he'd call earlier.
 
8:31 PM
@RubberDuck If it's not too much asking, do you think I could see it once you're done? I'd love to have a model to work from as I have not really applied for IT positions except just once and it was more like hardware support job
 
@Phrancis For whatever it's worth.... sure. Ping me @ ckuhn203 @ g
 
ah what the heck, answered as well
 
I though these had been resolved in 1.3.0.1...
 
@FreeMan what has?
 
sorry, took a minute to figure out which image I'd just captured...
 
8:38 PM
hmm
maybe it's getting confused with VBA.Financial.Rate
 
mebe...
maybe so... changed it to MyRate and the error went away.
sorry, the Code Inspection issue
 
@FreeMan no repro here with Rate
Public Function ResponseRate(ByRef year As yearflag, ByRef ps As printstate) As Single
    Dim rate As Single
    rate = 0
    On Error GoTo ErrHandle
    rate = responsesGenerated(year, ps) / ApptsComplete(year, ps)

Exit_Here:
    ResponseRate = Round(rate, 3)
    Exit Function

ErrHandle:
    Resume Exit_Here
End Function
0 issues found
build 1.3.5602.38613
 
I dunno, it's pretty consistent for me. Happening in Excel.
 
annoying
 
May 14 at 16:38, by FreeMan
I'm really bad at intentionally testing things, but I'm really good at stumbling across weird bugs!
 
8:46 PM
lol
@CosmicRay @FreeMan it's ok
 
in The 2nd Monitor, 32 secs ago, by RubberDuck
I've gotta go home. Can someone deal with this please?
That last edit makes your question off topic because its hypothetical code. And don't do that. Just craft a proper where statement. Don't do all those unions. — RubberDuck 1 min ago
 
9:29 PM
In case any of you guys are interested...
 
 
1 hour later…
10:39 PM
> Excel and Access LLC is now following you on Twitter
 
This is irritating me!
So, I have the line and column the cursor is on.
So, I get all declarations that have the same component name as the selection.
Then, I group by reference so I get all the IdentifierReferences and their Declaration.
Or something like that - anyway, I get them.
So I do a foreach loop over the resulting collection, and do a foreach over the individual declaration/IDR sets in each item.
So, I have two foreachs inside a foreach.
Then, I have to get the arglistcontext(s) from each declaration with a try/catch, and exceptions are expensive, I've heard.
So, it is performance expensive, only works halfway, and is annoying!
The code is mostly snippets from reordering the parameters too, so...
 
Done with this crud today...
 
I'm going to re-write from scratch again and see if I can't fix this once and for all.
 
@RubberDuck - I plan to upgrade to the newer Get4 function, but I would still like an example of how you would handle this without using DoEvents. At the time I wrote the code, Get2 was the latest procedure available - I'd like to know how else I could have handled the wait? @Mat'sMug - I would imagine something like you describe was happening. I don't have any way to tell. All I know is that I was able observe the behavior I described first hand of VBA executing the next line before getting the return. This would happen seemingly randomly, maybe 5% of the total executions. — CBRF23 34 mins ago
Not exactly a help vampire. We need a name for this.
 
Gimme the codez.
 
11:00 PM
 
@Hosch250 but each declaration already has its references collection... what's the grouping by?
 
var possibleDeclarations = _declarations.Items
                        .Where(item => !item.IsBuiltIn
                                    && item.ComponentName == selection.QualifiedName.ComponentName)
                        .GroupBy(item => item.References);
This way, I only have the declarations and the references, which is all I need.
Yeah, I'm messing this up, but I think I might be on the right track now.
 
You're trying to locate your target, right?
Have a private static DeclarationType[] ProcedureTypes = { DeclarationType.Procedure, DeclarationType.Function, ... };
 
I've got it!
Instead of walking up the tree to the first valid one, I'll get a collection of all the ones with the same scope as the selection and choose the one in the same position as the selection.
That should be cleaner and easier - especially since I won't be dealing with so many types.
 
Whatever works!
I would select the Context.Parent of all in-scope declarations with an applicable DeclarationType, and return the SingleOrDefault where GetSelection().Contains(location) or References.Any(r => r.Context.Parent.GetSelection().Contains(location)), where location is the Selection object for the cursor location.
But apparently I'm good at writing unreadable LINQ ;-)
 
11:17 PM
That is an idea too.
Actually, that is effectively what I just wrote without LINQ.
 
There should probably be a method in Declarations that takes a Selection and returns the Declaration that matches it
 
11:33 PM
Internet went down for a bit.
 
It is working perfectly for inside declarations.
The only problem is it doesn't work perfectly inside references, yet.
@SimonAndréForsberg Swish! (Cards flipping.)
 
Just wanted to share a little something:
in TCG Creation, 22 hours ago, by Simon André Forsberg
afterPlay {
    summon 1 of 'Bodyman' to 'owner' zone 'Battlefield'
}
that, my friends, is the power of a Groovy DSL.
technically, I can even get rid of the quotation marks, just haven't prioritized that yet.
 
I like it with the quotation marks.
 
That's pretty cool @SimonAndréForsberg.
 
11:42 PM
@RubberDuck The best part is that I didn't even have to write any ANTLR grammar :)
2
that code is the same as:
summon(1).of('Bodyman').to('owner').zone('Battlefield');
 
That's pretty cool.
And afterPlay is an event, or a context?
Maybe I'm speaking a different language. It also looks like it could be some kind of closure.
@ducky doesn't know JAVA!
 
@RubberDuck It is a closure. This is Groovy btw, not Java.
and it definitely ain't JAVA!
afterPlay({
    summon(1).of('Bodyman').to('owner').zone('Battlefield');
});
i.e. call the afterPlay method with a closure.
    def afterPlay(Closure closure) {
        EffectDelegate effect = new EffectDelegate()
        closure.delegate = effect
        closure.call()
        addEffect(entity(),
            eff.described("${effect.description}",
                eff.toSelf({source ->
                    effect.perform(source, null)
                })
            )
        )
    }
by setting the delegate (and sometimes the resolve strategy) of a closure I can decide which methods that should be available
 
11:59 PM
Ahhh. That's pretty nifty. So, mind if I ask a dumb question? Too bad. Gonna ask it anyway.
 
00:00 - 16:0016:00 - 00:00

« first day (347 days earlier)      last day (2833 days later) »