« first day (2082 days earlier)      last day (1098 days later) » 
00:00 - 21:0021:00 - 00:00

9:09 PM
I guess I will save the projects provider in a static field then.
Arrgh, why can't VS show me the build errors when they are in Core?
 
might be something to do with the fact that we aren't using supported build system.
 
    public static T ParseAndTest<T>(IVBE vbe, Func<RubberduckParserState, IVBE, T> testFunc)
    {
        T result = default;
        using (var state = MockParser.CreateAndParse(vbe))
        {
            result = testFunc(state, vbe);
        }
        return result;
    }
 
considering that we do get the error in the output, and I think it's usually after we build the temporary project, it doesn't get copied to the error.
I guess I should check if the official SDK avoids this problem.
 
Looking at the output, Core seems to fain, which makes the WPF build fail, which then kills all error reporting for Core.
I actually could not find the error in the output.
 
@M.Doerner I've used something like the above code to generate state and get to something specific outside of a refactoring or inspection. Useful in your case?
 
9:14 PM
Only that Core failed, immediately followed by the WPF project failing.
The point in the CE tests actually is to not parse again.
 
Hmm, something new, then. I've consistently gotten error messages in the outputs.
 
I have already fixed the error since I know the obvious culprit.
 
9:33 PM
does anyone, off the top of their head, know a reason that regasm might be telling me I need to use an administrator command prompt even though I am already using an administrator command prompt?
i got the singletons figured out, expanded the process to the five data structures i wanted to use, it built essentially the first time i tried, then, when i went to register
a problem i didnt even know was possible
 
regasm is too dumb to do HKCU registration
It wants to do HKLM registration
but you have to have admin to write to HKLM
 
i am in admin command prompt though!
 
just because it says Administrator doesn't mean it's actually elevated
did you open it using Run As Administrator?
 
oh, then the next fix is easy.
pour coffee on your computer.
:-p
 
9:38 PM
im getting tempted to :(
 
one more thought - are you sure you used the correct version of regasm?
 
yes
i confirmed it worked with a different .dll in the same prompt it threw an error on mine
 
what about 32-bit/64-bit version of regasm?
 
64
which ive always used
 
what is the command you used?
normally it'd be soemthing like regasm.exe xxx.dll /tlb:xxx.tlb /codebase
 
9:40 PM
i have codebase between the .dll and .tlb but otherwise yes
and that has always worked
 
and you get the usual warn about installing into GAC?
 
it has to be something specific to how i made the most recent version of the reflected assembly
yeah
everything the same except instead of success it tells me there was an error with registering with the code RA0000
and that i need admin privileges
 
uhm. never saw a RA0000 before.
Did you google that?
 
yeah
that is why im asking here :)
 
Congratulations, you found a new bug?
 
9:43 PM
easiest star ever
 
wonders why nothing's working, remembers it's a moonday
 
okay but oddly
i decided to rebuild what i have, but only using the list again and only using a smaller selection of data types, and it worked
now im wondering if i rebuild it again with everything if it will work
btw
im not sure there is anything more beautiful than making a ton of big changes to code and having it run essentially perfectly the first time you try
 
Hello. I didn't expect such a response. You've put so much helpful concise and detailed information that it feels like Christmas. I couldn't wait to get home and get through it. I'll definitely learn lots altho surely come back with more questions.. Thank you!! — Anna Zet 4 hours ago
Late Christmas gifts are always nice.
 
@IvenBach nah. It's early.
Nicely done.
 
@this okay i did some process of elimination and it doesnt like one of the stack or queue
registered completely fine with all data type and list + dictionary + hashset
 
9:48 PM
are you exposing your version of stack/queue or just literally re-exposing .NET's?
 
theyre all wrappers
 
How important is it to have the document name on the result of ToClipboardString for inspection results?
 
i didnt really think i needed to make my own version
 
This is giving me some headaches right now.
 
nor realistically could i write one in C# better than the native .NET right?
okay the issue is with queue
stack was fine
 
9:50 PM
hmm i wonder if you're colliding with the fact that queue & stack are exposed to COM already
 
yeah
 
not the generic tho
 
oh, right.
Yes, not the generic version.
 
that was the whole point was to have strong typed .net structures if wanted
 
9:51 PM
Still if it collides, that might be why.
 
why would queue collide but not stack?
 
@M.Doerner what does it do with the document name? put it as a header or what?
Good question.
 
oh wait guess who was a moron and forgot to put DispIds on the stack and queue interface :)
 
It puts it in the returned string to qualify the location.
 
9:53 PM
[System.Runtime.InteropServices.ComVisible(false)]
[System.Serializable]
public class Queue<T> : System.Collections.Generic.IEnumerable<T>, System.Collections.Generic.IReadOnlyCollection<T>, System.Collections.ICollection
 
More precisely, to qualify the project.
 
@theVBE-it'srightforme that was very helpful of regasm to not tell you about it.
 
nope didnt fix it
@this stack and queue seemed like interchangeable things basically
i mean i know they're not but like they were the same fundamental thing
 
may have to see what your code looks like.
 
The format is severity: description - (documentName) projectName.ComponentName, line lineNumber.
 
9:55 PM
hmm. The issue is that without document name, that could be confusing coming from a session where we have multiple workbooks open or similar.
 
@this wait could a GUID conflict be causing this?
 
everythign should have their own GUID, yes
 
An actual GUID collision means you need to buy all lottery tickets you can get your hand on.
 
My problem is that I need an IVBProject to get to the document name.
 
9:56 PM
i figured :/
 
Because you gonna win them all.
 
Currently, we use the one currently stored on the project declaration.
 
@M.Doerner didn't we have a stripped down data structure to cache only essential stuff?
 
However, I am in the process of removing that.
 
i like just dont get why it is doesnt like queue but is fine with stack
 
9:57 PM
Yeah, me neither.
 
since you've isolated it to only queue
it might be actually a flaw with how it's structured. Try doing few members a ta time?
 
A problem with the ProjectDisplayName is that it cannot really be cached on the declaration because it can change during its lifetime.
 
There is no event in the VBE for a document rename.
 
9:59 PM
it was more fun than that
private static Lazy<GenericQueue> instance = new Lazy<GenericQueue>(() => new GenericQueue());
        private readonly static string name = "Queue";
        private readonly static string guid = "04";
so you see the second line
each structure singleton contributes that to here:
void GenerateStructure(IGenericStructure W) { //FIX NEED TO ADD CUSTOM DATA MARSHAL CALL

                //get parameters

                string sName = DataName + W.Name;
                string progID = PIDPrefix + W.Name;
(W is the singleton instance)
so
when i changed Queue to Queue2
it worked
in short you were 100% correct it was colliding with something
but i think it was the progid?
 
yeah, progid collision seems likely. But why not stack, though?
what is the full name?
 
i mean it depends on the data type
GenerateStructures<bool>("Boolean", "Bool", "AB");
GenerateStructures<short>("Integer", "Int16", "AC");
GenerateStructures<int>("Long", "Int32", "AD");
etc
 
@M.Doerner when using the clipboard export function, would it mix all results from all projects?
 
DataName is parameter 1, PIDPrefix is 2
 
if it's limited to only one project, then I guess we would be OK to live without document.
However if it's possible to export all results from all projects, not having that information might become problematic
 
10:04 PM
so like for queue it was generating BoolQueue, Int16Queue etc
i would assume the problem was probably coming from the variant version, which doesnt have a prefix?
 
wait, you aren't providing 2-part naming?
you really should.
 
yup it was
@this que?
 
you want to do CreateObject("MyCoolLibrary.MyCoolStuff"), not CreateObject("MyCoolStuff")
meaning, your progIds should be "MyCoolLibrary....."; That helps avoid colliding with.... something.
 
wow that seems really obvious in retrospect
kinda funny there was no issue until queue lol
that is however very easy to fix
 
yeah, I wonder what that thing is.
I think to use .NET stuff, you do something like CreateObject("System.Collection.Queue")
 
10:36 PM
Where exactly do our formatters, e.g. the implementations of IExposable get applied?
They are wrappers around the formatted object, but they seem to magically appear on items in an ICollectionView.
and on items in an ObservableCollection<TypeToWrap>
 
11:00 PM
that part does need revisiting
ttqw
 
Hm, I think the simple answer to my question how the formatters get applied is that they do not get applied at all.
When I try to export to clipboard anywhere, I get no results.
There are uses of OfType<IExportable> on the result collections, but the items are not of that type; only the wrappers are.
 
ok
im unclear when is the right time to make a CR post about this
i know obviously not every feature needs to be there, but does every bug need to be out as well
every feature meaning certain structures not wrapped or certain methods not wrapped since those are easy to add later
and a perfect thing to leave up in the air for a review
most things work right now except the enumerator and a method i tried to add to allow adding multiple items at once
the method is failing i think because param array needs a special marshal?
i mean that params int[] items does not translate to VBA ParamArray by default
enumerator is dumb smile
 
11:22 PM
need to set up the marshal, I think.
 
is it stylistically correct to put it above the method declaration or inline?
also do i need it on both the interface and the class implementation?
the attribute i mean
 
for MarshalAs it has to be inline
since it's a parameter attribute
 
for the class/interface's attributes, above the class/interface
 
i saw a syntax in something that was like [param: MarshalAs()]
so i was confused
 
11:25 PM
can't remember if I ever marshaled a paramarray
thinking about it, I am pretty sure I haven't.
at one point, I decided that using arrays were too big of a PITA
and thus wrote code to handle the collections (e.g. as its own type or whatever)
judging from the silence in this article, I am thinking that COM interop doesn't do ParamArray OOB.
 
11:42 PM
@this thank you for writing it for me ;-)
im sad
time to write a custom marshaller for it!
oh yeah that article was what brought me back here, since i couldnt make sense of it at all
C style and safe array were both ??? lol
 
you ever wondered how VBA knows when you do x{42) that it's out of array's range?
 
i assumed it just knew how big the array was
 
of course it does know, but how?
 
magic, of course
 
11:47 PM
"Oaidl.h" sees header file and runs
okay though that does make sense
so that is what it means by "safe"
 
whenever you do Dim x() As Long VB is actually allocating a SAFEARRAY struct
and when you define the size (perhaps as part of declaration, perhaps when doing ReDim, it writes the size to cbElements field.
for multiple dimensions array, it also use this:
 
so then when you make a call to an element it checks against that and tells you you're a bad boy if the array doesnt have it
 
Yep.
With C, there's no such runtime checks
 
so the "array" is just a class itself lol
 
so if you go x[42] in C, it will give you some random garbage at that memory location because... you asked for it!
 
11:50 PM
@this that is why everyone loves C so much
thanks i get the difference now
 
C the Merciless. C the Relentless. C the Grinder.
 
the best intro programming language imo!
wait wait wait
VB.Net still supports ParamArrays doesnt it?
 
yeah
it's special
 
but if that is the case, i feel like there has to be a way to marshal them to COM
like what would happen if you tried that with VB.NET code instead of C#?
 
C# has params for that. Might be ParamArray in VB.NET though.
 
11:56 PM
Ah, the clipboard export works again.
 
@MathieuGuindon its not showing up like a paramarray in the object browser :/
 
Likely makes it just any other array
 
would it do the same thing with vb.net paramarray?
 
didn't say it magically marshalled as you'd need it
@theVBE-it'srightforme I would assume so
 
that is kinda funny that a vb.net ParamArray would not marshal to something that is ParamArray in VBA
i (think i) get why i mean but the idea
 
00:00 - 21:0021:00 - 00:00

« first day (2082 days earlier)      last day (1098 days later) »