Subj : Re: WrapFactory.wrapAsJavaObject has null class argument To : netscape.public.mozilla.jseng From : Attila Szegedi Date : Sun Jul 10 2005 10:29 am WrapFactory.wrapNewObject() calls it with null. I think you should semantically assume java.lang.Object.class when you get null. Attila. On Wed, 06 Jul 2005 21:07:37 +0200, Rod Macpherson wrote: > Consider a Map that contains Model objects where both Map and Model > return a Scriptable from my WrapFactory override: > > public Scriptable WrapFactory.wrapAsJavaObject(Context context, > Scriptable scope, Object object, Class klass) > > Now consider this reference in JavaScript: > > myMap.myModel; > > The myMap object is processed by the WrapFactory and klass is > java.util.Map; perfect. The myModel object is then processed but klass > is null; crashes my code. The object looks fine: it's a Model type. How > do I control what gets passed to wrapAsJavaObject? > -- home: http://www.szegedi.org weblog: http://www.jroller.com/page/aszegedi .