« first day (1959 days earlier)      last day (1221 days later) » 

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 1 opened issue. 1 closed issue. 3 issue comments.
[Minesweeper] Games Played: 76, Bombs Used: 53, Moves Performed: 10623, New Users: 4
 
 
4 hours later…
4:12 AM
@IvenBach MSDOS games are now playable that’s to archive archive.org/details/…
@IvenBach your duckling could get a good understanding from these old games about software design :)
 
 
1 hour later…
 
2 hours later…
7:17 AM
@PeterMTaylor Oof. I don't remember MSDOS. Before my time and they feel very clunky. Still neat to see how games have changed.
 
 
3 hours later…
11:23 AM
> This is a problem with with how `MatchName` in `DeclarationFinder` works. Before searching for the name, it normalizes it, i.e. it removes enclosing brackets and converts to lower case. However, we only convert to lower case when building the backing dictionary. Consequently, the declarations whose identifier name contains enclosing square brackets cannot be found by name.

We should be consistent between the backing dictionary and the function. I would propose to remove the brackets as well
> This is a problem with with how `MatchName` in `DeclarationFinder` works. Before searching for the name, it normalizes it, i.e. it removes enclosing brackets and converts to lower case. However, we only convert to lower case when building the backing dictionary. Consequently, the declarations whose identifier name contains enclosing square brackets cannot be found by name.

We should be consistent between the backing dictionary and the function. I would propose to remove the brackets as well
 
12:08 PM
nice -n 20 mvn -q clean install -DskipTests=true -Dmaven.javadoc.skip=true  590,33s user 21,29s system 51% cpu 19:53,48 total
... ~sighs
clean install taking 20 effing minutes to allow me to build the project I'm actually working on ...
Anybody got a better razor for this yak?
 
12:24 PM
@PeterMTaylor Nice!
@IvenBach quit making me feel old. :(
I'd really love to find Castle Wolfenstein for the Apple ][. That was the first serious computer* game I remember playing. *i.e. not console game at the arcade.
or Lemmings. That one was fun. I think it was PC, not Apple.
 
12:40 PM
Yeah, Lemmings!
and... I can play online!
notes link for later entertainment purposes
 
1:24 PM
Design question: I have a DownloadStatus class that contains some basic info about how the download(s) is/are going. I want to extend it by adding a Collection/Dictionary of individual results. clientID, recordsDownloaded, recordsInserted, recordsUpdated, that sort of thing.
Would it be better to create a new class with those elements and have the Dictionary contain a list of class elements, or can/should I simply add a Type that holds that info and have the Dictionary contain them?
 
1:45 PM
Should there be a list of hosts where RD is used? IOW (with the user's permission) RD could report which host it's running in and which version. Also, some sort of aggregation (15K users are on Excel 2016 but only 17 are on Excel 2010). Might give a better indication of where to test.
 
^ Telemetry FTW!!!
 
Also, if someone reports an issue with a specific host, and another RD user reports with that same host, it might make it easier to narrow the bug down.
@FreeMan What's the current state of telemtry?
 
Add that to the telemtry discussion issue. github.com/rubberduck-vba/Rubberduck/issues/5106
@ZevSpitz lot of hot air? :)
 
I was going to say "wish list", but "lot of hot air" will suffice...
 
hopefully it won't remain just hot air. :)
 
1:55 PM
> @mansellan

> IMO usercode, references, project and component names MUST be excluded, it shouldn't be possible to give consent for any of that.

[source](https://github.com/rubberduck-vba/Rubberduck/issues/5106#issuecomment-526199496)

Would it be possible to differentiate between elements and libraries from "standard VBA stuff" -- such as Excel, Access, ADO, DAO, WIA, MSHTML, Regex -- and custom user projects or referenced libraries? Maybe a list of the standard ones, and any non-stand
 
2:13 PM
What's the best "RD Way" to find the definition of an Enum or other data type? If I have Dim foo As UserDefinedType and Rubberduck | Find All References on UserDefinedType it doesn't list the definition of what a UserDefinedType is, only the other places where I've defined something as a UserDefinedType.
I ended up searching for enum UserDefinedType and found it, but it seems there should be A Better Way™
 
2:25 PM
@FreeMan find symbol
 
ooooohhhh... scribbles note
 
Or the VBE's own shift+F2
 
coulda sworn I tried that and got no love from Shift F2...
works just fine now, of course.
 
the View Definition doesn't work in all circumstances
It should but...
 
see? I'm not (totally) crazy!
 
3:12 PM
Once again, Access has decided that Mug's DebugLevel isn't declared anywhere. A bit of searching brought me back to this:
Sep 19 at 16:23, by Mathieu Guindon
@FreeMan try qualifying the enum member with the enum type, e.g. LogLevel.DebugLevel
and adding the fully-qualified name didn't help either.
It tells me that LogLevel isn't defined.
Access is st-st-st-stooopid...
once again a C&R seems to fix it.
:/
 
3:25 PM
If I'm getting 2019-10-17 11:24:32.2639;ERROR-2.4.1.5086;Rubberduck.UI.Command.Refactorings.CodePaneRefactorRenameCommand;System.Runtime.InteropServices.COMException (0x80020010): Invalid callee. (Exception from HRESULT: 0x80020010 (DISP_E_BADCALLEE)) does that mean that the refactor is running even though the codepane is dirty?
must have been, even though it looked like it parsed and didn't give any error message
This is the next most recent relevant item in the log: 2019-10-17 11:24:09.6769;INFO-2.4.1.5086;Rubberduck.Parsing.VBA.ParseCoordinator;Parsing run finished after 10.0059197s. (thread 97).;
Probably related to the DebugLevel isn't declared issue above. :(
 
@FreeMan You sure about that? Looks like a VBIDE issue, not Access issue.
@FreeMan I wonder if that has to do with the issue that Max raised regarding the project caching: github.com/rubberduck-vba/Rubberduck/issues/5206
 
@this I only run into it in Access and I use Mug's logger in a big Excel project too.
(Only = only that I remember. Excel doesn't have a Compact & Repair to fix the issue, so I'd probably remember a different fix for that)
 
C & R isn't needed, though - just editing the enum makes that issue go away
but yes it is annoying.
 
@this Sure nods vaguely like he fully understood that sounds legit.
@this OK, I'll give that a try next time...
 
usually I cut out the enum definition, delete few blank lines, then paste it back in
and it goes "oh, here it is...." to which I say, "duh..."
 
3:36 PM
LOL... I say "duh..." to VBE a lot...
 
Coming soon to a rubberduck near you: Stop being stoopid menu command nah
 
@this Does that apply to the VBIDE, the user, or both?
 
ok, 2 menu commands, then.
maybe even 3 if you want that one-click action
 
heh
 
4:11 PM
----_____----
-1
Q: How do you get the current label dimensions setting for a zebra printer

KySotoI am making an access application that prints two sizes of label, 3" width by 2" height, and then 1.5" width by 1" height. This application will run on several different computers that dont have the same sets of printers, for example, machine 1 might have a GC420d, a GK420d and a regular 8.5x11 p...

jerk people downvoting
:(
but yeah, trying to find what the current printer settings for paper are, is a freaking nightmare
ESPECIALLY in the label printing world.
 
might be because you haven't talked about what posted the code you tried...
 
@KySoto what freeman said... the general rule is "if you don't have a specific coding issue/error in your question, you will not get an answer" and in many cases if you are asking for code you will have your post closed as too broad because 'code-for-you' is not within scope for SO
i just spent about 15 minutes working on altering my existing vba-word macro for adjusting table sizes, for all tables in the doc, only to come back to the exact first thing i tried...

z = .preferredwidth
.preferredwidth = z - 1

that's the code that worked... what i tried in the first iteration was `.preferredwidth = .preferredwidth - 1`.
 
the right way didn't work the first time but it worked after 20.482 other attempts? Sounds about right...
I've really been struggling with Functions the last 2 days...
Public Function foo (byval parm as type) as bar
  DoStuff
End Function
should be:
Public Function foo (byval parm as type) as bar
  foo = DoStuff
End Function
I'm like, "I stepped through the code, everything works. Why ain't I gettin' nuttin' back????"
Maybe I need a break...
 
4:29 PM
syntax is fun
 
4:54 PM
If we have a bracketed reference to an enum element, should the identifier name have the brackets or agree with the identifier name of the declaration?
 
couldn't [Apple] resolve to Apple?
 
It does in the VBE.
 
I'm thinking that if that's the case, the reference should be Apple as is in the declaration.
otherwise, it will just complicate the lookup logic
 
Ok, then I will make it so in my fix for enum elements.
 
Which is kind of unfortunate since it makes a lie of the fact that there's a bracketed expression in the reference.
 
4:58 PM
Especially if you have an element declared as[[Apple]] as well.
 
I hesitate to suggest OriginalIdentifierName member.
 
@M.Doerner the solution for that is 50000 volts through the user's keyboard. Why would you include [] in the enum name other than "because I can"?
 
But... but... the little engine said it could!
I suppose we can add IsBracketed bool member but... That's still as bad as OriginalIdentifierName
 
5:11 PM
@freeman the problem is i cant find anything that works
NOTHING i have found has given me what the stupid piece of crap printers are currently set to
NOTHING tells me what the custom paper size IS
my frustration level hit 11 yesterday on this
i tried WINAPI stuff, and it exploded access
because you have to use this special snowflake struct
looking for another struct that is like 2 levels deep
printer API is retarded
 
You're probably getting downvote(s) for failing to show what you've tried that hasn't worked. I trust that you've tried a wide variety of things, but as it stands, the question (to those who didn't see your earlier frustrations here in chat) reads as "gimme teh codz!!"
 
i dont have the code anymore
access hard crashed and i lost it all
 
yikes!
 
yeah
i hit go, it went crash to desktop
so i updated my question with my frustrations and what ive tried.
got an answer, but getting a paper type is useless unless i can find out the specifications on CustomType or whatever the name for enum value 256 is.
?application.Printers(0).DeviceName
ZDesigner GC420d (EPL)
?application.Printers(0).PaperSize
 256
such useful info when it doesnt tell you the actual paper size
 
5:30 PM
256 = user-defined
not much help but maybe the link is useful?
Reread of the question... and yeah that info is mostly useless ... sry
 
its ok :(
im fine with it being user-defined paper type
i really am
but could you tell me the freakin definition MS!?
if you could tell me that its 4320 twips by 2880 twips, I WOULD BE FINE! but just tell me what the dimensions of the paper are -_-
 
:headbang:
 
and this is my frustration
because NOTHING on the net seems to be about GETTING this information, only about SETTING it.
and even then, the resounding answer has been either use .net to create a custom paper type or, MANUALLY set this in the printer settings
well thats BS
 
5:48 PM
@KySoto I don't remember your actual label sizes, but can you try setting the printer and/or driver to a size that's really close to one of those enums then getting the .PaperSize and see if it gives you that enum back?
If it does, maybe you can use that as "size 1" and User-Defined as "size 2" and your code has to know which is which from there.
AC doesn't always pop a closing paren when creating a new Sub/Function:
anyone else notice this or is it just me?
build .5086
 
6:16 PM
3" by 2" and 1.5" by 1"
also @freeman , its not just one computer
its a lot of computers. i dont just need a solution for this one application, im trying to figure out an answer for the entire infrastructure of printing here
 
oh. my. god.
 
we have... at least 20-30 applications that print labels
 
Why in the world would anyone create something as terrible as the CriteriaBuilder API for JPA?
Who designed this crap?
  public Collection<ServiceTemplateInstance> findByTemplateId(final QName templateId) {
    try (AutoCloseableEntityManager em = EntityManagerProvider.createEntityManager()) {
      final CriteriaBuilder cb = em.getCriteriaBuilder();
      // Parameters
      final ParameterExpression<QName> templateIdParameter = cb.parameter(QName.class);
      // Build the Criteria Query
      final CriteriaQuery<ServiceTemplateInstance> cq = cb.createQuery(ServiceTemplateInstance.class);
      final Root<ServiceTemplateInstance> sti = cq.from(ServiceTemplateInstance.class);
This is literally a "SELECT * FROM table t WHERE t.templateId = ?"
 
I was thinking that if you could set the printer to say the 3x2 size and that was close enough to, for example acPRPSEnvB5, then when you asked the printer to tell you what the paper size was, you would get back either 34 for acPRPSEnvB5 or 256 for User Defined. You could treat 34 as the 3x2 size and 256 as the 1.5x1 size. So long as DeviceName returned ZDesigner GC420d (EPL) you'd be good to go.
but, alas, I don't see any enum sizes that are remotely close to your label sizes...
 
except we have a random splattering of at least 4-5 different label printers
 
6:21 PM
'twas a thought...
 
:( yeah
thats why im so damned frustrated
im trying to make htis as hands off for the IT department, and users as possible
 
@FreeMan places where the VBE's own completion interferes with AC (or rather, where AC interferes with the VBE's own completion) are... complicated - and sometimes, simply impossible to fix.
 
what we are going to end up needing to do is add some custom crap to the label printer name that says, im a 3x2 printer, and im a 1.5x1 printer
thats a freaking nightmare on 300+ computers
or the 100-150 that access the label printers
 
@MathieuGuindon ah yes. Sometimes it seems to work...
 
if you have a leading space before the (, it won't
 
6:24 PM
but there was no leading space in this example...
@KySoto at least that's not as bad as I'm a label printer and I have 3x2 labels. Oops, now I have 1.5x1 labels
 
6:44 PM
printer problem isn't a problem to be solved with software, IMO. It's a user training issue. Just give them a dropdown enumerating all printers for them to select from and make them remember. Or even annotate it with local table so they can write notes about printers.
just don't futz w/ printer anything programmatically.
 
7:00 PM
@this oops, missed the ping, checking
 
the thing is, right now, they dont select printers for printing labels
initially i didnt have the problem where i need to make sure because i didnt have any applications that crossed over like that
where there were 2 printers at once
i was solving it manually on a case by case, changing the printers name a little,
unfortunately i didnt do a long term fix for it, just a short term, bandaid
Public Declare Function SetDefaultPrinter Lib "winspool.drv" Alias "SetDefaultPrinterA" (ByVal pszPrinter As String) As Long
Public Sub setPrinter(Optional ByVal argPrinter As String = "")
    'Using pattern matching for the printername.
    'Changed to internal code instead of powershell external.

    Dim p As Printer
    Dim PN As String
    Dim out As String
    out = ""
    If argPrinter = "" Then
        PN = "ZD*"
    Else
        PN = argPrinter & "*"
    End If
    For Each p In Application.Printers
thats my printer setting code
i use it to set hte default printer to the zebra printer, then back to whatever hp/dell/network printer
because we wasted a LOT of time on printer related stuff
well time and materials
 
7:17 PM
> Hmm, hadn't considered that... I can't see the harm in having a library whitelist. Another option could be to hash all referenced libraries and send just the hashes, which we could then match up to hashes of known libraries. Either way, no private info is sent.
 
7:34 PM
> So for the time being, it's not an issue because neither resources nor related documents are showing up in the VB6 Code Explorer. That said, you should probably check the component type in CanExecute and exclude both of these component types.
 
I'm bumfoozled. Not that this is anything new...
I found this on MSDN for Access 2003 indicating that Command will return the one-and-only allowed command line parameter.
I found this on SO indicating that /cmd "p1" "p2" "p3" was perfectly legal and that Command would return an array of strings each holding a parameter.
The MSDN doc does seem to be accurate for Access2016, and that's what I've had to do. Why, then did the SO question accrue 4 up votes and a check mark while indicating something that is, in my testing, invalid?
Also, why doesn't a search seem to want to return any newer docs than for 2003? This has to be documented in the 2016 docs somewhere, doesn't it?
 
7:51 PM
> This is probably a side-effect of #4338, looks like these tests should pass once that's fixed.
 
holy crap
someone figured it out!
 
that's amazing. Upvoted it.
 
it only needed minor alterations since it was referencing word.application
but thats OK!
i gave him best answer because i can use this to do what i need to do
 
need to get that user some more rep - forgot that you need enough to comment in a chat room
 
8:08 PM
yeah, poor guy
i'll upvote his comments too
welp, the guy is already up to 36 or so rep
 
@Vogel612 or @MathieuGuindon can you give Senipah rights to talk? He just bailed KySoto out on his printer issue. Sounds like the kinda guy we need to hear from 'round here.
 
yeah, and he did it using win api
im freaking amped that he figured it out.
 
yay! I can talk
Hi all
 
Wewt
 
@Senipah welcome and nice work!
 
8:16 PM
i imagine you can see how ecstatic i am
 
:)
I pinged you on reddit @KySoto when I made my first edit
you can ignore that msg now
 
OH, snap, thats right
you ARE on reddit
i didnt make the connection
 
yup, that's me
 
Yeah, i feel like i always end up asking these weird edge case questions
 
They're the interesting ones ;)
 
8:18 PM
im surprised that no one has asked this particular question before, or my google fu failed me
 
@Senipah nice work, indeed!
 
hey @Senipah, welcome to our little pond!
 
Thanks @FreeMan. Bit of a bodge but happy it helped
 
So, now that i have your example to work with, do you know what the paper is measured with? you divided the papersizes(i).x by 254
where did you get the 254?
 
mm
 
8:24 PM
oh so its in milimeters?
interesting
thats very good to know.
 
sorry tenths of a milimiter*
 
@Senipah it's VBA bodge is SOP
 
check the DC_PAPERSIZE description here: docs.microsoft.com/en-us/windows/win32/api/wingdi/…
@FreeMan lol true
 
8:36 PM
Thanks senipah, seriously
you are enabling me to not need to worry about printer names and whatnot now when finding the correct printer
nor do i need to worry about if the label printer happens to be on the network.
 
no problem! was a fun distraction. just happened to be checking in here as I've opened a couple of RD bug reports recently and saw you chatting about your SO post getting downvoted
moral of the story is you should've cross-posted to /r/vba :P
 
i was strongly considering it
but then you answered it on here
xD
 
@FreeMan there's no need to grant explicit talk privileges to them
 
not now there isn't as stackexchange updated my rep. thanks though @FreeMan & @Vogel612
catch you all later
 
 
1 hour later…
10:11 PM
> FWIW, I did some experiments based on the `DeclarationFinder` code comments. Hopefully, some of this information might be new/useful to you.

Based on your above comments, I would expect the following assumptions and logic to be true:

1. `[Apple]` is a valid variable VBA Identifier without the first layer of surrounding brackets
Normalized within `DeclarationFinder.MatchName` as `apple`
As stored in `DeclarationFinder._declarationsByName`: `[apple]`
`DeclarationFinder.MatchName` ne
 
10:21 PM
> First, I think changing the declaration finder is the wrong approach here. The problem is that we do not follow the VBA logic of ignoring the outermost enclosing brackets at the declaration. If you look at what IntelliSense shows, you will only see the versions with one less pair of brackets.

Regarding putting name validation on the `DeclarationFinder`. Please don't. This class does not need more responsibilities, but less. It should be split into a cachine part and other parts instead. If
> First, I think changing the declaration finder is the wrong approach here. The problem is that we do not follow the VBA logic of ignoring the outermost enclosing brackets at the declaration. If you look at what IntelliSense shows, you will only see the versions with one less pair of brackets.

Regarding putting name validation on the `DeclarationFinder`. Please don't. This class does not need more responsibilities, but less. It should be split into a caching part and other parts instead. If
 
10:33 PM
Wow, I found a way to reliably crash Excel via either IntelliSense in the VBE.
Hm, seems to be us actually.
Ok, I hate you VBA.
Private Enum StupidEnum
    []
End Enum


Public Sub TestStupid()
    Debug.Print StupidEnum.[]
End Sub
Why is this allowed?
What kind of code do we execute on typing?
If RD is loaded (no initial parse), typing the dot crashes Excel.
 
@M.Doerner that wouldn't be us
 
If RD is not loaded, everything is fine.
 
Hm.. AC would be a suspect then
not sure how, but I'm not seeing anything else
 
AC is disabled
Could it be the IntelliSense stuff we do to suppress the beep?
Without RD, you get an IntelliSense droptown containing a single item, which contains an empty string.
 
10:48 PM
@M.Doerner not with AC completely switched off... beep suppression only runs if SCP succeeds IIRC
oh wait, no
no, beep suppression still gets to run if SCP isn't succeeding... that's how quickinfo remains visible as you type the args
still shouldn't run with AC (or just SCP) switched off though
 
Anyway, I will open an issue for the crash.
 
thanks
 
I also observed that I recently Excel started to restart after using the VBE again.
 
@M.Doerner Sorry could you rephrase that?
 
The last times I opened Excel and the VBE with RD loaded, after closing Excel, it restarted automatically.
 
11:01 PM
ah yes, as if it had crashed on exit
I do not like new silent crashing behavior. Quite confusing.
 
> Closes #3238

This PR changes the identifier name on enum elements defined with enclosing brackets to the text withing the outermost enclosing brackets. This agrees withe the handling of the VBE as can be seen from the IntelliSense dropdown.

Moreover, the `IdentifierName` of references with bracketed members is changed to that of the referenced declaration. Having it include the brackets and thus differing from that of the declaration is rather surprising.
 
strange. I replicated on 2016 but not 2010.
 
Hm, I cannot replicate with the debugger attached.
 
that was what I was doing with 2010
let me try without debugger attached
I didn't have debugger attached to my 2010 and it iddn't crash, either.
AC was enabled, too.
yet, on 2016, AC is off and it crashes.
in 2010 I can even ctrl + I and show quick info
 
[rubberduck-vba/Rubberduck] build for commit 3eb9f92f on unknown branch: AppVeyor build succeeded
 
11:16 PM
hmm. won't even let me get to the JIT debugger in 2016.
(the VM with 2016 doesn't have the development version of RD installed)
Hmm. The 2016 crashes even after I've unloaded RD.
I can paste the entire code. Once pasted, I can Ctrl+I just fine. It's the tying of the dot that crashes the 2016. It still is crashing even when I've unloaded all add-ins.
 
Even stranger
I changed it to contain [e].
IntelliSense was OK.
I changed it back.
Still OK.
 
typing another dot at the Debug.Print Stupid|.[] crashes it still.
 
OK, no that does not work.
 
Hmm, not here. It crashes after I change the e
 
I added [e] to it.
Then I removed it.
Hm, that no longer works.
WTF, why did it work before?
 
11:25 PM
Confirmed. Adding e avoids the crash.
 
Adding it, yes.
But removing it again leads to the old crash.
 
Considering that this works without issues in Excel 2010, I think it is some kind of regression.
 
Well, without RD loaded, it always works.
 
Strange. I don't have RD loaded at all and I can crash 2016 reliably.
 
Hm, now it crashes without RD.
But it did not before.
 
11:29 PM
This could be a heisenbug
 
This seems to crash 99% of the time, but just sometimes work.
 
If it was RD, then I would expect it to crash both 2010 and 2016.
2010 even had the AC turned on and didn't even flinch.
 
Not necessarily.
It could have something to do with stuff we hook into.
That can change with the host.
Where can one report such bugs to MS?
BTW, I am on 2013.
 
i think the public channel is the send a frown
not sure if that is there in 2013
 
I do not think so.
 
11:33 PM
you could ask Mat kindly to shake the Excel NDA list
but I also expect the chorus will be "BUT WHY"
It's just like that old joke of man telling the doctor "it hurts when I move my arm like so." "Then don't do it anymore" says the doctor.
hmm. I was doing ctrl + I because of beep interceptor but now I realize it's not even that.
see, I can reproduce the crash even on a pasted code by placing the cursor to right of the dot and hitting the ctrl + space.
So it's specifically the command to show the intellisense (not quick info) that is crashing.
NUMBER OF DEAD EXCELS: 31 32
3
 
The advice to just ignore it reminded my of thecodelesscode.com/case/224.
 
Heh. Good counterpoint.
 

« first day (1959 days earlier)      last day (1221 days later) »