cw_field: checking entries [message #38604] |
Fri, 12 March 2004 01:22 |
schaa
Messages: 10 Registered: March 2004
|
Junior Member |
|
|
hi all,
you know the feeling of wanna kick your computer...?
(hmm ,it's not the computer fault, is it?)
so i like to check the validity of the entries in a cw_field,
when it is not defined , send a message, when it is defined go on.
actually simple as that, but the thing is, it seems to me the value is
always defined, no matter if there is someting in the field or not.
i am sure some of you have fixed this problem 100 years ago, so what
do you suggest?
thanx
-ralf
;; what i've done to catch the problem of none-definded cw_fields:
Widget_Control, event.id, Get_UValue=eventID
CASE eventID OF
'go' : BEGIN ;; button's name is 'go'
Widget_Control, info.startf, Get_Value=startf
;; info.startf holds the value of the cw_field
IF N_Elements(startf) EQ 0 THEN Print, 'not defined' ELSE $
Print, 'defined'
END
ELSE :
ENDCASE
=> prints always 'defined'
|
|
|