| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Oct 02, 2002 9:52 pm Post subject: Possible Bug - Dialog will not close... |
|
|
I can't get this dialog to close, it only will hide.
| Code: | DIALOG CREATE,Splash Screen,0,0,337,191,NOTITLE,CLASS TSplashWin,ontop
DIALOG ADD,BITMAP,image,0,0,337,191,not_available.bmp
DIALOG SHOW
WAIT 3
DIALOG CLOSE,#TSplashWin
warn If code is executed below"," splash screen will not close. |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team
Last edited by FreezingFire on Wed Oct 02, 2002 10:40 pm; edited 2 times in total |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Oct 02, 2002 10:00 pm Post subject: |
|
|
You must select the dialog number for DIALOG CLOSE,
otherwise it closes the current one. DIALOG CLOSE
itself uses no parameters. Dialogs are numbered in
succession from zero.
| Code: |
DIALOG SELECT, 0
DIALOG CLOSE
|
In your example, a simple DIALOG CLOSE should work.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Oct 02, 2002 10:07 pm Post subject: |
|
|
That doesn't work either
I'm using:
| Code: | DIALOG CREATE,Splash Screen,0,0,337,191,NOTITLE,CLASS TSplashWin,ontop
DIALOG ADD,BITMAP,SPLASHBIT,0,0,337,191,splash3.bmp
DIALOG SHOW
WAIT 3
dialog select,0
DIALOG CLOSE
warn If code is executed below"," splash will not close. |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Oct 02, 2002 10:11 pm Post subject: |
|
|
OK, ya can't close the main window. Create and
show your splash window after creating your main
window. This way the main window is DIALOG 0,
and your splash screen is DIALOG 1.
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Oct 02, 2002 10:21 pm Post subject: |
|
|
Like this:
| Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,Test Program,-1,0,300,200
DIALOG CREATE,SPLASH,-1,0,100,40,NOTITLE
DIALOG ADD,STYLE,S1,Comic Sans MS,15,BC,YELLOW,RED
DIALOG ADD,TEXT,T1,2,2,96,36,"Splash!",,S1
DIALOG SHOW
WAIT 3
DIALOG CLOSE
DIALOG SHOW
:EVLOOP
WAIT EVENT
goto @event()
:CLOSE
EXIT
|
Cheers, Mac
BTW, Maybe we should maybe check with others in "General
Help" on an issue before putting it in "Bug Reports". Otherwise
this area is gonna get cluttered with false reports, and SADE
won't pay much attention to it... _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Oct 02, 2002 10:25 pm Post subject: |
|
|
Sorry, I will move this topic...
I have been experiencing problems like this before though
and I thought it might be a bug...
Maybe there should be a place for possible bug reports... _________________ FreezingFire
VDSWORLD.com
Site Admin Team
Last edited by FreezingFire on Wed Oct 02, 2002 10:33 pm; edited 2 times in total |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Oct 02, 2002 10:31 pm Post subject: |
|
|
Why not just post it in "General Help", and use
"Possible bug - child window" (or whatever) as
the topic?
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Oct 02, 2002 10:38 pm Post subject: |
|
|
Yes, that would be a good solution.
I've got a few other problems occasionally about hiding and showing dialog elements; they sometimes do not hide.
Also, there should be a system of using more than one TIMER events:
:loop1
wait event,1
goto @event()
:timer1
info Timer event 1
exit
:loop2
wait event,5
goto @event()
:timer2
warn Timer event 2
goto loop2 _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Mac Professional Member

Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Wed Oct 02, 2002 11:06 pm Post subject: |
|
|
I don't think that's practical because VDS doesn't multitask.
Any timer event would stop execution of the timer itself
while it went to the appropriate procedure, and the next
event could easily be missed because the clock is still
ticking while the first event is being processed...
You can do this with WAIT and an incremented counter,
and use @mod() to check for 3, 5, etc. It's not exact on
slow procedures, but it will keep the correct count going.
Or you can use @mod() on @datetime(ss), but it can still
miss some on large procedures:
| Code: |
TITLE By Mac
DIALOG CREATE,Test Program,-1,0,300,200
DIALOG ADD,STATUS,Stat
DIALOG SHOW
:EVLOOP
WAIT EVENT, 1
goto @event()
:TIMER
%t = @datetime(ss)
if @equal(@mod(%t, 2), 0)
goto LOOP1
end
if @equal(@mod(%t, 5), 0)
goto LOOP2
end
goto EVLOOP
:LOOP1
DIALOG SET, Stat, %t 2 second timer...
goto EVLOOP
:LOOP2
DIALOG SET, Stat, %t 5 second timer...
goto EVLOOP
:CLOSE
EXIT
|
Cheers, Mac  _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
 |
|
| Back to top |
|
 |
MondoNuovo Valued Newbie
Joined: 09 Jul 2001 Posts: 44 Location: Italy
|
Posted: Thu Oct 03, 2002 2:36 am Post subject: |
|
|
| Code: |
Title SplashScreen
DIALOG CREATE,Program,-1,0,400,240,RESIZABLE,CLASS DMain
GOSUB SPLASH_SCREEN
DIALOG SHOW
:resize
:Evloop
wait event
goto @event()
:close
exit
:SPLASH_SCREEN
%%time = 3
DIALOG CREATE,SplashScreen,-1,0,340,220,NOTITLE,CLASS DSplash
DIALOG ADD,STYLE,STYLE3,Times New Roman,9,I,WHITE,ADADAD
DIALOG ADD,STYLE,STYLE2,Times New Roman,36,,WHITE,GRAY
DIALOG ADD,STYLE,STYLE1,Times New Roman,36,,WHITE,0095DD
DIALOG ADD,SHAPE,SHAPE1,0,0,340,220,WHITE,BLACK,,RECTANGLE
DIALOG ADD,TEXT,TEXT2,55,40,,,SplashScreen,,STYLE2,TRANSPARENT
DIALOG ADD,TEXT,TEXT1,53,38,,,SplashScreen,,STYLE1,TRANSPARENT
DIALOG ADD,TEXT,TEXT3,108,234,,,Version 1.0,,TRANSPARENT
DIALOG ADD,TEXT,TEXT4,201,122,,,by MondoNuovo,,STYLE3,TRANSPARENT
DIALOG SHOW
wait %%time
dialog close
%e = @event()
EXIT
|
|
|
| Back to top |
|
 |
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Thu Oct 03, 2002 6:44 pm Post subject: |
|
|
FreezingFire, this may be what you mean with using multiple timers:
| Code: |
:loop1
wait event,1
goto @event()
:timer
info Timer event 1
goto loop1
:loop2
wait event,5
goto @event()2
:timer2
warn Timer event 2
goto loop2
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|