« first day (2078 days earlier)      last day (1102 days later) » 
00:00 - 19:0019:00 - 00:00

12:00 AM
RELOAD!
[Minesweeper] Games Played: 105, Bombs Used: 61, Moves Performed: 12943, New Users: 6
RELOAD!
[Zomis/minesweeper-flags-client] 2 commits. 2 additions. 2 deletions. 2 issues opened. 2 issue comments
[rubberduck-vba/Rubberduck] 7 issue comments
 
12:20 AM
damn that is
yeah exactly what you said haha
 
@theVBE-it'srightforme you running in release or debug?
 
that's why it's being optimized away
ffs...
Look, either you keep stubbornly digging yourself into that doomed rabbit hole that leads directly into a wall, or you clarify the why so people can help you come up with an actual viable, not-clunky solution that actually works. But I'm done here, good luck disabling the VBE. — Mathieu Guindon 39 secs ago
 
12:35 AM
@MathieuGuindon so as a general rule its better to work in debug?
 
For debugging, yeah =)
plus you get edit&continue
 
wait wtf
that is why there was no edit and continue?
omggggggggg
 
brb switching
okay fixed :)
 
lol OP has been trying to disable the vbe for 2 years, props for not giving it up
 
12:44 AM
@MathieuGuindon so many questions
lets start with why
oh wait
i just realized what you were saying in your comment :)
 
Yep
Interesting question. Out of curiosity, why do you want to do this? — John Coleman Jan 26 '18 at 14:04
literally two years
 
im actually laughing
 
"The question is how not why" - kthxbye
 
i saw Jan 26 '18 and lost it
just uninstall office!
 
^
Damn, how does this guy gets Raymond Chen to reply and then dismisses him like it's just some random bloke
-1
Q: Obtaining Win OS UserName and Password?

JerryI am familiar with obtaining the System Username. How do you return the System Password ? The login password for Windows on a machine ? Is it possible ? Thanks

that user's posting history is rich
 
12:49 AM
troll or?
also this is going to be bad but who is raymond chen
its so hard sometimes with someone like that because you want to believe its genuine
 
Some big name at MSFT
 
changing from release to debug forced me to retype the regasm command :(
 
basically it's like asking some C# question, getting a comment from Jon Skeet or Eric Lippert saying you should probably do XYZ instead, and then :shrug:
@theVBE-it'srightforme you can put it in the postbuild events; RD had it that way for a long time
 
im going to assume they are the main designers of C# or something of that sort
@MathieuGuindon oh shit right ty
i wrote a note for myself to do that actually then promptly never did it
i was very proud of myself for thinking of doing that
you say had though - why did you change it?
 
Skeet has over 1M rep score on SO, and Lippert was on the original compiler design team
 
12:55 AM
that sounds like close enough to a yes for me
but tbh i really do think that is a troll
the way its written with what its asking
and you telling me about the posting history
 
@theVBE-it'srightforme because.... complex build process, antlr grammar, COM registrations, ...and then there was that one time I ended up needing to wipe over 200 registered versions of RD from my registry because prebuild wasn't unregistering the previous build...
 
there was that one time I ended up needing to wipe over 200 registered versions of RD from my registry because prebuild wasn't unregistering the previous build...
^ so uh...
 
@theVBE-it'srightforme nah just one of many hopeless vampires that don't care to learn anything and just want ready-made solutions chewed up and given to them
@theVBE-it'srightforme yeah
 
lets say someone wasnt aware of the need to unregister previous builds
 
regedit.exe
pray.exe (make sure to load fingerscrossed.dll)
 
12:59 AM
i lost it at regedit
but to avoid this issue again
is it easy to implement in prebuild?
 
It's regasm.exe with the -u switch
 
does VS need to be started as admin for the command line to work properly with regasm?
 
hm possible
 
okay ill stay manual for now so i dont have to deal with issues with that
i mean until i finish testing what i wanted to lol
 
If you're registering to HKLM, that would need admin privs
 
1:05 AM
okay
do i need to switch the path at all like i do in regular cmd
btw it worked as you said with showing up ty
 
@theVBE-it'srightforme actually the build process doesn't involve regasm.exe; IIUC we're writing to the registry ourselves, to make e.g. unit testing work with a per-user install
 
If I Understand Correctly
(comes up quite a lot in here)
 
oh okay
i will remember it
@MathieuGuindon maybe, i just dont feel like they would be asking a question like the one they did though
lol i switched the build target from any to x86 and it went from working to crashing VS
specifically locking it up while disabling task manager
think im gonna need to restart brb
 
1:32 AM
lol i clearly broke something somewhere
going to need to take a break i think
 
2:13 AM
Later!
 
3:06 AM
@MathieuGuindon TBH, I find E & C flaky in C#.... More often than not, I get "you can't edit because stack frame will be unwound, and bad things will happen, so Dave, I can't do that, sorry."
@MathieuGuindon @theVBE-it'srightforme Yep - VS's default COM interop is boneheaded because it insists on writing to HKLM by default and you can't change that. As Mat correctly notes, we generate our own registry keys at build-time so that we can write to HKCU.
Friendly reminder: Read this wiki. Read the links linked there. Do it few times until you got it. Ain't no magic about COM, I promise!
famous last words
 
@this that's because of async/await and, rule of thumb, being invoked from a () => lambda / anonymous delegates
i.e. 99% of modern code lol
 
@MathieuGuindon Just as a FYI - the underscore will make it hidden but won't actually prevent the use thereof. To actually do so, one needs the restricted, something which .NET has conveniently not provided a interop attribute for and therefore we must inject it ourselves.
 
(made-up stat)
 
@MathieuGuindon Hence, E & C is near-useless.
 
Point conceded
Was cool in VB6 though
 
3:15 AM
Still is cool in VBA. :)
@theVBE-it'srightforme Docs FTW
 
 
4 hours later…
7:22 AM
There's times you just gotta include -f and force it.
So glad I figured out how to do a filament swap.
I've got your gift printed mug. Need to find time to pack it and get it out to you.
 
 
5 hours later…
12:46 PM
@IvenBach Did you just print that?
 
1:26 PM
> I agree with this as of the latest prebuild as well. However, setting the option to remove seems to apply for a while, then under some circumstance that I cannot reproduce, the indenter acts like it is set back to 'ignore' and i have to go back into the settings and change it back to 'remove'.
 
1:46 PM
@IvenBach May the schwartz be with you!
 
2:04 PM
 
0
Q: Code very slow in ms project VBA

Marcinmy code in MS project VBA, in theory, doesn't do anything major. Compares the tasks with each other. But it runs super slow. One run through Temp lasts 15 secs. Try that with 1500-2000 tasks and the macro takes hours.. Please advise. Sub Laczona() Application.Calculation = xlManual Application...

 
3:10 PM
monkin' @mug!
 
@QuackExchange Interesting that the suggestions focus on fixing the loops; nobody thought to look at the object model to find if there's a method that would do the job.
 
@Mast yes.
 
3:34 PM
Because Dim Temp, Temp2 as Integer, Temp is an implicit Variant. Both of them should be Long. Dim Temp as Long, Temp2 as Long. Even better, declare them on separate lines - vertical space is cheap and eliminates that confusion. 64-bit Office will implicitly convert Integer to Long anyway, so no sense declaring it as Integer. — FreeMan 43 mins ago
^ @FreeMan something something answers in comments
@this I don't think it's particularly easy to rewrite this as a Filter, actually..
at least the docs about Filters are pretty bad there :/
 
I did say I don't know the OM but I'd really want to do the research first and make use of what native methods there are
more code ≠ better
 
yea, that much is definitely true
 
if i have an access app that uses a table with a datetime field on hte sql server back end
wait... nevermind
i r teh derps
 
4:00 PM
@MathieuGuindon How're you?
 
That's good
 
4:12 PM
say you have a procedure that needs to receive an undetermined amount of value pairs. in C# you'd probably just take in a params Tuple[] and call it a day. what do you do in VBA?
 
umm... scrap the VBA approach and use something else?
 
Take a scripting dictionary?
 
^^ xy solution.
 
@MathieuGuindon unique keys?
if yes, then what you have is a dictionary, if no, pass a List or Array of a custom type
 
not necessarily unique, no
am I weird if my go-to solution would be to make some Tuple class?
 
4:26 PM
then dictionary won't work, because that assumes unique keys
so ... no, you're totally fine if you want a Tuple class :)
 
Writing classes feels like the correct solution.
 
@IvenBach often it's not actually...
a lot of languages will already have some kind of native support for a Tuple type
be that a Tuple or a Pair or a KeyValuePair or something like that
so usually you'd want to use that existing code instead of reinventing the wheel ther
 
except VBA's wheels tend to need re-inventing pretty often
context:
0
Q: VBA: Checking optional parameters

AlexI have two subs and want to pass values from one to the other. Option Explicit Sub Test() Call HandleInput(ActiveSheet.Range("A1:C4"), 4, 2) End Sub Sub HandleInput(rng As Range, rowNumber As Long, colNumber As Long) Debug.Print rng.Cells(rowNumber, colNumber).Value End Sub However,...

 
@Vogel612 mumble mumble mumble. I forget that CR rules are different in terms of answering questions...
 
@FreeMan no worries :)
 
4:35 PM
@MathieuGuindon I've felt the same way - if we try to apply good OOP, it ends up with more boilerplate simply because VBA won't do it for us under the hood.
Whereas C# is magical in contrast. I don't think many people who work with C# (and not with any low level languages) even realize how much magic there is going on in the compiler
 
the more I write classes and interfaces and factories in VBA, the more I just feel like it's the normal thing to do
 
@MathieuGuindon - I get a guilty pleasure from feeling that way...
 
@MathieuGuindon share code with other VBA experts. See them scream bloody hell for not using reddick & using classes when you could just do it with modules.
 
why though?
what's so bloody evil about class modules?
 
I think it's because for years they are trained to think procedurally
and It's Good Enough For Anyone Elseâ„¢.
IDK. I do know that many VBA-centric books talk about classes as an afterthought, rather than saying "hey, you can write cleaner code if you use ...."
 
4:51 PM
@this thanks. this is why I must not give up, and keep writing that book
 
^^^^
exactly
speaking of which.... I should finish that article about class modules...
One more point to think about, though - VBA is inherently event-driven, right?
So if you can just add a event handler, and then just write code... wow! How easy!
So more often than not, they are extending some existing classes (usually the document class). It's when they need to do it in a generic manner that they get in trouble. (e.g. smart UI)
 
@this to the extent that you automate worksheets through event handlers, sure
 
Yes.
I'm pretty sure zero VBA books ever talk about making your code testable. It's all "you can totally write code! It's easy! Here's how!"
2
 
5:15 PM
Why is there so much logic in the EncapsulateFieldModel again?
It is supposed to be a dumb container for the refactoring's configuration.
In a previous PR, I painstakingly extracted all logic from it.
Now, I will have to do it again.
 
Again? It got reverted?
 
No, the recent PR that enhanced the refectoring pumped it full of logic again.
 
Oh, right
But it's also now quite different since it does much more
 
Still, the models are supposed to be dumb.
 
Yeah
 
5:22 PM
Huh, it also now has a public method for tests only. That does not seem right.
I mean the refactoring.
 
@IvenBach Shiny
 
And... I finally figured out why/how I keep biting myself in the butt with git & Access.
 
Shiny = Item + Gold
 
I create a new branch and I dive in and start working on what's already in the .accdb and forget to import the code from whatever branch I just checked out
:(
potentially dumb question, @this - how will import/export differ between OASIS and RD's import/export?
dumb... OASIS divides up the reports & forms into 2 parts, I'd imagine that RD does not.
(at the minimum)
 
I don't think RD will import document classes
it can export them, yes but not import them
(or does it only handle the code behind?)
 
5:30 PM
yeah, doccls stuff, too.
 
just not the layout, though
which is kind of moot since RD has no knowledge about it.
 
OK, will definitely stick with OASIS, yesterday's discussion about using RD's built in methods got me thinking.
 
OASIS wouldn't know what to do with doccls, either, I think.
 
somewhere/somehow, I've got a local config table that my import/export has killed all the data from, though. :(
 
you can configure the OASIS to preserve the data
 
5:33 PM
TFW when you tell it to export data at a max of 0 rows...
I presume that if you tell it to export data, it will also, by default, import it?
 
yes.
you should then end up with another file.
localconfig.dat, I think?
which is just a XML file with all the data
 
yup. just took a look and saw that. nice!
and, I keep getting this on form import:
CodeBehindForm
Option Compare Database
Option Explicit
'@folder "Satisfaction Report"
'@IgnoreModule ProcedureNotUsed
stuck in the middle of the code behind.
I guess I need to report that as a bug, eh?
 
I would, yeah - so it's being duplicated? Does the text file have that, too?
 
and this is at the beginning of every class after import:
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
End
 
I don't get that. So strange.
 
5:38 PM
No, it doesn't appear to be duplicated in the .def file
It's like it's importing and appending to the end of the existing code instead of replacing
 
and neither in the .layout file?
 
It's definitely set to overwrite on import.
maybe I should enable some logging?
Ah!
 
Sure why not. You'll need it to report it anyway
 
there's code in the .layout and in the .def!
 
that's wrong
the .layout should not have any code
that'd explain why you got that duplicated
 
5:44 PM
yeah, that's... not rightâ„¢
 
as for the class. I looked and I don't have that header at all
@FreeMan (that header, I mean)
I think it was mentioned before that Access' export routine does NOT include that header but VBIDE does
I just verified and that is the case.
Therefore for your classes to work w/ OASIS (actually Access' imports/exports), you ought remove that header.
 
I have to remove the header to get it to compile. I've never typed it in by hand.
oohh... I wonder if somehow, that was there from way back when I did my own export and those have never been overwritten properly by an OASIS export...
 
Correct.
OASIS isn't your mother checking your homework. ;-)
it'll just import / export on the expectation that it was exported / imported using Access' methods
I'm curious, though... How does Access know it's a module vs. a class...
exported using Application.SaveAsText acModule....
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Compare Database
Option Explicit
 
of course, it seems like every time I get into my project to work on something, some random thing is broken.
 
exported using VBIDE's export
VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "Class1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Compare Database
Option Explicit
Note that Access also strips the Attribute VB_Name, which makes sense
 
5:56 PM
Now I've got a record source for a drop down and it's telling me that my record source (specified as a query in code - working for the past year+) doesn't exist and that I should select an existing table or query.
I've got SELECT ... FROM ... WHERE... in the record source.
the query is valid, I can execute it in SSMS with no issue.
 
Executing in SSMS isn't a good litmus test
Executing in Access would be a better test
e.g. prove that it's not because you're missing a linked table or something
 
@M.Doerner please don't - I have some significant changes WIP for that refactoring
(model will be dumb again)
@this the VBIDE API can't do it. document modules belong to the host
 
Yes, I could have phrased it better
it's the "pretend we import code-behind" that I was fuzzy on
 
@MathieuGuindon I am currently refactoring all refactorings to split them into the find-the-configuration part and the actual refactoring.
I guess, I will try to work around that refactoring then and bring it in line later.
I plan to change the base classes, though.
 
sounds good! ....sorry for being so slow.. had this WIP for like 2 weeks now
 
6:11 PM
I have already one change in, though: the field _targetQMN does not exist anymore.
It can be read from the model.
 
I started from the UI, working my way into the VM... I fully expect a bigly negative diff on that PR
 
is there any way to manually insert one of those points that lets you minimize lines in VS
 
@theVBE-it'srightforme you mean code folding?
 
#region MyRegion ... #endregion
 
you probably don't want #regions though
 
@this yup. I think that's it. missing linked tables.
thx
 
@theVBE-it'srightforme IIRC vanilla-VS does it for every scope?
or just procedures?
 
@MathieuGuindon it is every scope
i just wanted to hide a big block of junk that was commented out
i tend not to toss scraps until im certain i dont need them
 
I want a #endregion tee
 
6:28 PM
#ImAnId10t
 
relevant:
290
A: Are #regions an antipattern or code smell?

Arseni MourzenkoA code smell is a symptom which indicates that there is a problem in the design which will potentially increase the number of bugs: this is not the case for regions, but regions can contribute creating code smells, like long methods. Since: An anti-pattern (or antipattern) is a pattern used ...

 
@theVBE-it'srightforme With proper version control, that is really unnecessary.
 
^ and small commits
 
@M.Doerner "proper version control" hearty laughter
i am willing to learn how though :)
the whole metaprocess of programming is just as complex as actually writing code i feel
 
cowboying it generally isn't sustainable :)
 
6:32 PM
having spent a whole day trying to fix something that was working and broke because of that i would agree
 
I found the fundamental process of using git rather easy to grasp.
Not the more arcane commands, mind you.
 
"using git" hearty laughter
that is what i was getting at, like the whole need to use git is hard for someone learning to grasp
 
It especially helps that there are good GUIs.
 
honestly it does seem pretty straightforward from what ive seen looking at the RD page
 
It makes traveling through the history of the code rather easy.
 
6:33 PM
for most of the time, it is
 
@M.Doerner once you figure out how.
 
should i use the integration with VS or upload manually
 
for GUI, I have been happy w/ TortoiseGit
 
don't use VS integration. That'll make you cry.
 
6:34 PM
@FreeMan Or if you use a good GUI.
 
VS is just Word or Excel, except for writing code
 
I use VS' Team Explorer all the time
 
the biggest hurdle when starting out with git is the fact that there's always at least two repositories
 
so then i treat it the same way
 
either do it CLI or via a dedicated tool
 
6:34 PM
once you get that into your mental model of git, it's comparatively smooth sailing
 
except i dont save a million versions of old files
i guess that is what git is for actually lol
 
after that it's just the weirdnesses of graph theory that sometimes throw things out of whack
 
why are there always 2
 
I do CLI for git pull upstream and git cherry-pick and other things, but committing and pushing is just right there in VS
 
Personally, I use SmartGit for most of what I do and the CLI for the more complicated things.
 
6:35 PM
@theVBE-it'srightforme one on your computer and one at the "remote" you're working with
 
@Vogel612 that is confusing
 
the idea is that your computer could just as well act as a "remote" for other people
 
it's the "distributed" in "distributed version control"
 
I commit and inspect the log in SmartGit. That is a bit easier than doing it in the text editor.
 
yea, sometimes I miss scrolling in the log, but usually I can be quick enough to find things
 
6:37 PM
I also use the GitHub add-in for VS, to checkout & review pull requests in the IDE
 
Technically you can use git with just one repository, but that goes a bit against its main point.
 
I'd never want to use git blame from the console, though
@M.Doerner yea, and you could never push
 
(most reviews I just do directly on GitHub though)
 
this is going to need a bit of time to sink in lol
 
@M.Doerner I've used TortoiseGit and WinGit. Problem is, I just haven't yet absorbed what I'm looking at, so it's just nice pictures of gibberish.
 
6:39 PM
I also have TortoiseGit installed for the added support in the FileExplorer.
 
i managed to (mostly) successfully stumble my way back to what was working before i broke it!
 
When you use git and your changes in a file completely messed things up, you can just use discard to get back the state at the last commit.
 
is getting more convinced
also reflection really doesnt like indexers from what i can tell
 
@theVBE-it'srightforme I can't shake the feeling that you're trying to run before you can walk
 
eh
a bit probably
but it feels like its the correct way to learn rn for some reason
 
6:44 PM
OTOH, diving into C# straight into deep reflection stuff can only be beneficial if you keep at it
 
@M.Doerner ohhh, right, that's one of the new commands :)
 
i feel like i have learned a lot very quickly about C# as a language
 
@theVBE-it'srightforme indexers are weird, because they're somewhere between methods, properties and operators
 
@theVBE-it'srightforme that, and the .net type system
 
6:45 PM
@MathieuGuindon oh yes that too
@Vogel612 i was trying to treat them as a regular property
 
that won't work, because properties don't take arguments :/
 
but the get/set methods are the same as a property get/set method
name wise
i guess that is consistent with "somewhere between methods, properties and operators"
@MathieuGuindon i should say i was maybe conflating C# and .NET a little bit :p
 
everything in the System namespaces is .NET, the framework; any .NET language can use anything in there.
emitting IL code is deep, deep .NET stuff
 
you got me off of VB.Net before I could really get that understanding of it :)
@MathieuGuindon so i should be proud of myself for kinda understanding what it is?
 
yes
emitting IL code is akin to making VBA code inject compiled p-code into a VBA program, at runtime
 
6:55 PM
or making java code emit bytecode into the program at runtime
 
im sure that is harder in VBA though? it feels like framework wise MS didnt make this very difficult.
like, they give you all the tools you need to do it at least.
 
@this I've exported everything from my Access project via OASIS. The only odd thing I'm seeing so far is that my form.def file starts with CodeBehindForm. My .layout files do not have code in them, only the layout info.
 
i wouldnt even know where to begin with VBA p code :)
 
the C# compiler is written in C#, it helps :)
 
@FreeMan that's... expected?
 
6:56 PM
@MathieuGuindon meta
 
Why is that odd?
 
actually im curious, have you done that with VBA p code?
 
@this indeed. But, after exporting to my working directory, doing an Import, OASIS flagged every. single. file. for import, claiming they were newer
 
I'd be kinda concerned if VBA allowed writing p-code as easily as C# allows reflection
 
6:58 PM
AFAIK p-code isn't even documented anywhere. I just know it exists and has a name
 
yeah this is what i was saying about MS making it easy with C# lol
 
#FunFact it's probably easier to inject assembler instructions into running VBA code
 
i will still be proud of kinda getting what im doing conceptually instead of just copying examples though :)
 
(now try doing that in C# ha!)
 
you can load arbitrary dlls in C#, that's ... basically equivalent
 
6:59 PM
assembler instructions?
 
@this because it was duplicating code in the .layout file before. So it's odd in that which appeared to be borken before is working fine now. I also just did a test import of a form and a class module that were giving me import errors before and they seem to have imported correctly now.
 
@theVBE-it'srightforme register-level CPU instructions
 
Erm, why do we register the refactoring dialogs twice in the IoC installer?
 
00:00 - 19:0019:00 - 00:00

« first day (2078 days earlier)      last day (1102 days later) »