Normal Topic Command Button zero (0) (Read 471 times)
Hunkulus
Member
*
Offline


No personal text

Posts: 12
Joined: Mar 15th, 2005
Command Button zero (0)
Nov 4th, 2006 at 9:19pm
Print Post Print Post  
I have a command button on two of my forms that is named MAP and has the following programming:
map = @AsynchShell("http://www.mapquest.com/")
The program works OK, but on executing the program the button has a zero (0) on it as the label instead of MAP.
The name won't return to MAP until I re-open the form.
Anyone have any ideas why this is happening ? Any help is welcome.
Hunkulus

Embarrassed
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Command Button zero (0)
Reply #1 - Nov 4th, 2006 at 9:25pm
Print Post Print Post  
@ASynchShell is a function and returns a value, an integer. By assinging that value to the button, you end up telling Sesame to label that button with the value returned by @ASynchShell. Instead, use a variable to catch the value returned:

Code
Select All
var vResult as int

  vResult = @ASynchShell("http://www.mapquest.com/")

 

  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Hunkulus
Member
*
Offline


No personal text

Posts: 12
Joined: Mar 15th, 2005
Re: Command Button zero (0)
Reply #2 - Nov 5th, 2006 at 12:52am
Print Post Print Post  
Thanks Mark that did the trick.
Hunkulus
Grin
  
Back to top
 
IP Logged