« first day (1900 days earlier)      last day (1280 days later) » 
00:00 - 16:0016:00 - 00:00

4:13 PM
> I _knew_ I wasn't imagining things!

```
'@Ignore VariableNotAssigned returned by PrepareExcelSourceData
Dim Address As String
```

Works just fine! (and has been in my code for quite some time).

Note the lack of `:` after the inspection name, yet following comments and there's no failure of the parser to recognize and honor the `'@Ignore` here.

It appears that there's a difference between how the `UnassignedVariableUsage` and the `VariableNotAssigned` inspe
 
@ticker "Therefore it's crucial that my object gets persisted in memory even when I hit stop in the editor" ...gosh, no.
 
1 file changed, 23 insertions(+), 68 deletions(-)
^going in the right direction, right?
 
@MathieuGuindon FWIW, I have a similar problem with connections. :\ I usually work around by not clicking the stop but rather letting the procedure abort via error handling.
 
I really don't like that VBIDE basically make the stop/reset a lie
that is, it'll happily dump everything in the memory but keep the instances open.
 
4:27 PM
posted on August 19, 2019 by CommitStrip

 
going out of one's way to have objects still floating around after 'stop' is pressed essentially amounts to willfully causing a memory leak.
spawning .net CLR ffs
 
I agree. The real blame is that VBIDE should have had dismissed all those instances
Do userforms stay open after a stop? Access forms does. :\
 
@this they shouldn't, unless they're leaking memory (they'll go invisible, but then the designer view won't open)
 
hmm. if they go invisible, doesn't that mean their state is still corrupted?
If it did unload then re-load, then it probably is OK
 
it properly unloads as soon as you bring up the designer though
 
4:32 PM
yeah that's also the case for Access forms/reports.
 
You should expect things to blow up if you hit 'stop'... adjust the callback so that it bails out if it's invoked after some control variable reference is cleared. Get rid of the CLR cache, it's a toxic hack that's only making a complex situation worse. — Mathieu Guindon 28 secs ago
makes me wonder wtf they're up to
 
technically this is a developer only problem they're trying to solve.
an user would never have that issue.
but a stop-button-loving developer would.
 
@MathieuGuindon yet ;-)
 
@MathieuGuindon I gave him an upvote for a well written question, even if his line of reasoning is questionable...
 
4:47 PM
@Greedo the point is that by hitting 'stop', you are the one doing the sneaky tablecloth pull — Mathieu Guindon 16 secs ago
I really dislike this idea of spawning a CLR AppDomain to store VBA global state
IIUC the guy's basically looking for a way to make the VBE's 'stop' button no longer work as designed.
and now I wonder just how equivalent to End this stop button really is
 
i thought they were the same thing
they reset all the globals
My main problem with the VBA environment is that there is no actual such thing as "global" or even a "main"
at least not one that you have control as a programmer.
 
5:02 PM
How about spawning a modeless, invisible userform and use that hWnd instead of Excel's? — Mathieu Guindon 3 mins ago
aka the smart indenter trick
attach to a child hWnd, not the host's
not tested, and probably crashes just as hard
at the end of the day what they want is the ability to register callbacks. not sure what the problem is with using Event and RaiseEvent for that.
 
from the other question, i guess because they wanted the flexibility to choose....
 
@Vogel612 wow that does look better. thanks.
 
@this for kicks then
 
yeah pretty much
may need an dose of YAGNI
 
^^^^^^
or two
 
5:16 PM
too bad I'm adding a callback in the mock framework.
in that case, creating a event would have required the unit tests be class modules and... and... and... too much complexity
but unlike the OP there, the callback isn't long-lived. It only exists as long as the procedure runs, so it's good.
 
I'm seriously questioning OP's "need" to have anything outlive the VBA execution context though
it just doesn't make sense
 
^
if he just re-created the callbacks at the start, then it would be moot
 
and not nuke them mid-execution and then blame Microsoft for "sneakily pulling the tablecloth"
 
he is using timer from win32 API, though
 
as a hack to get callbacks to run
"mis"-using timer from win32 API
 
5:21 PM
Ok, I missed that point
I thought he was actually using it for some reason
 
i.e. use idiomatic language constructs to do the job, and none of it is relevant
 
or just use .NET DLL....
 
but... using the right tool for the job defeats the purpose of the experiment!
 
well let's experiment with assembly then.
 
5:40 PM
so, wow. this is freakin nuts
 
sorry can't say I'm surprised.
we suck at security.
 
yeah, but its really really bad
plaintext passwords and usernames
AND admin accounts
hte actual fingerprints and all of that data
in a non hashed form
the only way this could be any worse is if it affected more poeple
 
@KySoto yikes...
On the bright side, maybe it'll make people think twice... naaaaaaah, who am I kidding...
 
Want to keep a secret secret? Don't share with anyone!
 
drawing a total blank here... When I deploy an SSIS package, where in the SSISDB should I expect to see it?
Under Integration Services Catalogs, not in SSISDB.
Can I give myself a check mark and get 15 points for that?
 
5:50 PM
@FreeMan ive been using filesystem.... lol
 
hm, i'm a bit fuzzy - I think the ISC is the old skool way
 
I just created & deployed my first 2 packages, and that's where I found 'em...
I dunno, I followed some directions the first time 'round and that's where it put it.
where else would I look?
 
where you tell it to put it
if you look at the project, doesnt it tell you where it puts it?
 
I was thinking of the other way where you connected to SSIS as a separate connection (that's the old skool -- the image above is the new way)
this is the old way:
 
gotcha... that's where I was looking.
My confusion was looking here:
 
5:55 PM
ah yes
 
I forgot the ISC was down below and where I shoulda been looking
I'm on the right track.
 
I kind of forgot that ISC was a folder, too.
:+1:
 
gotta make a couple of environments now.
 
come to think about it - the SSISDB folder there is redundant
 
5:56 PM
hey, on the bright side, I can upload images here, even if I can't UL to GH!
 
considering that you can't rename or change the SSISDB database so why a folder?
:D
 
i dunno what the SSISDB folder is...
 
it fits the model
 
or the ICS thing
 
I dont' think you'd have them if you aren't using 2012 or new
it's the new way to deploy a SSIS package
realizes that 2012 is now 7 years old....
 
5:58 PM
carp. :( New package, new environment (even though it's pointing to the same server) means new ID which means that I've gotta keep track of them so I can pass the proper environment ID when I call my packages...
 
yeah gogo sql server 2008r2
one day when we have cash available we might update to sql server 2016 or newer
 
SS 2008 is 11 years old!!
 
and it EOL'd last month, too
 
im angling for 2016 since its compatible with our sharepoint and most everything else
basically all of our cash is tied up in materials to make parts because demand skyrocketed
so no spare cash to spend on nice things like staying in suppert
 
you could try out Azure, I guess. That means no large upfront cash payment.
 
6:00 PM
fortunately my boss does try to stay in support where he can
 
but then you are trusting random clowns on internet to keep your data secure, sooo.
 
@this 50mbit synchronous isnt good enough
also, we dont trust those random clowns
we have some HR data on our servers
erm in our databases
 
@this points to this:
23 mins ago, by KySoto
https://www.forbes.com/sites/zakdoffman/2019/08/14/new-data-breach-has-exposed-millions-of-fingerprint-and-facial-recognition-records-report/#c91e42146c60
 
nah, just put them in CSV files and put it on a public FTP.
2
 
^^+1
 
6:03 PM
Might as well as save them the trouble, right?
23 mins ago, by this
we suck at security.
 
lol
 
> Are you sure that you get a result in the above case after removing the annotation comment?

According to the grammar, and my tests, that _annotation_ parses as a comment.
 
@IvenBach May I ask you a C# best practice question?
 
> After breaking the annotation syntax `' @ Ignore ...` and parsing, I do NOT get a `VariableNotAssigned` inspection result. It appears that this particular false positive was fixed, therefore it's not parsing the annotation?

TBH, though, that _is_ they way I originally added the comment (after RD inserted the annotation for me), and it's been processed like that for quite some time. (For some value of "quite" definitely > 4 months, probably < 12 months, but no guarantee of the exact time fra
 
@puzzlepiece87 Uh sure...
 
6:13 PM
@MathieuGuindon being the right tool for the job is, however, a totally different thing...
 
lolol @IvenBach you are being asked best practices questions now
looks like you finally made it
 
^ Bwahahha you got that one wrong...
 
nope, you dont get to say you didnt, thats for others :p
 
@IvenBach Thanks xD
 
none of your lack of confidence is allowed here
5
 
6:17 PM
Oh dear. I think you're right. If others start asking me and the big ducks don't immediately correct me... :whelming-realization: whoa. I need to sit down a little.
 
So it's been my impression from hanging out in this room, reading RD blog posts, etc. that it's best practice to keep your code and graphics far away from each other.
So I'm making a WPF app and it's complaining I have two main procedures even though I don't. I researched and found out it's because I have a Main() and this in App.xaml:
 
StartupUri="MainWindow.xaml">
 
by the way guys, dont use them
 
So I see what this is doing, it's saying "Hey, you have a GUI program, let's start with the main GUI"
I would have assumed that it would be best to start with the main program class and bring the graphics up from there instead, but now I'm wondering since Visual Studio auto-generated it to start the graphics first if I am wrong/misunderstand.
 
So finally, @IvenBach, would you recommend that StartupUri be equal to MainWindow.xaml or Program.cs?
 
I don't think it will even work if you try Program.cs. I've always left it as MainWindow.xaml or edited that StartupUri to be the correct xaml file I wanted to use.
 
@IvenBach Got it, thanks for answering my silly question! And you don't just take that line out? Like, would another option be to delete the StartupUri line altogether?
Again, this is me working under an assumption that firing things up through graphics and calling my code from there is probably the wrong way to go about it, but I'm probably wildly misunderstanding the situation.
Okay, I'm all set. Continued reading after thinking out loud and processing your answer and found this: stackoverflow.com/questions/2694680/no-main-in-wpf
Thanks @IvenBach!
 
@puzzlepiece87 If you don't have StartupUri=FooBar.xaml then nothing is shown. Don't think that's what you want. Application.StartupUri property is the very beginning of where the UI starts. From what I've understood and documentation.
 
6:39 PM
@IvenBach Yes exactly, and then it seems that the idea is to just run everything off of interface actions. That makes sense, it just took me awhile to wrap my head around that. I'm definitely more used to the VBA process where you prepare the environment and then bring the graphics up when you're ready and keep them under strict control with instancing, etc. Thanks for helping me process this.
 
Not sure what I did, if anything, but glad it makes sense now.
 
@puzzlepiece87 I always remove <StartupUri="MainWindow.xaml"> in the markup, because I want full control of how my app starts up
 
@MathieuGuindon Yay! Glad the impressions I've gotten from hanging out here are correct! I feel empowered to do the same now, I'd also like that control. Thanks!
 
6:56 PM
@puzzlepiece87 Yeah, Mat's right.
You want to override OnStartup or whatever the method is.
Then in there, you'll create a new instance of your window and show it.
 
@23fc9a62-56de-47fb-97b4-737890 exactly
                    resx.Culture = Thread.CurrentThread.CurrentUICulture;

                    var service = new ClockerDataService(new UnitOfWorkFactory());
                    using (var time = new DateTimeProvider())
                    {
                        var viewModel = new MainWindowViewModel(service, time);
                        viewModel.Initialize();
                        var view = new MainWindow {DataContext = viewModel};
                        view.ShowDialog();
                    }
 
Preferably through an IoC container.
 
^ here with poor man's DI, works just fine
 
Yeah, I like poor-man's better, TBH.
But it can get to be too much on a larger system.
 
for a simple app, there's no need for an IoC setup
 
6:59 PM
I almost never use an IoC container, TBH.
But I always feel I'm not preparing for the future just a bit.
 
I think there's stuff like TinyIoC
 
If it's just me, I can always add one later, but for larger projects...
 
if you abstract it out, then it's easy to substitute in a more full-featured IoC
 
@23fc9a62-56de-47fb-97b4-737890 nah - you're ctor-injecting dependencies, inversion of control is in place ... #NoGuilt
 
@MathieuGuindon Perfect :D
Anyway, I'll step out now--someone found a Maybe<Bug> in our system.
 
7:01 PM
if/when the DI setup gets complicated, then you shove all that setup code into an IoC container
 
7:21 PM
Anyone gotta minute for an SSIS issue?
I've got a package that I've set up very similarly to one that's already working (different source file and destination table, but otherwise nearly identical).
I have this sproc that I call from my VBA to launch it:
CREATE or alter PROCEDURE [dbo].[SSIS_ApptPlusLoad] (@database AS NVARCHAR(50))
AS
BEGIN
	DECLARE @environment_id BIGINT

	IF @database = 'Prod'
		SET @environment_id = 4
	ELSE
		SET @environment_id = 3

	DECLARE @execution_id BIGINT

	EXEC [SSISDB].[catalog].[create_execution] @package_name = N'Package.dtsx', @execution_id = @execution_id OUTPUT, @folder_name = N'AppointmentPlus Load' , @project_name = N'BizSol ApptPlus',
		@use32bitruntime = False, @reference_id = @environment_id, @runinscaleout = False
If I'm not specifying Prod mode, it defaults to Dev which is environment_id=3
But,... when I try to run it I get an error saying:
Msg 27208, Level 16, State 1, Procedure SSISDB.catalog.create_execution, Line 258 [Batch Start Line 2]
The environment reference '3' is not associated with the project.
Is there a possibility that because I have a Dev and Prod environment for each of the 2 packages I've deployed so far that there's confusion? I wouldn't think so, I'm referring to them by number, not name...
my test call:
USE [ReportingDev]
GO

DECLARE @RC int
DECLARE @database nvarchar(50) = 'Dev'

-- TODO: Set parameter values here.

EXECUTE @RC = [dbo].[SSIS_ApptPlusLoad]
   @database
GO
the sproc SSIS_ApptPlusLoad is set up identically to the functioning one with the exception that the functioning one defines environment IDs 1 & 2. Other than that, it's a copy/pasta/rename
well, OK, the params to [create_execution] are different to point to the other package.... You get the idea...
 
7:48 PM
I can see that my default member reolution is coming along; default member tests start passing, and tons of other tests fail.
Hm, apparently we never resolve the output list of Debug.Print statements.
For Print statements, we do it, though.
Oh, we just bail out in the tests because we cannot find the VBA library.
 
the Debug probably need fixing anyway
You were one who suggested making Debug be a standard module rather than a class
Not sure that impacts the resolution, though.
 
I just decided to resolve the output list regardless whether the declration for Debug.Printis there or not.
 
I would think that Debug shouldn't depend on having VBA library, though.
 
It needs it for the parent project.
Will this be a problem in VB6?
 
I honestly don't know. @mansellan would know.
but I thought one of uncertainty was that Debug should be a keyword, rather than a object.
It is a oddball.
 
8:00 PM
Ahhh!!! I found it!!
gah! too many little bits & pieces... :/
 
@FreeMan It wouldn't be Microsoft otherwise?
 
so true...
 
One good side effect of implementing default memebr reolution with tests for all cases is that I also find a few statements in which we have not generated any references so far.
 
and that's very important - everything hangs on proper resolution.
 
8:15 PM
@this yup, both Debug.Print and Debug.Assert get keyword-highlighting, hinting at a massive hack compiler-assisted "debug object" that doesn't really exist; we cheat by making a fake DebugClass module with a Print method
 
waves hand There aren't the massive hacks you're looking for.
 
I would rather guess that it gets translated to an ordinary Print statement with a special file number for the output stream to the immediate window.
Or rather the equivalent thereof.
 
@M.Doerner that's probably closer to the actual workings of it
 
It has the strange output list argument the Print statement uses.
So, it is probably the same, but with another output stream.
 
I'd like to find out if the Immediate type lib has the IVBFormat interface implemented. That would be what'd enable the printing
 
8:27 PM
Hah, I think I have found the cause of #4994: we do not resolve Mid statements.
I'll add that.
 
Will you add world hunger to the list that your PR will fix? :)
8
 
That is a bit beyond my capabilities.
 
Still, I love that you're finding many fixes for resolver. :)
 
I could add it to the list, but then you have to wait indefinitly for it to move out of the draft status.
We were just missing tests for the more arcane parts of VBA.
 
FTR I'll hit "merge" on a PR that even partially addresses world hunger, if it comes down to this :)
4
 
8:43 PM
> The reaon for this bug seems to be that we forgot to resolve Mid statements.

I will add resolution for them in my current PR #5089 and a test to verify that this bug is no longer there.
> The reason for this bug seems to be that we forgot to resolve Mid statements.

I will add resolution for them in my current PR #5089 and a test to verify that this bug is no longer there.
 
The Maybe<Bug> was a real bug, and it's fixed now.
 
Down to 63 failing tests.
 
Test failure incoming
 
9:15 PM
Max, I don't know if this is warranted but recall that we are also supposed to clean up the declarations. Does it make sense to create a derived DefaultMemberDeclaration or something like that?
 
I do not think so.
 
[rubberduck-vba/Rubberduck] build for commit f913d7ad on unknown branch: AppVeyor build failed
BUILD FAILURE!
 
Default mebers can be very different kinds of declarations.
 
Looking at what Comintern did, he mapped them to body elements such as class or function or property
 
You can have properties, functions and procedures.
 
9:16 PM
yeah. MS calls them "default properties", but they're really default members
 
In reality, only properties and functions could be a default member.
(I don't think a procedure can be a default member, right?)
 
You can have a defult member resolution on call statements.
It can.
That resolution path is in the spec.
 
Ok. I see the problem. Was just a thought because I noticed that the declaration got more properties and it is already kind of bloated.
 
It is used whenever the procedure in a call statement is classified as an object type variable..
 
@this interesting. it can - but you get "invalid use of property" at run-time
 
9:19 PM
The declaration got some new general use properties.
 
oh wow
 foo = Class1 'VB_PredeclaredId=True; Class1.Test.VB_UserMemId=0
^ invokes the default member (a Sub procedure that pops a msgbox that says "Hi!")
 
That's dastardly if you ask me.
 
#BarelyLegal
 
#ThunderCode
 
definitely
 
9:22 PM
and what is the value of foo, anyway?!?
 
so... I guess we need an inspection that flags Attribute [MemberName].VB_UserMemId = 0 usage on Sub procedures
 
^
 
@this Empty :)
 
does it get set to Empty even if it was assigned before that line?
or still retains the last assigned value?
TBH, I am not sure that makes any difference. It's still horrid code either way.
 
That is a nice trick to let maintainers of your code go crazy.
Definitely a case for the axe murderer.
 
9:27 PM
^
 
^^
Implicit side-effects? Mwahahaha
 
I guess Joel wasn't quite thorough in his draft of VB and Bill wasn't quite critical as he should have been.
 
Was Bill too busy bathing in Benjamin’s by that point in time?
 
No, according to Joel, he was swooning because Bill actually read his spec and made many notes in it.
 
And the 1900 vs 1904 date problem IIRC.
> Bill doesn’t really want to review your spec, he just wants to make sure you’ve got it under control.
That sounds like a mug we all know.
 
9:56 PM
which strikes you as more cleaner --- Set mock2 = MockProvider.MockMemberObject(mock1, "...") vs. Set mock2 = mock1.SetupChildMock("...")
Note that in the latter setup, the mocked object would have to be able to refer to the provider to be able to create a new mock of the child object's type.
 
What exactly is the purpose of this statement?
 
consider the scenario where we want to mock something like fso.Drives("C")
The fso is Scripting.FileSystemObject and thus we can mock it by acquiring the progid
however, the property Drives returns a class Scripting.Drives, which does not have progid and cannot be created directly
Instead, I must arrange the mock for that class by setting up the Drives property to return a new mock of the Scripting.Drives so that it can be then furthered mocked up on its Item property to do something
 
The complication is that the MockProvider has the knowledge necessary to create a new mock of a type whereas the ComMock has the knowledge to perform the necessary setup.
If I opt to enable the ComMock to return a new ComMock for its object-returning members (the 2nd option), then it has to hold a reference to MockProvider. If I use the first option, the MockProvider only need to call the Setup on the ComMock.
 
10:21 PM
@this you have a moment to help me understand "Test project Examples.Tests does not reference any .NET NuGet adapter. Test discovery or execution might not work for this project.
It's recommended to reference NuGet test adapters in each test project in the solution."?
I've attempted to install and update the test framework to the newest but that broke the tests.
 
I guess you created a normal project, rather than a test project?
 
Reverted to the older NUnit and trying to figure my way through it.
 
and you did the nuget restore, right?
need to step out for a bit, BBS
 
I've checked Tools > Options > NuGet Package Manager and both options are toggled on.
It builds without issue. When I try and run tests I get the message about it not referencing an adapter.
I've also tried clearing the NuGet cache as well.
 
@puzzlepiece87 I just override OnStartup in App.xaml.cs
 
10:29 PM
0
Q: Excel's Dynamic Array Functions...In VBA (No Win 32)

rickmanalexanderIn recent months I have been trying to figure out how in the world one can mimic the functionality of Excel's New Dynamic Arrays exclusively in VBA. There are tricky ways to do this using the window's API, (see this link), and I have also found that one can utilize ADO with Querytables (see this ...

 
@this Right clicked solution>Restore NuGet Packages "All packages are already installed and there is nothing to restore."
 
@MathieuGuindon Thank you!
 
10:49 PM
While outputting a #SPILL string looks like the thing, I would recommend outputting an actual existing/supported Error type (e.g. CVErr(xlErrValue)), so that native functions like IsError still work correctly. — Mathieu Guindon 15 mins ago
 
11:11 PM
@this can't see it in the OB anywhere...
 
It is nowhere
It wouldn't be keyword-blue if it were =)
 
@IvenBach Write the author? Normally when I make a new test project, I just use the standard test project in VS, then install the NUnit & Nunint3TestAdapater nuget packages and it's all good.
@mansellan The question Max is asking is whether there'll be a problem treating Debug as a module rather than a class
right now, we pretend that it's a Debug which isn't really true because it's not object-able.
but it is objectionable!
@puzzlepiece87 to me that says all about what I suspected know about WPF -- it's a WTF framework because it's burdening you with choices that you shouldn't even have to make, IMNSHO.
 
uhm, not sure how to check - afaics Debug acts the same in VB6 as in VBA
Set objectVariable = Debug fails for example
 
11:33 PM
fwiw, found this library which seems more complete way of abstracting and thus mocking the filesystem & registry & whatnots within System
 
porting the first our our WPF apps to net core 3 at work. I know its still prerelease, but it has a go-live license and is now feature-locked. And its a developer only tool, so...
@this MS-PL :-(
 
If we only use for our testing, that doesn't matter?
oh wait, we need the abstraction in production. Bummer.
 
@this well VBA docs do talk about a "Debug object"
 
OK but what is a module exactly?
we can name-qualify them so they do have some bearing on the name scoping.
we just can't reference them directly.
In contrast, a predeclaredId class can both be referenced or new'd up
 
11:50 PM
depends. COM types support instancing modes VBA user classes don't
 
and VB6 supports more modes than VBA -- not sure if VB6 supports all as COM does
 
aye. meaning, it could very well be a class using some restricted instancing mode VBA can't emulate
 
00:00 - 16:0016:00 - 00:00

« first day (1900 days earlier)      last day (1280 days later) »