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

vuott at tiscali.it vuott at tiscali.it
Thu Jun 28 01:09:37 CEST 2018


  
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 :
> 
>> 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 0ff 2px solid; margin-left: 5px; width: 100%;">

>> 
>> 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 3EUR al mese, per
sempre. Cambi gratis quando e come vuoi e in più hai 10EUR di credito
omaggio!
>> SCOPRI DI PIU' http://tisca.li/MailHPMobile [2]
>> 
>> ----[
Gambas mailing-list is hosted by https://www.hostsharing.net [3] ]----
 



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/20180628/794cafff/attachment-0001.html>


More information about the User mailing list