Mercurial > projects > dwt-mac
comparison dwt/dnd/URLTransfer.d @ 8:a9ab4c738ed8
Fix: instanceof
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Wed, 27 Aug 2008 14:32:39 +0200 |
parents | e831403a80a9 |
children | d8635bb48c7c |
comparison
equal
deleted
inserted
replaced
7:e831403a80a9 | 8:a9ab4c738ed8 |
---|---|
119 protected String[] getTypeNames(){ | 119 protected String[] getTypeNames(){ |
120 return new String[] {URL, URLN}; | 120 return new String[] {URL, URLN}; |
121 } | 121 } |
122 | 122 |
123 bool checkURL(Object object) { | 123 bool checkURL(Object object) { |
124 return object !is null && (object instanceof String) && (cast(String)object).length() > 0; | 124 return object !is null && ( null !is cast(String)object ) && (cast(String)object).length() > 0; |
125 } | 125 } |
126 | 126 |
127 protected bool validate(Object object) { | 127 protected bool validate(Object object) { |
128 return checkURL(object); | 128 return checkURL(object); |
129 } | 129 } |