« first day (319 days earlier)      last day (2861 days later) » 
00:00 - 19:0019:00 - 00:00

00:06
@Rossco I was just thinking exactly about that (making classes internal)
Although that makes another complication (albeit a mild one) to unit testing
Bah. That's an easy fix though.
Well if a class needs to be accessed externally, then it should be public. Only the ones which are not required outside should be internal.
BTW, I added my 2c to your discussion about implicit references.
@Rossco Fair enough, ...but then should we replace all quickfixes with links to articles?
(I'm pulling your leg right now)
00:20
well done sir
If down the road you really want to go through the pain of trying to make that replacement, then you are welcome. Remember that the activesheet could change throughout a procedure.
Hmm... Which is a good reason to find someway to disable an inspection via an annotation.
I think a good first step would be to make all the references explicit to start with. Evolutionary development.
^^ that was my original fix
You will still want to flag that with a warning even after doing that since the problem hasn't really gone away.
For me, I'd only make that mistake accidentally which would lead to a non-obvious bug no doubt. I'd rather just have the addin tell me about it. I've probably made a logic error.
Good point. Perhaps the best fix is no fix after all - like the OptionBaseInspection which simply warns you about a potentially confusing implicit array base
00:37
Just make flexible, devs all have their own preferences (which we defend religiously).
I was just reviewing the *.reg files in the root of the solution dir. Are they used still? The x64 bit one seems to have less in it than the x32 one.
Also, they seem to be registering some CLSIDs. Did you use them before using regasm? Or do they need to be run as well?
01:04
@Rossco We keep deleting them... they keep coming back!
Relics from 1.0
@Mat'sMug rofl thats awesome!
isn't it?
:D
01:37
Oh god. Those are still there?
apparently
lol and I merged two of @Hosch250's PR's just yesterday - the ones that removed them yet again
they just keep coming back
@Mat'sMug So you still needed those after all?
Oh.
You still haven't merge the ones that fix the ComVisible(true), or whatever it is called.
I won't. I've used the same explicit GUIDs you generated there, but made the constants private and there was something else, I left a comment on one of 'em.
ah found it
the progid for _SettingsDialog shouldn't have had an underscore
01:47
OK.
mind you without R# I'm not sure I would have known that the constants could have been made private
I just copied the constants from somewhere else.
So, there is at least one other place (I believe two) you need to make the private.
ah crap
well I just made my build not com-visible at assembly level, I'll probably spend the rest of the evening playing with attributes on various classes until I get a working debug build
I used the same name, so just search for the name.
woah, the debug build works
awesome
@Hosch250 I must have fixed it there too then
01:52
OK.
I still get that nasty access violation exception
time for some serious debugging.
You to Rubberduck:
> You have serious problems. You need serious help.
I'm refactoring QualifiedModuleName, taking the contentHashCode outta there.
> @msdev favorited one of your tweets
I've gotta sign in to Twitter and catch up.
Maybe I'll favorite some.
I'm just a few tweets short of my 100th
02:04
I'm a few tweets short of 10.
lol keep it up!
haha thanks for that RT :)
0
Q: VBA Text Array - Scan two columns rather than one

PootyTootI have some code which is designed to scan Columns F & G for occurrences of words found in an array, the array contains text found in Column J. If it finds occurrences in either Column F or Column G, it will copy and paste the terms into the corresponding columns. During testing, the code prov...

02:42
you have no idea how many bugs I'm fixing right now
var module = vbe.FindCodeModules(QualifiedName).First(); ...is all over the code.
turning it into var module = vbe.FindCodeModule(QualifiedName);
every single code inspection result class
You had it returning just the first instead of all?
Won't that be a problem because you were using T before and IEnumerable<T> now?
indeed ..except that .First() call was a work-around that assumed FindCodeModules always returned only one item - and it didn't. But now it will, because I'm doing a reference equality check against the VBProject and VBComponent, instead of just matching the names.
oh wow that completely breaks the TestEngine... damn that code was frail.
Hmm.
I just wish I knew what everything was supposed to do (like you probably do).
^^ I turned that code...
..into this:
    public struct QualifiedModuleName
    {
        public QualifiedModuleName(VBComponent component)
        {
            _component = component;
        }

        public QualifiedMemberName QualifyMemberName(string member)
        {
            return new QualifiedMemberName(this, member);
        }

        private readonly VBComponent _component;
        public VBComponent Component { get { return _component; } }

        public VBProject Project { get { return _component == null ? null : _component.Collection.Parent; } }
which is a major breaking change, but oh so needed
Just about to give you a code review on indentation :)
02:52
lol
One thing nice - posted my 100 answer today!
Dishes time, see you.
later!
the whole unit testing discovery is relying on strings-identifiers. from project to procedure names.
4 errors in 1 file.. I need to change TestMethod to fix it. Time for a smoke.
03:31
ooh I think I just made unit tests work in PowerPoint
        protected virtual string GenerateMethodCall(QualifiedMemberName qualifiedMemberName)
        {
            /* Note: Powerpoint supports a `FileName.ppt!Module.method` syntax
             * msdn.microsoft.com/en-us/library/office/…
             */

            var projectFile = qualifiedMemberName.QualifiedModuleName.Project.FileName;
            var moduleName = qualifiedMemberName.QualifiedModuleName.Component.Name;

            return string.Concat(projectFile, "!", moduleName, ".", qualifiedMemberName.MemberName);
03:48
refactoring completed.
hmm not quite
04:07
@Mat'sMug
'sup?
Who said you are too old for a #Rubberduck? Everyone has a Rubberduck at heart! Get yours at http://www.rubberduck-vba.com/ today!
How do you like it?
nice!
Too bad #OneNote doesn't run #VBA! https://twitter.com/LearnOneNote/status/590364063189839872
04:47
ugh. the stupid access violation exception is due to my test workbook being simply corrupted.
2 hours lost
if not more
So, now you need to revert all your changes?
nope
I just pushed the biggest commit I've made in the project so far I think.
Nice!
...to master
@RubberDuck don't look at this commit: github.com/retailcoder/Rubberduck/commit/…
> Showing 58 changed files with 288 additions and 427 deletions.
result is much more robust project/module/procedure-finding code
also I removed the "embed interop types" options from both Rubberduck and Rubberduck.Parsing projects on the VBIDE reference - while debugging the stupid access violation I found out that the types were clashing because they were defined in both places
05:08
and yup, unit testing works in ...PowerPoint.
Good.
I wish I could contribute more...
I need to finish this semester and get this release of my app out.
And I don't know VBE, VBA, or COM, so it is kind of hard sometimes.
But, I did learn about the yield keyword just the other day.
yield is awesome
I don't know a whole lot about it.
and no worries, there's enough work in RD for a decade ;)
Except that it lets you return the items in an IEnumerable one at a time.
So you don't have to create a copy of the IEnumerable and return it.
I suppose it takes up less memory with yield, maybe?
Less time?
What are the main advantages of it?
05:16
it's mostly useful combined with LINQ's lazy evaluation
careful though
Apr 13 at 5:01, by Mat's Mug
note to self: LINQ lazy evaluation is a double-edged blade.
I'm not sure what that is either, I mostly use LINQ to select/remove subsets of lists.
I need to go to bed - the bathroom just cleared out and it is past midnight again...
Confirmed: next release, #VBA #UnitTesting works in... #PowerPoint. I just wonder what VBA code people write in @powerpoint...
@Hosch250 if you don't "materialize" the query (e.g. "ToList()"), then the query isn't executed until you iterate the results
good night!
oh crap I borked the parseresult caching
I need that key listener
...but the base ProcessKeyPreview method is a member of UserControl ........fuck.
> 40 followers, 101 tweets
> 98 downloads
06:14
TTGTB. Inspections performance sucks, but I've restored the caching. We definitely need a better way of finding out if a module was modified, than getting the hashcode of the entire code in the module.
 
2 hours later…
08:22
0
Q: WinHttpRequest / MSXML2.DOMDocument in VBA imitate using Internet Explorer

mamoI am trying to find the quickest way to get the HTML code of a webpage. The issue is that I have to use the internet explorer, for this webpage. As I know using WinHttpRequest is so way much faster, my question is: Is it possible to use the WinHttpRequest or MSXML2.DOMDocument but "pretending" ...

 
1 hour later…
09:31
It's good. Commits like this are why I freaked out about a SCM that locks files and can't merge. Can you imagine?!
 
1 hour later…
10:41
@RubberDuck I know .... should I have committed a broken build to master instead? ;)
2
lol
Why not?
11:31
This is a bad idea, but I don't know how else I'll get my homework done while I'm at the conference. Installing VS on my work machine
11:50
@Rubberduck203 seriously, rename a namespace in 2 seconds, or incrementally reimplement it in 200 working commits across 2 days of work?
12:08
@Rubberduck203 but #Refactoring right keeps the code compilable all the while! So we agree, Ctrl+R,R the namespace is a #NoBrainer right?
Thing is, unless you modified the QualifiedModuleName struct, there won't be conflicts @RubberDuck ;)
@Mat'sMug and that, my friend, is why the answer is always
> it depends
in The 2nd Monitor, 8 mins ago, by nhgrif
The ultimate sin has been committed... Someone made a new control, then made a form that uses the new control... Then committed the form without committing the control... I cannot build my project... 18 million lashings when he gets in this morning.
12:42
Oh wow!
13:02
Right?
> Applying Visual Studio 2013 Update 4
14:04
Btw @RubberDuck did you see this? github.com/retailcoder/Rubberduck/issues/316
#Feedback
Oh and we got a 37th star :)
> v1.22 has 100 downloads
2
14:20
@Mat'sMug I hadn't noticed. I'll see what I can do about picking out some es
I created the label (made it green :)
I just applied to a handful of code inspections
14:49
> Implementing that one involves modifying the IdentifierReferenceListener to override the virtual EnterErrorStmt method, and implement a collection property that returns all the Error statements encountered while walking the parse tree, and then exposing this collection in the VBProjectParseResult, perhaps as some new StatementOrToken (or any better name) type that could be reused when we implement

Once the VBProjectParseResults return all Error statements in the parse tree, half the job is done - all that's left to do is to implement the ObsoleteErrorStatementInspection : IInspection cla
well for a , that one is easy ;)
I tossed a few on there that should be easy.
Assuming he knows anything about events at least.
15:01
#399 should be a true
woah, next issue is #400
We've come a long way.
and, a year ago, this project was just an embryo
a long, long way
Btw.... I'm ready to start implementing the logic that will let me actually merge in changes github.com/retailcoder/Rubberduck/commits/sourcecontrol
@Mat'sMug not even. I've not gotten my yearling badge yet.
oh wow
@RubberDuck oh nice!
I ♥ that commit message:
2
> I hate installshield with a firey passion; re-added primary output to x86 setup
2
Hmmmm.... who's lurking?
15:07
someone's a starpy cat...
actually attempting to do work this morning
Hey @FreeMan!
hey there
somehow, watching the 2+ of you work is far more interesting than doing my own work...
2
coming up: Rubberduck.TV - the reality show
(not)
I should be working, too. bbl
15:12
@FreeMan You mean watching us not work?
Is there a way to get stupid msdn.microsoft.com to default to showing me office 2010?
Actually, I get a surprising amount done, even when I'm in here.
I mean, I know it's 5 years old and all, but that's what the office gives me
@RubberDuck whatever...
15:21
@RubberDuck the more I think of it, the more I find all code inspections should default to Warning
and then inspections that actually prevent a runtime error should be Error - like that Object variable not set inspection on the roadmap.
but everything else feels very, very arbitrary
Could that be because it is?
arbitrary, I mean.
yeah
I removed on issues
and there goes #400 (a real issue)
@ticker VBA doesn't have generics. And you're using the obsolete Call statement.
Side note, Call statement is obsolete - you can do RefreshScreen "ProducerID", ProducerID instead. — Mat's Mug 5 secs ago
15:41
hi @jeffery!
hi @Soviet_Jesus!
Just 4 more C# answers with a total of 11 score to get a badge.
Side note: inconsistent indentation makes code hard to follow.. and nested With blocks are never a good idea. — Mat's Mug 6 secs ago
3
I have 24 C++ answers, and I need some 18 more votes, and 20 HTML answer and need 3 more votes to get a badge.
I need 4 more VBA reviews with 12 votes each to get a silver VBA tag badge ;)
I don't know if you'll get the 12 votes each.
I wonder what my average vote per answer is, I'll have to write an SQL query for that.
15:54
meh, tag badges are like Gandalf: never too late.
Hello @Mat'sMug ..I'm just watching atm, though for the future is this a decent place to bring excel VBA questions?
sure!
@RubberDuck & I are the top answerers on Code Review
There are others in and out sporadically too.
Nice to meet ya @Soviet_Jesus.
Someone is playing Santa.
2
Thanks.
also we're using this chatroom as a "war room" for building our little pet project, if you noticed - rubberduck-vba.com
@Hosch250 cough
15:59
It is more than you, though.
@Mat'sMug, thanks! @RubberDuck, you do not have anything to do with Hak5 do you? They have their rubberducky hack kit which funny and cool at the sametime.
@Mat'sMug it's like Tourette's on the tab key!
I've already got 90 rep here today.
@Hosch250 It's 4.
@jeffery Nope. Didn't know anything about it.
16:01
@sᴉɔuɐɹɥԀ Did you already have one, or did you check manually?
SELECT AVG(Score)
FROM Posts
WHERE PostTypeId = 2
AND OwnerUserId = 34073
Oh, I didn't see the 4 was a link.
^^ Pretty simple thing to write ;)
Yeah, if you know SQL.
So is that rubber duck thing like a proper IDE for vba? Cause I've been working between the developer tab in excel and sometimes visual studio, but the former feels super weak and the latter feels like swatting flys with a cannon
16:02
6 for answers.
3 overall.
@Soviet_Jesus we're trying real hard to make it so! ;)
really cool things coming up next release
@Hosch250 PostTypeId = 1 -- <- questions, not answers
@sᴉɔuɐɹɥԀ Yeah, I changed it to 1.
16:05
that looks awesome, downloading now....and time to get back to work lol
3
thanks! enjoy unit testing your VBA code!
come back anytime!
Thanks :D
16:28
@RubberDuck I moved the 1.3 milestone to 05/03.. incoming RD news post.
oh, thanks @Santa!
and moved 1.31 to 05/17, assuming there will be one
@StackExchange whenever you're ready
posted on April 21, 2015 by rubberduckvba

As I said earlier on Twitter, I messed up the 1.3 release… big time. Shooting for April 18 was fine, rushing to meet that “deadline” wasn’t. We’re removing the 1.3 pre-release. I pushed “release early, release often” too far this time. Recommend uninstall+rollback to 1.22.. sorry! Again, apologies. I was so excited about releasing all the […]

3
Well said Mat.
> April 21, 2015 rubberduckvba pre-release, release, v1.3, woopsie
@RubberDuck BTW the 1.3 parser still breaks with my StringFormat function. hold on, verifying something.
yup
oh that's a problem.
labels break the parser.
and cache [non-]invalidation is throwing a COMException when you close a parsed workbook and then parse a new one
16:47
Hmm random up vote on this.
6
Q: Domain Name Service Class

RubberDuckI recently wrote a DSN class for use with the Access flavor of VBA. I'm preparing to refactor and would appreciate feedback. I am aware of two issues. I added the findSectionKey() function to the Registry class (which is separate and out of scope for this question) that I call, but never went ...

My very first CR I believe.
And now I desperately want to re-write the whole thing.
lol
stick that into a new module, and look at the code explorer:
Sub foo()
On Error GoTo Fail

Tata:
    Exit Sub
Fail:
    Resume Tata
End Sub

Sub bar()
On Error GoTo Fail

Tata:
    Exit Sub
Fail:
    Resume Tata
End Sub
does 1.22 handle it?
I only get foo in the code explorer with 1.3
I'll let you know when I get back to my desk.
@RubberDuck I think it is because @Mat'sMug posted an answer on it, and it was tagged .
A novice asked master Banzen: “What separates the monk from the master?”
Banzen replied: “Ten thousand mistakes!”
4
I'm on my way!
#402 is a showstopper
> 402 Payment Required
Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened, and this code is not usually used. YouTube uses this status if a particular IP address has made excessive requests, and requires the person to enter a CAPTCHA. Some work has been done to implement payments via the digital currency Bitcoin automatically on a 402 request.
17:04
> Surely the old monk next to me has made 10,000 mistakes by now.
> No. Ten mistakes. 1000 times a day.
@RubberDuck Yup.
@Mat'sMug Works fine in 1.22
Oh my.‌​. he knows not what he asks.
Sure, why not!
That would be crazy, we might as well make it into a layer that you can write C# in...
> Oooh I like this, very very much. Like some kind of expression evaluator that we could translate into LINQ expressions that query the Declarations API.

This would require implementing a brand new ANTLR grammar specifically for this.
@RubberDuck The good news is that issue is not found!
17:16
lol
@Mat'sMug :+1:
Hmm, I want to help with this.
So, would you basically provide an API that the user could use?
it's essentially about creating a query language from scratch
go ahead with it, I'm not seeing it until at least RD 4.0 ;)
Why don't you just create a sort of API that gets the different things (caching would probably be a good idea) and the user can use them as they want?
Like the API could return the number of lines in a method/procedure, and other interesting items.
It could return methods by type, and all sorts of wonderful things.
And the user can do whatever then.
It honestly probably doesn't need the parser. This information could easily be yanked from the VBIDE library.
But we need a query syntax @Hosch250. That's why Mug suggested a new grammar.
17:21
Oh, yeah.
Not the VBA grammar, but one that defines the query language.
Let's use either SQL or LINQ style.
Might as well use something that is already well-known.
@RubberDuck I'd make it work off the declarations API. why reinvent the wheel?
Speed.
No other reason.
good point
17:24
That, and I'd still like to create a replacement to the VBIDE library for VBA consumption.
exposing VBProjectParseResult.Declarations would do just that
well some API built on top of it, that is
Some kind of Facade class to make it pretty.
yeah.. mostly to wrap up the generics so it actually can be COM-visible
Hmm... let's see if I remember my MS login...
I don't get my current accounting assignment :(
17:27
Private Sub RebuildPivotChart(ByVal PivotItemsList As PivotTableItems, ByVal MChart As Excel.ChartObject, ByRef CChart As Excel.ChartObject, ByRef Clinic As Worksheet)

Dim TChart As Excel.ChartObject
Dim PIL As PivotTableItem
Dim Shp As Excel.Shape
Dim Ser As Excel.Series

'this is the referenced loop:
  For Each TChart In Clinic.ChartObjects
    If TChart.Name = MChart.Name Then
      TChart.Delete
    End If
  Next

  MChart.Chart.ChartArea.Copy
  Clinic.PasteSpecial Format:="Microsoft Office Drawing Object", Link:=False, DisplayAsIcon:=False
If I skip the referenced loop in the debugger, and delete the chart from the destination sheet by hand, the paste works fine
@FreeMan ???
If I let it go through the referenced loop, it deletes the chart from the destination sheet, but I get Runtime error 1004 Method 'PasteSpecial' of object '_worksheet' failed
someone was saying something about VBA being annoying, irritating an irrational? No, I'll say it.
2
Where do you get the error?
clinic.pastespecial...
the first of the 2. the 2nd is to ensure formatting is copied correctly, though I don't think I'll need it.
Does Clinic get destroyed if all of the TCharts get deleted?
17:31
@RubberDuck I knew it. shit. I modified the label grammar rule to handle line numbers, looks like I borked it.
I was wondering about that.
> Bork: obstruct (someone, especially a candidate for public office) through systematic defamation or vilification:
2
Ohhhhh VS remembered I like the dark theme.
That's awesome.
Doesn't appear to be applicable.
@RubberDuck Yeah, a lot of the settings are stored in the cloud now.
@RubberDuck no, it'll only delete one chart - this little routine gets called one chart at a time for the worksheet
17:32
Even the setting for having the taskbar hidden is.
Trouble is, Windows 10 has a different UI and animation, so I like the taskbar NOT hidden there and hidden on Windows 8.1 :(
@RubberDuck I added a label to that grammar bug. we can't release without a fix to that one.
2
So @Mat'sMug. What do I need to get started building an ANTLR grammar?
notepad
lol
Check, what else?
start by studying the .g4 grammar file in the repo - start with the lexer rules at the bottom
then go all the way up and notice the first parser rule
17:36
We're using ANTLR 4, right?
65
Q: Using ANTLR 3.3?

MarkI'm trying to get started with ANTLR and C# but I'm finding it extraordinarily difficult due to the lack of documentation/tutorials. I've found a couple half-hearted tutorials for older versions, but it seems there have been some major changes to the API since. Can anyone give me a simple exampl...

startRule : module EOF;
Probably similar.
Looks a lot like regex to me.
^^ that's the "entry point", so to parse an entire module, you just need to call parser.startRule()
EOF looks like it's a special token that identifies the end of the file (it doesn't seem to need to be defined as a lexer rule)
17:38
You might want to put the VBA grammar up there.
^^ IIRC I took the VB6 grammar from there
when it works, yeah ;)
module :
	WS? NEWLINE*
	(moduleHeader NEWLINE+)?
	moduleConfig? NEWLINE*
	moduleAttributes? NEWLINE*
	moduleDeclarations? NEWLINE*
	moduleBody? NEWLINE*
	WS?
;
a grammar rule has a name that MUST be in camelCase, followed by a whitespace and a colon :
this module rule describes the contents of a module
remember the startRule goes module EOF, so the module rule encompasses everything in a module.
moduleBody :
	moduleBodyElement (NEWLINE+ moduleBodyElement)*;

moduleBodyElement :
	moduleBlock
	| functionStmt
	| macroIfThenElseStmt
	| propertyGetStmt
	| propertySetStmt
	| propertyLetStmt
	| subStmt
;
moduleBody rule says "we have an undetermined number of moduleBodyElement rules in here"
and the moduleBodyElement rule explains why embedded #If conditional-compilation statements break the parser
the pipe reads "or"
and you use regex-like operators, + for one or more, * for as many as you find
and all rules end with a semicolon
and that's the part I broke:
lineLabel : (ambiguousIdentifier ':' WS) | lineNumber;

lineNumber : (INTEGERLITERAL WS);
used by
block : lineLabel? blockStmt (NEWLINE+ WS? blockStmt)* NEWLINE*;
and I think I see what I did wrong here
Wow, you're not supporting Windows XP, isn't that supposed to be the next big thing?
Hmm... Will look at it a bit. I want to build a calculator.
Dude, Windows 7 hit it's end of life this year.
I feel something dripping... Oh wait, it's my sarcasm
@RubberDuck No it didn't.
@RubberDuck Well, still 5 years of extended support then right?
18:02
XP is out of support completely, Windows 7 will still receive full support, just no new features.
> robodude666 starred us
That's 38
18:21
5
Q: How do I prevent a PivotChart from becoming a regular chart on sheet copy?

FreeManUsing Excel 2010, I have written some VBA to copy selected sheets from a Master workbook to a Client workbook. The code works just fine to copy the data sheet which has data & PivotTable(s) associated with the data, and the chart sheet with one or more PivotCharts to the new workbook. The issue...

50 magical internet points on offer!
18:36
> And then what? We target 4.0 and forget all about async/await? I strongly oppose this. Part of why I'm enjoying this project is because I can learn new things doing it. Reimplementing the async stuff with pre-4.5 features isn't somewhere I want to go. Next thing you know you need to target 2.0 and drop all LINQ code because some dude wants to use Rubberduck on Win98 in Office 97? No thanks.
@RubberDuck, @Hosch250 has more commits than you this week ;)
@Mat'sMug gasp
some dude wants to use Rubberduck on Win98 in Office 97
I am that DUDE!!!
well, welcome to 2015, dude!
Works in Office 97, just not Win98...
true that
18:41
I don't understand why my parser and lexer files are empty.
because they're new?
I don't understand how I generate the code.
I have my build action set to Antlr4
> Also, a lot of poor engineers can't download and install VBE add-ins on their office machine, for the same corporate reasons they're stuck on XP...
No they're not.
18:44
If you're stuck on XP as a company, you're doomed, because support has ended.
You're not stuck, you just need to go find a half decent job.
Because the writing is on the wall anyway.
Hence, not stuck.
Seriously, how long until someone cracks open a company's security because they're running an ancient OS?
Matter of time man.
@RubberDuck build the project. now go dig up the generated lexer/parser under the obj directory - use the "Show all files" toggle in the solution explorer
copy the files into your solution, then set build action to -none- on the grammar
but why is it there whenever it put it right in my project the first time?
PITA, but that's how I managed to get it to work
no idea
This PC just SNAPped :|
Apr 17 at 16:10, by sᴉɔuɐɹɥԀ
user image
00:00 - 19:0019:00 - 00:00

« first day (319 days earlier)      last day (2861 days later) »