Variable scope
Posted
#1
(In Topic #1365)
Trainee
Posted
Regular

Uhmmm… did you formally declare hButton2 as "<COLOR color="#800000">Global</COLOR> " ?CharlesStearman said
…when I try to run it I keep getting the error "Unknown identifier: hButton2 (FMain.class:34) within the event handler. I assume this means that hButton2 is out of scope within sub hButton1_Click…
Exemplum:
Code (gambas)
- .W = 100
- .H = 50
- .X = 20
- .Y = 20
- .W = 100
- .H = 50
- .X = 20
- .Y = 100
- hButton2.W = 200
Europaeus sum !
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
<COLOR color="#FF8000">Amare memorentes atque deflentes ad mortem silenter labimur.</COLOR>
Posted
Trainee
1 guest and 0 members have just viewed this.



