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
Contributor
joanpuigsanz
Posts: 27
Registered: ‎07-30-2011
My Device: Z10
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?

 

 

Developer
Zmey
Posts: 1,512
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

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
hendrik
Posts: 63
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
joanpuigsanz
Posts: 27
Registered: ‎07-30-2011
My Device: Z10

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
hendrik
Posts: 63
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