12:01 AM
5 hours later…
6 hours later…
11:24 AM
[rubberduck-vba/Rubberduck] mansellan commented on issue #3952: VB6 editor is missing menu and commandbar icons
> So it turns out I was wrong about using DLL calls. As an office commandbar, the only way is option 2.
It's possible that the unreliability is due to not registering the correct clipboard formats ("Toolbar Button Face" and "Toolbar Button Mask" in en locales). I also have an idea on how to make it locale-agnostic.
It's possible that the unreliability is due to not registering the correct clipboard formats ("Toolbar Button Face" and "Toolbar Button Mask" in en locales). I also have an idea on how to make it locale-agnostic.
2 hours later…
1:13 PM
1:40 PM
[rubberduck-vba/Rubberduck] WaynePhillipsEA commented on issue #3952: VB6 editor is missing menu and commandbar icons
> @bclothier not necessary here. In general, you need not worry about COM calls happening in the wrong thread. They will be marshalled to the correct thread for you automagically. (This is somewhat different to the TypeLib API, due to the ~~~hack~~~ magic we use to grab the initial COM object)
[rubberduck-vba/Rubberduck] WaynePhillipsEA commented on issue #3952: VB6 editor is missing menu and commandbar icons
> Having to use the clipboard for this is a horrible, cumbersome design. I suspect the issues on my machine were something to do with the Office clipboard manager (in Office 2003) interfering with the API calls. If having the icons is important enough, we could potentially hook the clipboard API calls that VB6 makes at this point, and redirect them to our own .NET implementations, so in effect not using the clipboard at all (remembering to unhook immediately after the PasteFace call of course)
[rubberduck-vba/Rubberduck] WaynePhillipsEA commented on issue #3952: VB6 editor is missing menu and commandbar icons
> Having to use the clipboard for this is a horrible, cumbersome design. I suspect the issues on my machine were something to do with the Office clipboard manager (in Office 2003) interfering with the underlying clipboard API calls. If having the icons is important enough, we could potentially hook the clipboard API calls that VB6 makes at this point, and redirect them to our own .NET implementations, so in effect not using the clipboard at all (remembering to unhook immediately after the Past
2:15 PM
[rubberduck-vba/Rubberduck] mansellan commented on issue #3952: VB6 editor is missing menu and commandbar icons
> This is going to need some kind of clipboard inspection. So far I have done the following:
1. Outside of RD, created a custom CommandBarButton and pasted an image into it*
2. Back in RD, programatically located this button and called Clipboard.GetData("Toolbar Button Face") and ("Toolbar Button Mask"), sent resulting memory stream into byte[] arrays.
3. Clipboard.Clear
4. Clipboard.SetData x2 (using same formats)
5. Button.PasteFace
Step 5 fails with a cryptic COM exception. But - us
1. Outside of RD, created a custom CommandBarButton and pasted an image into it*
2. Back in RD, programatically located this button and called Clipboard.GetData("Toolbar Button Face") and ("Toolbar Button Mask"), sent resulting memory stream into byte[] arrays.
3. Clipboard.Clear
4. Clipboard.SetData x2 (using same formats)
5. Button.PasteFace
Step 5 fails with a cryptic COM exception. But - us
2:34 PM
[rubberduck-vba/Rubberduck] bclothier commented on issue #3952: VB6 editor is missing menu and commandbar icons
> FWIW, in older versions of Access whenever you paste in an image, it got wrapped with EMF metadata and was saved with that extra wrapping. That essentially meant the picture was saved differently from its original format. It is very possible you are observing a similar thing going on here; what you are getting out contains all metadata and the `PasteFace` won't have none of that; it only wants raw image file?
Ref: http://www.lebans.com/image_faq.htm
Ref: http://www.lebans.com/image_faq.htm
[rubberduck-vba/Rubberduck] Vogel612 added label enhancement to issue #3953: Get unit tests working in VB6
[rubberduck-vba/Rubberduck] Vogel612 added label duplicate to issue #3908: Changes in Personal Macro workbook
[rubberduck-vba/Rubberduck] Vogel612 added label bug to issue #3908: Changes in Personal Macro workbook
[rubberduck-vba/Rubberduck] Vogel612 added label feature-inspections to issue #3933: False Positive: Return value of function {x} is never used
[rubberduck-vba/Rubberduck] Vogel612 added label inspection-false-positive to issue #3933: False Positive: Return value of function {x} is never used
[rubberduck-vba/Rubberduck] Vogel612 added label bug to issue #3933: False Positive: Return value of function {x} is never used
[rubberduck-vba/Rubberduck] Vogel612 added label bug to issue #3932: @Ignore HungarianNotation is not working
[rubberduck-vba/Rubberduck] Vogel612 added label feature-inspection-quickfixes to issue #3932: @Ignore HungarianNotation is not working
[rubberduck-vba/Rubberduck] Vogel612 added label feature-inspections to issue #3932: @Ignore HungarianNotation is not working
3:00 PM
Anyone --- I think I need a sanity check. I have this feeling I'm fighitng the mock tests, not the actual behavior. Does this look right for setup?
[Category("Resolver")] [Test] public void Identify_NamedParameter_Parameter_FromExcel() { const string code = @" Public Sub DoIt() Dim foo As Variant Dim sht As WorkSheet foo = sht.Cells(ColumnIndex:=12).Value End Sub"; var vbe = new MockVbeBuilder() .ProjectBuilder("TestProject", ProjectProtection.Unprotected) .AddComponent("TestModule", ComponentType.StandardModule, code, new Selection(6, 30))
3:13 PM
> We have a couple of wiki articles on the parsing process, great!
But unfortunately, for people to be able to contribute to resolver fixes, I think we could all benefit from some high-level map for the resolver. As it is, it involves a large number of classes and a very deep traversal where a binder may resolve expression, invoking yet another binder and so on.
And we also have multiple passes (e.g. compilation pass, type annotation pass (which I should note that has nothing to do with
But unfortunately, for people to be able to contribute to resolver fixes, I think we could all benefit from some high-level map for the resolver. As it is, it involves a large number of classes and a very deep traversal where a binder may resolve expression, invoking yet another binder and so on.
And we also have multiple passes (e.g. compilation pass, type annotation pass (which I should note that has nothing to do with
[rubberduck-vba/Rubberduck] bclothier added label meta to issue #3955: Resolver needs a wiki article
[rubberduck-vba/Rubberduck] bclothier added label repository-wiki to issue #3955: Resolver needs a wiki article
4:27 PM
4:42 PM
Welcome to Code Review. As πάνταῥεῖ said, a little bit more context would me great, e.g. "I'm given an amount of coppers and want to transform it into the number of gold, silver and copper pieces, where a silver piece is worth 100 copper pieces and a gold piece is worth 100 silver pieces. It works for any string/some strings/...". Context is an important part of the question, so make sure to edit it into your post. — Zeta 9 hours ago
ResultX
are all String
variables. Does VB.NET allow you to divide a string by 100 like this? This post needs more context, and more of the code.. we don't even know what the method is named or what its purpose is, only that you'd like it shorter. Please read How to Ask. — Mathieu Guindon 34 secs ago4:49 PM
4:57 PM
really think the
.AddReference
should have a overload to take an enum so we can eliminate all the guesswork WRT the path and version. Those are not details I'm very interested when I'm writing a test
5:43 PM
[rubberduck-vba/Rubberduck] bclothier commented on issue #3937: Early-bound named parameters not resolved?
> I've reviewed this and I think this is actually more complicated than it seems.
Consider those 3 cases:
```
Public Sub foo()
Dim sht As Excel.Worksheet
sht.Paste Link:=True
End Sub
Public Sub foo1()
Sheet1.Paste Link:=True
End Sub
Public Sub foo2()
Dim v As Variant
Dim sht As Excel.Worksheet
v = sht.Cells(ColumnIndex:=12)
End Sub
```
In the first case, it resolves correctly and shows as `Parameter` when selecting the `Link`
In th
Consider those 3 cases:
```
Public Sub foo()
Dim sht As Excel.Worksheet
sht.Paste Link:=True
End Sub
Public Sub foo1()
Sheet1.Paste Link:=True
End Sub
Public Sub foo2()
Dim v As Variant
Dim sht As Excel.Worksheet
v = sht.Cells(ColumnIndex:=12)
End Sub
```
In the first case, it resolves correctly and shows as `Parameter` when selecting the `Link`
In th
6:02 PM
[rubberduck-vba/Rubberduck] bclothier synchronized pull request #3893: Improve resolution for ambiguous names WRT scoping
[rubberduck-vba/Rubberduck] [codecov[bot]](github.com/apps/codecov) commented on pull request #3893: Improve resolution for ambiguous names WRT scoping
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=h1) Report
> Merging [#3893](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/14743dc32ef02938b569b841fe94e8d250217b72?src=pr&el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `100%`.
```diff
@@ Coverage Diff @@
## next #3893 +/- ##
=========================
> Merging [#3893](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/14743dc32ef02938b569b841fe94e8d250217b72?src=pr&el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `100%`.
```diff
@@ Coverage Diff @@
## next #3893 +/- ##
=========================
[rubberduck-vba/Rubberduck] bclothier commented on issue #3937: Early-bound named parameters not resolved?
> Note that the PR #3893 adds a failing unit test which is currently ignored;
Identify_NamedParameter_Parameter_FromExcel_DefaultAccess
that covers the third case. We also have a (currently passing) unit test for first case (Identify_NamedParameter_Parameter_FromExcel
) to prove that external references are being resolved correctly. Originally I was going to fix this in the PR #3893 because it seemed similar enough but based on the finding above, I think a separate PR is best.
[rubberduck-vba/Rubberduck] bclothier commented on Rubberduck.Parsing/Symbols/DeclarationFinder.cs of pull request #3893: Improve resolution for ambiguous names WRT scoping
[rubberduck-vba/Rubberduck] [codecov[bot]](github.com/apps/codecov) commented on pull request #3893: Improve resolution for ambiguous names WRT scoping
> # [Codecov](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=h1) Report
> Merging [#3893](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/14743dc32ef02938b569b841fe94e8d250217b72?src=pr&el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `100%`.
```diff
@@ Coverage Diff @@
## next #3893 +/- ##
=========================
> Merging [#3893](https://codecov.io/gh/rubberduck-vba/Rubberduck/pull/3893?src=pr&el=desc) into [next](https://codecov.io/gh/rubberduck-vba/Rubberduck/commit/14743dc32ef02938b569b841fe94e8d250217b72?src=pr&el=desc) will **increase** coverage by `0.05%`.
> The diff coverage is `100%`.
```diff
@@ Coverage Diff @@
## next #3893 +/- ##
=========================
4 hours later…
10:52 PM
[rubberduck-vba/Rubberduck] bclothier commented on issue #2936: Rubberduck crashes on rearranging ToolWindows in docked frame containing Properties Window
> FWIW I cannot reproduce this anymore so I think we can close this issue unless anyone have a different MCVE where crash still happens?
[rubberduck-vba/Rubberduck] bclothier commented on issue #3677: Inspection Settings throws an exception
11:22 PM
[rubberduck-vba/Rubberduck] bclothier closed issue #2638: Code Explorer crashes Excel while examining a property of a class.
[rubberduck-vba/Rubberduck] bclothier commented on issue #2638: Code Explorer crashes Excel while examining a property of a class.
> Using the same file that was provided above, and deleting few random classes, I no longer can reproduce the crash when trying to view the same property mentioned. Unless someone can provide show otherwise, this will be closed.
[rubberduck-vba/Rubberduck] bclothier commented on issue #2826: We should expose the APIs of RDs different functionalities in separate assemblies
> Since we already addressed this with the PR #3739, this can be considered to be partially addressed. Furthermore, we have an open issue that's more recent -- #3862, so I'm closing this to minimize duplication.
[rubberduck-vba/Rubberduck] bclothier closed issue #2826: We should expose the APIs of RDs different functionalities in separate assemblies
« first day (1416 days earlier) ← previous day next day → last day (1764 days later) »
Transcript for
Apr21
Apr '1822
Apr23
VBA Rubberducking
This chat has moved to Discord: discord.gg/MYX9RECenJ