« first day (1985 days earlier)      last day (1195 days later) » 
00:00 - 21:0021:00 - 00:00

9:01 PM
ah ok
 
0
Q: Changing the value of a cell to have the same cell output a result?

OsamaHow can I change the value of cell B2, which is 10, to become 100? Also, I want it to be applied to a range of cells in the same column, B2:B13. How can I do that? One more question, can I have different functions in the same spreadsheet using VBA? For example, Cells B2:B13 the input value * 10 C...

 
yeah just had to log in
 
@this kills me with WPF. I'm getting better at it but still hard to know what's wrong sometimes.
 
Why do I have to find bug whenever I ead through a refactoring?
 
@mansellan login confirmed </creepy-spying-on-accounts>
 
9:06 PM
The way ReorderParameters finds the argument list is rather naive.
 
@M.Doerner Hey, it was my first major RD work.
Feel free to tear it apart.
 
@M.Doerner yeah some intern wrote it :)
 
I wasn't an intern at that point.
I was a raw recruit about 1 month in, LOL.
 
The problem is that it first looks for an ancestor that is a call context and then reorders its parameters.
The problem is that that argument list might belong to a totally different member.
 
I wouldn't be surprised if Remove had the same bug.
 
9:09 PM
I bet; the two refactorings are near identical.
 
the good news is that they're not frequently-used refactorings :)
 
The better news is they have lots of tests.
 
I have to adjust that anyway because of the default members.
They did not cover a procedure call on an object returned from a function whose arguments get reordered.
Currently, it reorders the arguments of the procedure instead of those of the function.
 
the ability to reliably get a ParameterDeclaration off an argument expression is quite recent IIRC
 
That might actually be the most reliable way to go.
 
9:14 PM
Quite a bit more recent than 1.4.3.
 
I was thinking about enhancing the logic for getting the argument list from the method references.
However, getting them from the parameter references should be much easier.
Thanks for mentioning it.
Hm, I think things are a bit trickier than the current implementation covers.
Dealing with optional parameters is a bit painful.
Or the situation where you have some named arguments.
 
this is just a random thought -- but ought we consider raising the abstraction level a bit more --- instead of writing the entire code directly, we should be able to invoke mini-rewriters that does one thing well.
as an example, have one rewriter that deals with creating, removing or editing a parameter. Another to create the declraation, and yet another for the call site
Then the refactoring would request the mini-rewriters as it needs, and thus we have uniform behaviors across refactorings?
 
You mean mini-refactoring, right?
 
remember, this was written before the rewriter API was even a dream
 
I don't know what I'd call them actually. The point is that they should deal with a specific code element
so when we assemble a program for rewriting, it'll be a matter of queueing all specialized rewriters for declarations that needs to be changed.
 
9:27 PM
@this and quickfixes?
 
Why not? If it changes code, then it should come from the same thing.
the unit tests then becomes much easier to write for
 
@this I don't think rewriters can work like this
 
since we only need to assess the change in the specific code element.
I thought as long you queue non-overlapping changes, it'll work?
 
Well, I actually plan to do one step into that direction when I tackle the refeactoring commands.
 
@this no, the 2nd will overwrite the changes of the 1st, and the 3rd will overwrite the 2nd
they work off the module's token stream
 
9:28 PM
confused. I thought you could request several rewrite operations and execute them in one go
 
I would like to split the part acquiring the target and the one executing the refactoring.
 
@this with one rewriter for the module, yes
 
and my suggestion was that the mini-rewriters would simply just queue a specific operation to the rewriter for that module
again, I don't know what to call it
 
I plan to add something like an IRefactoring<TModel> that can be used in combination with something getting the correct model.
 
@this I don't see how that's different from what we're already doing
@M.Doerner ooh, that'd be lovely!
 
9:31 PM
@this It is confusing if you call them mini-rewriter.
they are rather mini-refactorings.
They do not replace the rewriters.
 
but the idea is that if a refactoring needs 1) change a signature by adding a parameter, 2) update the call site, then instead of specifying all the rewriter operations, it would be doing something like Rewriter.Add(new ParameterRefactor(parameterDeclaration); Rewriter.Add(new CallSiteRefactor(callsiteDeclaration);
 
I really do not like the newing up.
This should rather be injectable stateless services.
We already have some of those, like the AttributesUpdater and the AnnotationUpdater.
 
I'm sure my quick'n'dirty example can be improved but I think you get my idea -- the refactoring classes themselves shouldn't have to perform the mechanics of rewriting but rather simply specify what code elements needs to be changed and leave the mechanics of specifying the rewrite operations to those updaters/mini-refactoring.
I suppose we can call them "Updaters" since we already have them for attribute/annotations.
 
that makes sense
 
so all the refactoring should do is request what updaters they need for a given set of declarations, done.
 
9:37 PM
This totally makes sense for things used in multiple places.
 
sorry I wasn't very clear originally
 
However, most of our refactorings do entirely different things.
Oh, one thing I forgot about my generic refaactoring interface idea: I would let them take the model and a rewrite session.
Then, they can be used in quick fixes without any problem.
 
10:20 PM
@M.Doerner when it comes time to create VB6 implementations of IRequiredBinaryFilesFromFileNameExtractor, I'm not sure that regex will suffice - I suspect (but haven't confirmed) that the set of controls that can emit a binary file reference is open-ended. At that point, would we need to consider extending the grammar with comprehension of component headers?
 
10:35 PM
Using the VBA parser would actually be rather painful since the entire setup is geared towards paring already existing components.
We would rather need another specialized parser as for the conditional compilation directives.
 
ah ok
 
The implementation of the extractor can really do whatever it finds necessary.
 
apologies if this is an obvious question, but... I'm not entirely sure why VB6 would need to (re)import from files for source control... the source files are already on disk. I feel like I'm missing something...
 
On the other hand, we already parse the form part of a VB form and then just do not use the result. So, we could use the VBA parser as a basis.
I always forget that.
So, is SC basically done once you have the external SC?
 
Absent IDE integration as we had previously, I can't see why not? Never tried it, but I can't see any reason why a normal git client wouldn't work for VB6.
 
10:42 PM
Currently, the effect od the update command would be to remove the component and then to add the file again.
Will removing the component delete the file?
 
No, it just excludes it from the project file
 
I guess, we should deactivate the update from file command for VB6 then.
I wonder how to best integrate that into the control.
The other sync command still makes sense.
 
the code explorer has a couple of properties for VBA / VB6 menu item visibility
 
Ah, ok.
Could you add a review comment, so I don't forget to deactivate the command for VB6?
 
sure np
So iiuc the other command imports files - would that duplicate Add -> Existing files... ?
 
10:47 PM
Not really.
 
IIRC, the .vbp file stores the full path for the included files which makes SC painful. That means for SC to be complete on VB6, one'd have to handle the updating of the .vbp... right? (that is just me asking - I assume that needs to be its own PR anyway)
 
What it does is to remove all components from the project and to (re)add all files selected.
 
@this it stores relative path from wherever the .vbp is
 
oh I was mistaken, then.
 
I think, if you use the sync command and select all files now there, the project file should get adjusted correctly.
 
10:49 PM
(but in practice everyone just sticks every source file in the same dir as the vbp)
@M.Doerner ah ok
 
AFAIU, the only effect of importing and removing components is to adjust the project file.
 
@M.Doerner correct
ok cool, I'll add a comment
 
That is a so much more sensible approach than VBA's stuffing everything into a binary.
 
I don't think Microsoft really anticipated that VBA projects could get as large as VB6 could.
 
The command could be more useful if it took everything in a configurable relative path.
However, such a command would be another PR.
It also does zero checks that it can reimport the components.
 
10:58 PM
Thinking about it some more, I'm still not sure what the use-case is for "Replace" in VB6. I get it for VBA, as you'd start with, say, an empty Excel doc and import everything you cloned from SC. But with VB6, the .vbp would also be in SC, so I'm not sure why you'd ever want to zero it out and then add back from the fs?
sorry if I'm being dumb, it's been a long day...
 
OK, if the project file is also under SC, this is not too useful.
 
I think the whole sync menu is only useful for VBA. And apologies for not thinking of this sooner...
 
but what about changes to the files?
that wouldn't change the vbp since the list of files are still the same... right?
hmph, no, because git can work directly there.
 
yeah...
 
I guess it's only if you aren't actually using SC
 
11:06 PM
and VB6 should pick up the changes at the latest at compile-time (not sure if they had filewatchers back then for insta-reload)
checking
ok, wait....
VB6 does no such thing... It has zero awareness of external changes
so we may need these after all
I think I need to actually put something into git and simulate the use-cases properly
 
> linking [chat](https://chat.stackexchange.com/transcript/message/52529208#52529208)

In theory, these commands shouldn't be necessary for VB6, as the source files, binary-content files and project files are already stored on the filesystem. Unfortunately, VB6 has no awareness of changes made externally. Not only does it not put filewatchers in place, it won't even check the filesystem for changes when compiling. The version in the editor is considered canonical at all times.

I will need t
 
gonna call it a day there though, ttgtb
one thing before I go though - will need to consider what happens if the .vbp changes externally. Presumably the only recourse there is to unload and reload the entire project...
 
11:36 PM
hmm looks like I can parse code in break mode. Scary.
 
@this why not? #EditAndContinue
 
seen anyone change a tire while driving 60 mph on a highway?
 
bah insomnia
what would be pretty freakin' awesome is if we could add the missing filewatchers, and give the same "Ignore, Overwrite, Save As" thingy that modern VS does...
potentially for VBA too?
 
@mansellan works for VB6, but of limited use for VBA
 
why so?
 
11:47 PM
I think that makes more sense. For VBA, we have to consider the case where the changes was done while the host isn't running
 
@this why, that's not how you change your tires?
 
@MathieuGuindon oh, so you chuckleheads do it all time, eh? #PicturesOrItDidntHappen
 
@mansellan VB6 works off the file system, VBA works off some IStorage
 
@MathieuGuindon but when the host is active, it's nice to have it auto-detect when git has performed changes to the working tree in the filesystem.
 
yeah... would need a persistant location for the SC folder, preferably without an external config file
 
11:50 PM
sounds familiar...
 
@this actually, there's an ad running on UK TV that shows exactly that
 
@mansellan bah. stuntman in a closed course don't count!
and how do you know it's not photoshopped anyway?!?
 
heh, it probably is
 
@this granted, but only applicable in a SC scenario... quite valuable in a SC scenario actually...
I just don't want us to get sucked into SC integration again..
 
11:52 PM
but what would it watch? the last folder it was synced from?
 
that's the thing about VBA-SC, in fact. With VBA, it's now two steps
whereas with a VS project or whatever, you do it right there
 
but yeah I feel you RE: not wanting to get sucked into SC again
 
well I guess we could implement it for VB6, then think of options for VBA
 
seems sensible
 
11:53 PM
Feature Request: Implement IStorageWatcher
 
@this I think as long as we're not looking to add a UI (other than a simple dialog box), we should be ok
issue incoming
 
@this make git write to the IStorage!
 
are there other SC solutions that aren't file-based?
 
@MathieuGuindon Linus may have some choice expletives for that. ;-)
Judging from this page I guess there isn't a such thing as non-file-based SCC
 
00:00 - 21:0021:00 - 00:00

« first day (1985 days earlier)      last day (1195 days later) »