[Gambas-user] how to detect if a class has a .text property?

PICCORO McKAY Lenz mckaygerhard at gmail.com
Fri Jul 6 21:40:11 CEST 2018


dont work, said: Unkown symbol "symbols"

it's a control! i must detect first if the object its a control! how to do?


Lenz McKAY Gerardo (PICCORO)
http://qgqlochekone.blogspot.com


2018-06-27 19:09 GMT-04:00  <vuott at tiscali.it>:
> Why do not you try them ?  :-)
>
> Il 27.06.2018 21:24 PICCORO McKAY Lenz ha scritto:
>
> 2018-06-27 14:51 GMT-04:00 <vuott at tiscali.it>:
>>
>>   cl = Class.Load("Button")
>
> umm i assumed that cl it's equal to my already passed object a argument
> right?
>
>
>>
>>
>>   For Each s In cl.Symbols
>>     Print s
>>   Next
>
> so then one of thos will print "Text" i guess?
>
>
>>
>> + + + + + + + + +
>> vuott
>>
>> Il 27.06.2018 19:25 PICCORO McKAY Lenz ha scritto:
>>
>> in the following code i want to detect independent of the type if the ref
>> obj has a input text field and are empty..
>>
>> how can i do that?
>>
>> Public Function required(objinput As Variant) As Variant
>>
>>     If TypeOf(objinput) = gb.String Then
>>         If Comp(objinput, "", gb.IgnoreCase) = 0 Then
>>             Return "is empty"
>>         Endif
>>     Endif
>>
>>     If TypeOf(objinput) = gb.Class Then
>>         If Comp(objinput.Text, "", gb.IgnoreCase) = 0 Then '
>> Return "is empty"
>>         Endif
>>     Endif
>>
>>     Return "is not empty? could not detect any input text"
>> end
>>
>>
>> Lenz McKAY Gerardo (PICCORO)
>> http://qgqlochekone.blogspot.com
>>
>>
>>
>>
>> Con MyOpen hai Giga, SMS e i minuti che vuoi da 3€ al mese, per sempre.
>> Cambi gratis quando e come vuoi e in più hai 10€ di credito omaggio!
>> SCOPRI DI PIU’ http://tisca.li/MailHPMobile
>>
>>
>>
>> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>>
>
>
>
> Con MyOpen hai Giga, SMS e i minuti che vuoi da 3€ al mese, per sempre.
> Cambi gratis quando e come vuoi e in più hai 10€ di credito omaggio!
> SCOPRI DI PIU’ http://tisca.li/MailHPMobile
>
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>


More information about the User mailing list