On Feb 9, 7:21 pm, Daniele Rizzo <[EMAIL PROTECTED]> wrote: > I'm studing pyxpcom, and i've a problem when i try use python dictionary > as function's argument: > > i try use python dictionary, passing as nsIVariant, but this raise > exception/error. I'd like a "bridge" js<--->python with swap of python > dictionary in js object/array associative. Is'it possible? > > How can i use the "fantastic" and "magic" python dictionary with xpcom? >
Only "simple" types can (currently) be stored in a dictionary. The best solution is probably to design a "dictionary-like" interface (but using methods instead of '[]' notation, for example. You would then implement this interface in Python, leaning heavily on the builtin dictionary type. You will then be able to pass objects implementing this interface to JS, and have JS use the methods in your interface to access the dictionary. HTH, Mark _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
