[Gambas-user] A Beginner's Guide to Gambas

Scott Castaline hscast at ...407...
Wed Jul 4 02:00:55 CEST 2007


ron wrote:
> On Tuesday 03 July 2007 22:01, Rob wrote:
>> In one of Ron Onstenk's replies to your posts, he actually suggested 
>> commenting out the DIM line for this same reason.  But the replies 
>> were going back and forth pretty fast, so it wouldn't surprise me if 
>> you missed that one.
>>
>> Rob
>>
> 
> LOL
> 
> I did mistaken reply to Benoit message instead his one.
> BTW, I did not suggested but required it to be commented.
> 
> Only the way how I did. As far I know (locally dutch) we use many 
> times the message like _'<----- Rem this line_ to say comment this line.
> 
> REM stands for the good old BASICs REM statement which is short 
> for REMARK (or COMMENT) and also well known as the character ' 
> or using in bash as character # :)
> 
> For Scott:
>>  Your modifications worked. I noticed that you don't have the DIM hButton 
>>  AS Button statement. Is that because of the PUBLIC statement in the main 
>>   routine itself? (PUBLIC hButton AS Button?) I think I'm miss 
> 
> In fact the head of the class file where the PUBLIC statement is, is not 
> 'the main routine' but the 'global' part of the class (or module) file.
> Also in this place, the global and what is written, it are declarations.
> 
> Variable declared in this global part are available in every FUNCTION 
> and SUB in the class/module.
> 
> PRIVATE tells these are only inside this class/module available and
> when PUBLIC you can use them in case of modules inside an other
> class/module by prefix the name with the name of the orginal module
> where the declaration is.
> 
> module: MyGlobal.module
> 
>   PUBLIC MyPubVar AS Integer ' anyone may use this
>   PRIVATE MyPriVar AS Integer ' only code in me may use this
> 
> Form: MyForm.form
> 
>   SUB XYZ()
>     PRINT MyGlobal.MyPubVar ' works
>     PRINT MyGlobal.MyPriVar ' does not work
>   END
> 
> Have fun with gambas and the guide as is :)
> 
> --
> Ron
> 
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
> 
Yes to both of you Rob & Ron. That did the trick. I think it's starting 
to make sense now, since you put it that way Rob. (I'd knock on wood, 
but I have a headache)\;=>




More information about the User mailing list