*kuch* ... this reads like hell :)
read and learn :)
#1 -----------------------------------
when posting code here, use:
<code>
; your stuff here
</code>
and replace the < > with [ ] .. that'll keep the indenting.. (if any :)
#2 -----------------------------------
CreateButton(...) makes a button, but you can't use it directly since you didn't use the potential return handle..
bla=CreateButton(....) actually gives you 'bla' .. (which is an int value (4 bytes)) and 'bla' can now be used to use this button, change it's properties etc. etc.
This number is an adres.. don't do math with this number :) If you want to know which adres:
Notify bla
.. but it'll give you some number like 21375263 orso ..
Same for CreateLabel .. CreateWindow, CreatePanel etc. etc.
So, if you just do:
CreateButton(....)
then you can prolly use it by checking on EventID $401, but you can't specify which button one pressed, if you have more buttons (or other things that generate $401 events) at work..
#3 -----------------------------------
Keep it nicely structured, and don't cramp stuff together like "Repeat Select WaitEvent(1)"
It's not wrong to actually use lines :)
#4 -----------------------------------
Printing something to the screen, like QBasic did, is different in B+ .. don't use CreateLabel as a souped-up PRINT command :) If you want to use a label -which isn't strange in fact- then create 1 label, and change its caption each time it needs to show something different.
SetGadgetText gadgethandle,"blah" does that, iirc :)
#5 -----------------------------------
More like style .. but do you really want to type that whole EVNT_GADGET_ACTION terror again and again? :)
There's only a few often-used codes .. $803, $401, $201, $202, $203, $205, $206, $4001 are the ones I use most, and if I need more, I'll check the help. There's a bit of logic in some of the numbers..
on a canvas:
$201 mouse-down
$202 mouse-up
$203 mouse-move
$206 mouse-canvasrelease
Take this from me: code for 2 days with just those numbers, and you never need const-replacements ever again.
read and learn :)
#1 -----------------------------------
when posting code here, use:
<code>
; your stuff here
</code>
and replace the < > with [ ] .. that'll keep the indenting.. (if any :)
#2 -----------------------------------
CreateButton(...) makes a button, but you can't use it directly since you didn't use the potential return handle..
bla=CreateButton(....) actually gives you 'bla' .. (which is an int value (4 bytes)) and 'bla' can now be used to use this button, change it's properties etc. etc.
This number is an adres.. don't do math with this number :) If you want to know which adres:
Notify bla
.. but it'll give you some number like 21375263 orso ..
Same for CreateLabel .. CreateWindow, CreatePanel etc. etc.
So, if you just do:
CreateButton(....)
then you can prolly use it by checking on EventID $401, but you can't specify which button one pressed, if you have more buttons (or other things that generate $401 events) at work..
#3 -----------------------------------
Keep it nicely structured, and don't cramp stuff together like "Repeat Select WaitEvent(1)"
It's not wrong to actually use lines :)
#4 -----------------------------------
Printing something to the screen, like QBasic did, is different in B+ .. don't use CreateLabel as a souped-up PRINT command :) If you want to use a label -which isn't strange in fact- then create 1 label, and change its caption each time it needs to show something different.
SetGadgetText gadgethandle,"blah" does that, iirc :)
#5 -----------------------------------
More like style .. but do you really want to type that whole EVNT_GADGET_ACTION terror again and again? :)
There's only a few often-used codes .. $803, $401, $201, $202, $203, $205, $206, $4001 are the ones I use most, and if I need more, I'll check the help. There's a bit of logic in some of the numbers..
on a canvas:
$201 mouse-down
$202 mouse-up
$203 mouse-move
$206 mouse-canvasrelease
Take this from me: code for 2 days with just those numbers, and you never need const-replacements ever again.