forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


@event(D) after Timer event

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports
View previous topic :: View next topic  
Author Message
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Fri Mar 11, 2005 3:29 am    Post subject: @event(D) after Timer event Reply with quote

I don't know if I am doing something wrong, but ...

I have a script with some child windows, and I need to keep track of windows by using @event(D).

On one child window, I am using the VDSPopup.dll. When I use @event(D) on the MENU events, it always says the dialog number is 0.

I then tried using:

Code:
wait event, .1
parse "%%tmpev;%%dialognum", @event(D)


before creating another child dialog, so I could get the number of the current dialog.

That also seems to return 0 as the dialog number. And that is the possible bug I am posting about. Does @event(D) with a TIMER event return dialog 0 for other people? Even when it is on dialog #2, for instance?

Hope this isn't confusing ...

_________________
Joe Floyd
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Fri Mar 11, 2005 3:37 am    Post subject: Reply with quote

If the event is fired from an extension dll, the dialog number will always be
zero.

According to Jules, VDS 4.5 and below have no way for an extension dll to
tell VDS which dialog an event is comming from. And as far as VDS 5 and
up goes, I'm not sure how to send the dialog number back to VDS either.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Fri Mar 11, 2005 3:40 am    Post subject: Reply with quote

Ok - sounds reasonable.

But I was also getting dialog 0 when it fired from a TIMER event in the main program. (When focus was on a child dialog.) That is the possible bug I'm wondering about ...

_________________
Joe Floyd
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Fri Mar 11, 2005 3:43 am    Post subject: Reply with quote

I personally have never had a problem with @event(D) and a timer.
Almost every program that I write has a timer event and multiple dialogs,
although, most of the time I only have one dialog active and showing.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Fri Mar 11, 2005 3:50 am    Post subject: Reply with quote

Here is an example of what I mean:

Code:
DIALOG CREATE,main dialog,-1,0,240,160
  REM *** Modified by Dialog Designer on 3/10/2005 - 22:14 ***
  DIALOG ADD,BUTTON,second,75,57,,,second
  DIALOG SHOW

  :mainloop
  wait event
  %%tmp = @event(D)
  parse "%%ev;%%diag", %%tmp
  gosub %%ev

  goto mainloop

  :secondbutton

  DIALOG CREATE,second dialog,-1,0,240,160
  REM *** Modified by Dialog Designer on 3/10/2005 - 22:17 ***
  DIALOG ADD,BUTTON,close,98,107,,,Close
  DIALOG SHOW
  wait event, 2
  %%tmp = @event(D)
  parse "%%ev;%%diag", %%tmp
  info Dialog number is: %%diag
  dialog close
  repeat
  until @not(@event())
  exit



Run the program, and click on the button to open the second dialog. If you then click the button to close it, it says it is dialog 1.

But if you wait more than 2 seconds and the TIMER event fires, then it says it is dialog 0.

That may be by design in VDS, but it would be nice if we could use that TIMER function to obtain the current dialog number to overcome the lack of the correct dialog number in events fired by external .DLLs.

If it isn't a bug, maybe move this to the Wish List?

_________________
Joe Floyd
Back to top
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Fri Mar 11, 2005 3:57 am    Post subject: Reply with quote

Well you've got me stumped Confused

It might have something todo with the WAIT command also.

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
jules
Professional Member
Professional Member


Joined: 14 Sep 2001
Posts: 1043
Location: Cumbria, UK

PostPosted: Fri Mar 11, 2005 9:03 am    Post subject: Reply with quote

Timer events are generated by the system, not by a dialog element. Therefore the dialog ID is always zero.

As regards events from external dialog elements, the VDS extension interface was never actually designed with making dialog elements specifically in mind, so the fact that you can do so at all is kind of a bonus, and there are inevitably shortcomings.

In VDS 5, this was changed, so that the browser element could be made external but CR never published the revised interface, and there are still a few things that didn't quite work right. In VDS 6, it should be possible to create external dialog elements that work just like internal ones, and I made an example DLL which hopefully CR will publish. Hopefully this will encourage all those who didn't upgrade to VDS 5 to go for VDS 6, and all the DLL developers to create DLLs for VDS 6 so as to get the benefits of the new interface.

_________________
The Tech Pro
www.tech-pro.net
Back to top
View user's profile Send private message Visit poster's website
jwfv
Valued Contributor
Valued Contributor


Joined: 19 Mar 2002
Posts: 422
Location: Beaufort, SC

PostPosted: Fri Mar 11, 2005 1:05 pm    Post subject: Reply with quote

Thanks Jules - just wanted to make sure I wasn't just coding it incorrectly.

I wish there was some function like @DialogID(~TransDialog) that would tell me the current dialog number of "TransDialog" (or whatever I named it.)

I know that it can be done by keeping a list, etc - but a direct function would be very handy.

_________________
Joe Floyd
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Bug Reports All times are GMT
Page 1 of 1

 
Jump to:  
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

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group