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


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Contributor
Posts: 27
Registered: ‎07-30-2011
My Device: Z10
My Carrier: Tmobile
Accepted Solution

NDK 10.1 beta issue??

Hi there.

 

I have a project that worked fine with the 10.0 NDK (GOLD) and when I compile it with the NDK 10.1 beta I got a new error in the following code:

 

Invocation {
            id: linkInvocation
            query: InvokeQuery {
                mimeType: "text/html"
                uri: "http://www.example.com/foo"
                invokeActionId: "bb.action.OPEN"
            }
        }

 Ans this is the error for the "query":


                         Read only property cannot be set main.qml

 Why is this?

 

 

Highlighted
Developer
Posts: 1,524
Registered: ‎12-18-2012
My Device: Z30, Z10 LE, DevAlpha C, PlayBook

Re: NDK 10.1 beta issue??

Hi,

 

Try removing the 'InvokeQuery' word. This page has an example:

https://developer.blackberry.com/cascades/reference/bb__cascades__invocation.html


Andrey Fidrya, @zmeyc on twitter
Developer
Posts: 64
Registered: ‎09-10-2009
My Device: Z10, Bold 9700
My Carrier: O2 Germany

Re: NDK 10.1 beta issue??

I'm getting the same error with the 10.1 Beta NDK. However if I ignore the error and run the app on the simulator, the InvokeQuery still works and opens the browser. Removing the "InvokeQuery" as suggested doesn't remove the error message in the NDK and has the effect of the query no longer working.

I guess it is a bug in the NDK and the error message can be ignored for now. It is still beta, after all.
----

My Twitter: @hendrik_dev
Contributor
Posts: 27
Registered: ‎07-30-2011
My Device: Z10
My Carrier: Tmobile

Re: NDK 10.1 beta issue??

Hi!

How to fix it:

Invocation {
            id: linkInvocation
            query {
                mimeType: "text/html"
                uri: "http://www.example.com"
                invokeActionId: "bb.action.OPEN"
            }
        }

 

Developer
Posts: 64
Registered: ‎09-10-2009
My Device: Z10, Bold 9700
My Carrier: O2 Germany

Re: NDK 10.1 beta issue??

Good idea, you also removed the colon after "query", opposed to the example in the API documentation. That indeed removes the error message in the Beta NDK.

However "query: InvokeQuery" also successfully initializes the query when the Invocation is created and correctly invokes the browser when you run the code, so I am not sure the error message should be displayed in this situation in the first place.
----

My Twitter: @hendrik_dev