« first day (2053 days earlier)      last day (1127 days later) » 

12:00 AM
RELOAD!
[Minesweeper] New Users: 9, Games Played: 68, Bombs Used: 53, Moves Performed: 9246
RELOAD!
[rubberduck-vba/Rubberduck] 2 issues closed. 3 issues opened. 20 issue comments
 
12:20 AM
Helloi
how can i see the translation in previow
 
12:47 AM
@M.Doerner Can you help me?
 
 
1 hour later…
2:08 AM
@AfonsoMira is PT listed in the settings dialog? A while ago we had to modify the code for a new language to show up there, but looking at that code it looks like no changes are needed anymore, we just detect what cultures are available.
 
 
2 hours later…
4:09 AM
> From what I see in the EnsureProjectReferencesUnitTesting, it does not attempt to add by GUID (e.g. References.AddFromGuid). It only uses the file (References.AddFromFile). We alrea
 
 
3 hours later…
7:11 AM
in Coding Projects and Twitter Heaven :), yesterday, by Marc-Andre
https://blog.aurynn.com/2015/12/16-contempt-culture
From Simon’s room but that is a good read.
Really illustrative about what RD is doing for those that don’t have another environment to develop in.
RD is leaving your code better than it found it.
 
7:47 AM
@MathieuGuindon we might need a display name for the language...
Which is ... a not-so-great ux now that I think of it
 
 
2 hours later…
9:31 AM
@Vogel612 FWIW, the installer already asks to select a language. That choice ought to carry over into the installed version, so that it shouldn't be necessary to go there; it would be there for benefits of those who want to switch language at runtime.
 
10:00 AM
> If the value from the registry is indeed the description, we can simply change to FindByDescription.
 
10:47 AM
@MathieuGuindon turns out that you can run VBA on Commodore!
 
 
4 hours later…
3:02 PM
Hi folks, nice weekend :-)
I've noticed there is a new 'Function return value gets discarded' inspection.
Is this a right behaviour? Or false possitive?
I've got function: 'vbNewLines'
Public Function vbNewLines(Optional ByVal numOfLines As Long = 1) As String
    Dim i As Long
    For i = 0 To numOfLines - 1
        vbNewLines = vbNewLines & vbNewLine
    Next i
End Function
When used in context:
Debug.Print "First line" & vbNewLines(2) & "Third line"
This raises the inspection.
The function can't be a procedure, because it's returning string which I then use. So... ? :-)
 
yea, that shouldn't raise the inspection result, actually
Function Return Value gets discarded is "just" a rewording of "ReturnValueNotUsed" or whatever it was before with some bugfixes rolled into there
 
4:00 PM
That's debug.print being annoying as usual... we do handle referencing expressions in argument lists, but Debug.Print doesn't have an argument list (like all Print statements) and we always forget to special-case it
 
Hi folks. There's something I've been wanting to ask for a while related to VBA. It's not a pressing issue, just something I observed, was unable to find references online, and I'm quite curious about.

If one runs multiple instances of a VBA Application, each instance will be able to execute code independently from the other, as long as there are hardware resources.

But it both instances try, at the same time, to use CreateObject (or even New), the one who gets to be the first will block the other until object creation is finished. For "light" objects its barely noticeable. But if one's t
 
One more Linux thing I find annoying is that they don't really have a "select word by double-click" feature, apparently. In Windows, double-clicking in the FF addressbar would select just the specific path section bounded by special characters. That doesn't happen in Linux.
 
4:20 PM
Also, it doesn't know how to play gifs :(
 
@CarlosGustavoReetz CreateObject hits the registry and uses Win32 to spawn the object... so that's one shared resource (registry); then the Application object being created will initialize, and that initialization very likely accesses shared resources as well... this isn't a VBA thing, you'd have the same constraints spawning Application instances with any language.
 
@MathieuGuindon, Thanks! That would be my next question (whether it was a OLE/COM thing, or would manifest in .NET as well)
 
5:12 PM
@MathieuGuindon To be pedantic, the object creation is actually a part of the COM specifications, and has less to do with Win32. Normally, I believe the CreateObject internally makes use of the IClassFactory and the related library functions described in the 2nd method.
Registry lookup to find the CLSID usually should be quick and thus insignificant. I'd look more at what the application.
 
@CarlosGustavoReetz Because you didn't mention which, it bears reminding that not all applications will have same behavior WRT the creation. Outlook is a good example; you can call CreateObject all you want, even up to 1000 times if you wanted but it only have a single instance so it actually acts like GetObject for the next 999 times.
So Mat's right - this isn't something to do with languages but how the application you're creating is implemented. They may have decided that creation requires exclusive access which cause the serialized access.
 
> Since y'all are working on deeper issues with this I will leave closing this up to y'all. I am up and functioning again, so that is good enough for me... Thanks!
 
@SonGokussj4 thinking in air code of you Dim an array and then Redim it with the number of elements you want you could use the Join function to concatenate it together. Trust avoids creating and dumping the string in the loop.
 
@SonGokussj4 That bug is on me. However, please note that this is not about whether the function can be written as a procedure. That is FunctionReturnValueAlwaysDiscarded, which will not fire for recursive functions..
 
5:27 PM
@IvenBach Thanks for the tip. I'll add that as TODO. :-) I'm not using this function much so it has not any performance impact. But good to know though :-)
 
@MathieuGuindon You are right. I forgot that we are not only in an argument if there is a argument list ancestor, but also if there is an output list ancestor.
 
@M.Doerner could we write an ancestor function that consolidate all 3 usages? Mat said we always forget to special case, so if that's the case, it shouldn't have to be?
 
That would probably always be forgotten. It would not conform to the usual GetAncestor<TargetContectType>().
 
Yeah, i guess it'd probably be more of FindUsages than a subtype of GetAncestor
 
The question really is not if it is a usage.
The question is whether a reference is a procedure call.
There is a specific method for this in the inspection; it just lacks the test for output lists.
 
5:41 PM
Ok. I took Mat's comment to imply that there were other inspections that needed similar information.
 
@this in the docs you linked to it states ‘... getting a pointer to an interface...’. That means if you have Foo:Bar, Bar:Duk, and Duk:Bazz there are 3 interfaces that can be chosen for a Foo instance. 2 interfaces for Bar. Only a single interface for Bazz. Is my understanding accurate?
 
I think it was more meant in the way that we tend to forget output lists rather frequently, because they are not something one has to deal with explicitly very often.
 
@IvenBach if they are exposed to COM, yes. Note that a object can implement additional interfaces that are not COM-visible, and by COM rules, you can have only one line of inheritance anyway
This means that Foo, Bar, Duk and Bazz each must be defined as a COM interface, and inheriting from the previous interface in order for your statement to be true.
 
Visibility being designated by the ComVisible attribute.
 
That's a .NET thing.
In C++ you make it COM-visible by writing an IDL for it and exposing that via the type library.
 
5:55 PM
Not knowing C++ is limiting my ability to fully understand.
IDL is Intermediate Disassembly Language?
 
Do not forget that COM is meant to be language agnostic. The ComVisible is just a .NET's shorthand to do the equivalent for you without you having to roll up your sleeves and writing a IDL
No, interface definition language.
 
@this indeed, I was mostly referring to Excel, though I remember to have tested it with Word and PowerPoint as well (Didn't have Outlook nor Access at the time).
 
> Perhaps something changed in the `RenameRefactoring` since this issue opened. In v2.5 I can `RenameRefactor` `pFoo` to `Foo` successfully starting from the midpoint step and get the expected result described above. But, I'm thinking that renaming `pFoo` to `Foo` should only rename the single, local, (undeclared) instance of `pFoo` (whichever was selected) and leave all others untouched.

So...Although this issue can be closed as not reproducable, I'm wondering if there is a different iss
 
Hmm. Creating a new Excel instance is possible; not sure why it'd be blocking.
Are you just creating instances, and not also opening a particular file?
 
I was trying to come up with a "general purpose multi-process implementation library" to be used in VBA... (mostly for the fun of it)
 
6:08 PM
Ah. Cool. VBScript would have been cheaper, I think.
 
So I would have a Mastar Application that would spawn Worker Applications... to make that asynchronous (non-blobking) the spawning was being done via VBScript
that was when I noticed I wasn't able to spawn multiple instances at the same time... even firing multiple scripts simultaneously
each script would report back to the Mastar Application via GetObject (it had Public Functions written at the ThisWorkbook module) and hand over the newly spawned instances, when those were ready.
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5362?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request head (`FixFunctionReturnValueDiscardedInspection@c6f25a4`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-head-commit).
> The diff coverage is `n/a`.
 
At first I considered just using the pure instances, without creating workbooks, since I just wanted separated VBA Runtimes to be available... I also remember investigating whether it there was a "lighter" VBA host among Excel, Word and PowerPoint. But in the end I stuck with Excel... and also created a workbook along each instance, since it enabled the use of certain other useful functions (evaluate, worksheetfunctions and the like)
 
> Yeah the name validation / clash-verification logic was revised at some point leading up to 2.5.0; this one is probably a dupe of an issue about the clash-verification logic that was closed with the merge of a PR, leaving this one open.

Not sure I'm following the local `pFoo` problem - assuming a parse happened, I'm not seeing how the resolver could possibly treat these local undeclared variables as anything other than undeclared locals (does the toolbar not say something to that effect? or
> The new problem is a bug in the resolver. When we resolve undeclared variables, we reuse already found instances of the variable. Unfortunately, the check is by the qualified name of the enclosing procedure, which is identical for Let, Set and Get. We will have to split that according to declaration type.
[rubberduck-vba/Rubberduck] build for commit c6f25a4e on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5362?src=pr&el=h1) Report
> Merging [#5362](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5362?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/5d7369a3c8ed8df1848bd3583c0fb6a0e97887b7?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.


```diff
@@ Coverage Diff @@
## next #5362 +/- ##
=========================
[rubberduck-vba/Rubberduck] build for commit c6f25a4e on unknown branch: 61.69% (target 0%)
[rubberduck-vba/Rubberduck] build for commit c6f25a4e on unknown branch: 100% of diff hit (target 60%)
 
6:38 PM
@this Oh, now I remembered. Each new instance would open a read-only copy of the Master Workbook, so they'd have the same set of code available to execution. To send something to be executed by a Worker, the Master App would, first, send over the function name, parameters and an optional Callback Object, and then Call a method that relied on Application.OnTime to actually trigger the Worker's calculations.

It was somewhat overengineered, but quite fun to watch it working
 
7:17 PM
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5363?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request head (`FixUndeclaredVariableScopingInResolver@58e8e15`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-head-commit).
> The diff coverage is `n/a`.
 
7:33 PM
[rubberduck-vba/Rubberduck] build for commit 58e8e158 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5363?src=pr&el=h1) Report
> Merging [#5363](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5363?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/5d7369a3c8ed8df1848bd3583c0fb6a0e97887b7?src=pr&el=desc) will **increase** coverage by `<.01%`.
> The diff coverage is `70%`.


```diff
@@ Coverage Diff @@
## next #5363 +/- ##
==========================
[rubberduck-vba/Rubberduck] build for commit 58e8e158 on unknown branch: 61.69% (target 0%)
[rubberduck-vba/Rubberduck] build for commit 58e8e158 on unknown branch: 70% of diff hit (target 60%)
 
7:48 PM
[rubberduck-vba/Rubberduck] MDoerner pushed commit 58e8e158 to next: Generate distinct unresolved variable declarations in Get Set and Let
Merge pull request #5363 from MDoerner/FixUndeclaredVariableScopingInResolver

Generate distinct unresolved variable declarations in Get Set and Let
[rubberduck-vba/Rubberduck] MDoerner pushed commit c6f25a4e to next: Make FunctionReturnValueDiscarded inspections correctly deal with output lists
Merge pull request #5362 from MDoerner/FixFunctionReturnValueDiscardedInspection

Handle output lists (Print statements), fixes FunctionReturnValue(Always)DiscardedInspection
[rubberduck-vba/Rubberduck] build for commit f27427f1 on next: AppVeyor build succeeded
[rubberduck-vba/Rubberduck] build for commit f27427f1 on next: 61.69% (target 0%)
[rubberduck-vba/Rubberduck] build for commit f27427f1 on next: 70% of diff hit (target 60%)
 
 
1 hour later…
9:32 PM
@MathieuGuindon I would appreciate if you could also take a look at my short PR from yesterday, i.e. #5360.
 
@M.Doerner yep, was giving AppVeyor a little break =)
 
I think that will be useful for PR #5357.
Thx
 
I have the feeling that my other larger PR is conflicting again.
 
[rubberduck-vba/Rubberduck] MDoerner pushed commit caa16668 to next: Let AddComponentService optionally take a component name
Merge pull request #5360 from MDoerner/EnhanceAddComponentToProvideTheName

Let AddComponentService optionally take a component name
 
9:37 PM
Hm, apparently not.
I'll run the tests locally anywway to be sure.
 
Regarding the sheet access using string inspection - wouldn't using ActiveWorkbook implicitly be also a code smell?
 
10:28 PM
@this There is an inspection for that, AFAIK.
 
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5347?src=pr&el=h1) Report
> Merging [#5347](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5347?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/999a846fec9e1b61cafe9a95b3c074ca0fb66702?src=pr&el=desc) will **not change** coverage.
> The diff coverage is `n/a`.


```diff
@@ Coverage Diff @@
## next #5347 +/- ##
=======================================
[rubberduck-vba/Rubberduck] build for commit 999a846f on unknown branch: Coverage not affected when comparing 999a846...999a846
 
Yep, ImplicitActiveWorkbookReferenceInspection.
 
10:45 PM
[rubberduck-vba/Rubberduck] build for commit 18774ce2 on unknown branch: AppVeyor build succeeded
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5347?src=pr&el=h1) Report
> Merging [#5347](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/5347?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/999a846fec9e1b61cafe9a95b3c074ca0fb66702?src=pr&el=desc) will **increase** coverage by `0.01%`.
> The diff coverage is `81.25%`.


```diff
@@ Coverage Diff @@
## next #5347 +/- ##
=======================
[rubberduck-vba/Rubberduck] build for commit 18774ce2 on unknown branch: 81.25% of diff hit (target 60%)
[rubberduck-vba/Rubberduck] build for commit 18774ce2 on unknown branch: 61.67% (target 0%)
 
11:44 PM
@IvenBach The AddComponentService should now allow you to to specify everything you need for the new component in your PR.
 

« first day (2053 days earlier)      last day (1127 days later) »