« first day (361 days earlier)      last day (2819 days later) » 
00:00 - 18:0018:00 - 00:00

12:00 AM
RELOAD!
[Cardshifter/Cardshifter] 22 commits. 4 opened issues. 2 closed issues. 7 issue comments.
[retailcoder/Rubberduck] 14 commits. 4 opened issues. 6 closed issues. 2 issue comments.
 
We won in issues closed, anyway...
 
12:37 AM
We all win if we have things to commit :D
2
 
I need to deconstruct a menu, but I don't know how to do it.
Once I do it, I can close another issue.
A menu and a command bar...
 
12:51 AM
What do you mean, deconstruct?
I think at the end, our menus and buttons will have to implement some command pattern
Menus are a freakin mess right now..
brewing coffee
 
Well, I found how to remove it.
 
Oh, the teardown! Awesome!
 
The trouble is, I think it will remove all menus by addins.
IDE.CommandBars[1].Reset();
 
If you're removing it with the big red Reset() button, ...not it ;-)
 
Lol, yeah, I figured as much.
Here, what is the ID of the Rubberduck menu?
If I have that, I can remove it.
 
12:58 AM
we can't remove it by its object reference?
 
I can pass 5 values in to the FindControl().
And I can call Delete() after that.
Type, Id, Tag, Visible, and Recursive
 
I just updated the 1.4 milestone to June 14
that should be enough
 
For example, this will remove the Edit button:
menuBarControls.Parent.FindControl(MsoControlType.msoControlPopup, Visible: true).Delete();
 
I think ID's are only for built-in menus
not sure though
 
I tried using the debugger to read the data, but VS closed on me :(
 
1:02 AM
I used VBA to figure out the menu id's
I mean, the VBIDE API is the same in VBA as in C# you know ;-)
 
Oh, OK.
 
it should be possible to do the same in C#, but I find it faster to hack up a quick method in VBA to explore the commandbars
no need to build and launch Excel and then fire up the VBE
 
Can you give me all the data you find?
I need to repair Office - that wretched code removed the File and Edit menus - for good.
Do NOT run this:
menuBarControls.Parent.FindControl(MsoControlType.msoControlPopup, Visible: true).Delete();
My first virus
 
well the problem is in RubberduckMenu.Initialize()
lol
        public void Initialize()
        {
            const int windowMenuId = 30009;
            var menuBarControls = IDE.CommandBars[1].Controls;
            var beforeIndex = FindMenuInsertionIndex(menuBarControls, windowMenuId);
            var menu = menuBarControls.Add(MsoControlType.msoControlPopup, Before: beforeIndex, Temporary: true) as CommandBarPopup;
            Debug.Assert(menu != null, "menu != null");

            menu.Caption = RubberduckUI.RubberduckMenu;
 
We add it there.
 
1:06 AM
menu should be promoted to a field
 
So, we need to remove it when we dispose it.
 
yes
 
So, if I have the Id, I can remove it.
But, it had better be the right ID.
 
and then you can just get its ID with _menu.Id
 
Really?
 
1:07 AM
yup
 
Yup.
 
yup-yup
 
OK, I never use those menus anyway, so I'm going to do this quick.
 
just make sure you dispose it last in the disposal sequence
not sure it really changes anything, but just in case
 
> Our official website hasn't been updated in ages. Let's revamp the whole thing and launch a new design together with the new version.

Any suggestions?

(yes, I'm considering putting the nav at the top like a *normal* website)
 
1:11 AM
Removes it from the menu.
 
Does NOT remove it from the context menu.
 
what is/isn't?
the context menus also need to tear down
 
Yeah.
It is removed from the menu bar at the top.
 
20 mins ago, by Mat's Mug
Menus are a freakin mess right now..
 
1:13 AM
It is not removed from the context menu.
 
context menu is not the main commandbar...
 
It is not put back in when you reload the addin.
 
hmm we're not doing this right then
if you put an empty destructor in _Extension.cs, does it get called when RD is unloaded?
 
Probably, hold on.
0
Q: July 2015 Community Challenge

Hosch250What should we do this time? Feel free to resubmit non-winning ideas from previous rounds, although new ideas are usually more successful. Post an answer to this question with your challenge Vote for those answers which interest you At the end-of-day on Sunday, May 31st, the most-voted post wil...

It does NOT get hit when unloading, but does when closing.
 
that's an interesting finding
so we're actually disposing a live instance
 
1:27 AM
I need to reboot,
 
see you on the other side then!
 
Hi.
 
Hi!
 
Running a quick repair.
I tried to before, but it never started, so I had to restart.
Didn't work.
Going to try RESET().
Worked.
 
2:12 AM
@Hosch250 voted
 
Thanks.
 
no problem. It'll keep you busy & off the streets. ;)
 
@all - @Mat'sMug - head over to the 2nd and check the pinned question, you too, @Simon
 
 
2 hours later…
3:57 AM
[retailcoder/Rubberduck] retailcoder pushed commit 39ffbd6c to next: removed unused using statement
[retailcoder/Rubberduck] retailcoder pushed commit 1b740e24 to next: adjusted namespaces - renamed Rubberduck.Config to Rubberduck.Settings, in line with Rubberduck.UI.Settings.
[retailcoder/Rubberduck] retailcoder pushed commit f008ad19 to next: woopsie - fixed build errors
 
@Hosch250 ...sorry - if you had pending changes, I think I just gave you a bit of trouble here
 
Umm, not sure what I have.
I've been trying to dispose of the different menus, and I've got it sort of working.
At least, parts of it are working...
I'm getting a COM exception when I try to re-create a DockableWindow, though.
I suspect I'm not disposing of it properly.
This is the line:
var toolWindow = _vbe.Windows.CreateToolWindow(_addin, _DockableWindowHost.RegisteredProgId, control.Caption, control.ClassId, ref userControlObject);
You don't want that, I don't think.
So, this is what I've tried:
_window.Detach()
_window = null
Oh, I don't remember it all.
 
If you catch the COMException and recreate it again I've found that it works.. ugly ugly ugly hack, but works.
Not all docked windows do that though
Do the code explorer and code inspections windows blow up?
@Hosch250 there's unmanaged COM involved, the COM object needs to be marshal/released
 
4:14 AM
I've not worked with them yet - I'm doing the Rubberduck Menu.
@Mat'sMug Is there a way to force that?
 
Marshal.ReleaseComObject(thing);
 
OK.
 
[retailcoder/Rubberduck] Hosch250 pushed commit bd474fea to next: Rubberduck menu changes text
 
That didn't help, but the try-re-try did.
It flickers a little, but it works.
Also, don't do it a whole lot, because it fills the context menu up.
I haven't removed it from there yet.
Also, the Code Explorer Window is not done.
I need to get ready for bed now, see you tomorrow.
 
the Code Explorer and Code Inspections, for some reason, seem to cleanly handle closing & reopening.
ok, tomorrow then
 
4:37 AM
[retailcoder/Rubberduck] retailcoder pushed commit 78d4b510 to next: codepane context menu teardown
 
@Mat'sMug They aren't menus in menus.
And, Excel is crashing again.
 
not here...
 
Hmm.
 
repro?
 
Change language from English to French, and back.
 
4:48 AM
aw, only did half of that ;)
 
Did you remember to -= all the handlers in the context menu?
 
removing the event provider removes the risk of the provider outliving the listener, no?
 
Not sure, but that is what I did before.
 
also I had to remove the -='s in the code inspections toolbar, because the instance is null when Dispose gets called
 
All I know is it was working before, and now it isn't.
 
4:52 AM
I didn't look too deep at how you implemented the teardown, but I'm calling the context menu teardown in the Dispose method, after the handlers are removed
 
All I did was remove the menu item.
 
comment on the commit if you think there's something that's wrong with it ;)
 
Trouble is, it might have been doing it in my commit, but I believe it wasn't.
BTW, Code Inspections toolbar works halfway.
(Uncommited)
It works from one to the other, because of the different names, I believe, but crashes when you got back.
 
not sure what you mean here
 
Say you start in French.
Change it to English.
You have two toolbars now (don't know why yet).
Go back to French.
Crash.
 
4:59 AM
bring up the VBE, show the code inspections toolbar, click refresh while there's no active codepane. crash.
 
BTW, there is another z-value for you to translate.
And, I've got to get to bed.
I don't know how you can stay up past midnight like this...
 
done
1:04AM here
 
5:16 AM
nope. no repro still
 
[retailcoder/Rubberduck] retailcoder pushed commit 11f168d7 to next: localized reset button
 
5:34 AM
[retailcoder/Rubberduck] retailcoder pushed commit 237b9df3 to next: fixed NRE in settings dialog when a parent node is selected; removed redundant label in "general settings" tab
> Code Explorer is great, but I want to be able to right-click a module in the native project explorer and have all the goodies, too.
> seems to work nicely now
> Repro:

- Open up a relatively large VBA project
- Bring up the code inspections, click the "Refresh" button
- After parsing completes, inspections refresh button turns into a cancel button - click it

The currently running inspection will return its results, and code inspections will then cancel and whatever results have completed will show up. Cursor remains stuck on "wait".

This *should* be an easy-fix; tagging as such.
 
5:59 AM
and this is how the cookie crumbles
just noticed, the code inspections toolbar doesn't die
 
 
3 hours later…
9:28 AM
@rolfl Why you ping us here instead of in the 2nd?
 
 
2 hours later…
11:27 AM
> 50 stars!!!
2
 
11:43 AM
Interesting search query that brought at least one person to my blog last month.
> how to use Rubberduck for VBA
 
We need a user manual
 
There is one, of sorts.
There's the wiki.
 
@RubberDuck nice to see that it's only us on the front page
 
12:09 PM
Most of the second page too.
 
12:51 PM
> We kind of have a lot going on in the way of our web presence. We have Rubberduck News, the home page, and the wiki. It'd be nice to really make the website our "other hub" (sorry, bad github pun).

Maybe we can find a way to better embed Rubberduck News posts into the website and start centralizing our documentation on the website instead of the wiki. Thoughts?
 
@RubberDuck eh, by 2.0 well be all over the interwebz!
2
 
@Duga we already seem to be @Mat'sMug. =;)-
 
The thing I didn't mention is that I'm allowed 5 pages. I would like the wiki to be the dev hub and the website, the users' hub. I think it might be time for me to either invest a bit more and get the most out of godaddy, or consider wordpress hosting
 
5 pages could potentially be plenty if designed smart. I'm not sure how much room there is to make it more dynamic. I don't know anything about the hosting plan.
 
It's very... static.
Drag and drop content static
Driving, bbl
 
1:14 PM
You can put quite a bit in 5 pages, with some formatting. Even more without formatting!
 
1:56 PM
> I would like the GitHub wiki to he the "dev hub" where we document the code and COM API's, and the website to be the "user's hub" where we document the features and, basically, how to use Rubberduck.

Rubberduck News deserve more space indeed.
 
2:07 PM
I'm just about done with all the depressing re-org meetings.
They can stop any time now.
 
2:56 PM
Got a proper interview for a DevOps position tomorrow.
 
3:08 PM
And I got the Code Inspections toolbar to reset with the language.
Unfortunately, it closes.
 
[retailcoder/Rubberduck] Hosch250 pushed commit c1322ae8 to next: Reset Code Explorer after saving settings
 
@Mat'sMug I just fixed this.
 
@Mat'sMug I fixed the crash again.
All I had to do was re-add the -= back to the Code Explorer toolbar.
Now, I need to figure out how to tell the toolbar to show or not after I reset it.
 
@Hosch250 I guess you fixed the NRE in that dispose method too then?
 
3:19 PM
It didn't seem to have one.
It is working fine for me.
 
I had removed the de-registration because the reference was null when dispose gets called
@Hosch250 that's fine
 
[retailcoder/Rubberduck] Hosch250 pushed commit d1acffdf to next: Code Inspections Toolbar re-displays after resetting
 
Fortunately, it doesn't close.
 
@Duga only if it was already displayed in the first place?
 
Unfortunately, it jumps back to the middle.
Yup.
In the toolbar:
public bool ToolbarVisible
{
    get { return _toolbar.Visible; }
    set { _toolbar.Visible = value; }
}
In App.cs:
            var displayToolbar = false;
            if (_codeInspectionsToolbar != null)
            {
                displayToolbar = _codeInspectionsToolbar.ToolbarVisible;
                _codeInspectionsToolbar.Dispose();
            }

            _codeInspectionsToolbar = new CodeInspectionsToolbar(_vbe, _inspector);
            _codeInspectionsToolbar.Initialize();
            _codeInspectionsToolbar.ToolbarVisible = displayToolbar;
 
3:23 PM
The x-y coords are in the COM object if you need them
 
My god I hate that RSS feed at the top of this chatroom. Can I remove it permanently?
 
Yeah, I might as well set that too.
@JeroenVannevel Go vote on my Meta question.
2
15
Q: Ticker feeds in Chat

Hosch250The ticker feeds in chat are interesting, but also annoying. One feature that would make them very nice is a fade feature, where they fade away after displaying for N seconds (perhaps even user adjustable). As an example of this, I didn't clear my ticker for a while, and this is what I got:

I hope the only reason that hasn't received any attention from SE is because they are so busy implementing a fix they don't have time to respond.
 
[retailcoder/Rubberduck] Hosch250 pushed commit 4f344d15 to next: Toolbar stays where you put it
 
Umm, I don't know why I just closed VS.
 
[retailcoder/Rubberduck] Hosch250 pushed commit 17028888 to next: Remove commented code
 
3:38 PM
33
Q: Could red lights be eliminated if all vehicles were automated?

jawns317At a typical intersection that uses red lights to control traffic, vehicles traveling on one roadway have a green light and can travel through the intersection, often at full speed, while vehicles traveling on the intersecting roadway have a red light and must come to a full stop until the signal...

Yeah, until one car has a little more friction, or breaks down, or any of a trillion zillion things to go wrong happens, and KABOOM, the whole city is killed.
2
//Importing Resources (Random)
import java.util.Random;
Comment of the year ^^
 
Hey, it gets worse than that.
 
Lol.
 
import java.util.*; //so I can use scanner
 
4:02 PM
@Hosch250 Some of us enjoy driving, please don't automate all the things!
 
Not me who wrote that.
I'm not on CB.
 
@rolfl hey I reviewed that code!
 
@Mat'sMug It worked perfectly in debug mode, but something about the optimizer or something was messing it up.
I fixed it by instead of try {} finally{ /* turn wait off */ } to try {} catch {} /* turn wait off */
@Mat'sMug Is a name only valid if it starts with a letter?
 
4:21 PM
Yes. But we need to test square bracket identifiers too
 
OK.
 
Monking ducks!
 
Like, [test] and test are both names?
-Must begin with alphabetical character
-Must not contain period, space or punctuation character
-Must be no longer than 64 characters
-Must not be a reserved word (e.g Dim, Sub, Function, Form, Module ...)
-Must be unique in the procedure that uses it
Good variable names
Dim x As Integer
Dim Count As Integer
Dim Str As String
Dim Your_Name As String

Bad variable names
Dim 001Num As Long
Dim Your.Name As String
Dim Your Name As String
Dim sub as String
:O
 
Hmm hold on
 
Not good, just valid
 
4:26 PM
I was wondering if I might bug you guys with a VBA question, at your convenience
 
Sq brackets not valid in excel vba, but I think Access might have other rules
@Phrancis sure
		left join unambiguousGarments ug on g._Id = ug.GarmentId
		left join unambiguousGarmentsHistory ugh on g._Id = ugh.GarmentId
 
OkButton.Enabled = (NewName != Target.IdentifierName)
                   && char.IsLetter(NewName.FirstOrDefault())
                   && NewName.Length <= 64;
 
....isn't there a validation method to stuff that in?
there's an icon that appears when the name is invalid
 
Yeah, I put it there.
But apparently 64 chars is not the limit in 2016 Preview, anyway.
It compiles just fine with a name like this:
rrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr
(Please write an inspection for that!)
 
So I have a worksheet with data arranged like this (except column N would be blank at first)
 
4:34 PM
> It also allows us to rename things to sub, which is also not valid.
 
@Duga ?????
 
Yup.
 
oh
yeah, reserved keywords and all
basically anything that matches any string in Tokens.resx
 
So, basically, the view needs to be passed the parse results.
 
> No, it doesn't work as expected.

To me it seems, that neither *TestInitialize* or *TestCleanup* is called from the framework. Probably neither the other methods, too.
 
4:37 PM
So basically, each ID in column A has between 1 and 3 error codes in column M, each on their own individual line
 
@RubberDuck can you try a repro on @HenrikBach1's comment? I'm not sure he actually gets what the workaround implies
 
My goal is to go through the sheet, and populate column N with 1, 2 or 3 keywords which identify the type of fix needed
Is there an easy VBA way to do this? Point me at some kind of function(s) I would want to look at?
I also considered plugging the data into Access tables and doing a sort of weird join, but I don't know if that would work out good
 
there's actually an Excel way of doing this ;-)
 
Is there? That would be awesome
 
there is?
 
4:41 PM
Sure @Mat'sMug. Just smoking a cig and heading back to my office. Can do it in just a minute.
 
make a hidden column for each code you want in 'N', and enter a formula that returns either the code or an empty string
then in N you concatenate the hidden results
 
That ^. =)
 
Ahhhh. Do you know what formula that would be?
Would it basically just be an IF/ELSE type of formula?
 
=IF(IFERROR(SEARCH("OEM",UPPER($M2)),"") & IFERROR(SEARCH("PRODUCT", UPPER($M2)),"") <> "", "OEM/PRODUCT","")
 
            Tokens.ResourceManager.IgnoreCase = true;

            OkButton.Enabled = (NewName != Target.IdentifierName)
                               && char.IsLetter(NewName.FirstOrDefault())
                               && Tokens.ResourceManager.GetString(NewName) == null;

            Tokens.ResourceManager.IgnoreCase = false;
Keywords are not allowed.
 
4:45 PM
awesome!
 
[retailcoder/Rubberduck] Hosch250 pushed commit 3dc8cf09 to next: Partial fix for Rename refactoring
 
All that is left now is checking if there is already a name in scope.
 
yeah, "easy as pie"
...not
 
The scope can either be greater than, or less than, the renamed value.
And, somehow I need to pass the View the parse results.
Constructor chaining is what I'm planning to use, any other ideas?
 
..of the target Declaration.. or any of its references!
@Hosch250 there's only a parameterless ctor?
 
4:48 PM
Yeah.
For the view.
        public RenameDialog()
        {
            InitializeComponent();
            InitializeCaptions();

            OkButton.Click += OkButtonClick;
            Shown += RenameDialog_Shown;
            NewNameBox.TextChanged += NewNameBox_TextChanged;
        }
 
ok. it needs to stay - not having one will break the designer
so yeah, reversed ctor chaining ought to work
(reversed as in, the parameterized one calls the parameterless, ..which is usually backwards)
 
Yeah.
 
Why are tokens stored in a resource file?
They're the same regardless of language used, might as well make them constant fields in a class
 
laziness
 
easier to use and no lookup in resource file needed
 
4:55 PM
that's correct
 
> These strings should be public static const defined in a public static class. Let's move them.
 
@Mat'sMug ^^ any clue how to fix that in R?
 
oh
hmm
that's where the nasty ifs come into play I guess
 
4:58 PM
Oh ok
 
OK, so I have Declarations.
 
@Hosch250 that validation is going to be hard
you need to check whether the identifier is ambiguous at the declaration site, but also at every reference site too
 
OK, so it should be easy enough to we aren't messing with names with less scope.
 
and doing that everytime a key is pressed in the textbox might be overkill
 
If it turns out to be overkill, we can always just display a message box after OK is clicked.
 
5:01 PM
and, just to make things more fun, you & I have a different definition of "ambiguous" than VBA has ;-)
@Hosch250 I approve this message
 
OK, revert my changes.
 
keep the check for reserved keywords though
 
@Mat'sMug The definition of "ambiguous" is ambiguous? oy...
 
Yup.
 
somewhat circular in definition, then, isn't it...
 
5:03 PM
so, you get the name from the dialog, and then make an ambiguousness check, if ambiguous you prompt the user whether they want to proceed or not, and that should be good
or we just block it?
 
@Mat'sMug Do you think it'd get downvoted into oblivion if I asked on SO with the above screenshot?
 
_declarations.Items.Where(item => item.Scope.Contains(target.Scope)
                                  || target.Scope.Contains(item.Scope));
 
@Phrancis there's much worse on SO...
 
I don't know, I was thinking block it.
 
Wait, gonna try something first, I wonder if using IF formulas in a concatenate might work across multiple rows (since the order of the errors is always going to be the same)
 
5:08 PM
might want to ask on SU though
 
Oh, good thinking, let me do that
 
Eh, Vba4All isn't around to down vote the formula question on SO. =(
 
but I am =)
just did now
 
5:26 PM
The declaration works.
 
0
Q: Conditioned concatenate cell content across rows

PhrancisI have a worksheet with thousands of rows which contain a unique ID A, and one 3 different error codes M. Each individual ID may have 1, 2 or 3 errors. They will always be in the same order. I have typed by hand and in N what the desired output is. I have written a formula like this one in cols ...

 
Vote++
 
> # Repro:

Use the test explorer to insert 2 identical new test modules. `TestModule1` and `TestModule2`.

Option Compare Database
Option Explicit

Option Private Module

'@TestModule
Private Assert As New Rubberduck.AssertClass

'@ModuleInitialize
Public Sub ModuleInitialize()
'this method runs once per module.
End Sub

'@ModuleCleanup
Public Sub ModuleCleanup()
'this method runs once per module.
En
> I found some interesting things that I will open issues for so we can verify whether or not they're still issues in the next release.

1. Module Intialize/Cleanup is running on *every* iteration instead of once per TestModule.
2. Indenting the entire module one tab breaks the test discovery. I'm assuming we have a parse error in that situation.
 
> Waits for the "Welcome to Super User!" comment...
4
 
@Duga cc @Mat'sMug
 
5:31 PM
<lunch>
 
> @ckuhn203 module initialize/cleanup is *supposed* to run once per module, not sure what happened here, but I could have sworn it was the case. This is definitely getting fixed by next release.
Test discovery breaks *specifically* because we are *not* using the parser for that, but still the frail VBIDE code from 1.0 which was essentially ported from the VBA version of the unit testing framework - rewriting test discovery to work off the parse results will definitely fix this.

And we should
 
@Mat'sMug one more issue that I forgot. So, head's up. Incoming issues.
 
awesome, bring it on!
 
Test Explorer shouldn't be picking up Initalize/Cleanup methods.
 
5:42 PM
Something's weird what build is this?
Definitely fixed in 1.4
And critical
@RubberDuck you can assign me right away, I'm on it tonight
 
Okay. Working on submitting some issues now.
I think there is filtering happening, but it based on the name instead of the attribute.
Notice that TestIntialize isn't there? Just TestIntialize2.
 
> As mentioned in #570, `@ModuleInitalize` and `@ModuleCleanUp` are running for each and every test method right now. They should only be executing once per test module.

## Repro:

Option Compare Database
Option Explicit

Option Private Module

'@TestModule
Private Assert As New Rubberduck.AssertClass

'@ModuleInitialize
Public Sub ModuleInitialize()
'this method runs once per module.
Debug.Print "Module Initalize"
End
> ## Repro:

1. Insert a new TestModule and TestMethod.

![image](https://cloud.githubusercontent.com/assets/2716800/7942805/a06b7876-092e-11e5-9903-0eff4dce06cf.png)

2. Insert at least one space before `Public Sub TestMethod1`.

'@TestMethod
Public Sub TestMethod1() 'TODO: Rename test
On Error GoTo TestFail

'Arrange:

'Act:

'Assert:
Assert.Inconclusive

TestExit:
 
5:59 PM
Awesome.... not I can't reproduce.
 
0
Q: Finding and pasteing images into a specific cell

proxy156The below macro finds and pastes images into column A. While the macro works, it starts to slow down when running 500+ images. I am not too familiar with the VBA language, does anyone have any suggestions to make this code quicker and/or more elegant? My existing Macro is as follows: Sub Pi...

 
@StackExchange go away!
 
00:00 - 18:0018:00 - 00:00

« first day (361 days earlier)      last day (2819 days later) »