On 2013-05-18, 19:50 GMT, Harald Kirschner wrote: > nice project! That's a simple fix, you just need to rename Contact to > mozContact. > You can see an example at > https://wiki.mozilla.org/WebAPI/ContactsAPI#Example and a lot more > code in the Gaia communications app > https://github.com/mozilla-b2g/gaia/tree/master/apps/communications
Does the same moz* prefix applies to other Contact* constructors as well (ContactAddress, ContactField, and ContactTelField)? My current code (https://github.com/mcepl/import-LDIF/blob/master/importAddrBook.js#L70) now crashes on cAddr = new subClass(); with errors * Error: TypeError: subClass is not a constructor Source File: app://84eb47f2-a003-47ee-8a32-c224b56aabb5/importAddrBook.js Line: 70 * Content JS LOG at app://84eb47f2-a003-47ee-8a32-c224b56aabb5/importAddrBook.js:140 in translateObjectToContact: new sub element ContactField * Content JS LOG at app://84eb47f2-a003-47ee-8a32-c224b56aabb5/importAddrBook.js:66 in findSubElement: idx = email, subClass = [object ContactField], subType = work (I don't understand how it is possible that the error message precedes log messages, and apparently subClass has a value of ContactField, so the error message doesn't make much sense to me). > You could also add a Web Activity to bind your app to "open" LDIF > files (from links, email attachments, etc). The PDF app does that for > PDF files [1]. Splendid idea! Will do, once the program works. Best, Matěj _______________________________________________ dev-webapps mailing list [email protected] https://lists.mozilla.org/listinfo/dev-webapps
