1. VEL "experimental" question.
- Posted by Naflign <naflign at MEDIAONE.NET> Oct 02, 1999
- 327 views
I finally managed to get a day off, so I had a bit of time to play around with the new version of VEL. If anyone else has, I'd be really grateful if you might be able to help me with a little problem I'm having. I made a quick little thing to test the file loading, to see the filter in action. Unfourtunatly though, I've only had limited success, and I was hoping someone might be able to say whether it's something I, or the experimental nature of this VEL did. Basically, with this little thing, when I start up the procedure to load a file, I get an error message saying "controll can't be found". Then it returns to the window, and only when I exit the program does the load box appear, and then after something is picked, it says "invalid dialouge", followed by exw crashing. Here's the script if anyone can figure out what's going wrong.... If anyone here can, than a huge thanks in advance for the help! without warning include vel005.e integer Form1,Button1,OpenDialog1,crudvar1 sequence s Form1=CreateControl(FORM, 0) s = {{CAPTION, "quick mod of demo9"}, {FILENAME, "VEL.ico"}, {TOP, 100}, {COLOR, CWHITE}, {LEFT, 100}, {TOP, 100}, {HEIGHT, 500}, {WIDTH, 600}} SetAttribute(Form1, s) Button1 = CreateControl(BUTTON,Form1) s = {{CAPTION, "Load Test"}, {TOP, 350}, {LEFT, 250}, {HEIGHT,25}, {WIDTH,75}, {TABORDER, 2}, {TABSTOP, TRUE}, {DEFAULTBTN, TRUE}, {HINT, "The on to the adding of chr's in the map creator"}, {SHOWHINT, TRUE}} SetAttribute(Button1,s) procedure Button1OnClick(integer id, integer p, integer q) OpenDialog1 = CreateControl(OPENDIALOG, Form1) SetAttribute(OpenDialog1, {{FILTER, "Euphoria |*.e;*.ew;*.ex;*.exw"}}) OpenDialog1 = ShowDialog(OPENDIALOG, Form1) crudvar1 = ShowDialog(OpenDialog1, Form1) end procedure SetEvent(Button1, CLICK_EVENT, routine_id("Button1OnClick")) ShowForm(Form1, MODAL)
2. Re: VEL "experimental" question.
- Posted by Ad Rienks <kwibus at DOLFIJN.NL> Oct 03, 1999
- 317 views
Naflign, I altered your code a bit and have added some comments. The descriptions and examples in 'Experimental.doc' are a bit confusing But this version requires that you first create a control for the OpenDialog function to work. This is a control 'behind the scenes', as I would discribe it. The open a file using OPENDIALOG, you have to set the FILTER attribute each time you use it. To open the dialog, you use ShowDialog, where the first argument is the id, that was returned when you created the OpenDialog control. Are you still with me? From here on, you build further on your program. BTW, what kind of program will it be? A Bitmap Editor? Anyways, I would like to see your progressions while making it -- %< snip >% -- the (updated and commented) Euphoria program. without warning include vel005.e integer Form1,Button1,OpenDialog1,crudvar1 sequence s Form1=3DCreateControl(FORM, 0) s =3D {{CAPTION, "quick mod of demo9"}, {FILENAME, "VEL.ico"}, {COLOR, CWHITE}, {LEFT, 100}, {TOP, 100}, {HEIGHT, 500}, {WIDTH, 600}} SetAttribute(Form1, s) Button1 =3D CreateControl(BUTTON,Form1) s =3D {{CAPTION, "Load Test"}, {TOP, 350}, {LEFT, 250}, {HEIGHT,25}, {WIDTH,75}, {TABORDER, 2}, {TABSTOP, TRUE}, {DEFAULTBTN, TRUE}, {HINT, "The on to the adding of chr's in the map creator"}, {SHOWHINT, TRUE}} SetAttribute(Button1,s) -- First, you should create an (invisible) control for the use of OpenD= ialog OpenDialog1 =3D CreateControl(OPENDIALOG, Form1) procedure Button1OnClick(integer id, integer p, integer q) --The next line causes the error: --OpenDialog1 =3D ShowDialog(OPENDIALOG, Form1) SetAttribute(OpenDialog1, {{FILTER, "Euphoria | .e;*.ew;*.ex;*.exw"= }}) crudvar1 =3D ShowDialog(OpenDialog1, Form1) s =3D GetAttribute(crudvar1, FILENAME) puts(1, s) -- now you should see the name of the file you selected= in a console window end procedure SetEvent(Button1, CLICK_EVENT, routine_id("Button1OnClick")) ShowForm(Form1, MODAL) -- %< snip >% -- end of Euphoria code -- ^ | /-\<| ----- | Gratis e-mail en meer: http://www.dolfijn.nl/ | Een product van Ilse: http://www.ilse.nl/
3. Re: VEL "experimental" question.
- Posted by Naflign <naflign at MEDIAONE.NET> Oct 06, 1999
- 313 views
Thanks a ton!! I'm extremely grateful! Just sorry it took so long to thank you, my connection kept cutting out on me *cable company modifying their system ----- Original Message ----- From: Ad Rienks <kwibus at DOLFIJN.NL> Sent: Saturday, October 02, 1999 4:25 PM Subject: Re: VEL "experimental" question. Naflign, I altered your code a bit and have added some comments