Xflnemesys / gwt-phonegap

Automatically exported from code.google.com/p/gwt-phonegap
0 stars 0 forks source link

getContacts().find not working #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following is not invoking either callback functions and nothing happens:

            LightArray<String> match = new JavaLightArray<String>();
            match.push("displayName");
            match.push("name");
            phoneGap.getContacts().find(match, new ContactFindCallback() {
                public void onSuccess(LightArray<Contact> contacts) {
                    Window.alert("contacts: " + contacts);
                }

                public void onFailure(ContactError error) {
                    Window.alert("contacts failed");
                }
            }, new ContactFindOptions("a"));

On a lighter note, ContactFactory getFacotry(); is mispelled

Original issue reported on code.google.com by jve...@gmail.com on 4 Oct 2011 at 6:55

GoogleCodeExporter commented 9 years ago
THis line: LightArray<String> match = new JavaLightArray<String>();
must be: LightArray<String> match = CollectionFactory.constructArray(); 
Otherwise phonegap is not working correctly, because it is expecting a 
Javascript Array (Which you will get in script mode from the factory)

fixed the typo changes are in trunk.

Original comment by kurka.da...@gmail.com on 5 Oct 2011 at 7:56

GoogleCodeExporter commented 9 years ago
Yes it works fine.

Original comment by jve...@gmail.com on 8 Oct 2011 at 12:05

GoogleCodeExporter commented 9 years ago

Original comment by kurka.da...@gmail.com on 8 Oct 2011 at 12:08