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 


VDS6 and @sendmsg() problem

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Tue Mar 03, 2009 9:48 pm    Post subject: VDS6 and @sendmsg() problem Reply with quote

The following code has worked in VDS5 and probably versions below that, but now seems to choke:

Code:
  %A = @sendmsg(@winexists(~TIMTITLETXT),$0B,0,0)
  DIALOG SET,TIMTITLETXT,@datetime(hh:nn:ss ampm)
  %A = @sendmsg(@winexists(~TIMTITLETXT),$0B,1,0)


In VDS6 it gives an "Error: Invalid parameter to command"

Does anyone know why? or of a workaround?

Thanks,
~Garrett

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
DaveR
Valued Contributor
Valued Contributor


Joined: 03 Sep 2005
Posts: 413
Location: Australia

PostPosted: Thu Mar 05, 2009 8:04 am    Post subject: Reply with quote

Works perfectly here in VDS 6. Only difference is I always send the message to the dialog's class, and not a dialog element like you are doing.

Sample code from main script:
Code:
  # Move item in queue
  Redraw off,#%%MainClass
  TableMove QueueTable,up
  Redraw on,#%%MainClass


User defined command:
Code:

:Redraw
  #-----------------------------------------------------
  # Redraw command. SYNTAX  Redraw <on/off>,<window-id>
  #-----------------------------------------------------
  if @both(%1,@winexists(%2))
    if @equal(%1,off)
      # Set redraw flag to clear so list items can be added invisibly
      %x = @sendmsg(@winexists(%2),$0B,0,0)
    elsif @equal(%1,on)
      rem wait 0.2
      # Set redraw flag to redraw to show all the list items
      %x = @sendmsg(@winexists(%2),$0B,1,0)
      window activate,%2
    end
  end
  exit

_________________
cheers

Dave
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Mar 05, 2009 2:59 pm    Post subject: Re: VDS6 and @sendmsg() problem Reply with quote

Garrett wrote:
Code:
  %A = @sendmsg(@winexists(~TIMTITLETXT),$0B,0,0)
  DIALOG SET,TIMTITLETXT,@datetime(hh:nn:ss ampm)
  %A = @sendmsg(@winexists(~TIMTITLETXT),$0B,1,0)


In VDS6 it gives an "Error: Invalid parameter to command"


The error sounds like it is an error with the DIALOG SET and not the @sendmsg() function. Garrett verify that the TIMTITLETXT element actually exists. Either walk the code line for line or put some info boxes around the lines of code to locate the actual line that is causing the issue.

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Mar 05, 2009 5:34 pm    Post subject: Reply with quote

It does exists. Without the sendmsg() it works fine for me, the text is updated with the time. But what I was trying to do, is lock the text element while updating, then unlock it after updating. I have a gradient element behind it which when updating the text causes a flashing effect on the gradient. I was hoping that locking and unlocking might resolve the flashing effect.

I've since removed the gradients and used solid colored backgrounds instead. So no more flashing effect. Not as pretty as using the gradient, but, at least no ugly flashing effect.

_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)


Last edited by Garrett on Thu Mar 05, 2009 5:39 pm; edited 1 time in total
Back to top
View user's profile Send private message
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Thu Mar 05, 2009 5:38 pm    Post subject: Reply with quote

Dave, thanks for the suggestion too. I may have to consider doing that instead of just the element. What bugs me, is that long ago I used to do this with just the elements and it worked. Now I try it in VDS6 and it doesn't work Sad
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
Back to top
View user's profile Send private message
vdsalchemist
Admin Team


Joined: 23 Oct 2001
Posts: 1448
Location: Florida, USA

PostPosted: Thu Mar 05, 2009 8:13 pm    Post subject: Reply with quote

Garrett wrote:
It does exists. Without the sendmsg() it works fine for me, the text is updated with the time. But what I was trying to do, is lock the text element while updating, then unlock it after updating. I have a gradient element behind it which when updating the text causes a flashing effect on the gradient. I was hoping that locking and unlocking might resolve the flashing effect.

I've since removed the gradients and used solid colored backgrounds instead. So no more flashing effect. Not as pretty as using the gradient, but, at least no ugly flashing effect.


Ok I figured out what the issue is. VDS 6 draws both the shape element and the gradient elements directly on the dialog. They no longer have their own window like in VDS 5. Sad I guess you can stack them ontop of a line element?

_________________
Home of

Give VDS a new purpose!
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Fri Mar 06, 2009 1:16 am    Post subject: Reply with quote

Ahhhhh.... Ok. Thanks Dragonsphere.
_________________
'What you do not want done to yourself, do not do to others.' - Confucius (550 b.c. to 479 b.c.)
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 -> General Help 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