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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Cascades Development

Reply
Contributor
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Carrier: Telus
Accepted Solution

SystemDialog is not a type

Hey All,

 

I was wondering if anyone has dealt with this before.  I have included the blackberry system library, updated the .pro file and have included bb/system/SystemDialog in my .h file as well as bb.system 1.0 in all my qml files and I am still getting the

 

SystemDialog is not a type error.

Please use plain text.
Developer
helex
Posts: 191
Registered: ‎02-14-2012
My Carrier: -

Re: SystemDialog is not a type

Don't forget to include this in your code:

 

using namespace bb::system;

 I hope this solved the issue and you don't forget to hit the like button. ;-)

Please use plain text.
Contributor
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Carrier: Telus

Re: SystemDialog is not a type

Thanks for the reply, I already had that as well.  Not sure what is happening here.

Please use plain text.
Developer
Zmey
Posts: 881
Registered: ‎12-18-2012

Re: SystemDialog is not a type

Could you paste the exact error message and the code?
Please use plain text.
Trusted Contributor
Zymatic
Posts: 109
Registered: ‎12-18-2010
My Carrier: Rogers Wireless

Re: SystemDialog is not a type

Where specifically are you getting this error?  Is it just when you try to use the QML preview or is it when running the app?  If its just in the preview then I think that this is normal.  The preview does not work for anything that is not in the bb.cascades namespace.  In my own app that uses SystemToast it shows the "SystemToast is not a type" error but my app still works and the toast still works.

 

Please use plain text.
Contributor
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Carrier: Telus

Re: SystemDialog is not a type

Thanks Everyone.

 

Zymatic - I beleive this was what was wrong,  I am however still trying to get the pop-up to work.  Can you call a SystemDialog from a javascript function?

 

I basically have

 

Container {

      id: top_container

 

      function thisFunction (ean, value) {

           ...
           if ( ean < value) {

               top_container.errorPop.show();

               return -1;

           }

           ...

       }

       ...

       ...

       attachedObjects: [

          SystemDialog {

               id: errorPop

               title: "Input Error"

               body: "Value Too High"

           }

       ]

}

Please use plain text.
Trusted Contributor
Zymatic
Posts: 109
Registered: ‎12-18-2010
My Carrier: Rogers Wireless

Re: SystemDialog is not a type

[ Edited ]

Yes you can call it from a javascript function.  

 

I could be wrong but I think you should be able to change

 

top_container.errorPop.show();

 with

errorPop.show();

 

 

Would it possible for you to post the complete qml.

Please use plain text.
Contributor
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Carrier: Telus

Re: SystemDialog is not a type

Hello Zymatic,

 

Removing the container id did the trick.  Thanks.

 

The qml file is a bit large at the moment which precluded me from wanting to include.

Please use plain text.
Trusted Contributor
Zymatic
Posts: 109
Registered: ‎12-18-2010
My Carrier: Rogers Wireless

Re: SystemDialog is not a type

Great, Glad I could help.

Please use plain text.
New Member
nikunjdhamat
Posts: 1
Registered: ‎04-08-2013
My Carrier: Vodafone

Re: SystemDialog is not a type

[ Edited ]

I have same problem

 I have included 

using namespace bb::cascades;

import bb.system 1.0

also edited pro file

 

still not able display qml preview

 

Please use plain text.