Consolify - convert VDF Apps to console Mode.
I quite like console mode apps, and it's frustrating that DAccess don't provide a "Convert to Console" button in the project options.
So - I've started a project that allows you to create VDF Console Mode apps.
See it being demonstrated here:
[url]https://dl.dropboxusercontent.com/u/520163/consolify.swf[/url]
Download it here:
[url]https://github.com/seanbamforth/Consolify[/url]
All source included and dataflex native.
Any suggestions or additions would be appreciated.
Re: Consolify - convert VDF Apps to console Mode.
To clarify, what sean has done is to magically allow VDF apps to be run from the command line, in the manner of the scriptable Unix (or dos) command shell programs. He hasn't magically re-created df2.3 console mode in vdf.
A very useful technique when writing batch processes, or utilities that do background tasks, where you just need an exit code.
[s]Neat stuff.[/s] Freakishly Incredible stuff.
I just read the code, and I have no reasonable clue how he figured that stuff out. More power to your elbow Seanyboy!
Re: Consolify - convert VDF Apps to console Mode.
I downloaded and had a look at it. And it does like something that can be very valuable to have, although I cannot think of something at the moment.
But if the main purpose is to get exit codes from a background task why not use memory pipe, as is done in the COM Manifest Builder project? There calls is made to several DOS processes and then not only gets the exit code back but also the output from the process. The function is GetExternalProgramResult and it returns a string array as a ByRef value (the output) and also the exit code as an integer.
But surely there must be more uses for what seanyboy has created, right?
Re: Consolify - convert VDF Apps to console Mode.
I'm thinking that it allows you to write [s]V[/s]DF utilities that you can then include as part of a different set of batch files, or if you like working at the dos prompt you can use this to write the utilities that set up, for example, the beginning conditions for a test script.
Re: Consolify - convert VDF Apps to console Mode.
The plan is to use it for general tools, automated builds, TDD and datafile conversion.
Also package management.
Pipes between multiple processes suffer from having having to write two different programs. You have to write the VDF program, the DOS program, and you've got to make sure they can talk to each other and they continue to talk to each other. That may be easy for others, but it's complexity I'd rather not deal with. Plus - I'm not hugely comfortable writing utilities in languages other than DF. That's a personal thing.
Nils - There probably is a better way of doing this. I think it's a prerequisite of me posting anything here that -
(a) someone else already did it better. (json & XML Parsers)
(b) What appears to be an amazing utility to me is actually mundane, prosaic or unnecessary. (Coffescript preprocessor)
Re: Consolify - convert VDF Apps to console Mode.
Thanks for the explanation!
Re: Consolify - convert VDF Apps to console Mode.
Hi,
Thanks for the reply. Please don't see my reply as I was trying to be negative - I'm impressed on what you've done!
I was just trying to describe that I - at the moment - was confused and couldn't see how I should use it and needed help with ideas. What you have created is by no means mundane, and I'm sure we all are going to have great use for it!
BTW, what did you mean by "Package Management"?
Re: Consolify - convert VDF Apps to console Mode.
I might add that while developing the COM Manifest Builder project I tried to make an interface to the console, but I wasn't successful. So I am genuinely impressed with your work!
Re: Consolify - convert VDF Apps to console Mode.
Great Stuff Sean,
I remember writing some code for supporting console in the past, but can't find it.
It certainly wasn't as full fledged as what you have here.
Thanks!
--
Wil
Re: Consolify - convert VDF Apps to console Mode.
Found it! [url]http://support.dataaccess.com/Forums/showthread.php?48117-Console-Tools-for-VDF-I-want-to-run-this-past-people-see-if-there-s-any-interest&p=239912#post239912[/url] :)
Glad to see you spent the time to work on this and actually share your work back with the community. I am sure it is going to be useful for me one of these days.
Thanks!
--
Wil