[Gambas-user] : : why this code not working

T Lee Davidson t.lee.davidson at ...626...
Tue Jul 14 21:47:10 CEST 2015


On 07/14/2015 03:14 PM, tsukuba GIMP user wrote:
> No i make a mistay Mistakes not $dbclick += 1 still not working is

I think it may actually be working. You just cannot see that it is, because the code after the "just_keep_moveing" label is 
resetting the value of TextBox1.text.

After performing the "If $dbclick = 8" test the program drops through and executes the "just_keep_moveing" code no matter what 
the value of dbclick is. Depending on what the "just_keep_moveing" code is supposed to do, you may need to move it to *inside* 
the Else block.

You could either set a breakpoint at or just before the Else and examine the value of TextBox1.text, or place a 'Print "hello"' 
statement just after "If $dbclick = 8 then" to see if "hello" is printed to the IDE console. If it is, then the "If $dbclick = 
8" test *is* working and you need to rethink the program's logic.


Lee
__________





More information about the User mailing list