View previous topic :: View next topic |
Author |
Message |
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Fri Jan 31, 2003 9:48 pm Post subject: @dlgtext(button1) bug? |
|
|
Hi all,
is this a bug or am i doing something wrong - running Windows ME and VDS 4.5?
if i have a button called BUTTON1 with a caption UPGRADE, then this code gives me an error:
Code: | if @equal(@dlgtext(button1),upgrade)
|
the error part seems to be that @DLGTEXT is not able to read the caption of my button...my understanding was that i could use @DLGTEXT to do that...
Serge _________________
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Jan 31, 2003 10:05 pm Post subject: |
|
|
I ran into this bug awhile back also. It's been discussed at
http://www.vdsworld.com/forum/viewtopic.php?t=1031&start=15
but it was never posted in the "Bug Reports" section. But as mentioned
in the thread listed above you can use a @sendmsg() instead. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Jan 31, 2003 10:10 pm Post subject: |
|
|
You can also use @wintext()...
Code: |
OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,300,200
DIALOG ADD,BUTTON,B1,5,5,60,24,"Test"
DIALOG SHOW
:EVLOOP
WAIT EVENT
goto @event()
:B1BUTTON
INFO @wintext(@winexists(~B1))
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 |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sat Feb 01, 2003 2:24 am Post subject: |
|
|
Have you tried this:
Code: | %%BtnText = @dlgtext(button1)
if @equal(@dlgtext(%%BtnText),upgrade) |
-Garrett |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sun Feb 02, 2003 8:24 am Post subject: |
|
|
Your idea does not work Garrett - i get an error at the first line of your suggestion...the error is to the effect that BUTTON1 is not a valid element!!?!!
I had already found a work around and i just wanted to know if others had come across the same problem - thanks for your suggestions as work arounds
Silly me, i should have done a search of the archives first
Serge
ps i was not notified by email that there had been a reply to my post...usually i get one...has something happened? _________________
|
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Feb 02, 2003 8:47 am Post subject: |
|
|
Yeah, my idea doesn't work because I wasn't paying attention and gave
you bad code to deal with there.
It should've been this:
Code: | %%BtnText = @dlgtext(button1)
if @equal(%%BtnText,upgrade) |
-Garrett |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Sun Feb 02, 2003 8:56 am Post subject: |
|
|
i'll give it a try, Garrett!
i got email notification of your reply this time
Serge _________________
|
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Feb 02, 2003 8:57 am Post subject: |
|
|
Actually it just doesn't work Garrett (not in VDS3 anyway).
@dlgtext() won't read a button control...
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
Last edited by Mac on Sun Feb 02, 2003 9:08 am; edited 2 times in total |
|
Back to top |
|
|
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Feb 02, 2003 9:05 am Post subject: |
|
|
Ok, I can understand Serge still being up, since he's in Australia, but
Mac, isn't it past your bed time? Come to think of it, isn't it
past my bed time too?
You could be right Mac, I don't honestly know. I didn't try my code. I'll
be honest, I was watching a movie called "The Punisher" starring Dolph
Lungren.
If I run code while watching TV on my TV card, it screws things up.
But I do know that sometimes, when you try to deal directly with an
element and it gives you a bad time, using a variable first to obtain the
information and then using that in a command sometimes works.
-Garrett |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Feb 02, 2003 9:11 am Post subject: |
|
|
I'm not sure it's a bug in @dlgtext() - more likely an error
in the help file. There seems to be plenty of those...
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: Sun Feb 02, 2003 9:14 am Post subject: |
|
|
BTW Garrett, ya just need a good stable OS like Windows 95.
I run my tv card a lot (especially news) when I'm programming.
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 |
|
|
Skit3000 Admin Team
Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Sun Feb 02, 2003 12:23 pm Post subject: |
|
|
Mac wrote: | INFO @wintext(@winexists(~B1)) |
Mac, only @wintext(~B1) is also enough... |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Feb 02, 2003 11:04 pm Post subject: |
|
|
Nice catch skit.
I'll go ya one better - ya can also leave off the "~"...
INFO @wintext(B1)
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 |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Mon Feb 03, 2003 2:16 am Post subject: |
|
|
Off topic:
I seem to have a natural talent for people taking me in a bad way...its amazing actually...so in advance I don't mean anything bad by my post!
On topic:
Mine doesn't work w/o ~
NodNarb |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Mon Feb 03, 2003 6:16 am Post subject: |
|
|
OOPS...
My mistake - it doesn't work for me without the "~" either.
I often use "Test" with an INFO window to prevent an error
if there's no value. Apparently I had done this, and the text
of the button is "Test", sooooo...
Thanks nodnarb - and don't hesitate to point out code errors
anytime.
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 |
|
|
|