« first day (275 days earlier)      last day (2905 days later) » 

12:10 AM
I've officially seen Frozen one too many times.
 
 
6 hours later…
6:03 AM
> Code Explorer display style toggles between "member names" and "full signatures"
 
6:39 AM
> added context menu; can now run all tests from Code Explorer!
> added handler for ShowDesignerContextButton.Click
> @mwolfe02 how about this?

![image](https://cloud.githubusercontent.com/assets/5751684/6544938/25635e92-c535-11e4-819a-2401e3b12ddd.png)
> added refresh button to context menu
 
6:59 AM
@Rubberduck203 (whistles) http://t.co/AIe1TSwC1J
 
 
3 hours later…
10:26 AM
> Is this add-in supposed to work in VB6 IDE?

I think ANTLR parser has great potential for really useful features in the IDE. RegExp find&replace within routines with {Name} placeholder comes to mind.
 
11:16 AM
> Neither of us have an old copy of Visual Studio that supports VB6, so we've not tested it. The add-in is designed with Office VBA in mind. I *know* the unit testing framework isn't compatible though.

You might be able to get it to work if you know how to manually register the add-in, but I'm not sure it's compatible. Please feel free to test it and/or submit a pull request adding support.
 
11:38 AM
> Some times you need to know when good enough is good enough, and I think that [extracting an `Inspector`][inspector] might have been enough. Both views communicate through that object now and although they both perform similar functions, they do it in very different ways. There is very little code reuse to be had here. Closing this issue.

[inspector]:https://github.com/retailcoder/Rubberduck/commit/1052b628e54fea17bc1d2d82ba1fceab93ecc656#diff-44e0e6380350c7dc6d4fa9143d4e950d
 
12:27 PM
[retailcoder/Rubberduck] ckuhn203 pushed 1 commit to 1.21
> Merge pull request #299 from retailcoder/refactor

Abstracted IInspectionModel; closes #139
[retailcoder/Rubberduck] ckuhn203 deleted branch refactor
 
1:07 PM
> #225 added DeleteBranch method
> Don't close until the wiki gets updated.
 
1:24 PM
> closes #226; remote repository location is optional for COM clients
 
2:55 PM
@Duga @RubberDuck that's the one that contacted us from the website!
 
@Mat'sMug Oh really?
Nice!
 
3:17 PM
[retailcoder/Rubberduck] ckuhn203 pushed 3 commits to 1.21
> Merge pull request #300 from retailcoder/sourcecontrol

Sourcecontrol - Improved API & Documentation
[retailcoder/Rubberduck] ckuhn203 deleted branch sourcecontrol
 
Subject
Execute all tests in a VBA procedure
Message
Hello, Is it possible (or will it be possible) to execute all the existing tests in a VBA procedure ? I use actually an another testing framework (AccUnit) and I would like to replace it by RubberDuck ! We had developped a build chain around this framework using ant (to build, deploy and test Excel applications). Test target is executed automatically by calling a sub procedure where there is a manager that runs all existing tests... Is it possible with RubberDuck ? An other question : is it possible to write a test report at the end of te
 
> Is this more or less completed by #292? Perhaps we need to mark this with the source control label and finish it off in v1.3?
 
@Duga Yup.
What's left of #231 should be for 1.3, right.
The "delete" functionality is purposely missing: I want it to be a "Safe delete" refactoring, so yeah, 1.3
@RubberDuck ^^
 
3:42 PM
Gotchya;
 
3:52 PM
I need to work on the "Variable not assigned" bug
 
hey guys
can you box and unbox in vba?
 
Not sure what you're getting at @JLILIAman. What are you trying to do?
 
im trying to box an integer in an object and unbox it to an integer
 
 
3:56 PM
ive done it already in c# and was wondering if thats possible in vba apparently its not
 
Well... you could wrap it up in a class I suppose. Example of what you'd like to do please?
 
Sub Test()
Dim i As Integer: i = 1
Dim o As Object: Set o = i ' boxing
Dim j As Integer: j = CInt(o) ' unboxing
End Sub
it's returning mismatch on the second line which i can understand
 
you can't set a value type in VBA ;)
hi!
 
object is not a value type?
it's a reference type
 
4:03 PM
it's a class right?
not a construct?
 
something like that.... this isn't .NET!
 
i know it's not .net
lol
thats why im getting the error
 
lol indeed!
 
object is not really an object
 
4:05 PM
object is just a catch-all for object references
 
gotcha
mug
 
like, IsObject(foo) returns true for any object reference
 
what have you been filled up with today? Coffee as usual?
 
haha yeah
 
4:06 PM
ugh
im going to have a word with them
hot or warm coffee?
 
@JLILIAman What you need is an Int class with a default property of value.
Give me a minute.
 
Sure
 
> Hmm no repro on my build:

![image](https://cloud.githubusercontent.com/assets/5751684/6546498/cd3de758-c58b-11e4-80bd-a87cd9feb66c.png)
 
@JLILIAman you have a Rubberduck install?
 
nope man
im not home im in the city now
a filthy keyboard and a dirty screen an ashtray filled with cheap cigarettes butts... it's not pleasant
 
4:12 PM
lol
 
i dont like these internet cafés
 
@RubberDuck thoughts on #282?
 
@JLILIAman save this as a *.cls file and import it into your project
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "BoxedInt"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit

Private this As Integer

Public Property Get Value() As Integer
Attribute Value.VB_UserMemId = 0
    Value = this
End Property

Public Property Let Value(val As Integer)
    this = val
End Property
 
save what?
 
Then you can use it like this
 
4:17 PM
sure
 
Public Sub test()

    Const i As Integer = 1
    Dim o As New BoxedInt

     o = i

End Sub
 
@RubberDuck semantics are completely broken, I wouldn't use that code ;)
 
this is a workaround :)
 
Of course it is.
It's VBA. Practically everything is a workaround.
@Mat'sMug I didn't say I'd actually use it. I was asked if/how it could be done. =)
 
lol
 
4:19 PM
thanks i'll look try it when i get home are you sure this code will be here ?
 
if we're busy you may have to scroll up a bit ;)
 
> @retailcoder have you tried this including the line numbers?
 
i was making a joke
lol
 
@RubberDuck actually I have a repro with my own code, was going to mention
 
@JLILIAman send your self the perma link?
 
4:21 PM
you were supposed to say the code isn't going anywhere
 
but no, line numbers break the parser
 
thanks duck i'll copy it and send myself an email
 
If line numbers break the parser, that's probably the source of the bug.
@JLILIAman You're welcome!
 
oh hadn't noticed the line numbers on his screenshot
but there is something wrong with VariableNotUsedInspection
 
I'd leave it open and tie it to the other issue about the line numbers.
I've gotta go.
Oh.... there is?
 
4:24 PM
yeah
but "not used" and "not assigned" are two different things
 
> Line numbers are now known to break the parser, we need to modify the grammar to support them, and regenerate our lexer/parser - that will happen in the [GrammarIsFun] branch and I'd like release 1.3 to see an updated grammar. So I'm blaming this instance on line numbers. But on a related note, VariableNotUsedInspection is yielding false positives: I've tested on a bigger/real project and I see no false positives for VariableNotAssignedInspection, but VariableNotUsedInspection...
doesn't seem to catch all usages of a variable. Therefore, I'm closing this issue (keeping in mind that line numbers must eventually be supported by our grammar/lexer/parser), and focusing on #260.
 
@RubberDuck good job on the wiki sidebar!
 
> I wouldn't tag with Source Control, since it's really Code Explorer UI work. But yeah all that's left to implement needs features planned for 1.3, so moving this one to 1.3 is the right thing to do :)
 
4:47 PM
Hey VBA'ers
 
Thanks @Mat'sMug
 
You've got a question here:
 
Hey @Simon
 
0
Q: Randomizing Civilization 5 team choice

Simon KarfunkelThis macro is made to randomly draw specific number of civilization choices for a specific number of Civ V players. It is based on a list of 43 possibilities and the for loop in the while loop checks for already picked civilizations. Constant cell references point to values obtained with scroll-...

 
@SimonAndréForsberg ooh nice!
 
4:48 PM
Where you @ @StackExchange?!
 
@RubberDuck it probably had a @Duga moment ;)
 
It's a friend of mine, who had a birthday yesterday, he was a bit nervous about coming here so be kind to him ;)
 
> @wqweto we have an actual Rename refactoring scheduled for version 1.3, much better than Find&Replace (even with regex) if you asked me ;) As for VB6 support, that would be awesome...like @ckuhn203 said, unit testing wouldn't work, but I can see the improved navigation, code inspections and refactorings be useful in a VB6 environment.. only thing is, I don't have a VB6 IDE to play with - if you have one, and want to contribute, we'll be more than happy to accept a pull request that makes...
our ducky work in VB6!
 
5
Q: Randomizing Civilization 5 team choice

Simon KarfunkelThis macro is made to randomly draw specific number of civilization choices for a specific number of Civ V players. It is based on a list of 43 possibilities and the for loop in the while loop checks for already picked civilizations. Constant cell references point to values obtained with scroll-...

 
there's the bot ^^
 
4:53 PM
runs off to run it through RD Code Inspections
Only one.
Gotta do this the old fashioned way.
 
> Member 'CIV_draw' is implicitly public - right?
 
yup
 
@Mat'sMug okay I have no idea about what you just said there
 
the signature doesn't specify an access modifier, so the procedure is Public, implicitly
gtg, RL happening here - bbl
 
okay. I don't know what consequences that has in VBA... can it be called from other spreadsheets or something?
 
4:58 PM
if it's written in a standard non-private module, it means the procedure is exposed as a macro
and since most other languages make their members private by default, it makes code that's harder to maintain ;)
in this case it's probably intentionally exposed, so it's better off explicitly Public
my guess is that it's assigned to that button's click handler
 
yup, it is assigned to that button
 
I'll review it when the kids sleep (if they ever sleep!), my initial thoughts revolve abstraction opportunities
 
Yeah. Me too. Not sure how far I get before going to meet this shelter dog.
 
5:15 PM
> @retailcoder: I don't think current ANTLR parser is ready for rename a la VS.Net style. There is no symbol tables implementation and you can't move beyond parse trees (to AST) so you cannot tell if an identifier is a method or a local variable. Current parser cannot tell if A(i) is call method A with arg i or access array A with index i.
 
5:28 PM
@Duga oh yeah? watch me then. I promise you we're ready for this.
2
 
5:43 PM
I'm a bit offended by that. I seriously down he's spent that much time looking at the source code.
 
He knows his stuff, and he's right - technically - but who said the parser had to know everything there is to know about the code? he may not have seen the code for code inspections and extract method refactoring
we're using tree walkers to add the context to each identifier
 
@RubberDuck s/down/doubt/
@Mat'sMug there's no greater feeling than proving someone else wrong, is there?
 
Something tells me that guy is never going to bed.
 
5:58 PM
that guy is me implementing a Refactor/Rename functionality
 
That's the spirit!
 
oh and #260 is under way
the bug isn't with finding usages, it's with finding assignments
        public override void EnterVariableCallStmt(VBParser.VariableCallStmtContext context)
        {
            if (!(context.Parent is VBParser.AsTypeClauseContext))
            {
                base.EnterVariableCallStmt(context);
            }
        }
^^ that's considering too many things as "assignments"
@SimonAndréForsberg see, the grammar/parser is kinda dumb - but we know what the grammar rules are (and they're not changing), so we can fine-tune our tree walkers to get exactly what we're looking for
the only cost is performance
but then, that's what progressbars and wait cursors were made for, right?
2
 
@Mat'sMug yup!
 
6:29 PM
dammit, the double-click glitch is back! ugh
 
@Mat'sMug you want my w-key?
 
lol
no thanks!
it's just that last I committed the code explorer, double-clicking a module node would navigate to it without expanding/collapsing it - it was beautiful. and now it expands/collapses and it's annoying
I must have deleted something I shouldn't have
 
7:07 PM
> closes #260 - there is still something weird going on though, will open separate issue.
> Closing this issue, as the portrayed behavior has been corrected. However it seems an unused global somewhere, somehow makes an unused field be ignored.
 
7:21 PM
> fixed disappearing unused field when an unused global is declared
 
8:12 PM
hack hack hack hack hack
        private bool IsUserDefinedType(VBParser.VariableSubStmtContext context)
        {
            if (context == null)
            {
                return false;
            }

            var type = context.AsTypeClause() == null
                ? string.Empty
                : context.AsTypeClause().Type().GetText();

            // note: scoping issue; a private type could be used in another module (but that wouldn't compile)
            // Rubberduck inspections assume VBA code compiles though.
 
hi mug
 
hi!
 
Comment ça va?
 
> UDT-typed fields no longer cause a VariableNotAssignedInspectionResult
 
merveilleux! quand on règle des bogues, la vie est fantastique!
 
8:22 PM
Mais biensure.
Les bogues
c'est une autre façon d'apprendre
 
il reste 2 bogues dans milestone 1.21, et les deux sont status-deferred. donc...
donc, joie!
 
Superbe!
 
ah, merde.
pas exactement réglé
 
M. la tasse de Mat! Quelle la différence entre la classe object en .Net et en VBA?
Quelles idées?
 
lol
 
8:32 PM
Ma traduction? C'est rigolante, non?
;)
 
une classe définit un objet - en VBA comme en .NET. La différence c'est que cet objet est un objet COM en VBA, et un objet "managed" en .NET
l'objet COM n'a pas de constructeur paramétré, entre autres différences
 
entre autres différences
 
eh bien, en .NET tout objet dérive de System.Object
 
merci pour la mise en route, je vais rechercher sur ce truc sur MSDN
 
pas de problème :)
1 vote short for Necromancer here: stackoverflow.com/a/28860165/1188513
 
8:40 PM
ha?
 
j'ai répondu à une question quelque 3 années après qu'elle fut posée - 5 votes sur cette réponse me donnent un badge "Necromancer" :)
Youppi!
 
i've voted you up
voila
 
merci!
 
pff de rien tasse c'est du virtuel ça n'as pas de sens pour moi
:)
 
9:01 PM
> Disable QuickFix button when there are no more issues to fix
 
a bientot tasse
salut
 
Salut!
 
> The class seems to be instantiated more often than it needs to be; as a result the private fields are assigned more often than they need to be, and they are expensive to assign - cleaning this up should result in an instant performance improvement in code inspections. Also - may or may not be related (quite possibly is) - this code doesn't produce consistent inspection results: Private Sub DoSomething Dim a(1 To 10) As String a(5) = "Hi!" End Sub Sometimes it will produce a...
VariableNotUsedInspectionResult, but then refreshing code inspection results may remove it.
> This: public class IdentifierUsageInspector { private readonly IEnumerable<VBComponentParseResult> _parseResult;
private readonly HashSet<QualifiedContext<VBParser.AmbiguousIdentifierContext>> _globals; private readonly HashSet<QualifiedContext<VBParser.AmbiguousIdentifierContext>> _fields;
private readonly HashSet<QualifiedContext<VBParser.AmbiguousIdentifierContext>> _locals; private readonly HashSet<QualifiedContext<VBParser.AmbiguousIdentifierContext>>...
_parameters;
private readonly HashSet<QualifiedContext<VBParser.AmbiguousIdentifierContext>> _userDefinedTypes = new HashSet<QualifiedContext<VBParser.AmbiguousIdentifierContext>>(); private readonly HashSet<QualifiedContext<VBParser.AmbiguousIdentifierContext>> _assignments;
private readonly HashSet<QualifiedContext<VBParser.AmbiguousIdentifierContext>> _usages; Is a poor man's *symbols table* - a way to lookup a scoped identifier and determine if we're looking at a local...
variable, a field, or a global variable; we need to have a better implementation for this - the idea is to be able to tell whether this: foo = bar(42) Is referring to the 42th index of array bar, or to the result of function bar with parameter value 42. So that when we start working on the Rename refactoring, finding all references to the selected identifier will be easy as 1-2-3. And once we can "find all references" to any given identifier, why not implement a codepane context menu...
button to "Find all references"?
 
9:22 PM
@RubberDuck I think we're out of bugs to fix for 1.2... are we?
 
9:41 PM
@Mat'sMug the double click glitch is an either or. Either we can navigate directly to a module and we have the glitch, or the glitch goes away and we can't navigate.
At least not in a double click.
Anyway, I'm pretty sure that's all the bugs.
 
@RubberDuck No, something happened - it was working perfectly well ...there's still that to fix.
 
10:08 PM
Because I disabled the double click event for nodes with child nodes.
Enabling the event means we can navigate, but it also toggles the node's expanded state.
 
10:40 PM
@Mat'sMug is this code still there? github.com/retailcoder/Rubberduck/commit/…
Nope. I've got it. One sec.
 
> fixes code explorer treenode collapsing/expanding issue
 
@Duga @Mat'sMug it works, but the screen will "flicker" a bit because the collapse happens before it gets re-expanded.
 
11:16 PM
Only defining endOfRange and not initializing it as False inside the for-loop causes the routine to generate the same Civ for each loop. I added "endOfRange = False" right after the definition to counter this. — Simon Karfunkel 7 mins ago
You spreading wrong information, Ducky? (@RubberDuck)
 
11:31 PM
@RubberDuck I'll look at it in a bit
 
Is it just me or is "Suggestion: Member 'CIV_draw' is implicitly Public" not really a suggestion but more of a "problem statement"?
 
Yeah @Simon. I was in a bit of a rush.
 
@RubberDuck no worries. Simon is sleeping now so you have plenty of time to fix it now ;)
 
Ummm now that you mention it, yeah. But it could also possibly read
> Warning: member Blah blah blah
 
yup ^^
but right now, it says "Suggestion"
 
11:39 PM
... Yeah. You're right.
English & code don't mix well.
 
> > 1 issue found. Suggestion: Member 'CIV_draw' is implicitly Public - VBAProject.Module1, line 3

This isn't really a suggestion as it doesn't contain a suggestion for how to fix it, it is more of a warning / problem statement. Providing an actual suggestion, such as "Declare method public", is more helpful. (Perhaps even a quick-fix button or hotkey?)
 
I love making issues for you guys :)
303 issues? That's a lot
 
@SimonAndréForsberg there is a quick-fix button, and a quick-fix implemented for that inspection. What you pasted there is the code inspection results copied to clipboard from the code inspections toolbar...
are you suggesting that issues should be fixed from.. clipboard content??
 
@Mat'sMug probably not :)
 
@SimonAndréForsberg 70 69 opened, 197 198 closed ;)
 
11:46 PM
^^ that is impressive
 
okay, if it is just code inspection results, naming it "Warning" is probably better
 
It's still confusing :)
 
> Turns out there *is* a quick-fix implemented for that inspection :)

What you're seeing is only the result of pasting inspection results copied from the code inspections toolwindow.

Move along, nothing to see here...
 
11:48 PM
inspections without a fix are usually at "Hint" level
but inspection severity is 100% configurable, too :)
 
@Mat'sMug Either way, it's not a suggestion.
 
private string FormatResultForClipboard(ICodeInspectionResult result)
{
    var module = result.QualifiedSelection.QualifiedName;
    return string.Format(
        "{0}: {1} - {2}.{3}, line {4}",
        result.Severity,
        result.Name,
        module.ProjectName,
        module.ModuleName,
        result.QualifiedSelection.Selection.StartLine);
}
 
11 mins ago, by RubberDuck
... Yeah. You're right.
 
it's the severity level
 
What Severity levels do you have?
 
11:51 PM
    public enum CodeInspectionSeverity
    {
        DoNotShow,
        Hint,
        Suggestion,
        Warning,
        Error
    }
^^ same as ReSharper ;)
 
Suggestion implies some actual Suggestion content though, IMO.
I was not aware that you had that enum. That makes it more clear.
 
doesn't it ;)
well the suggestion per se, is on the quick-fix button
 
Perhaps I should just shut up as I haven't used your tool myself ^^
 
> Specify Public access modifier explicitly
lol
 

« first day (275 days earlier)      last day (2905 days later) »