12:02 AM
1 hour later…
1:24 AM
[rubberduck-vba/Rubberduck] bclothier created comment on issue #5881: Unexpected Access form control supertype names
> From a test, I could determine that if a declaration was created for the hidden interface, then bracketing the supertype name would enable the resolution to succeed. In my test, I used `ClassModuleDeclaration` to "declare" the hidden interface but that would not be a proper use of the declarations. Thus, question then become:
1) Do we want to add hidden interfaces as a declaration? For instance, we could create `HiddenTypeDeclaration` and stick those types which would then allow the resolve
1) Do we want to add hidden interfaces as a declaration? For instance, we could create `HiddenTypeDeclaration` and stick those types which would then allow the resolve
[rubberduck-vba/Rubberduck] bclothier rejected pull request #5747: Introduce type information iterator + visitor
10 hours later…
11:21 AM
[rubberduck-vba/Rubberduck] pchemguy created comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> > Personally I'd write
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.
This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.
This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.
[rubberduck-vba/Rubberduck] pchemguy edited comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> > Personally I'd write
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.
This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.
And you can't create a new instance without using the New operator
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.
This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.
And you can't create a new instance without using the New operator
[rubberduck-vba/Rubberduck] pchemguy edited comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> > Personally I'd write
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.
This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.
And you must use the New operator to create an instance of a class
>
> ```
> set Instance = PredeclaredClass.Init(arg)
>
> should trigger the inspection warning.
This is wrong! Init is a constructor! Factory is responsible for New'ing the class and is called on the predeclared instance. Constructor is responsible for initialization and must be called on the new instance. That is the reason why we need a factory and constructor. One of them is not sufficient.
And you must use the New operator to create an instance of a class
11:36 AM
[rubberduck-vba/Rubberduck] FullValueRider created comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> Please explain why. As an example here is an example of my current useage. I haven't yet got my head around TSomething and TFactorySomething as explained in one of Mat's blogs
```
'@Description("Returns a new instance of the Lyst Class. Optionally populates the instance with the result of For Each applied to ipIterable.")
Public Function Deb(Optional ByVal ipIterable As Variant = Empty) As Lyst
Guard UsePredeclaredIdInstance, Not (Me Is Lyst), i.Location & "Deb"
If
```
'@Description("Returns a new instance of the Lyst Class. Optionally populates the instance with the result of For Each applied to ipIterable.")
Public Function Deb(Optional ByVal ipIterable As Variant = Empty) As Lyst
Guard UsePredeclaredIdInstance, Not (Me Is Lyst), i.Location & "Deb"
If
[rubberduck-vba/Rubberduck] FullValueRider edited comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> Please explain why. As an example here is an example of my current useage. I haven't yet got my head around TSomething and TFactorySomething as explained in one of Mat's blogs. Following feedback I now use Deb( short for debut or debutate) and ReadyToUseInstance instead of Create/Init and Self.
```
'@Description("Returns a new instance of the Lyst Class. Optionally populates the instance with the result of For Each applied to ipIterable.")
Public Function Deb(Optional ByVal ipIterable As
```
'@Description("Returns a new instance of the Lyst Class. Optionally populates the instance with the result of For Each applied to ipIterable.")
Public Function Deb(Optional ByVal ipIterable As
11:48 AM
[rubberduck-vba/Rubberduck] pchemguy created comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> Ok, "With New" can be used instead of declaring an instance variable within the factory (Deb).
Is there an advantage of using
```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```
over
```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
Is there an advantage of using
```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```
over
```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
[rubberduck-vba/Rubberduck] pchemguy edited comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> Ok, "With New" can be used instead of declaring an instance variable within the factory (Deb).
Is there an advantage of using
```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```
over
```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
Well, the former is cleaner in a sense, sure.
Is there an advantage of using
```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```
over
```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
Well, the former is cleaner in a sense, sure.
[rubberduck-vba/Rubberduck] pchemguy edited comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> Ok, "With New" can be used instead of declaring an instance variable within the factory (Deb).
Is there an advantage of using
```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```
over
```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
Well, the former is cleaner in a sense, sure. And helps to avoid the missing New operator by using a different pattern.
Is there an advantage of using
```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```
over
```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
Well, the former is cleaner in a sense, sure. And helps to avoid the missing New operator by using a different pattern.
[rubberduck-vba/Rubberduck] pchemguy edited comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> Ok, "With New" can be used instead of declaring an instance variable within the factory (Deb).
Is there an advantage of using
```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```
over
```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
Well, the former is cleaner in a sense, sure. And helps to avoid the missing New operator issue by using a different pattern.
Is there an advantage of using
```vb
With New Lyst
Set Deb = .ReadyToUseInstance(ipIterable)
End With
```
over
```vb
Dim Instance as Lyst
Set Instance = New Lyst
Instance.ReadyToUseInstance(ipIterable)
```
though?
Well, the former is cleaner in a sense, sure. And helps to avoid the missing New operator issue by using a different pattern.
12:49 PM
[rubberduck-vba/Rubberduck] 1504168 added label enhancement to issue #5885: Parametrized Test Method
1:27 PM
2:04 PM
2:43 PM
[rubberduck-vba/Rubberduck] pchemguy created comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> I just looked over this [post](https://rubberduckvba.wordpress.com/2018/04/24/factories-parameterized-object-initialization/) again . With this
```vb
Public Property Get Self() As Something
Set Self = Me
End Property
Public Function NewSomething(ByVal initialBar As Long, ByVal initialDucky As String) As Something
With New Something
.Bar = initialBar
.Ducky = initialDucky
Set NewSomething = .Self
End With
End Function
```
it is possible to
```vb
Public Property Get Self() As Something
Set Self = Me
End Property
Public Function NewSomething(ByVal initialBar As Long, ByVal initialDucky As String) As Something
With New Something
.Bar = initialBar
.Ducky = initialDucky
Set NewSomething = .Self
End With
End Function
```
it is possible to
[rubberduck-vba/Rubberduck] pchemguy deleted comment on issue #5876: Add PredeclaredClassAssignedToVariable inspection
> I just looked over this [post](https://rubberduckvba.wordpress.com/2018/04/24/factories-parameterized-object-initialization/) again . With this
```vb
Public Property Get Self() As Something
Set Self = Me
End Property
Public Function NewSomething(ByVal initialBar As Long, ByVal initialDucky As String) As Something
With New Something
.Bar = initialBar
.Ducky = initialDucky
Set NewSomething = .Self
End With
End Function
```
it is possible to
```vb
Public Property Get Self() As Something
Set Self = Me
End Property
Public Function NewSomething(ByVal initialBar As Long, ByVal initialDucky As String) As Something
With New Something
.Bar = initialBar
.Ducky = initialDucky
Set NewSomething = .Self
End With
End Function
```
it is possible to
1 hour later…
3:58 PM
[rubberduck-vba/Rubberduck] BZngr added label PR-Status: Review Requested to pull request #5734: Introduce DeleteDeclarationsRefactoringAction replacing IModuleRewritingExtensions.cs
[rubberduck-vba/Rubberduck] BZngr removed label PR-Status: WIP from pull request #5734: Introduce DeleteDeclarationsRefactoringAction replacing IModuleRewritingExtensions.cs
2 hours later…
5:50 PM
3 hours later…
9:16 PM
3 hours later…
« first day (2687 days earlier) ← previous day next day → last day (493 days later) »
Transcript for
Oct13
Oct '2114
Oct15
VBA Rubberducking
This chat has moved to Discord: discord.gg/MYX9RECenJ