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

PICCORO McKAY Lenz mckaygerhard at gmail.com
Wed Jun 27 21:24:24 CEST 2018


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 ]----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180627/ab88238b/attachment.html>


More information about the User mailing list