01-08-2013 02:53 PM
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.
Solved! Go to Solution.
01-08-2013 03:42 PM
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. ;-)
01-08-2013 03:52 PM
Thanks for the reply, I already had that as well. Not sure what is happening here.
01-08-2013 03:59 PM
01-08-2013 04:02 PM
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.
01-08-2013 04:21 PM
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"
}
]
}
01-08-2013 04:32 PM - edited 01-08-2013 04:33 PM
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.
01-08-2013 05:12 PM
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.
01-08-2013 05:16 PM
Great, Glad I could help.
04-08-2013 08:03 AM - edited 04-08-2013 08:06 AM
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