There are plenty of examples of using the FileSystemObject to recursively search for a file in subfolders. I thought that it would be interesting to write one using the Dir() function.
I was wondering if there is a way to return the found file without using the extra FoundFile parameter?
Fu...
> Same again, though Excel had been open, mostly idle, for much longer. Please let me know if there's anything more helpful I can do next time.
Version 2.4.1.4627 OS: Microsoft Windows NT 10.0.17134.0, x64 Host Product: Microsoft Office x86 Host Version: 16.0.11425.20204 Host Executable: EXCEL.EXE
@Vogel612 Besides my PR only deals with commands - there are more subsystems that needs to be hooked up similarly.
@M.Doerner would this extension be a clean way of getting the project? All declarations would have a reference to a QMN. Making it a method rather than a property avoids holding reference to it until it's actually needed, though it shifts the responsibility to the caller.
> Do you think it would be possible to highlight the function/sub/method? RD has so much more capability than the native explorer, it would be nice to keep the experience consistent.
I also understand that the update rate/overhead required to keep the explorer in sync at the function level might be too great. Especially if you have multiple codepanes and are actively clicking between them.
I have set up one project, and git remote -v shows origin <URL> (fetch) and origin <URL> (push). When I set up another, distinct project, will I have an origin for both projects, each with their own <URL> or will this one be origin and the next one be project2origin?
i.e., is "origin" relative to the project directory I'm currently in (on my local machine), or is it "global" to my local git installation?
My question really leads to whether I need to have all of my short names include info about the project (proj1master, proj1next, proj1branchA) or if simple names (master, next, branchA) are all it takes because they're unique within the project.
@M.Doerner Ok - IIRC, it was there for a case where the project provider was not available. I did consider whether it should be refactored to make use of it so that it would be accessible anywhere but never got around to it.
> > Do you think it would be possible to highlight the function/sub/method?
Yup. Using the `SelectionChangedService` like Max suggested, we could even select treeview nodes for enum members and module variables if that's what's selected in the current code pane. I think it's a great idea!
@Duga There is one potential problem, though - if the module has been changed, and the parse tree is now stale, then selection will be in wrong place.
To avoid this, either we'll have to have background automatic parsing (!) or use VBIDE API to locate the element rather than relying on the cached selection in the declaration.
@this meh. better select what RD thinks is selected - tells the user they need to reparse. If everything looks and behaves like all is up to date, we'll have other kinds of problems.... no?
@FreeMan everything in a repository belongs to that repository
@this I wouldn't say "confusing" as much as "irritating". RD would allow real-time syncing, etc. except that if I touch my keyboard, everything is out of sync & I have to reparse.
Everything's out of sync as soon as I type now, but it's not quite so obvious.
realy??? I started with 1.22 (still have the install if you wanna borrow it :) ) and I don't remember that. Though I can see the molasses thing happening...
anyway, I really don't think real-time parsing is feasible until we can reduce the granularity level to the procedure level rather than the module level.
We have the '@IgnoreModule attribute -- but in my case, I have a number of projects that has same modules that are not necessarily mine that get imported - would it make sense for RD to provide a blacklist (or whitelist) of module names to ignore?
when I git branch <name> that creates a branch on my remote. I then git checkout <name> - it's at that point that it actually copies the files from master to my local directory so I can start working on them, right?
I've created a network directory, switched to that directory, did git init there, dumped all my code and did git commit -a -m 'message'. That's my "GitHub" version that I'll use as my most current production code.
From here on out, I should never touch that network location by hand, right?
Now, I need to go to my local HD directory where my source is and if I do git checkout master I'll get all that code pulled to my local HD. That is where I do my branching, editing, committing, etc.
When I've reached a point where I'm ready to "release" code for a fix or a new feature, I git push it to master which updates the code on the network.
> Continuing to think this through a little bit... what would happen during parsing (my other ticket!)?
Assume you could populate the code explorer with all the projects/modules super-quick so people could at least navigate around while the parsing finishes. RD would have to know to only highlight the module, not look for the function, etc. I assume this would just be choosing the closest node in a tree, but it's still part of the consideration.
> Would it be possible to pre-parse the first xx lines to catch folder annotations?? That way the base tree structure would not have to change as more detail was discovered.
I just dont like the idea of watching a sudden switch from PE to CE... understanding of course that it may be too complicated to something other...
@Hosch250 there will be (eventually) 2 of us, and I want to create right habits from the start, but (interrupted by phone call) for now, I'm going to pretend I'm the only one in the universe. (Bwahahahaha!!!)
> I do not want to spoil the enthusiasm here, but I have my concerns with selecting the member. The primary problem I see is that once the user starts to edit the module, we have no idea where members start and end until the next reparse.
@this meh. better select what RD thinks is selected - tells the user they need to reparse. If everything looks and behaves like all is up to date, we'll have other kinds of problems.... no?
> FWIW, a stopgap solution would be to allow selection of procedures, which can be trivially found using VBIDE API. The declaration level variables and other elements would have to be ignored (placing the user at the top of the declarations section).
The ideal solution likely requires reducing the granularity of the parsing level from module to procedure which may enable real-time parsing, which is not possible until we solve other problems (e.g. creating our custom code panes).
while having our own IDE mean we won't have to fight with the VBIDE's dumb behaviors, we may end up fighting with host trying to work with the VBIDE. Then there's the debugging thingee....
Well, I'm not promising anything, but I might look into making a dockable control hosting a WPF tab container with each tab containing an Avalon control.
I want to save my file in PRN and my code is working awesome but the problem is once you convert the output prn then convert into notepad all the data i have put in my excel came into some other language it like ---- (ƒÑ}q’ne”:½ŒA¯[÷ &QâÐÄ6–ö'o?“Cº@É.¡............ — RISHABH SINGH9 mins ago
Hmm, should the # of references for module count any references to procedure within?
because if I select a module, the status bar show it having 0 references. yet if I select a procedure in that same module, it shows 4 references, 1 from another module.
If that was all it was, I would expect the references to be 1 for the whole module, no?
that wouldn't work - it's not possible to reference a module directly. The only time you can reference one is in a fully qualified call --- Module1.Foo is kosher; Set m = Module1 isn't.
Just because there's a reference to a function, it doesn't count as a reference to the class. There's probably a new Foo() or Foo. or using static Foo somewhere that does get counted, though.
Hmm.
Might need to be tweaked.
Anyway, can you (try to) help me with a DB thing I'm fighting?
Let's say I have an admin page that allows you to define the structure of an XLSX or CSV. Like, you can say which columns it will have and which data type the column data will be (decimal or string, for now).
One last thing i have used your code it is working a fine(ws.SaveAs Filename:="D:\birla soft\" & ws.Name & ".prn", FileFormat:=xlTextPrinter) but it gives output like this (...sheet1,...sheet2) I do not want (...) these dots in the starting i just want and keep it simple like (sheet1) (sheet2) & so on. — RISHABH SINGH1 min ago
The basic problem is that you're using an EAV model. EAV model is what you must work with for a relational database, and frankly it doesn't really scale that well.
Since the schema is meant to be dynamic, I'm more inclined to either farm it out to a schemaless data store or at least stuff it as a XML? JSON? column in the relational database.
I also would question whether they really need a dynamic schema.
Here's why I question the idea of dynamic schema -- if it's dynamic, then you will end up doing a bunch of metadata stuff just to work with their data.
The way I see it, it's simpler to set up a mapping system to a fixed schema than to create a dynamic schema that let them store whatever and leaving it up to you to figure what's the hell what.
The only other thing they can do is if a value matches another (string) or is in a range (decimal), they can provide a color and it will show up in that color. And only admins can do that.
Well, one other thing they do when they define the file structure is for each column, if it matches or is in a range (like the highlighting thing), they get a payout.
So, if your data matches a certain set, you can get points to buy things with.
That makes your schema much more simpler, and you don't have to deal with EAV-ness of it.
you only need to extract the metrics you actually need to measure, set up an expression that you can evaluate, and store it in your schema (as proper columns in a proper database table)
that gives you a proper indexing system and thus much better querying performance
Yeah. that'd be one way. And it should be fairly fast enough now that it's just a blob
since you must consume them all anyway
while your database can give you fast query for the data that you do evaluate/aggregate. That's why you want to keep the data for evaluation separate from "display-only" data.