00:01
[rubberduck-vba/Rubberduck] 7 commits. 4 opened issues. 1 closed issue. 10 issue comments. 617 additions. 1247 deletions.
[Zomis/Brainduck] 14 commits. 1 opened issue. 1 closed issue. 2 issue comments. 360 additions. 116 deletions.
2 hours later…
02:28
[rubberduck-vba/Rubberduck] retailcoder added label support to issue #808: Error while using the latest commit
02:52
[retailcoder/Rubberduck] retailcoder pushed commit f8e5786e to next: added BusyIndicator to InspectionResultsControl
[rubberduck-vba/Rubberduck] retailcoder added label code-inspections to pull request #809: BusyIndicator
[rubberduck-vba/Rubberduck] retailcoder added label user-interface to pull request #809: BusyIndicator
1 hour later…
7 hours later…
11:33
posted on October 04, 2015
One fall afternoon, Java master Bawan heard that the monk Landhwa had been struggling with a straightforward data-extraction program. Intrigued, Bawan visited the monk, who was slouching low in his chair. “The program runs out of memory,” yawned Landhwa, who had no patience for such investigations. “True, it processes many large files, but it does so one at a time, and retains only the smal…
4 hours later…
15:35
[rubberduck-vba/Rubberduck] retailcoder added label enhancement to issue #810: Support @ignore markers for code inspections
[rubberduck-vba/Rubberduck] retailcoder added label code-inspections to issue #810: Support @ignore markers for code inspections
[rubberduck-vba/Rubberduck] retailcoder opened issue #810: Support @ignore markers for code inspections
> Procedures that are bound to ActiveX controls on a worksheet, will always fire up a `ProcedureNotUsedInspectionResult` - and there's nothing we can do to prevent this.
Unless...
'@ignore ProcedureNotUsedInspection
Private Sub cmdEnterToday_Click()
presenter.EnterManualFigures
End Sub
Let's implement `'@ignore [inspection-name]` meta-instructions.
- At the top of a module, in the *declarations* section:
'@ignore [inspection-name]
Could be used
Unless...
'@ignore ProcedureNotUsedInspection
Private Sub cmdEnterToday_Click()
presenter.EnterManualFigures
End Sub
Let's implement `'@ignore [inspection-name]` meta-instructions.
- At the top of a module, in the *declarations* section:
'@ignore [inspection-name]
Could be used
[rubberduck-vba/Rubberduck] retailcoder added label bug to issue #811: Multiple opened instances of the host app break unit testing
[rubberduck-vba/Rubberduck] retailcoder added label unit-testing to issue #811: Multiple opened instances of the host app break unit testing
[rubberduck-vba/Rubberduck] retailcoder opened issue #811: Multiple opened instances of the host app break unit testing
> The code that fetches the `HostApplication` instance does not return the actual *host* instance.
Repro:
- Open up Excel
- Start a new instance of Excel, load a macro-enabled workbook with Rubberduck unit tests
- Run all tests
- All tests are inconclusive / raise an error about macros not being enabled or test methods that can't be found.
The "host" instance is always only the first one to be opened. This is a problem.
Repro:
- Open up Excel
- Start a new instance of Excel, load a macro-enabled workbook with Rubberduck unit tests
- Run all tests
- All tests are inconclusive / raise an error about macros not being enabled or test methods that can't be found.
The "host" instance is always only the first one to be opened. This is a problem.
[rubberduck-vba/Rubberduck] ckuhn203 commented on issue #811: Multiple opened instances of the host app break unit testing
> This might be extremely difficult to fix. Let me take a look at the code and see if there are any alternatives.
[rubberduck-vba/Rubberduck] Vogel612 commented on issue #810: Support @ignore markers for code inspections
> I find the `Inspection`-Suffix to be redundant...
Instead of requiring multiple `'@ignore` annotations for multiple inspections a comma-separated list may be more appropriate. For reference see Java's `@SuppressWarnings` which can be used like:
@SuppressWarnings("unused", "rawtypes")
That translates to:
'@ignore ProcedureNotUsed ParameterNotUsed
Instead of requiring multiple `'@ignore` annotations for multiple inspections a comma-separated list may be more appropriate. For reference see Java's `@SuppressWarnings` which can be used like:
@SuppressWarnings("unused", "rawtypes")
That translates to:
'@ignore ProcedureNotUsed ParameterNotUsed
[rubberduck-vba/Rubberduck] ckuhn203 commented on issue #811: Multiple opened instances of the host app break unit testing
> We're using `Marshal.GetActiveObject` to get the host instance, which is only guaranteed to return **a** instance of the specified running program. This is indeed a problem. I'm searching for alternatives.
https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.getactiveobject(v=vs.100).aspx
https://msdn.microsoft.com/en-us/library/system.runtime.interopservices.marshal.getactiveobject(v=vs.100).aspx
[rubberduck-vba/Rubberduck] retailcoder commented on issue #811: Multiple opened instances of the host app break unit testing
> @ckuhn203 If you find anything, get imaginary internet points here: stackoverflow.com/q/32953450/1188513
3 hours later…
[rubberduck-vba/Rubberduck] ckuhn203 commented on issue #811: Multiple opened instances of the host app break unit testing
> Here's a possibility.
1. Fire up Two instances of excel and open the VBE.
2. Open the Task Manager
3. Right click the VBE instance and "Go to Process"
4. Note that the process is actually one of the two instances of Excel.
Based on this, we *can* in fact get to the correct host instance.
class Program
{
[DllImport("user32.dll")]
static extern int GetWindowThreadProcessId(int hWnd, out int lpdwProcessId);
static void Main(string[] args)
1. Fire up Two instances of excel and open the VBE.
2. Open the Task Manager
3. Right click the VBE instance and "Go to Process"
4. Note that the process is actually one of the two instances of Excel.
Based on this, we *can* in fact get to the correct host instance.
class Program
{
[DllImport("user32.dll")]
static extern int GetWindowThreadProcessId(int hWnd, out int lpdwProcessId);
static void Main(string[] args)
2 hours later…
21:38
[rubberduck-vba/Rubberduck] retailcoder merged pull request #809: BusyIndicator from retailcoder/Rubberduck/next into rubberduck-vba/Rubberduck/next
[rubberduck-vba/Rubberduck] retailcoder pushed commit 7643fdd3 to next: removed "export" commands. clipboard will be good enough.
[rubberduck-vba/Rubberduck] retailcoder pushed commit f8e5786e to next: added BusyIndicator to InspectionResultsControl
2 hours later…
23:49
Hi Mat, I just trying to implement some unit tests in ms-access with Rubberduck. I wish there was a simple example of how unit tests could be applied to a real procedure in the documentation (github.com/rubberduck-vba/Rubberduck/wiki/…). I understand the purpose of unit testing and how it works but it is not obvious to me how to fill the empty test procedure with testing code. Could you please provide such an example with proc code and test code.
« first day (486 days earlier) ← previous day next day → last day (2694 days later) »
Transcript for
Oct4
Oct '155
Oct6
VBA Rubberducking
This chat has moved to Discord: discord.gg/MYX9RECenJ