Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development

Reply
Regular Contributor
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware
My Carrier: (none)

Blackberry Cascades Beta 3 SDK seems to be missing the AttributeSubKind class.

I tried to implement the use of a ContactPostalAddressBuilder and mapview to show the location of a certain address on a map in Blackberry Cascades Beta 3 SDK, but then the compiler says that there is no such class as AttributeSubKind (which is referred to in ContactPostalAddressBuilder.hpp).

 

I tried to do the following things to solve the problem:

 

1) I looked up that class online to see the include path - which is and I added an #include statement for that in ContactPostalAddressBuilder.hpp (#include inside of my copy of the <bbndk3\target_10_0_9_386\qnx6\usr\include\bb\pim\contacts\ContactPostalAddressBuilder.hpp file, but it still didn't help.

 

2) I checked that same contacts folder, and found no such class exists. I then searched for that file in the entire bb directory.

 

3) I also searched for any file contents containing "class AttributeSubKind" in that entire root directory (the bb directory) - using Notepad++'s Find in File search. But I could not find it anywhere.

 

4) I tried to search for a download of that class's source code on the internet, but couldn't find it.

Does anyone known where I can find the AttributeSubKind class for Blackberry Cascades?

 

5) I even did a search for that file (AttributeSubKind) in my entire C drive, and I did not find it.

Retired
Posts: 170
Registered: ‎09-06-2010
My Device: None
My Carrier: None

Re: Blackberry Cascades Beta 3 SDK seems to be missing the AttributeSubKind class.

Have you looked at the sample code in Git Hub, specifically: https://github.com/blackberry/Cascades-Samples/tree/master/PimAddressBook which use the PIM related APIs?

Regular Contributor
Posts: 55
Registered: ‎10-31-2012
My Device: Blackberry 10 Dev Alpha Simulator - VMware
My Carrier: (none)

Re: Blackberry Cascades Beta 3 SDK seems to be missing the AttributeSubKind class.

[ Edited ]

I have now checked the addressbook project.  This file should be in the SDK itself - not in any of these projects - it's certainly not in the addressbook project or in the mapview project.  But these files do not have this problem, because they do not use bb:: pim::contacts::ContactPostalAddressBuilder..  It's when I attempt to use that class, that I get this problem, because the ContactPostalAddressBuilder class uses the AttributeSubKind.

Retired
Posts: 170
Registered: ‎09-06-2010
My Device: None
My Carrier: None

Re: Blackberry Cascades Beta 3 SDK seems to be missing the AttributeSubKind class.

I hadn't implied that the class AttributeSubKind was to be found in this example. it's actually in the NDK in  ContactConsts.hpp. I had meant to suggest looking at that example for help using PIM.

 

Use of PIM also requires libbbpim.so to be linked against using 

LIBS += -lbbpim

in the .pro file.

 

I've reproduced the error myself even with libbbpim.so linked and raised this internally as MKS 6448728.

Highlighted
Retired
Posts: 170
Registered: ‎09-06-2010
My Device: None
My Carrier: None

Re: Blackberry Cascades Beta 3 SDK seems to be missing the AttributeSubKind class.

The issue was a missing #include of  ContactConsts.hpp from ContactPostalAddressBuilder.hpp. A fix has been produced and will appear in an IDE refresh.

 

As a workaroud you can include  ContactConsts.hpp yourself with something like:

 

....

#include <bb/pim/contacts/ContactConsts>
#include <bb/pim/contacts/ContactPostalAddressBuilder>
#include <bb/pim/contacts/ContactPostalAddress>

...