« first day (1194 days earlier)      last day (1986 days later) » 
00:00 - 17:0017:00 - 00:00

00:00
RELOAD!
[rubberduck-vba/Rubberduck] 1 issue comment.
@Mat'sMug Meh, just malloc the darned thing and be done with it. That way, you become the undisputed king of the object. And if it comes all crashing down, it's their fault, not yours.
@Hosch250 I need to review it after sleep. Too much reading/learning has already filled the sponge (my brain).
Home Time.
00:42
@Mat'sMug Only when foo is static.
@Mat'sMug That is C# 6.0...
That's the readonly property...
Just so I know - if I wanna code review, is PR needed for that or is there another way we generally use to share code?
01:06
I reckon for documenting purposes we could see which classes fits in this big-O algorithm complexity chart...just saying bigocheatsheet.com
01:17
[rubberduck-vba/Rubberduck] build for commit 96c2239d on unknown branch: AppVeyor build succeeded
01:31
> After building (and publishing?) Rubberduck.RibbonDispatcher, there are two XLSM.ZIP files to run the demo: **_RibbonLibrary_** needs to be unzipped and then saved as an XLAM (to %APPDATA%\Microsoft\AddIns); **_BareRibbonVn.n_** can then be unzipped and opened to test the ribbon. There are two MsgBox dialogs displayed to provide opportunities for Ctrl-Break when debugging that will be removed later.

The XLAM file contains two Standard Modules: the RibbonCallbackAdapter to relay the callback
> Here is a snap of the sample ribbon itself:
![image](https://user-images.githubusercontent.com/17173735/30303909-a628e9e8-9738-11e7-846a-65fd6c4d9f90.png)
> Here is a snap of the sample ribbon itself:
![image](https://user-images.githubusercontent.com/17173735/30303909-a628e9e8-9738-11e7-846a-65fd6c4d9f90.png)

Questions: I have used Matt's Mug's Private Type concept for module fields where possible; but could not figure out how to make it work for module fields WithEvents. Has anyone figured that out yet?
@this PR.
Even if it's still WIP, right?
> @pgeerkens If by "module", we're talking about VBA standard module -- you can't. Events can be only raised in a class module. Therefore, VBA users will need to create a class module. I would suggest that you provide a class module with PredeclaredId = true as to provide a default instance that can accept events without having to instantiate since I imagine the typical case is it'll be used like a singleton.
02:04
@Duga: No, it is a Class Module but looking like this:
Option Explicit

Private Const ModuleName    As String = "RibbonModel."
Private Const MsgBoxTitle   As String = "Rubberduck Ribbon Demo"

Private Type TRibbonModel
    BrandingGroup   As RibbonGroup
    CustomGroup     As RibbonGroup
    StandardGroup   As RibbonGroup
End Type
Private this As TRibbonModel

Private WithEvents mCustomButton1       As RibbonButton
Private WithEvents mCustomButton2       As RibbonButton
Private WithEvents mCustomButton3       As RibbonButton
Private WithEvents mCustomSizeToggle    As RibbonToggleButton
However, your PredeclaredId idea has merit; let me think on that a bit.
@Duga: Have you ever created a PredeclaredId module in an XLAM file? How does that work with multiple workbooks open that all reference the XLAM?
@PieterGeerkens Predeclared is Predeclared, no matter the project, but for the predeclared class to be exposed by a workbook that is then referenced by another, the class needs to be exposed as PublicNotCreatable (Attribute VB_Exposed = True)
Class1 in MySharedWorkbook.xlsm:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "Class1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = True
Option Explicit

Public Sub Foo()

  Beep

End Sub
@ThunderFrame: Okay, got it. It is a true singleton in the XLAM and all workbooks get the same instance. TY.
Module1 is myClientWorkbook.xlsm that References MySharedworkbook
Option Explicit

Sub test()
  MySharedWorkbook.Class1.Foo
End Sub
@PieterGeerkens not singleton - just a default instance
if you want to enforce singleton, you need to do that in the class
@ThunderFrame: Yes, bad choice of words.
It is a true "single special named instance" shared by all referencing workbooks.
02:20
but as long as you don't expose a constructor to a client workbook, the NotCreatable means that Singleton is the default behavior
@ThunderFrame @ThunderFrame curious - have you actually succeeded in enforcing true Singleton for a class within a single VBA project?
i.e. you can't New up a PublicNotCreatable class from outside the host project. You just need to ensure that your shared project doesn't expose a CreateNewClass1 function, and that Class1 doesn't expose a method that returns a new instance.
@this this is crude:
Private Sub Class_Initialize()
  If Not Me Is Class1 Then
    Err.Raise vbObjectError Or 666, , "You can't create me"
  End If
End Sub
@ThunderFrame that's what I did some time ago but I discovered this does not in fact work.
@PieterGeerkens BTW, RE my comments - I didn't realize you were referring to a ThisWorkBook which is a document module and therefore can have events. My bad.
3
A: Immutable Object class in VBA – Creatable only through constructor and not via “New” keyword

ThunderFrameEDIT Mat's Mug has the best approach in going for an Interface and an add-in, but if you constrain the requirements to a self-contained solution, and you assume the user of the class is unfamiliar with interfaces, then you can have everything in a single class. Your predeclared instance has the ...

@this Why didn't it work?
@ThunderFrame I wish I kept that code years ago - I just wrote up a quick test, thinking it was related to an error where the object STILL get initialized regardless
In my brief test with On Error Resume Next the object is still Nothing, so it's not that simple
I can only say that years ago, I did try something very similar to your code, throwing an error in the Initiialize event if the instance wasn't the default instance but later in production, we found a strange bug which I traced to the class still initializing anyway.
so we didn't try to create any singletons from that point.
02:35
@this might be different if not working with a predeclared instance.
Now I see why you start with a failing test.
It definitely was predeclared. Otherwise the check in Initialize event would not have made sense at all. Granted, the class in question was much more complicated.
> Create extensions to selection/contexts/tokens for ease of validating the question of whether a selection contains a given context or token, plus associated tests.
I don't understand why the branch is considered out-of-date if I've done a pull before I did a PR....
[rubberduck-vba/Rubberduck] build for commit da52c6b5 on unknown branch: AppVeyor build succeeded
02:44
@this see this: (recursion, see recursion)
15
A: Custom Event not firing

BlackhawkBased on the VBA Language Specification section 5.3.1.10 Lifecycle Handler Declarations, I would guess this is the reason (emphasis mine): If a class defines a Class_Initialize lifecycle handler, that subroutine will be invoked as an method each time an instance of that class is created by th...

That has to be it, @ThunderFrame
@this and there's an RD inspection pending: github.com/rubberduck-vba/Rubberduck/issues/3197
btw, I bow to your SO-fu, @ThunderFrame :D
[rubberduck-vba/Rubberduck] build for commit c1a8e9ca on unknown branch: AppVeyor build succeeded
@this lol - it was in chat, in July
Jul 31 at 2:00, by ThunderFrame
@Mat'sMug Is it possible to raise an event from within an event handler in VBA? I can't seem to get the event to fire.
02:48
FWIW, I don't remember raising events from the initialize, though.
but as I said, the class was quite complicated - the initialize wasn't simple
I also learned that a good general rule (at least for me) is that both Initiliaze and Terminate events must not have any "external" references; if the class tries to reach to something outside its module, it's screwed (well, not necessarily boom-crash but at least very strange behavior)
which kinds of suck because that means lot of classes gonna to have Init method if one needs to pass stuff into it. Can't wait for your @MustExecute annotation to become reality.
@M.Doerner FYI - I found that your visitor code as-is still was returning null. From my tests and stepping through - it seemed to me that the syntax Result => New List<Result() was always creating a new instance, so it kept losing things. I do hope my revised visitor code isn't as strange as it was first time, though! :)
this.Dispose();
 
1 hour later…
04:06
... Spent the last hour debugging a missing method I thought I'd already migrated over. I can't be the only one that's done this. #IAmSoSmrt
04:18
User Error is a powerful learning experience.
04:48
Yeah... I think I'm getting another one cause it's going down the rabbit hole pretty deep.
05:16
I'm just going to hang my head in shame, go to sleep, and pretend I didn't waste that much time on such a simple oversight.
05:33
@Mat'sMug Are there any inspections for If True Then <Foo> for when a literal True is used making the If test superfluous?
TTGTB
@ThunderFrame I can foresee that I'm going to have many of these in the future.
06:19
> Probably only good for the modern Office file formats, but being able to display the CustomUI (2007) and/or CustomUI (2010+) XML files, with markup, would be useful. The XML would need to be loaded from the last-saved copy of the host document using the Packaging API.

XML can be syntax highlighted with AvalonEdit.

Nice to have would be navigation links from XML-defined callbacks, straight to the VBA callback implementation, and or showing callbacks without implementations.
 
1 hour later…
07:24
@Mat'sMug Opening my test project in Excel without RD loaded consumes 38 MB of memory.
Verifying that dotMemory does not analyze unmanaged memory, I found that they mention two sources of use of unmanaged memory in their quick start guide: the CLR itself and all graphics caches of WPF.
09:22
> If there were an XLAM loaded that linked to Rubberduck, how about actually editing the CustomUI.xml for another workbook. Or related, copying images in for use by the Customized Fluent Ribbon?
09:40
> sure, you could edit the XML for *any* document, then have RD save and close the document, update the CustomUI parts in the document, and then reopen the document.

If the document was being referred to by other projects, you'd have to close all of those projects first, before you could close and update the target document, but it's still feasible.
 
2 hours later…
11:29
@Mat'sMug - quick question. If I have code like this in my class:
Private pLastYearEndDate As Date
Private pYtdStartDate As Date
Private pYtdEndDate As Date
Private pCommentStartDate As Date
Private pCommentEndDate As Date
with Getters/Letters for each, is there a quick, easy way to encapsulate them in a type and replace the p* with this.*? Or just do a search/replace on each one.
Private Type TFoo
  LastYearEndDate As Date
  YtdStartDate As Date
  YtdEndDate As Date
  CommentStartDate As Date
  CommentEndDate As Date
End Type
not much to editing the fields. But I don't think rename will let you rename to a qualified type member.
Yeah, I didn't think there was any nifty RD tool. I'll just Ctrl-H for pLastYear replace with this.LastYear, then clean up the ones within the type def.
always worth asking.
It would make a handy refactoring, though.... Allow the user to chose this, me, self, bob or whatever he/she desires
14 hours ago, by Mat's Mug
Stop reusing objects. Treat objects like condoms and you'll do great. — Mat's Mug 6 secs ago
thanks, @Mat'sMug almost drowned my keyboard in coffee...
practical and timely advice, however... I've got to add a new report to my report package. So far, all the reports run YTD, but at quarter end now, I need to run a current quarter only report.
The program starts by gathering all the data YTD from the SQL server, storing it in a couple of large data classes, then spits out all the appropriate pieces where they belong.
I was about to add a GenerateQuarterly as Boolean flag, then, if true, Set dataClass = Nothing and repopulate with just the quarterly data & rerun the report.
Would that be a logical way to do it, or would that be some... undesirable reuse of a class?
12:00
@FreeMan Why not have a method that generates the report, and accepts the startDate and endDate, and then it works for all time periods.
Because I haven't done that much refactoring yet. ;)
hi gents
@ThunderFrame
@FreeMan
there is a guy that goes by the name this
There's a form in Access in which I set the date ranges, and the Driver procedure uses those to create the reports. I think I'd end up wanting to create an IReportGenerator that would accept the date ranges, then implement it for each of the reports in the package, but I haven't gotten there yet.
@this
monkin @Jelly
12:06
must be a c# fanatic
@ThunderFrame: do you have idea about web license managemet?
i've developed a sw addin and i want to let users use through licenses
@Jelly yes, @this is currently disposed.
lol
when was it "finalized"
is it "managed" or rogue?
this currently working on nuget package: this NThat
@Jelly two things I detest: web-dev and licensing
12:26
Please, no finalizing of this. There are some organizations who might have some strong opinions about finalizing a person....
I kind of have to side w/ @ThunderFrame - licensing really are a pain in the nuts. That said, if you really insist and I'm assuming you're using Excel or some kind of VBA-hosted add-in.... you might want to look at LogicNP Cryptolicensing. We've used it for a customer before and it's flexible enough to do the job.... but be prepared to have a significantly more complicated testing process. YMMV.
@ThunderFrame: why?
i've worked so hard to write the addin
why give it for free?
> Given code like this:

```vb
'Existing field
Private foo As Date

Sub test()
foo = Now()
Debug.Print foo
End Sub
```

It would be tempting to implement the private fields Type as `this` pattern:

```vb
'Existing field
Private foo As Date

'New private type declaration
Private Type TFields
foo As Date 'New field
End Type

'New type reference
Private this As TFields

Sub test()
foo = Now()
Debug.Print foo
End Sub
```

And then be able to rename usages of
@Jelly web-dev - what's the framework de jour?
a plate of smelly wordpress php
im thinking abt buying this
@Jelly licensing is critical for monetization, but it's still a pain. Most users will pay up, but there will always be someone that crackz your licensing.
12:36
i understand that
that's part of the game
you have to just accept that some folks will never pay, and then make the rest have a pleasnt experience that doesn't ask them for a key every 2 hours, and then fail after a patch is applied.
but that raises the question how do you make money?
im thinking abt the subscription model
i actually now understand why companies move to the cloud
@Jelly supermarkets know that x% of customers will shop-lift. They raise the prces by x% for everybody, and the 98% that do pay will sustain the business.
the desktop model is not sustainable
12:38
doing it right w/ licenses is very difficult. I'd say that the process of licensing itself is a big project. You now have to test the process of setting up, then validating, then patching. Many will tell you "it's easy, just call Foo()!" but in reality, you will find out that many more line of codes is needed just for licensing
subscriptions - ugh!
IMO, no, and VBA addin is probably one of worse thing to try to license.
@this Office 365 fails to renew for me every year - I have to get a new subscription every time.
I'm quite happy with Office 2003 at home. Bought it once and does everything I need. Don't sell me Office365 which reminds me how often I have to pay for new features I don't need
@this: im not doing an excel addin
12:41
Ok. You did say addin but not sure what of addin.
solidworks
sorry this i wasn't clear
take a look at this
@ThunderFrame that must be fun. is this in spite of having automated renewals?
they seem to be a way to check the user machine into licenseengine when the license is activated but i can't find an api command in their docs to remove a hash once the addin is uninstalled
their support is not responsive and i don't like that ---
0
Q: Compare two Sheets for matching data and group them on another sheet

MoacirI have two sheets with data that comes from system reports (Razão and Kardex) and a sheet with parameters (Operações). The first thing this code do (except defining some variables) is to group the parameters as "Out" or "In" (opsaida or opentrada) inside two distinct collections. Then, for each ...

@Jelly not a good sign
yeah
13:31
@Mat'sMug or whoever manage the project .... I think appveyor is hung or something. It's been "building" for >30 minutes. IDK if that's normal.
@this It happens sometimes.
OK.
stuck on git clone for 30 minutes, yeah
[rubberduck-vba/Rubberduck] build for commit 678a85e0 on unknown branch: AppVeyor build cancelled
BUILD FAILURE!
rebuilding
queued
13:34
so to confirm - it sometimes may take >30 to build the whole thing but not necessarily just to clone?
[rubberduck-vba/Rubberduck] build for commit 678a85e0 on unknown branch: AppVeyor build succeeded
@this no, it's not normal. sometimes AppVeyor has connectivity issues with nuget which randomly times-out, or chocolatey having issues downloading the InnoSetup package, but otherwise a "normal" build takes <3 minutes from the moment it's out of the build queue
gotcha. GTK
@Duga this one completed in 2:46
I didn't say it was normal, I said it happens sometimes. If it gets stuck like that, it will wait for 1 or 2o hours (forget which) and then crash.
@Mat'sMug Maybe we should make it time out after about 10 minutes?
13:40
@Hosch250 lol
depends what it's hung for
sometimes it's AppVeyor itself and the builds stay "queued" forever
other times it's Nuget
or whatever
if it's hung for murder, then there shouldn't be a timeout, but if it's just hung for a minor misdemeanor, then yeah, 10 minutes sounds about right.
>95% it's running smoothly though
@Hosch250 u r back
did u buy your car?
@FreeMan If done properly, 10 seconds is long enough to kill.
@Jelly Yup.
13:41
Minor bug, but really, I'm of two minds whether it should be fixed or not.
I'm renaming my Private p* to use Mug's excellent Private This as TType, and a Rename of pVarA to VarA generates a "Conflicts with existing 'VarA' in scope. Continue?" error.
I hit 'yes' and it continued, but didn't rename anything.
I keep meaning to post pictures for you, but I keep forgetting.
so, the bug is telling it to continue doesn't actually do anything, but if it actually continued, it would introduce errors that not everyone would remember to clean up.
@FreeMan make that an issue. it's not a real name collision, and the validation warning is interfering with the refactoring. it should be fixed.
@Hosch250 If done properly, it's pretty much instant once the rope hits max...
@FreeMan I know.
13:46
snap
shudder
I think we are getting off topic.
Might I introduce you to the guillotine...
us? never!
> Starting with:

```VBA
Private pFoo as String

Public Property Get Foo() As String
Foo = pFoo
End Property
Public Property Let Foo(ByVal value As String)
pFoo = value
End Property
```

Refactoring to:

```VBA
Private Type TBar
Foo as String
End Type
Private this as TBar

Public Property Get Foo() As String
Foo = this.Foo
End Property
Public Property Let Foo(ByVal value As String)
this.Foo = value
End Property
```

As a midpoint step, I've got:

```VBA
> linking #875
> Do it!!!
14:23
Anyone else ever have any issues with the RD hot keys not responding? For example, I use the default Ctrl- ` mapped to Refresh. Sometimes I hit it it works, sometimes it doesn't. I try Alt-D, C and get the VBE to recompile with no problem, then try again, and usually it still doesn't refresh. Same goes for Rename, and others.
14:35
> When I start excel and I try to connect with the remote repository (Login) than excel is terminated every time.
![grafik](https://user-images.githubusercontent.com/20031926/30331127-3bf792aa-97d7-11e7-840e-f9bc03b3b5ff.png)
@Duga wrong repo, dupe of dupe of dupe of dupe of dupe issue
14:53
> Hi,

Not sure which version you're using, but [this is definitely a known issue](https://github.com/rubberduck-vba/Rubberduck/issues?q=is%3Aopen+is%3Aissue+label%3Afeature-source-control). The integrated Source Control panel has been disabled by default in the later releases, it is now dubbed an "experimental feature" and needs to be explicitly enabled through Rubberduck settings.

The entire Source Control functionality is undergoing a complete overhaul. In the meantime, the latest [v2.1
15:31
Morning.
15:45
hello
16:04
@Duga For the Nth time...
First Chris did it, then Bruno rewrote the UI. Then I rewrote the UI and fixed a couple bugs with the Git module. Also, extended it a little.
Now someone else is doing it.
@shadowofsilicon Those resx values are a mess. 1) don't put explicit newlines in; the UI will automatically handle the wrapping. 2) have it be one value with {0} and {1}, etc., for the dynamic bits.
^ agreed
@Mat'sMug You probably should have rejected the PR over that. Or done a clean-up PR promptly.
[rubberduck-vba/Rubberduck] build for commit eebaf88d on unknown branch: AppVeyor build succeeded
16:14
/my-2-cents
The explicit newlines are there because at that point there should explicitly be a new line. If it was based on the size of the textblock that contains it; it would interfere with properly creating two lines when translated to other languages.
to parse and process
the projects in the VBE
That should most certainly not be an explicit newline.
And for that case, what happens when it is translated to German?
It might look something like:
jio jiow ne eoi njei
ith
ti3othn hni e rei ewoi tui
tio
And remember, not all screens are created equal, and these windows can be resized.
Then the newline, when translated, goes where it makes sense in that language so that the text stays concise instead of stretching across the entire width of the window.
Then limit the width of the control it is displayed in.
Then when translated to German, it might look like this:

jio jiow ne eoi njei
ith
ti3othn hni e rei ewoi tui
tio
16:22
And what happens when I resize my window so it looks like this, instead of being neatly on three lines?
to parse and
process
the projects in the
VBE
The resx has no concept of the width of the lines; that is a pure UI concern.
The only place a newline would be acceptable is between sentences.
@Hosch250 @Hosch250 Google thinks you are mistaking Hawaiian for German. :)
3
@this LOL.
@shadowofsilicon one more consideration - it might be the case the word order won't be the same.
so it'd still come out confusing
It's not set to word wrap, the excess gets hidden under the window control as it gets smaller
@shadowofsilicon Then make it set to word wrap.
16:25
There's enough to the user that if they need to read the message, it is intuitive for them to widen the window.
If you won't, then I will this weekend. And I'm sure Mat will merge it.
Do you have a problem with me, @Hosch250? Quite frankly, I have better ways of spending my free time.
No, I have a problem with crappy UIs.
This is the whole reason we switched to WPF: so the UI's would display correctly at any width.
Whatever. Do what you want with it.
I appreciate your work on the project.
16:27
@shadowofsilicon this is WPF, let WPF do its job. It deals with all layout.
I didn't mean to make him rage-quit...
wtf happened here?
> Wonder what's up with the deleted user opening the PR though?
16:42
@Vogel612 Must've missed it. We had a fight in the chat and he rage quite completely off Git...
ohh ... wut?
It's just up there ^
Mat and I asked him to clean the resx up, and he wouldn't. Eventually I said fine, I would. He threw a fit.
FTR it was brought up in the CE window as well
I just didn't deem it enough of a problem to not merge the PR
like, it can be fixed later
@Mat'sMug You might as well merge the PR; it isn't bad, other than that, and it will make it easier to fix the bunch all at once.
right ....
^^ that
also ...wat?
16:45
@Hosch250 yeah, from [unknown repository] ...let's see what happens
whatevs, I'm back to getting food with the other conference participants.
[rubberduck-vba/Rubberduck] Unrecognized author pushed commit eebaf88d to next: Refactor the CE's Refresh message into a reusable element and apply it to the Code Inspections window
'later :)
Have a nice time.
later!
why nuke your GH user though, and lose all attributions
@Hosch250 must have been something else going on; one doesn't rage-quit and nuke a whole account over whether a label should word-wrap or not
16:48
Probably having a bad day.
Or very thin skinned.
maybe because getting SC back on track was too much pressure, on top of everything else
I mean, half RD's bugs are SC issues
I didn't expect him to do that.
nobody did
I don't know, a lot of people haven't learned to separate an argument over code and design from personal attacks. I've seen this kind of thing more than once.
It's like they have a "Like me, like my code" attitude.
16:52
@Hosch250 to be fair you can be somewhat blunt at times ;-)
(as I)
Yeah, I should probably work on that.
no, work on the SC panel instead :D
4
I know I hurt people more than I need to, though, because I tell them what I think. Of course, nobody does it back, so I'm left trying to guess what they really think all the time...
16:57
@this please don't hesitate to voice any concerns you have about the code, the issues you're working on, the project as a whole, how it's managed and anything else. and welcome aboard :)
And if we do so, just know we don't have a problem with you, we just want to make sure the work ties in well with the project as a whole.
i.e. don't keep it all to yourself and then rage-quit over the backcolor of a button
@Mat'sMug IDK. To be honest, some of @Hosch250 comments can be constructed as belittling his work. In this particular the comment about overwriting his work this weekend. Fiar or not, people do attach a little of themselves into their work so it's hard to take criticism. If you want people to stay, I'd treat those moments as teachable moments, and keep teaching. Even if I end up overwriting, I'll not say "Fine, I will". FWIW.
@this Yeah, I just figured at that point he would just keep arguing, and if he didn't want to do it, we'd still have to clean up after him.
Next time, I'll not do that.
Possibly. I'm the new kid so IDK the whole story but when you say "I'll do a PR and Mat will like it" --- that's pretty harsh, even if it is technically correct thing to do.
16:59
FWIW I liked that PR as well - heck, it's merged.
00:00 - 17:0017:00 - 00:00

« first day (1194 days earlier)      last day (1986 days later) »