Files

40 lines
878 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Darklord.js — dbFieldAny() (satır 3138)
[← Darklord.js](index.md) · [← Master](../../wiki.md)
```javascript
function dbFieldAny(object, names)
{
if (!object) throw "Object yok";
for (var i = 0; i < names.length; i++)
{
try
{
var value = object[names[i]];
if (value != null) return value;
}
catch (e1) {}
}
var cls = object.getClass();
while (cls != null)
{
for (var n = 0; n < names.length; n++)
{
try
{
var field = cls.getDeclaredField(names[n]);
field.setAccessible(true);
return field.get(object);
}
catch (e2) {}
}
cls = cls.getSuperclass();
}
throw "Field bulunamadi: " + names.join("/");
}
```