Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
明らかな何かが欠けているかもしれませんが、プロパティを間接的に参照するにはどうすればよいですか? たとえば、javascript では次のようになります。
if(propName in obj) return obj[propName];
同じことを haxe で何と言いますか?問題のオブジェクトはDynamic<String>、flash.display.LoaderInfo.parameters具体的には です。
Dynamic<String>
flash.display.LoaderInfo.parameters
どうもありがとう。
if(Reflect.hasField(obj, propName)) return Reflect.field(obj, propName);
コードが増えたように見えますが、生成される出力は基本的に同じです。