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

vuott at tiscali.it vuott at tiscali.it
Wed Jun 27 20:51:23 CEST 2018


  
...by using ".Symbols" property of "Class" Class. 
Ad exemplum: 
Dim
cl As Class
Dim s As String

 cl = Class.Load("Button")

 For Each s In
cl.Symbols
 Print s
 Next 
+ + + + + + + + +  
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 [1]
  


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20180627/ce5c8892/attachment.html>


More information about the User mailing list