Hi Matěj,

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

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].

Cheers,  

---
Harald Kirschner | Partner Engineer & Web Craftsman | [email protected] 
(mailto:[email protected])

[1]: 
https://github.com/mozilla-b2g/gaia/blob/master/apps/pdfjs/manifest.webapp#L21


On Saturday, May 18, 2013 at 11:45 AM, Matěj Cepl wrote:

> Hi,
>  
> I am trying to create an importer for the LDIF file (export from  
> Thunderbird Address Book) to my new Peak Contacts.
>  
> My current code is https://github.com/mcepl/import-LDIF . I have tried  
> to create a packaged privileged app (I need it for inserting new  
> Contacts to the system address book), but even though the package  
> validates on https://marketplace.firefox.com/developers/validator when I  
> run it in the Firefox OS Simulator 3.0 I get error
>  
> Timestamp: 05/18/13 20:18:26
> Error: TypeError: Contact is not a constructor
> Source File: app://84eb47f2-a003-47ee-8a32-c224b56aabb5/importAddrBook.js
> Line: 88
>  
> How come? Any thoughts what do I do wrong?
>  
> Best,
>  
> Matěj Cepl
> --  
> http://www.ceplovi.cz/matej/, Jabber: [email protected] 
> (mailto:[email protected])
> GPG Finger: 89EF 4BC6 288A BF43 1BAB 25C3 E09F EF25 D964 84AC
>  
> If trains stop at train stations, what happens at work stations?
> _______________________________________________
> dev-webapps mailing list
> [email protected] (mailto:[email protected])
> https://lists.mozilla.org/listinfo/dev-webapps
>  
>  


_______________________________________________
dev-webapps mailing list
[email protected]
https://lists.mozilla.org/listinfo/dev-webapps

Reply via email to