View previous topic :: View next topic |
Author |
Message |
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Apr 16, 2004 9:10 pm Post subject: "Error" message box |
|
|
We have all of the common message boxes implemented into VDS except
the "error" message box with the red "x".
I wish for a command like WARN, INFO, or QUERY that will easily display
the "error" message box.
While this can be done using the @msgbox() function, it is messy and
takes a lot more time and code to write than a simple command like
WARN. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
vdsalchemist Admin Team
Joined: 23 Oct 2001 Posts: 1448 Location: Florida, USA
|
Posted: Sat Apr 17, 2004 1:50 am Post subject: |
|
|
FF,
To be honest with you I don't know why Jules did this. He should have just left it with @msgbox.. If he had then the runtime would prob. be a little smaller _________________ Home of
Give VDS a new purpose!
|
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Apr 17, 2004 3:26 pm Post subject: |
|
|
mindpower wrote: | FF,
To be honest with you I don't know why Jules did this. He should have just left it with @msgbox.. If he had then the runtime would prob. be a little smaller |
I believe VDS initially had only info and warn. Then message box was added and ..... while on it julian prolly decided to give the user all the options exposed by that API - just my guess. _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sat Apr 17, 2004 3:38 pm Post subject: |
|
|
Your guess is correct, CodeScript. INFO and WARN and @ASK are there for backwards compatibilty.
My copy of VDS has a tool called MessageBox Designer, that lets you select what you want the message box to look like in a dialog, and then outputs the VDS code so you can paste it into the editor. I don't know if it's shipped with VDS, or just something I wrote. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
CodeScript Moderator Team
Joined: 08 Jun 2003 Posts: 1060 Location: India
|
Posted: Sat Apr 17, 2004 4:12 pm Post subject: |
|
|
jules wrote: | I don't know if it's shipped with VDS, or just something I wrote. |
It's shipped with VDS. Thanks for that tool _________________ Regards
- CodeScript
Give your application a professional look with the VDSGUI Extension |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Apr 17, 2004 4:38 pm Post subject: |
|
|
Yes, and in fact I used it several times today to create "error" message
boxes. But I do however use INFO and WARN countless times through
my code, I still think it would be nice to have a command to make the
"x" message boxes. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sat Apr 17, 2004 9:44 pm Post subject: |
|
|
Create your own, then, using a .dsu. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sat Apr 17, 2004 10:08 pm Post subject: |
|
|
I thought of that already.
It's just a pain to have to do anything other than use a simple command.
I guess you could call me lazy. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Apr 18, 2004 11:53 am Post subject: |
|
|
I was just thinking about something. Could it be possible to let VDS run a program before compiling a script (without letting it run the whole time while VDS itself is opened), so you could create a kind of pre-compiler? That way, you will be able to easily include little DSUs like the one we're talking about right now... _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sun Apr 18, 2004 11:55 am Post subject: |
|
|
All good programmers are lazy.
That's why I have a folder called Units full of include files containing functions and commands I've created to do dozens of things that are not specific to any one script. One of these files is called Utils.dsc, and it contains all the common stuff I always use. I put the #include for it at the start of my default.dsc, so I don't even have to think about it.
I have a similar Utils.pas I include in all my Delphi stuff. Delphi is a bit cleverer, in that it only includes stuff if you actually use it. But in VDS, if these commands were defined in the VDS runtime, you'd still get them whether or not you used them. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Apr 18, 2004 11:59 am Post subject: |
|
|
That's something I'd like to make... Maybe even let it connect to a database on the internet, so VDS users will always have the latest includable files without having to think about them...
Some more explaination, this:
Code: | title MyProgram
messagex "Hello!" |
Would become:
Code: | #define command,messagex
title MyProgram
messagex "Hello!"
exit
:messagex
exit @msgbox($123,%1) |
Without having to define it yourself (if it is possible to do... ) _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sun Apr 18, 2004 12:01 pm Post subject: |
|
|
Skit3000 wrote: | I was just thinking about something. Could it be possible to let VDS run a program before compiling a script (without letting it run the whole time while VDS itself is opened), so you could create a kind of pre-compiler? That way, you will be able to easily include little DSUs like the one we're talking about right now... |
I did think about including pre- and post-compile hooks so you could add in tools, but that was one of the ideas that was never appealing enough to get implemented. You don't really need a pre-compiler to do this, as you only need to insert the #include once. You could create a standalone tool that searched your units file and inserted the #includes, that you run when needed, or else you could adopt the brain-dead approach I suggested in my previous posting. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Apr 18, 2004 12:04 pm Post subject: |
|
|
I once thought about making a script which runs when VDS is started, and which could compile a script by controlling the IDE by DDE. The only downside of it is that if I'd really make it that way, people would see the lines added to the script, while I want them to be invisible and only added to the script just before compiling... _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
Back to top |
|
|
jules Professional Member
Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Sun Apr 18, 2004 12:04 pm Post subject: |
|
|
Don't forget that in VDS the line number in the script is usually important in tracking down a run-time error. Therefore you always want to work with the "real" script, not one that is recreated before each compilation by a pre-compiler. _________________ The Tech Pro
www.tech-pro.net |
|
Back to top |
|
|
|