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

Jesus ea7dfh at ...2382...
Tue Jul 14 22:03:07 CEST 2015


Tsukuba

With my respect to you, I think you need to understand the basics of
programming and familiarize yourself with the terminology.

I suggest reading a book or two about programming, perhaps visiting an
online manual [1] and [2] if you understand enough English, and once
done, come back with a bit more elaborated issues.

[1] http://whiteislandsoftware.com/index.php?page=cedi&type=misc&id=64

[2] http://howtogambas.org/

Also, reading and trying to understand the examples provided by gambas3
(the software farm) could help.

I don't want to seem harsh, only trying to help you the best way.

Best of luck

Regards


-- 
Jesus Guardon


El 14/7/15 a las 21:14, tsukuba GIMP user escribió:
> No i make a mistay Mistakes not $dbclick += 1 still not working is 
> 
> 
> 
>> Now, you declare $dbclick, but you don't set a value to it.
>> So, every time PictureBox1_MouseDown() starts, $dbclick gets the value 1.
>> Try: Private $dbclick as Integer = 0
>>
>> Am 14.07.2015 um 21:01 schrieb tsukuba GIMP user:
>> here is
>> ' Gambas class file
>>
>> '  Private $dbclick As Integer
>> ....(Unrelated content and Comment symbol because i build a package So I shielded them)....
>> ' Public Sub PictureBox1_MouseDown()
>> '   Dim dicer As Integer
>> '   dicer = Int(Rnd(1, 5))
>> '   $dbclick += 1
>> '   Print $dbclick <--------- TEST ONLY
>> '   If $dbclick = 8 Then <------------------ THIS STILL NOT WORKING!!!
>> '     Form3.Text = ("xxxx")
>> '     Form3.TextBox1.text = ("xxxxxxx!!!!!!")
>> '     Form3.Show
>> '   Else
>> '     Goto just_keep_moveing
>> '   Endif
>> '   just_keep_moveing:
>> '   If dicer = 1 Then
>> '     Form3.Text = ("xxxx")
>> '     Form3.TextBox1.Text = ("xxxx...xxxxxx.....")
>> '     Form3.Show
>> '   Else If dicer = 2 Then
>> '     Form3.Text = ("xxxx")
>> '     Form3.TextBox1.text = ("xx?xxxxxx?")
>> '     Form3.Show
>> '   Else If dicer = 3 Then
>> '     Form3.Text = ("xxxx")
>> '     Form3.TextBox1.text = ("xxxx~xxxxxxxx~")
>> '     Form3.Show
>> '   Else If dicer = 4 Then
>> '     Form3.Text = ("xxxx")
>> '     Form3.TextBox1.text = ("xxxxxxxxxxx! xx~xxxx!")
>> '     Form3.Show
>> '   Endif
>> ' End
>>
>>
>>
>>
>> On 07/14/2015 02:37 PM, tsukuba GIMP user wrote:
>>> i added the private var and in print number is working
>>> but when number is 8 it's still forget the
>>> if $dbclick = 8 then.... '$ is private var
>>
>> What is the content of your function's code now?
>>
>>
>> Lee
>> __________
>>








More information about the User mailing list