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
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Device: Playbook
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: 275
Registered: ‎02-14-2012
My Device: Nokia N950 / BB Playbook
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 Device: Playbook
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: 1,511
Registered: ‎12-18-2012
My Device: PlayBook, Z10, DAC

Re: SystemDialog is not a type

Could you paste the exact error message and the code?

Andrey Fidrya, @zmeyc on twitter
Please use plain text.
Developer
Zymatic
Posts: 144
Registered: ‎12-18-2010
My Device: Limited Edition Z10 & Blackberry Playbook
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.

 

Playbook Apps:
Touch Painter, LinkShrink

BB10 Apps:
NoteToSelf , LinkShrink
Please use plain text.
Contributor
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Device: Playbook
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.
Developer
Zymatic
Posts: 144
Registered: ‎12-18-2010
My Device: Limited Edition Z10 & Blackberry Playbook
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.

Playbook Apps:
Touch Painter, LinkShrink

BB10 Apps:
NoteToSelf , LinkShrink
Please use plain text.
Contributor
ThomasD
Posts: 26
Registered: ‎01-04-2013
My Device: Playbook
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.
Developer
Zymatic
Posts: 144
Registered: ‎12-18-2010
My Device: Limited Edition Z10 & Blackberry Playbook
My Carrier: Rogers Wireless

Re: SystemDialog is not a type

Great, Glad I could help.

Playbook Apps:
Touch Painter, LinkShrink

BB10 Apps:
NoteToSelf , LinkShrink
Please use plain text.
New Member
nikunjdhamat
Posts: 1
Registered: ‎04-08-2013
My Device: BlackBerry Z10
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.