Thread overview
RAD for D
May 21, 2003
Walter
May 09, 2003
Well, not exactly.
But what if you could use an existing RAD tool for some other language, for
D? It would still be good, wouldn't it?
Well, it wasn't too hard, but it's not complete. However, this tool lets you
(using dig) put buttons, groupboxes, checkboxes, comboboxes, edittextboxes,
labels and radiobuttons inside of frames (since dig doesn't have listboxes,
they're replaced by comboboxes. any better idea?).
All you have to do is run it and specify the filename you want to translate.
If you don't write anything, the program will prompt you to write a
filename. The program will automatically create a main() function, but you
can tell it not to do so with the switch (only switch) "-nomain". I tested
it quite heavily and passed not perfectly, but good enough. Now, for too
complicated windows, the program will most likely get confussed and will not
work properly. However, it will still work.
BTW, don't tell Microsoft, but the RAD used is ..... Visual Basic 6. Yes,
just as you read it. You create a form in VB6, save it, and vb2d takes the
.frm, process it and creates a .d that produces a window very close to the
one you designed. Pictureboxes and images are replaced by groupboxes;
datetimepickers, drivelistboxes, dirlistboxes are replaced by comboboxes;
sstabs, menues, lines, shapes are omitted; mdiforms are taken as forms.
Fonts are ignored (I guess dig doesn't let you change it, at least not the
way you'd want). If
scalemode is pixel, the measures are left as they are; if it is one of
point, chars, inches, mm, cm, or twip, it's converted to pixel, any other
scalemode is taken as twip.
vb2d doesn't translate vb code, so as long as it reaches the end of the
form, it stops. It just handles the graphical thing. I'm not releasing the
source code (it's done in D, believe me) because I don't want to look as a
fool due to the "beauty" of my code. Now give it a try a tell me what you
think.
Now that I think about it, if at least 5 different persons ask me the source
code, I'll release it, ok?

-------------------------
Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-07




---

File has not been scanned

Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-07



May 09, 2003
Added font support.
I'm uploading the source code now. The executable (even compressed) was a
bit too heavy to upload. digfont2.d is not needed to compile vb2d, but to
compile the generated .d files.

————————————————————————— Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06



May 09, 2003
Don't tell Burton, but it turned out that there're a listboxes in dig (it's
just that they're not documented...), so I added support for it. For some
reason, listboxes only appear with a title bar over them and without any
border, ask Burton why that's so.
I'm trying to add menues support, but first I have to understand dig menues!
This doesn't work as I'd want it to:

this() {
    MenuBar menu = new MenuBar ();
    super (menu);
    Menu sub;
    with (sub = new Menu (this)) {
        menu.popup ("A", sub);
        add('B');
        add('C');
        separator ();
        add('D');
    }
    caption('Test');
    showModal();
}

Any idea why?

————————————————————————— Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.478 / Virus Database: 275 - Release Date: 2003-05-06



May 21, 2003
It's great that you're doing this. Could you set up a web page with it on it? That would make it more accessible. Things tend to be hard to find in this newsgroup.


May 21, 2003
"Walter" <walter@digitalmars.com> escribió en el mensaje
news:baf0dc$1biq$2@digitaldaemon.com...
| It's great that you're doing this. Could you set up a web page with it on
| it? That would make it more accessible. Things tend to be hard to find in
| this newsgroup.
|
|

I haven't ever had luck maintaining web pages, so I'd rather not. However someone can put it in the wiki.

————————————————————————— Carlos Santander


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.483 / Virus Database: 279 - Release Date: 2003-05-19