Carlos Gustavo Reetz

 VBA Rubberducking

This chat has moved to Discord: discord.gg/MYX9RECenJ
Mar 2, 2020 23:34
but still, do you agree with the idea?
Mar 2, 2020 23:34
oh, nevermind, found the corresponding documentation -> help.github.com/en/github/writing-on-github/…
Mar 2, 2020 23:31
at the end of the article
Mar 2, 2020 23:30
I was thinking on adding a sumary table containing Annotation - Corresponding VB_Attribute
Mar 2, 2020 23:29
hey @MathieuGuindon, at the wiki editor, is it possible to insert a table? I can't find an UI button that does it, maybe it requires raw html?
Feb 28, 2020 01:10
@BloggingDuck wow, very nice article!
Feb 28, 2020 00:40
oh, VB_Ext_Key yields more results
Feb 28, 2020 00:38
@M.Doerner, I googled for VB_ExtKey and it only returned 3 results (!!!), none of them really explaining it's purpose or functionality. Is it vb6 exclusive?
Feb 28, 2020 00:24
*adjusting Goal time to.... 2030
Feb 28, 2020 00:22
and to think that my original motivation to come was to try to contribute to the "revival" of the ParseState user-facing API (silly me)
Feb 28, 2020 00:20
I'm coming to realize how poorly qualified I am to "refactor" that wiki page :(
Feb 28, 2020 00:18
@M.Doerner and that's the basis of my hopes lol
Feb 28, 2020 00:16
oh I wouldn't have thought of writing "Foo.VarDescription", rather just "VarDescription" and hope it infered it's context by it's position (which, I admit would require some magic)
Feb 28, 2020 00:12
@this what do you mean by more fragile?
Feb 28, 2020 00:10
@M.Doerner no wonder I was uneble to make them work on my ancient attempts
Feb 28, 2020 00:09
VB_ExtKey, haven't read about this one before
Feb 28, 2020 00:09
so part of what I proposed earlier already exists, I get it now
Feb 28, 2020 00:08
oh, nice
Feb 28, 2020 00:07
@M.Doerner how do these work? I could write something like @ModuleAttribute("VB_PredeclaredId","True") ?
Feb 28, 2020 00:03
btw, it now occured to me... excluding @Folder, do all the other annotations require an explicit action at Code Inspections to take effect?
Feb 28, 2020 00:01
I guess my "refactoring" draft for that wiki entry will include a table to sumarize all annotations more concisely
Feb 28, 2020 00:00
hmm these aren't listed
Feb 27, 2020 23:57
@M.Doerner


No Argument
'@PredeclaredId
'@Exposed
'@DefaultMember
'@Enumerator


With Argument
'@ModuleDescription("Description of the module's purpose")
'@VariableDescription("It's a thing")
'@Description("Does something")
'@ExcelHotkey("D")

'@Folder("VBAProject") <- I just noticed this one is't listed at the Wiki among the others
Feb 27, 2020 23:09
what I described would (I guess) approximate the behaviour expected from the native VBE editor IF it actually didn't hide all VB_Attributes
Feb 27, 2020 23:07
Oh, I haven't considered that
Feb 27, 2020 23:03
@this @M.Doerner, what I had in mind would probably require a lot of refactoring to implement (and probably run into technical difficulties) but it's as follows:

instead of handling these annotations via the Code Inspections, handle it "in the same way" (actually, I don't know how this is currently implemented, I know only the behavior I see from the user perspective) the @Folder is.

Uppon creation a new Class Module would have @Folder annotation (as currently happens), @PredeclaredId(False) (or true if created via the special template Rubberducj offers) and @Exposed(False)
Feb 27, 2020 22:51
if there's no technical impediment for them to behave the same way, I'd also suggest that their syntax was something like '@PredeclaredId("True") / '@PredeclaredId("False") and they could appear by default (the same way @Folder() does)
Feb 27, 2020 22:47
still related to those two annotations (PredeclaredId and Exposed) you refer to their appliance as a quickfix. Were they intended to behave in the same way as the @Folder ones do? (meanong, they take effect simply by pressing the Sync button)
Feb 27, 2020 22:43
I'll come up with a draft then!
Feb 27, 2020 22:42
@MathieuGuindon nice! I was unsure whether I was able to, i've never contributed to a public wiki before
Feb 27, 2020 22:38
I've tried to use them before, without success, and thought they were inactive due to some bug. Only today it crossed my mind to google it more thoroughly and came across that Stack Overflow thread
Feb 27, 2020 22:35
(hey, I've been absent but I'm still alive!)
Speaking of annotations, I'd like to suggest that the procedure do Apply the @PredeclaredId and @Exposed ones (https://stackoverflow.com/questions/58600560/how-to-set-the-attribute-vb-predeclaredid-using-rubberduck-predeclaredid) to be included into their wiki entry (https://github.com/rubberduck-vba/Rubberduck/wiki/VB_Attribute-Annotations)
Jan 19, 2020 18:38
@this Oh, now I remembered. Each new instance would open a read-only copy of the Master Workbook, so they'd have the same set of code available to execution. To send something to be executed by a Worker, the Master App would, first, send over the function name, parameters and an optional Callback Object, and then Call a method that relied on Application.OnTime to actually trigger the Worker's calculations.

It was somewhat overengineered, but quite fun to watch it working
Jan 19, 2020 18:18
At first I considered just using the pure instances, without creating workbooks, since I just wanted separated VBA Runtimes to be available... I also remember investigating whether it there was a "lighter" VBA host among Excel, Word and PowerPoint. But in the end I stuck with Excel... and also created a workbook along each instance, since it enabled the use of certain other useful functions (evaluate, worksheetfunctions and the like)
Jan 19, 2020 18:12
each script would report back to the Mastar Application via GetObject (it had Public Functions written at the ThisWorkbook module) and hand over the newly spawned instances, when those were ready.
Jan 19, 2020 18:09
that was when I noticed I wasn't able to spawn multiple instances at the same time... even firing multiple scripts simultaneously
Jan 19, 2020 18:08
So I would have a Mastar Application that would spawn Worker Applications... to make that asynchronous (non-blobking) the spawning was being done via VBScript
Jan 19, 2020 18:07
I was trying to come up with a "general purpose multi-process implementation library" to be used in VBA... (mostly for the fun of it)
Jan 19, 2020 18:05
@this indeed, I was mostly referring to Excel, though I remember to have tested it with Word and PowerPoint as well (Didn't have Outlook nor Access at the time).
Jan 19, 2020 16:25
@MathieuGuindon, Thanks! That would be my next question (whether it was a OLE/COM thing, or would manifest in .NET as well)
Jan 19, 2020 16:03
Hi folks. There's something I've been wanting to ask for a while related to VBA. It's not a pressing issue, just something I observed, was unable to find references online, and I'm quite curious about.

If one runs multiple instances of a VBA Application, each instance will be able to execute code independently from the other, as long as there are hardware resources.

But it both instances try, at the same time, to use CreateObject (or even New), the one who gets to be the first will block the other until object creation is finished. For "light" objects its barely noticeable. But if one's t
Jan 16, 2020 22:51
after playing a bit with SSView (https://www.mitec.cz/ssv.html) I've been wondering the same thing. Even knowing that the structured storage format is intended to be user for.... STORAGE, I wondered if it could give clues as to how/where the code is kept in-memory. Being able to get the VBA code from memory, rather then having to rely on exporting code to Disc could potentially enable all sorts of performance improvements.

Even if that proved to be a dead end (or too hacky to be acceptable for production)... getting the code from the .bin file could be useful in that it would allow RD to "
Jan 11, 2020 14:59
done
Jan 11, 2020 14:57
oh, now I noticed the notifications stating I don't have enough reputation to vote. Ooops
Jan 11, 2020 14:56
@M.Doerner thanks! I'll do some research based on your advise and probably try to replicate it. I'm currently using the VS integration because it was what came more naturally (point and click GUI and all). I have shamefully little contact with CLI interfaces in general, but I'm willing to change that.

I clicked to star your previous messages so I could find them again more easily. Does that (clicking at the star at the right side of each message) suffice?
Jan 11, 2020 14:43
(not that I've tried to change/add anything yet, mind you)
Jan 11, 2020 14:42
Yet another noob question. Now related to working cooperatively using the GitHub integration with VSComunity:

How do I keep my local fork synced with the "next" branch while maintaining eventual changes I may have done to the code? Is it even the correct approach?
Jan 9, 2020 23:51
looks much like a Process Flow Diagram from a refinery...without recycles
Jan 9, 2020 23:49
woah!
Jan 9, 2020 23:25
Aaaaaaand it's now working! Fixed it by following an answer suggesting deleting the .vs subfolder from the main solution folder and then rebuilding.