« first day (571 days earlier)      last day (2609 days later) » 
00:00 - 21:0021:00 - 00:00

00:00
...
Wait a second, did you make the parser call us, @Mat'sMug?
RELOAD!
[Hosch250/Rubberduck] 12 commits. 1563 additions. 665 deletions.
It doesn't look like it.
[Hosch250/VSDiagnostics] 59 commits. 10379 additions. 7518 deletions.
[retailcoder/Rubberduck] 44 commits. 25008 additions. 3218 deletions.
[rubberduck-vba/Rubberduck] 21 commits. 3 opened issues. 1 closed issue. 11 issue comments. 11263 additions. 1749 deletions.
[skiwi2/OLog] 2 commits. 349 additions. 21 deletions.
[Vannevelj/VSDiagnostics] 14 commits. 2 issue comments. 669 additions. 120 deletions.
[Hosch250/Rubberduck] Hosch250 pushed commit bb02e668 to ReinstateTests: Fix a couple bugs in the parser calling us.
00:04
@Mat'sMug If you want, I have the parser calling us in ReinstateTests.
Oh, OK.
There is a bug there. You need to throw on the Error state so we don't lock the VBE up if something happens.
I'll revert my changes and pull.
Revert "Fix a couple bugs in the parser calling us."

This reverts commit bb02e668195fd553b54f67e61361b7a48a45908f.
Revert "Make the parser call us."

This reverts commit 43f2308326ec018242f6bd33c7dc57abd7ac6db3.
I also made other changes, in ExtractInterfaceModel - you weren't accepting members with an implicit accessibility, and adding Accessibility.Implicit caused the thing to start treating the class module itself as a member
OK.
I thought you said to just accept public members.
implicitly public is still public
I'll fix ImplementInterface soon.
00:09
I want to understand why it's not accepting the selection
Also, I implemented the body of Auto Save, but I'm not sure how to wire it up.
Just inject it into App.cs and run it on a different thread?
Merge pull request #11 from rubberduck-vba/next

sync [next] with main repo
Merge pull request #13 from rubberduck-vba/next

sync with merged PR's in main repo
Merge pull request #15 from rubberduck-vba/next

sync with merged PR's in main repo
Merge pull request #17 from rubberduck-vba/next

sync with merged PR's in main repo
[Hosch250/Rubberduck] retailcoder pushed commit effd3f02 to BugBlipper: parser state fixes
[Hosch250/Rubberduck] retailcoder pushed commit 3f337019 to BugBlipper: reinstated 1000ms startup delay
@Mat'sMug It doesn't re-implement any implemented interfaces over here.
Also, what did you do? It didn't used to give that error about invalid selections.
What the heck did you do? It isn't seeing the reference to the interface!
It isn't even seeing the bloody interface.
And, it appears the declarations aren't being updated.
00:27
ParseAll needs to invalidate module state before it starts doing work
otherwise if the first module parses it looks like the state gets to Ready before all modules are done
        private void _state_StateChanged(object sender, EventArgs e)
        {
            if (_state.Status != ParserState.Ready)
            {
                return;
            }

            var declarations = _state.AllDeclarations.Where(d => !d.IsBuiltIn).ToList();
here declaration only contains 4 items, and Sheet2 isn't even there
the problem is with the parser/state, not with the modified refactoring code.
Well, it was working before. Don't know why.
@Hosch250 oh, right. needs to reparse, and it's fine
@Hosch250 because a blocking loop does work ;-)
Well, what's wrong with this one?
I'm not seeing hardly any of the declarations I should be seeing.
It looks like it parsed 3 of my 6 modules.
Is the parser being too quick in reporting back?
I don't know.
It looks like it should work, the state is reporting ready...
It looks like you report Ready as soon as a single module finishes resolving.
You can't be doing that until the last one is done resolving.
It was probably a coincidence that mine was working.
00:43
Like I said, ParseAll should start with invalidating all module states
So, how to do that?
Just stick this in for each of the components? State.SetModuleState(component, ParserState.Error);
that's what I thought.. something else breaks
It gives the same result over here.
ok works. I still get the invalidselection message, but I get all declarations I expect
I don't know why that would happen.
This is what I have at the moment:
private void ParseAll()
{
    var components = _vbe.VBProjects.Cast<VBProject>()
        .SelectMany(project => project.VBComponents.Cast<VBComponent>()).ToList();

    foreach (var component in components)
    {
        State.SetModuleState(component, ParserState.Error);
    }

    var result = Parallel.ForEach(components, component => { ParseComponentAsync(component, false); });

    if (result.IsCompleted)
    {
        using (var tokenSource = new CancellationTokenSource())
        {
            Resolve(tokenSource.Token);
00:52
parser seems to hang if IThisWorkbook gets removed from the project
@Hosch250 I have exactly that
well, almost. I'm working off the private field instead. but same.
Supper time, but things are really busted over here.
only the interface reference is missing
I have 9 non-builtin declarations in sight here
it's like the parser is reporting "ready" state without resolving
and if a module is removed from the project, it hangs in "parsing" state
I think I'll add an Invalid or Pending state so that we don't reset to an error state without an actual error
@Hosch250 no panic, it's only a matter of getting the parser/state to work properly and then everything will "just work"
I think we need an AllUserDeclarations instead of filtering !IsBuiltIn all the time
01:23
Me too.
@Mat'sMug Nope, I'm not even seeing the declaration.
I just have Sheet1, ThisWorkbook, and Class1.
I am missing Class2, IClass2, and the new IClass1.
all right, hold on
[retailcoder/Rubberduck] retailcoder pushed commit fad090d6 to next: added debugging declarations in ExtractInterfaceRefactoring, added Pending state.
@Hosch250 can you pull that?
Yes.
I have a breakpoint set on line 87 of ExtractMethodRefactoring.cs
01:31
[Hosch250/Rubberduck] retailcoder pushed commit fad090d6 to BugBlipper: added debugging declarations in ExtractInterfaceRefactoring, added Pending state.
It doesn't work.
Symptoms are the interface is called, then the parse happens.
define "doesn't work"
Same as before.
you're not being clear...
I get the invalid selection popup, then I click OK, then the parse button runs through the parse thing, with parsing-resolving-...
01:34
did you set a breakpoint?
No.
I'll do that in a sec.
        var declarations = _state.AllDeclarations.Where(d => !d.IsBuiltIn).ToList();
that should contain 9 declarations when you break
I just want to make sure we see the same thing with the same code
OK.
I have 21.
wah
ok, I meant off a brand new VBProject with ThisWorkbook and 3 sheets, and a DoSomething procedure in ThisWorkbook
Don't worry, I'm using different code that you :)
But, I'm not seeing the interfaces.
01:38
I'm seeing the extracted IThisWorkbook.. wait a sec.. you're right.
it's not there
dafuq
And guess what?
I got 6
what?
_state_StateChanged is only hit twice.
It should be hit at least 3 times.
not necessarily
the overall state depends on quite a few things
It should hit Parsing, Resolving, Ready.
And probably Parsed too.
01:41
        // prevent multiple threads from changing state simultaneously:
        lock(_lock)
        {
            Status = _moduleStates.Values.Any(value => value == ParserState.Error)
                ? ParserState.Error
                : _moduleStates.Values.Any(value => value == ParserState.Parsing)
                    ? ParserState.Parsing
                    : _moduleStates.Values.Any(value => value == ParserState.Resolving)
                        ? ParserState.Resolving
                        : ParserState.Ready;
it can't hit Parsed
You took that out?
that nested ternary needs to die
Where is Pending?
it's only set once in ParseAll
per-module
It should still be in there.
01:42
agreed
56 secs ago, by Mat's Mug
that nested ternary needs to die
I'm fixing it.
Unless you are.
well, all I have is this:
    private ParserState EvaluateParserState()
    {

    }
what's on your mind?
Umm, a bunch of ifs?
If you are on it, I'll let you handle it.
I've got to review my cover letter anyway.
The latest suggestion was to say how their business would benefit from taking me on.
Should I say I'm an obstinate, pig-headed person who'll be sure to accidentally take out their system? :P
01:48
that's sure to get noticed, ....probably not the way you'd want though :)
OK, I'm back.
(Like I really left...)
02:08
I'm feeling kind of burned out. Got any easy issues for me to do?
take a break man, you spent the whole holidays implementing stuff
Actually, I've not done anything serious since before Christmas.
Maybe an inspection or two would be good. Something easy, but productive.
@Duga :)
You merged that, but didn't close the issue.
02:17
yeah.. I tend to rely too much on commit messages
Autosave seems to work, sort of.
It has a COM exception.
Invalid cast. Hmm.
02:32
huh.. it worked
What.
            // prevent multiple threads from changing state simultaneously:
            lock(_lock)
            {
                Status = EvaluateParserState();

            }
        }

        private ParserState EvaluateParserState()
        {
            var moduleStates = _moduleStates.Values.ToList();
            var state = Enum.GetValues(typeof (ParserState)).Cast<ParserState>()
                .SingleOrDefault(value => moduleStates.All(ps => ps == value));

            if (state != default(ParserState))
OK, commit it then.
hold on, might have been a fluke. removing breakpoints to confirm.
COM exception: hresult -2146827540
At project.SaveAs(string).
No idea what's up...
02:35
wah, it really worked
there's too many Pending states though
I'll make it return Parsing state when either component is in Parsed state. That way it will say Parsing when 1 module is Parsed and every other is Pending
OK.
Do you know which error that is?
My code is working perfectly, up until the managed code fails on me.
*unmanaged
OK, unmanaged.
It is in my AutoSave branch.
I simply set the timer up in the ctor, and let it run.
It works perfectly (I have it at a 15-second save for testing purposes), but the save itself fails.
foreach (var project in _vbe.VBProjects.OfType<VBProject>().Where(p => !p.Saved))
{
    try
    {
        project.SaveAs(_vbe.ActiveVBProject.Name);
    }
    catch (COMException e)
    {
    }
}
that one really needs a checkbox to be enabled in the RD settings
I'm not going to touch the WinForm settings.
It doesn't have interfaces and is almost impossible to get working.
02:40
haha IKR
still, make that feature depend on some IAutoSaveSettings with an IsEnabled property
It will.
it can be a "fake" implementation that just returns true for now
I don't even ctor-inject it because we need to get the time settings.
It is just this statement in App.cs's ctor:
time settings?
_autoSave = new AutoSave.AutoSave(_vbe, 15000);
@Mat'sMug To set the save interval.
That is 15 seconds.
02:42
yeah, well, that would be the Delay property on that interface ;-)
BTW I know why you're getting a COMException
Good.
you can't call .SaveAs on a VBProject like this
I am working in an existing, saved document, BTW.
@Mat'sMug Then why is it there?
because the VB6 IDE implements the same VBE interface
That is just the most idiotic thing I've ever heard of.
02:44
lol
How hard is it to delete a single line?
It probably isn't even in the same file anymore.
if you run ThisWorkbook.VBProject.SaveAs "foo.bar" in the immediate pane, you'll get a runtime error 748 'Method or property is not valid in this type of project.'
@Mat'sMug That's exactly the error I'm getting.
OK, so how do I save the thing?
you need to call into the host app's API
ctor-inject an IHostApplication
OK...
02:46
the interface needs a new void Save() member
and then you'll need to implement it for each supported Office application
things will get "fun" with Outlook
And then call Application.SaveWorkspace();?
you actually need to access the active workbook / document
so for Excel that would be
Application.ActiveWorkbook.Save
you might want additional checks to make sure the workbook's VBProject is the project you intend to be saving
nothing's simple eh
I can't get the VBE.
huh?
oh, from the office API
Yeah, I see the ActiveWorkbook, but that looks awfully like it will just save the workbook and not the VBE.
02:52
the project is the workbook
you save the workbook, it saves the project along with it
Well, Access doesn't have an Active or a Save.
the project is embedded in the workbook
each Office app will have a different way of doing this
Word and Excel are easy.
02:54
Access doesn't support multiple opened VBProjects, the save method could be at the Application level
IDK
PowerPoint and Publisher also behave.
Access has a CurrentProject, but no Save.
@RubberDuck might have a clue at this one. Worst case, leave the implementation a no-op, or only enable the feature when the host app has it implemented (less overhead)
OK, it seems to work.
I can get it through reflection.
Yikes
Yep, it works.
03:03
Darn freakin intuitive API.. thanks Microsoft!
@Hosch250 I don't like this very much... it's easy to save another workbook than the one with the active project
And if the workbook was never saved, it would prompt for a SaveAs name
It shouldn't even try to do it if the host workbook was never saved
I think
ok this is what I get after extracting IThisWorkbook with Sub Foo() and Sub Bar():
Implements IThisWorkbook

Public Sub IThisWorkbook_Foo()
    Err.Raise 5 'TODO: implement interface member
End Sub

Public Sub IThisWorkbook_Bar()
    Err.Raise 5 'TODO: implement interface member
End Sub

Sub Foo()

End Sub

Sub Bar()

End Sub
I think we're in business
hmm the todo items don't show up
03:21
[retailcoder/Rubberduck] retailcoder pushed commit 27a470f9 to next: fixed parser/state glitch; fine-tuned extract/implement interface refactorings
Try '<space>TODO
Also, I can't see anything with reflection, and I know I could see a big list before when we were working on the Run thing.
How do I see the list of all methods?
I'm trying var m = typeof(Application).GetMethods(BindingFlags.Public | BindingFlags.NonPublic);.
Also, I've got to do the dishes. BBL.
call ToList, you'll be able to navigate m in debug
nope, a space doesn't fix it. I think the todo's are broken
ooh I love this
[retailcoder/Rubberduck] retailcoder pushed commit 5984913c to next: included identifier name in inspection result for meaningful names; reworded a bit.
04:12
the ducky icon is making everything crash the minute you're no longer in en-US
[retailcoder/Rubberduck] retailcoder pushed commit ea609e0c to next: added component name to OptionExplicit inspection description; fixed ducky icon in localized resources
04:55
I did call ToList(), and there wasn't anything.
05:20
Oh, I need the Instance flag.
Neither Outlook nor Access have a Save.
05:38
@Hosch250 hmm... another approach could be to find and run the VBE's own "Save" command.
05:52
eh, loading the CodeInspectionsWindow WinForms control blows up VS
@Hosch250 I don't know why the CodeInspectionsWindow blows up VS, but FWIW I have no problem viewing InspectionResultsControl.xaml in the designer
06:14
wasn't too hard. now there's a meta/tooltip for every inspection :)
[retailcoder/Rubberduck] retailcoder pushed commit 66e2fbd8 to next: added meta descriptions for all inspections
> Addressed in 66e2fbd8.
Closes #896
[rubberduck-vba/Rubberduck] retailcoder pushed 12 commits to next (only showing some of them below)
Merge pull request #15 from rubberduck-vba/next

sync with merged PR's in main repo
Merge pull request #17 from rubberduck-vba/next

sync with merged PR's in main repo
[rubberduck-vba/Rubberduck] retailcoder pushed commit effd3f02 to next: parser state fixes
[rubberduck-vba/Rubberduck] retailcoder pushed commit 3f337019 to next: reinstated 1000ms startup delay
[rubberduck-vba/Rubberduck] retailcoder pushed commit fad090d6 to next: added debugging declarations in ExtractInterfaceRefactoring, added Pending state.
[rubberduck-vba/Rubberduck] retailcoder pushed commit 27a470f9 to next: fixed parser/state glitch; fine-tuned extract/implement interface refactorings
[rubberduck-vba/Rubberduck] retailcoder pushed commit 5984913c to next: included identifier name in inspection result for meaningful names; reworded a bit.
[rubberduck-vba/Rubberduck] retailcoder pushed commit ea609e0c to next: added component name to OptionExplicit inspection description; fixed ducky icon in localized resources
[rubberduck-vba/Rubberduck] retailcoder pushed commit 66e2fbd8 to next: added meta descriptions for all inspections
Merge pull request #910 from retailcoder/next

Inspections Meta
07:13
[retailcoder/Rubberduck] retailcoder pushed 13 commits to next
[retailcoder/Rubberduck] retailcoder pushed commit e25201d6 to next: manual merge
[retailcoder/Rubberduck] retailcoder pushed commit e07acaef to next: added 'AllUserDeclarations' member to parser state, to return declarations where !IsBuiltIn; replaced 'AllDeclarations' and removed redundant where filters where appropriate.
> Plenty more to translate in Rubberduck.Inspections.InspectionsUI.resx now; note that code inspections resource strings will eventually be moved there.
07:34
[retailcoder/Rubberduck] retailcoder pushed commit 74454291 to CodeExplorer: code inspection results are displayed without a manual refresh, and running quickfixes reparses and refreshes.
[retailcoder/Rubberduck] retailcoder pushed commit 2db56c06 to CodeExplorer: added ParserState to ParseProgressEventArgs so ModuleStateChanged can report component state
08:07
[retailcoder/Rubberduck] retailcoder pushed commit f26135e4 to CodeExplorer: removed junk classes, added skeleton for RefreshCommand
TTGTB
Latest inspection finds possible bad names and suggests to refactor/rename. This was issue #31, closed in PR.. #902! https://t.co/56UV0wy0tW
 
5 hours later…
13:02
@Mat'sMug I might have a clue about what? I tried reading the transcript but wasn't able to follow.
 
3 hours later…
15:36
@RubberDuck saving, in Access
Like, saving the project?
Hmmm..... I've never done that through VBA. I usually took great lengths to stop anything from being saved.
@Rubberduck203 right now, it isn't. But we'll have an exclusion list, and boom done! :D
@TweetingDuck that will need a settings page
@Mat'sMug Heslacher is really cracking down on my use of var.
@Duga This is worse even than my commit messages!
@Mat'sMug I looked through its commands, couldn't see any Save method.
16:04
@Hosch250 I might actually post an answer too. A number of things hit me when I brought the code in yesterday. I made as many changes, too..
I don't care about var though ;-)
I accepted two Duck answers and a Chris Wue answer.
Hmm, @Mat'sMug Dirtiest Hack in the West: Simulate pressing CTRL-S with the keyhook.
16:23
@Hosch250 the keyhook would actually "eat" and repurpose the Ctrl+S hotkey. You're thinking of SendKeys, and that could work... possibly.
17:06
For issue #909, is this right?
public void Dispose()
{
    if (Application != null)
    {
        Marshal.ReleaseComObject(Application);
    }
}
public interface IHostApplication : IDisposable
17:22
[Hosch250/Rubberduck] Hosch250 pushed 17 commits to AutoSave
[Hosch250/Rubberduck] Hosch250 pushed commit 1219e7bd to AutoSave: Merge branch 'next' of github.com/rubberduck-vba/Rubberduck into AutoSave
[Hosch250/Rubberduck] Hosch250 pushed commit 66e47054 to AutoSave: Updates. Working for all but Outlook and Access.
[Hosch250/Rubberduck] retailcoder pushed commit 27a470f9 to BugBlipper: fixed parser/state glitch; fine-tuned extract/implement interface refactorings
[Hosch250/Rubberduck] retailcoder pushed commit 5984913c to BugBlipper: included identifier name in inspection result for meaningful names; reworded a bit.
[Hosch250/Rubberduck] retailcoder pushed commit ea609e0c to BugBlipper: added component name to OptionExplicit inspection description; fixed ducky icon in localized resources
[Hosch250/Rubberduck] retailcoder pushed commit 66e2fbd8 to BugBlipper: added meta descriptions for all inspections
Merge pull request #910 from retailcoder/next

Inspections Meta
17:50
0
Q: Excel VBA - Concatenate data files into master document; make multiple master documents if data exceeds Excel row limit

DKnightHere is a code I wrote to concatenate data files into master file. Once the data to be pasted into the master sheet exceeds the number of rows left in the master sheet, the program will create a new master document and continue the process. Hopes this helps. Help me clean it up and make it faster...

18:08
0
Q: Using VBA for Excel: Move zipped files from multiple subfolders into one master folder via loop process

DKnightI am trying to write a code that: First Prompt: asks the user to select the folder that contains all zipped folders where each zipped folder contains a data file. Second Prompt: Ask the user to select the master folder path to place the unzipped data files into. The program will unzip the fi...

 
1 hour later…
19:38
@Mat'sMug Can you get the button ID for Save in the VBE?
The VBE is blocking me for some reason over here.
I'm going to try to programmatically call it.
20:05
How does that rename feature decide what needs renamed?
Actually, can you move that question to the VBA room?
@EBrown I did that one, so I should know.
2 messages moved from The 2nd Monitor
@Hosch250 I'd be curious to see how you did it.
I cannot end with a number, it must be 3+ characters long, and it must contain a vowel:
the rename feature doesn't know anything. it's an inspection that's looking for meaningless names and suggesting to refactor/rename :)
Ah.
I might actually want to help with that one.
Do what?
Feel free to help with anything.
@Mat'sMug Do you know the ID for the Save command in the File menu?
Well I've always enjoyed working with heuristic data.
20:09
I can't get it for some reason.
@EBrown The names are the easiest. It just is a bunch of Linq.
We don't want to get too much stricter, or it will fire on too many declarations.
I don't know the ID.. hmm where did I put that VBA code again...
At the moment, maybe. But that doesn't prevent hungarian notation.
I have it, but it doesn't run on my system.
I need to get my Baysian spam filter up and running.
@EBrown Feel free to make a PR.
20:10
nothing can prevent Hungarian notation. not even a duck.
Public Sub FindMenuCommand(ByVal caption As String)
    Dim cmd As CommandBar
    Dim ctl As CommandBarControl
    For Each cmd In Application.VBE.CommandBars
        For Each ctl In cmd.Controls
            If ctl.caption = caption Then
                Debug.Print "Found '" & caption & "' at CommandBar '" & cmd.Name & "', index " & cmd.Index & "; control #" & ctl.Index & "; " & "Id'" & ctl.ID & "'."
            End If
        Next
    Next
End Sub
Found '&Save Book1' at CommandBar 'Standard', index 2; control #3; Id'3'.
Found '&Save Book1' at CommandBar 'Document', index 6; control #1; Id'3'.
ID 3
bbl
OK, great.
It said it wasn't trusted on my system.
It works!
@Mat'sMug We can save for any application.
[Hosch250/Rubberduck] Hosch250 pushed commit f779c832 to AutoSave: Save through the VBE.
@Mat'sMug When you come back later, I want to ask about the unit tests.
Right now, TFL. I didn't even realize it was 2PM til just now...
20:45
@Hosch250 you probably need to enable programmatic access to the VBE, it's disabled by default
one thing that's left to implement in inspections: the Declaration class has a IsInspectionEnabled member that returns false when a declaration is annotated with a '@Ignore {inspection-name} comment, but none of the inspections is using it at the moment
00:00 - 21:0021:00 - 00:00

« first day (571 days earlier)      last day (2609 days later) »