« first day (320 days earlier)      last day (2860 days later) » 
00:00 - 18:0018:00 - 00:00

18:00
I have a small bit of code in a PPT template file, some more in the XLS template file, and the majority in Access.
But then the VBA is in Access, no?
Oh
23 secs ago, by FreeMan
I have a small bit of code in a PPT template file, some more in the XLS template file, and the majority in Access.
:)
I've gotten to learn more about the PPT object model than I ever cared to...
18:23
> Consider this [bad but legal] code: Public Sub DoSomething() Foo: Bar End Sub Private Sub Foo() End Sub Private Sub Bar() End Sub The user's intent may have been to call both Foo and Bar procedures on a single line, but VBA will parse Foo: as a line label, and only Bar will be executed. Rubberduck should warn when it encounters a line label identifier that matches a procedure name that's in-scope. Possible quick-fix: Convert line label to procedure call - turn this: Public Sub...
DoSomething() Foo: Bar End Sub Into this: Public Sub DoSomething() Foo Bar End Sub --- Another possible fix would be to introduce a Call statement: Public Sub DoSomething() Call Foo() : Bar End Sub But that would fire up #34, and then applying the Remove obsolete Call statement quickfix would result in this code: Public Sub DoSomething() Foo: Bar End Sub In other words, this inspection solves an issue that an edge-case quickfix of #34 introduces in the user's code.
@Duga I say break it. They deserve it.
2
hides
> Note that applying the quickfix on this code:

Public Sub DoSomething()
Call Foo() : Bar
End Sub

Would turn the call to `Foo` into an ambiguous line label identifier. #408 addresses that.
@RubberDuck lol
the good news is that this:
In some cases using the call keyword is pretty useful, like when you just want to use a class once. I use it today to generate a random salt Call New RNGCryptoServiceProvider().GetBytes(salt) without Call I would have had to a variable as an RNGCryptoServiceProvider first — yu_ominae Dec 12 '12 at 2:56
isn't valid in VBA (it is in VB.NET though)
oh nice, 2500 views:
15
Q: List<T> implementation for VB6/VBA

Mat's MugRecently I decided VB6's Collection wasn't enough for my needs, so I decided to implement something like C#'s List<T>. Here's the class that resulted, I'd like to know if the implementation could be made better /more efficient, especially with Insert and Sort methods; also I'd like another pair o...

> Since `Call()` serves no other valid purpose in VBA, as was [discussed here](http://stackoverflow.com/questions/2573597/should-i-use-call-keyword-in-vb-vba/22325284#22325284), I'd say go with the first option:

Public Sub DoSomething()
Foo
Bar
End Sub
> @daFreeMan indeed. I was merely documenting an oversight in the implementation of the quickfix for #34 :wink:
+169 today already
anyone has 1.22 handy?
try running code inspections on this code:
Public Sub DoSomething()
    Call Foo(42): Bar
End Sub

Sub Foo(ByVal i As Integer)

End Sub
System.ArgumentNullException: Value cannot be null.
Parameter name: [context] and [comment] cannot both be null.
   at Rubberduck.Inspections.ObsoleteCallStatementInspection.<GetInspectionResults>b__2(IdentifierReference issue) in c:\Users\Mathieu\Source\Repos\Rubberduck\RetailCoder.VBE\Inspections\ObsoleteCallStatementInspection.cs:line 23
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
rather surprising, but it's the banned 1.3 pre-release.
does it blow up in 1.22 as well?
> Change default Inspection severity to Warning/Suggestion
> Merge pull request #409 from Ryankey/next

Change default Inspection severity to Warning/Suggestion; Closes #400
I need to merge Master back into Next asap. and stop working off master
damn 1.3 fiasco
It was easier to find linked messages when @Duga was napping... :/
She takes up a lot of screen real estate
get a bigger screen ;)
18:46
Can I tell my boss you said so?
> Mug says I need a bigger screen, so that I can read the VBA chatroom better - your call.
3
Thank you, I'll quote you on that.
nice!
18:51
I think I have my order of operation backwards though.
indeed
well
it's supposed to be 4*3+2?
Nope. It's not the order of operations. It's the order of the text.....
Which means, I basically don't have an order of operations.
I thought I did.
well you do
yeah, better.
and all that changed was the input I suppose?
18:53
No. Not better. Just different input.
yeah, fix that grammar ;)
You can just claim that the first uses RPN
uh-huh
lol, my last tweet was retweeted by someone that's running a weightloss website
3
that's what RubberDucks are for, weight-loss, right?
> Does this VBA code make my ass look fat?
3
19:13
Say goodnight, Gracie...
19:29
> Good night Gracie.
It's right. I just need to figure out how to go to the bottom first.
that's what the visitor thingy is for?
Yeah. I think so. But I haven't quite figured out how to go to the bottom first.
19:45
@RubberDuck July 1st
18
Q: Look 'ma, I can read code

Mat's MugI have put together a naive implementation of a VB6/VBA parser, and I'd like to see if the CR community sees the same things as I see can be improved with this code, before I start refactoring. I've never written a parser, so this naive implementation is naive in all senses: I wanted to push it ...

a long, long, long way we've come!
@Mat'sMug Thanks for that. Not sure how I missed the obvious there.
20:17
@ExcelEasy well done! #Challenge: make a more #OOP one without using the form's default/global instance! #becausewhynot
They probably don't like us neither http://www.commitstrip.com/2015/04/22/whats-wrong-with-ides/ http://t.co/IP6jbw6qjo
@ExcelEasy well done! #Challenge: make a more #OOP one without using the form's default/global instance! #becausewhynot
Oops
@RubberDuck You don't. I think you have it reversed. If the top-priority operations are at the root, you just need to walk your tree and evaluate as you go all the way down each branch in order; when you get to the bottom of the first child, you store the result and evaluate the next child.
Idk. I almost had it.
If the expression is an Integer, return it.
Otherwise, walk left down the tree.
walk right down the tree
If operator isn't null, perform operation and return.
But I'm getting a null operator where I should be subtracting.
are you sure you're where you think you are in the tree then?
Otherwise, it works. It calculated the left side of the tree fine.
No. I'm not.
Hold up. I think I know what I need to do.
Nope.
20:31
lol
21:02
well that was fun
0
A: Condense largely(Unpractical) loop based VBA code; nested For...Next loops

Mat's Mug I am also looking for suggestions to speed up the code in general aside from screen updating and calculation suggestions. I'm guessing this means you're already implementing those then. I might not help with anything, but get rid of this line: Anvil.Select Working off the current selecti...

21:13
@Mat'sMug I'm not sure I understand the logic of changing For u = 16 To 70000 to u = t + 14
t is looping the rows on sheet A, from 2 to 70K; u is looping the rows on sheet B, from 16 to 70K. He's looping ~70K times on sheet B for every row on sheet A, ...oh wait, I fucked up.
...did I?
(deleted answer for now)
I think the first version compares each t to each u, whereas the second compares each t to t+14
exactly - my point being that there doesn't need to be ~4,900,000,000 iterations
but yeah it's actually a search he's doing.
I fucked up.
other answer has it right
I would have just commented like a sane person but I don't have 50 rep yet...
well, thanks anyway - you got my foot out of my mouth - I owe you one!
21:19
Cool, you can answer a RD question then!
CodeInspectionTests.cs - Is that something that was commented out because of the change in how parsing works?
probably - I tend to scrap the tests when the implementation breaks them. I'm not very much into TDD if you noticed ;)
also, mocking the VBE is ....complicated.
actually, that was commented-out before I implemented the Declarations API / symbol table.. which should make testing easier.
like, much easier.
22:01
TTQW
 
1 hour later…
23:21
Mocking the VBE isn't all that complicated once you figure it out. One sec.
[TestInitialize]
public void InitializeMocks()
{
_window = new Mock<Window>();
_window.SetupProperty(w => w.Visible, false);
_window.SetupGet(w => w.LinkedWindows).Returns((LinkedWindows)null);
_window.SetupProperty(w => w.Height);
_window.SetupProperty(w => w.Width);

_windows = new MockWindowsCollection(_window.Object);

_vbe = new Mock<VBE>();
_vbe.Setup(v => v.Windows).Returns(_windows);

_addIn = new Mock<AddIn>();

_view = new Mock<ISourceControlView>();
_changesPresenter = new Mock<IChangesPresenter>();
Once I merge in, I'm going to extract that to some kind of factory method.
The MockWindowsCollection was the key. It made the whole thing dead simple.
Oh! Hey! @ryankey721, thanks for the PR!
@RubberDuck PR?
Pull Request ;)
I merged it in within minutes
^^ that one
I can't wait to stabilize 1.3 and ship it. That grammar thing with line numbers sounds more and more like a deferred issue.
I mean, I'd reinstate the line labels and drop line numbers - that worked well IIRC.
23:54
@RubberDuck Oh, Pull Request. Sure, it's fun learning a project like this. Listeners are a little new to me, so I might be pretty slow with commits until I understand it all better. Nice mock VBE solution by the way.
00:00 - 18:0018:00 - 00:00

« first day (320 days earlier)      last day (2860 days later) »