comparison dwt/dnd/TextTransfer.d @ 9:e76aa0b07480

Some more instanceof
author Frank Benoit <benoit@tionex.de>
date Wed, 27 Aug 2008 14:36:41 +0200
parents e831403a80a9
children d8635bb48c7c
comparison
equal deleted inserted replaced
8:a9ab4c738ed8 9:e76aa0b07480
144 protected String[] getTypeNames() { 144 protected String[] getTypeNames() {
145 return new String[] {UTEXT, TEXT}; 145 return new String[] {UTEXT, TEXT};
146 } 146 }
147 147
148 bool checkText(Object object) { 148 bool checkText(Object object) {
149 return (object !is null && object instanceof String && (cast(String)object).length() > 0); 149 return (object !is null && null !is cast(String)object && (cast(String)object).length() > 0);
150 } 150 }
151 protected bool validate(Object object) { 151 protected bool validate(Object object) {
152 return checkText(object); 152 return checkText(object);
153 } 153 }
154 } 154 }