Compilation warning

SQL > ALTER SESSION SET plsql_warnings * ' enable: serious ', ' enable: performance ', ' ERROR: 05003. "

What is the implication of the above command?

A. he issues a warning every time that ERROR: 05003 occur during compilation.

(B) it causes the compilation fails every time that happens the ERROR.05003 warning.

C. It emits warnings warn whenever that code causes an unexpected action or erroneous results performance issues.

D. it causes the compilation fails whenever the code gives wrong results or contains instructions that are never executed.

No, this is not correct.

It will become WARNING 5003 a MISTAKE, causing compliation fail instead of succeed. And he has absolutely nothing to do with the performance.

Tags: Database

Similar Questions

  • Disable CSS compile WARNING

    Hi all

    How can I disable the warning of compiler on the CSS styles. I need of the solution for the SWF compiled locally and those that are compiled in Flex Data Services. doesn´t Flex - config.XML has the possibility of node.

    Thank you

    David

    Brent Merci for your quick response. That option works well with the compilation on the spot. I found the solution if you compile with FDS.

    Sound in the docs under:

    Building and deploying Flex 2 Applications > Creating Applications Flex > 2 the kit Flex SDK and Flex Data Services Configuration > Flex Data Services configuration

    You can edit the config.xml file - webtier-flex and turn into production or use the queryString (showAllWarnings = false) If you just test.

    See you soon

    David

  • CVI 2013: macros return WARNING: will never be executed

    I did not a systematic study and therefore other macros may exhibit the same behavior:

    say, for example, gives the compiler warning it will never run

    the same is true for DefineThreadSafeVar

    To Assert, this warning is ironically caused by exactly the behavior that the macro has been designed for. The macro Assert uses a ternary operator to determine if it should trigger an error or continue execution. Of course, with a ternary operator, one of the operations will be executed while the other is not. If the compiler is able to determine that your condition to assert will always have the same result (for example 0 == 0), then you will get this warning.

    For DefineThreadSafeVar, this happens because DefineThreadSafeVar is really the same as calling DefineThreadSafeScalarVar with the parameter maxGetPointerNesting the value - 1. In this case, the new warning is precisely reflecting the fact that a conditional statement inside a macro called by DefineThreadSafeScalarVar checks whether maxGetPointerNesting is > = 0 (which it won't). There are actually two cautions that the code will not run: one for the line of code inside this condition and one for the second half of the conditional. This condition is within the macro CheckThreadSafeVarNestedLockCount which is used by many of the macros variable thread safe and is so widespread. You can take a look at all these macros in utility.h. This warning can be ignored, or you can get rid of it using DefineThreadSafeScalarVar with a really big maxGetPointerNesting parameter. I filed the bug 423739 report for that matter.

  • Some General Questions of CVI - how does the compiler

    Hello

    I work with CVI 9.1 for more then a year during this time i ' v noticed a couple things, I would like to help me to understand.

    1. Work with several C files:
    • When I'm writing a software that uses lets say C files and files of 10 H 10: Main.c Main.h File1.c File1.h Panels.h Panels.uir and so on... I'm implementation of the function in the c file and its deceleration of writing in the file h, i ' v noticed that sometimes I get msgs of the compiler on the conflicts, maybe there's a way I know not just for the CVI?
    • Works correctly with the file UIR for example lets take the files written above, if I have sign - HAND and control led1 and I want to do SetCtrlVal in the Main.c I can implement as this SetCtelVal(MAIN,MAIN_LED1,1); but when I go to file1.c and try to do it, I get the error message that main_led1 is not a control value (I included the Panels.h) this problem happens to me a lot is there a solution? or maybe I am doing something wrong...
    • What is the best way to implement bollean var (true false) for the software? is it possible to add this var always?
    • decelerations of incompatible type: allows you to take the Fmt function for example when I'm trying to use it in another file, I get the decelerations of incompatible type with the names of the files...
    • General question: lets say I want to include in my project and I want to use its features in main.c and file1.c, I included in two files? or there is a way to include it in a single file only?

    2. to access the buttons

    • lets say that I have buttons and I am pressing on it after pressing the button I have a loop for 10 min, I want to create a button give up, but I can't press anything because the keys are "locked out" is there a way besides multi threading to implement this?

    Wow! A very broad set of issues!

    A quick response.

    • Works correctly with the file UIR for example lets take the files written above, if I have sign - HAND and control led1 and I want to do SetCtrlVal in the Main.c I can implement as this SetCtelVal(MAIN,MAIN_LED1,1); but when I go to file1.c and try to do it, I get the error message that main_led1 is not a control value (I included the Panels.h) this problem happens to me a lot is there a solution? or maybe I am doing something wrong...

    There is a basic error in your statement: the first (SetCtrlVal) parameter must be the handle Panel, which is the reference to the object in memory that is created when you call LoadPanel (). Using the name of constant sign is not correct: it may work if you're lucky and you have the Panel handle with the same value as the name of the constant, but this certainly isn't the correct way to address on a panel controls.

    Even if I don't understand the error that you declare: I expect 'the control is not of the type expected by the function' or an error of inconsistent data type (like passing an int to double check) or...

    Remember that each function that processes objects on a Panel must be aware of the handful of Panel, then either you pass to the function as a parameter, or store it in a global variable.

    • decelerations of incompatible type: allows you to take the Fmt function for example when I'm trying to use it in another file, I get the decelerations of incompatible type with the names of the files...

    I normally leave CVI #including the necessary system files: when I use certain functions like Fmt in a source file and compile ICB warns me to add the relevant include file, and it does it correctly. Operating in this way I never had problems with formatting and the I/o library functions. You can rebuild the inclusion list by removing all #includes in yous source files and compilation of the project, this should correct errors

    • General question: lets say I want to include in my project and I want to use its features in main.c and file1.c, I included in two files? or there is a way to include it in a single file only?

    You must include the file containing the definitions of the functions in all source files that use. Or you can create a general include file with all included in your project and include only this one in all of your source files

    • lets say that I have buttons and I am pressing on it after pressing the button I have a loop for 10 min, I want to create a button give up, but I can't press anything because the keys are "locked out" is there a way besides multi threading to implement this?

    It is a general rule that animates the CVI environment: during the execution of a loop inside a function (a reminder of command or another function) the system does not handle the user interface events, so that your buttons appear locked. This can be solved by adding a call repeated (ProcessSystemEvents) inside the loop: this way of all UI events are monitored and managed by the system.

    You must use this method with caution: before entering the loop, you must disable all the controls that can be used during operation (normally only the Quit button should stay active) otherwise, you can enter a situation in which other callbacks are executed during the loop that might interfere with it.

    In such a case, do not put a reminder in the stop button and the use of a global variable I have normally create a toggle button Stop and manipulate it in this way:

    While (1) {}

    ....

    ProcessStemsEvents ();

    GetCtrlVal (panelHandle, PANEL_STOP, &stop);)

    If {(stop)

    ... gracefully out of the function

    break;

    }

    }

    This argument has been discussed several times in the forums: do a search for ProcessSystemEvents returns a large number of discussions you can read

    • What is the best way to implement bollean var (true false) for the software? is it possible to add this var always?

    CVI is not a native boolean value. I used to use an int and test weather it is zero or not

    • When I'm writing a software that uses lets say C files and files of 10 H 10: Main.c Main.h File1.c File1.h Panels.h Panels.uir and so on... I'm implementation of the function in the c file and its deceleration of writing in the file h, i ' v noticed that sometimes I get msgs of the compiler on the conflicts, maybe there's a way I know not just for the CVI?

    I do not understand what you describe: could you add some piece of code allowing to penetrate this situation and report exactly the message the compiler warns?

  • error when you try to compile this stored procedure

    I get this error message

    Testing_sp PROCEDURE compiled
    WARNING: the execution is completed with warning

    can I do this...

    See the err;

    and:

    17/23 PL/SQL: ORA-00932: inconsistent data types: expected NUMBER obtained -
    16/1 PL/SQL: statement ignored

    I can't understand why.
    I checked all the columns at TEST_TMP_TBL
    they are all varchar2





    CREATE OR REPLACE PROCEDURE testing_sp
    AS

    XML CLOB.
    xml2 VARCHAR2 (150);

    BEGIN


    SELECT ' <? XML version = "1.0" encoding ="' | utl_i18n.map_charset (value) | "" ? > '
    IN xml2
    OF nls_database_parameters
    Setting WHERE = 'NLS_CHARACTERSET ";


    SELECT
    XMLElement ("APPLICATION",
    XMLAttributes ('TEST', "Name")
    , XMLElement ("TESTPAGE",
    XMLAgg)
    XMLElement ("PROJ",
    XMLAttributes (NVL("ORDERS",' ') AS ORDERS,
    NVL("SUB_PART",' ') AS SUB_PART,
    NVL("SUB_SUB",' ') AS SUB_SUB,
    NVL("DESC",' ') AS DESC,
    NVL("ADD",' ') AS ADD,
    NVL("NUMB",' ') YOU NUMB
    ),

    XMLForest)
    NVL("ORDERS",' ') STOPPED,
    NVL("SUB_PART",' ') AS SUB_PART,
    NVL("SUB_SUB",' ') AS SUB_SUB,
    NVL("DESC",' ') AS DESC,
    NVL("ADD",' ') AS ADD,
    NVL("NUMB",' ') YOU NUMB
    )
    )
    )
    )
    )
    in xml
    OF TEST_TMP_TBL;



    DBMS_XSLPROCESSOR.clob2file (xml2: xml, 'dir', 'testing.xml');



    EXCEPTION
    while others then
    Rollback;

    end;



    Let me know if you have an idea, I would almost give my first born of an answer to this (not really sure)

    SQL > DECLARE
    2 v_xml CLOB.
    3 - v_xml XMLTYPE.
    4 BEGIN
    5 SELECT XMLELEMENT ("Emp") IN v_xml FROM DUAL;
    6 DBMS_OUTPUT. Put_line (v_xml);
    7 END;
    8
    9.
    SELECT XMLELEMENT ("Emp") IN the v_xml FROM DUAL;
    *
    ERROR on line 5:
    ORA-06550: line 5, column 21:
    PL/SQL: ORA-00932: inconsistent data types: expected NUMBER obtained -
    ORA-06550: line 5, column 2:
    PL/SQL: SQL statement ignored

    now change the variable for XMLTYPE data type;
    SQL > DECLARE
    2 - v_xml CLOB.
    3 v_xml XMLTYPE.
    4 BEGIN
    5 SELECT XMLELEMENT ("Emp") IN v_xml FROM DUAL;
    6 DBMS_OUTPUT. Put_line (v_xml);
    7 END;
    8
    9.

    PL/SQL procedure successfully completed.

  • Impossible to compile apex_030200.wwv_flow_plsql_job and wwv_flow_job

    Hello! I met the problem when I was upgrading my installation OracleXE 10.2.0.1.0 with Apex 3.2

    At first, I had to extend the tablespace SYSTEM, provided with standard XE installation, because it wasn't enough room inside to compile all new items added in the installation. Of course, I managed, but I assumed that the seller take the issue into account (for example, as a procedure for extra control in the installation script)

    But the most serious was another boredom. When I tried to compile the apex_030200.wwv_flow_job and apex_030200.wwv_flow_plsql_job packages I have a "... updated with errors" error.

    SQL > alter the package apex_030200.wwv_flow_plsql_job package compilation;

    WARNING: The package has been modified with compilation errors.


    The lack of source code for the package body, I can not find the reason. Could someone help me, please?

    The errors are on the lines referring to the table wwv_flow_job_bind_values that should exist in the apex_030200 schema. It may be missing from your installation. Review your Setup log and see if you see no mention of this name in the table.

    Update: here's the DDL to re-create this table. I see that it is created in the default tablespace that said you that you were having problems with:

    create table wwv_flow_job_bind_values (
      job                           number,
      name                          varchar2(200),
      value                         varchar2(3125),
      primary key (job,name)
    )
    organization index
    tablespace ^8
    including value
    overflow tablespace ^8
    /
    

    Replace ^ 8 with the name of tablespace default apex.

    Scott

    Published by: sspadafo on May 22, 2009 13:51

  • Initializations unrecognized local table

    Copy the following code generates a compile warning:

    myRoutine()

    {

    unsigned int localBuffer [8] = {0,0,0,0,0,0,0,0};

    ...

    If (condition)

    {

    $myvariable = localBuffer [1];

    }

    }

    ==> WARNING: variable ' localBuffer [1] "maybe is not initialized when used here

    Hello richferrara!

    I would like to ask you if you could provide more detailed information on this compiler warning you see, since I couldn't reproduce the problem in CVI 2012 or 2013 CVI. Could you please provide the following details?

    1. An excerpt from exact code of the program you are using.
    2. Provide the version of the CVI.
    3. Mention the compiler warning level (located at Options"compilation" Options of Configuration Options"warnings from the compiler) that you use and possibly other options of the specific compiler that you changed from their default values.

    Thank you!

  • Auto-install HPLIP: it works?

    I just bought a HP printer. Then I was installing HPLIP for 2.5 days. more than expected. (Needless to say that I curse me HP the last day). Now, I am pleased to succeed, but I also think it was a good chance. I think that this story deserves to be shared.

    I'm a Linux user since 1998, geekness rather low. I almost always use a binary pre-compiled. So I hoped to use auto install (and ultimately done). In recent years, I use Debian.

    It seems that I now understand the origin of the problem. People to take hplipopensource.com the current Debian release (among other distributions) and adjust auto-installer for this version. After that, the Debian people include this new version of the automatic installer for the next version of Debian. And so on. As a result, the auto-installer never works! He always complains that this version is not yet supported.

    I installed Debian 7.1 my (slightly old) DVD. I loaded the Installer do not use any mirror network. Don't laugh, this is essential. (When I did otherwise I got 7.4 Debian instead of 7.1 - not yet supported...) According to this version of Debian, the Installation Wizard gave me the auto-installer ' hplip - 3.14.1.run'. Running it, I received a message: 'disable CD sources in your apt sources list. Frankly, I use Synaptic instead of apt. Well, I found this /etc/apt/sources.list and commented all sources CD. Hplip again, that I have because it fails to install gcc even running. Well, no wonder: no mirror network. I've added a mirror network. The rest was pretty easy.

    So, I got the impression that a user of Linux non-so-geek, like me, have some probability of positive, but small enough to pass through all delays before selling its new HP printer. Indeed, if Linux is quite new, it is not yet supported. If it's a little more than necessary, a new hplip fails for this reason, while old hplip does not support the new printer (I think so; I have not tried). And especially: hplip site tells me that

    Debian 7.1 HPLIP 3.12.6 office supplies and it is supported by your printer.
    As the version of HPLIP, supplied with your operating system supports your printer, you can continue to use this version of HPLIP.

    It is true; but he forgets to add that my distro contains a version out of date; It simply doesn't get it. What a catch!

    Maybe I'm naïve somehow? Others seem to feel better. What Miss me?

    Wow, it works, HPLIP auto install!
    See my session below.

    The five following points seem to be critical for me.

    1. the site of hplip says:
    '7.1 debian provides HPLIP 3.12.6 and it is supported by your printer. As the version of HPLIP, supplied with your operating system supports your printer, you can continue to use this version of HPLIP." No, don't think. Download the latest version (in my case, hplip - 3.14.1.run), later called "XXX.run".

    2. ensure that your repositories contain no CD/DVD (the auto-installer will warn you), but "main" and "contrib" (the No auto-installer will warn you). It is not necessary to "non-free". I did it through the (settings-> repositories) Synaptic Package Manager.

    3. run the XXX.run file with a command line "sh XXX.run" issued in the terminal under the MISTLETOE (not the console). Do not be root and not to use 'sudo '. Instead, you must know the root password.

    4. you will get an error like this: "error: debian-7 version, 4 is not supported, so all dependencies cannot be installed." "However trying to install using debian package - version 7.2.
    Don't worry too much; in my case it was harmless. Answer "y".

    5. the final error message "RuntimeWarning: PyOS_InputHook isn't available for interactive use of PyGTK set_interactive (1)" is also harmless.

    After the message
    "SETTING UP THE PRINTER. Please make sure that your printer is connected and powered at the moment. "
    You should get a graphic Panel
    "HP - Setup Manager. Device discovery.
    Do the necessary of the choice (in my case, USB), click "next". You should get another graphic Panel
    "HP Device Manager - install plug-ins." Installation of the plug-in Driver. "
    Choose 'Download', click 'Next' and to be patient. in my case, it took 5 minutes, but no visible progress. Following graphic Panel:
    "Pilot plug-in license agreement. Browse through, click "I agree." see the "Installing a plugin successfully" message, click 'OK '.
    The last graphic Panel: "HP - Setup Manager. Device Setup. Mark 'Send test page', click on "Add a printer" and hope for the best.

    boris@debian:~$ sh hplip-3.14.1.run
    Creating directory hplip-3.14.1
    Verifying archive integrity... All good.
    Uncompressing HPLIP 3.14.1 Self Extracting Archive...................................................................................................
    
    HP Linux Imaging and Printing System (ver. 3.14.1)
    HPLIP Installer ver. 5.1
    
    Copyright (c) 2001-13 Hewlett-Packard Development Company, LP
    This software comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to distribute it
    under certain conditions. See COPYING file for more details.
    
    Installer log saved in: hplip-install_Thu-27-Feb-2014_19:04:37.log
    
    \
    note: Defaults for each question are maked with a '*'. Press  to accept the default.
    error: debian-7.4 version is not supported, so all dependencies may not be installed. However trying to install using debian-7.2 version packages.
    
    Press 'y' to continue auto installation. Press 'n' to quit auto instalation(y=yes, n=no*): y
    
    INSTALLATION MODE
    -----------------
    Automatic mode will install the full HPLIP solution with the most common options.
    Custom mode allows you to choose installation options to fit specific requirements.
    
    Please choose the installation mode (a=automatic*, c=custom, q=quit) :
    
    Initializing. Please wait...
    
    INTRODUCTION
    ------------
    This installer will install HPLIP version 3.14.1 on your computer.
    Please close any running package management systems now (YaST, Adept, Synaptic, Up2date, etc).
    
    DISTRO/OS CONFIRMATION
    ----------------------
    Distro appears to be Debian 7.4.
    
    Is "Debian 7.4" your correct distro/OS and version (y=yes*, n=no, q=quit) ?
    
    ENTER ROOT/SUPERUSER PASSWORD
    -----------------------------
    Please enter the root/superuser password:
    
    INSTALLATION NOTES
    ------------------
    NOTE: Disable the CD Sources in your apt sources.list or the install will fail and hang.
    
    Please read the installation notes. Press  to continue or 'q' to quit:
    
    RUNNING PRE-INSTALL COMMANDS
    ----------------------------
    OK
    
    INSTALL MISSING REQUIRED DEPENDENCIES
    -------------------------------------
    warning: There are 9 missing REQUIRED dependencies.
    note: Installation of dependencies requires an active internet connection.
    warning: Missing REQUIRED dependency: gcc (gcc - GNU Project C and C++ Compiler)
    warning: Missing REQUIRED dependency: libpthread (libpthread - POSIX threads library)
    warning: Missing REQUIRED dependency: make (make - GNU make utility to maintain groups of programs)
    warning: Missing REQUIRED dependency: python-devel (Python devel - Python development files)
    warning: Missing REQUIRED dependency: cups-devel (CUPS devel- Common Unix Printing System development files)
    warning: Missing REQUIRED dependency: libusb (libusb - USB library)
    warning: Missing REQUIRED dependency: libtool (libtool - Library building support services)
    warning: Missing REQUIRED dependency: cups-image (CUPS image - CUPS image development files)
    warning: Missing REQUIRED dependency: libjpeg (libjpeg - JPEG library)
    
    INSTALL MISSING OPTIONAL DEPENDENCIES
    -------------------------------------
    warning: There are 8 missing OPTIONAL dependencies.
    note: Installation of dependencies requires an active internet connection.
    warning: Missing REQUIRED dependency for option 'network': libcrypto (libcrypto - OpenSSL cryptographic library)
    warning: Missing REQUIRED dependency for option 'network': libnetsnmp-devel (libnetsnmp-devel - SNMP networking library development files)
    warning: Missing OPTIONAL dependency for option 'network': avahi-utils (avahi-utils)
    warning: Missing REQUIRED dependency for option 'gui_qt4': pyqt4-dbus (PyQt 4 DBus - DBus Support for PyQt4)
    warning: Missing REQUIRED dependency for option 'gui_qt4': pyqt4 (PyQt 4- Qt interface for Python (for Qt version 4.x))
    warning: Missing REQUIRED dependency for option 'fax': dbus (DBus - Message bus system)
    warning: Missing REQUIRED dependency for option 'scan': sane-devel (SANE - Scanning library development files)
    warning: Missing OPTIONAL dependency for option 'scan': xsane (xsane - Graphical scanner frontend for SANE)
    
    CHECKING FOR NETWORK CONNECTION
    -------------------------------
    Network connection present.
    
    RUNNING PRE-PACKAGE COMMANDS
    ----------------------------
    su -c "dpkg --configure -a" (Pre-depend step 1)
    su -c "apt-get install -f" (Pre-depend step 2)
    su -c "apt-get update" (Pre-depend step 3)
    warning: An error occurred running 'su -c "apt-get install --yes cupsys-bsd"'
    su -c "apt-get install --yes cupsys-bsd" (Pre-depend step 4)
    OK
    
    DEPENDENCY AND CONFLICT RESOLUTION
    ----------------------------------
    Running 'su -c "apt-get install --force-yes -y g++"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libc6"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y make"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y python-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libcups2-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y cups-bsd"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y cups-client"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libusb-1.0.0-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libtool"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libcupsimage2"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libcupsimage2-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libjpeg8-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libssl-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libsnmp-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y avahi-utils"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y python-qt4-dbus"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y python-qt4"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libdbus-1-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y libsane-dev"'
    Please wait, this may take several minutes...
    Running 'su -c "apt-get install --force-yes -y xsane"'
    Please wait, this may take several minutes...
    HPLIP-3.12.6 exists, this may conflict with the new one being installed.
    Do you want to ('i'= Remove and Install*, 'o'= Overwrite, 'q'= Quit)?    :
    Starting uninstallation...
    HPLIP uninstallation is completed
    
    RUNNING POST-PACKAGE COMMANDS
    -----------------------------
    OK
    
    RE-CHECKING DEPENDENCIES
    ------------------------
    
    PRE-BUILD COMMANDS
    ------------------
    OK
    
    BUILD AND INSTALL
    -----------------
    Running './configure --with-hpppddir=/usr/share/ppd/HP --prefix=/usr --enable-qt4 --disable-libusb01_build --enable-doc-build --disable-cups-ppd-install --disable-foomatic-drv-install --disable-foomatic-ppd-install --disable-hpijs-install --disable-udev_sysfs_rules --disable-policykit --enable-cups-drv-install --enable-hpcups-install --enable-network-build --enable-dbus-build --enable-scan-build --enable-fax-build'
    Please wait, this may take several minutes...
    Command completed successfully.
    
    Running 'make clean'
    Please wait, this may take several minutes...
    Command completed successfully.
    
    Running 'make'
    Please wait, this may take several minutes...
    Command completed successfully.
    
    Running 'su -c "make install"'
    Please wait, this may take several minutes...
    Command completed successfully.
    
    Build complete.
    
    POST-BUILD COMMANDS
    -------------------
    
    CLOSE HP_SYSTRAY
    ----------------
    Sending close message to hp-systray (if it is currently running)...
    
    HPLIP UPDATE NOTIFICATION
    -------------------------
    Do you want to check for HPLIP updates?. (y=yes*, n=no) :
    
    RESTART OR RE-PLUG IS REQUIRED
    ------------------------------
    If you are installing a USB connected printer, and the printer was plugged in
    when you started this installer, you will need to either restart your PC or
    unplug and re-plug in your printer (USB cable only). If you choose to restart,
    run this command after restarting: hp-setup (Note: If you are using a parallel
    connection, you will have to restart your PC. If you are using network/wireless,
    you can ignore and continue).                                                   
    
    Restart or re-plug in your printer (r=restart, p=re-plug in*, i=ignore/continue, q=quit) :
    Please unplug and re-plugin your printer now.  Press  to continue or 'q' to quit:
    
    PRINTER SETUP
    -------------
    Please make sure your printer is connected and powered on at this time.
    
    RE-STARTING HP_SYSTRAY
    ----------------------
    
    HP Linux Imaging and Printing System (ver. 3.14.1)
    System Tray Status Service ver. 2.0
    
    Copyright (c) 2001-13 Hewlett-Packard Development Company, LP
    This software comes with ABSOLUTELY NO WARRANTY.
    This is free software, and you are welcome to distribute it
    under certain conditions. See COPYING file for more details.
    
    /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:127: RuntimeWarning: PyOS_InputHook is not available for interactive use of PyGTK
      set_interactive(1)
    boris@debian:~$
    
  • Save the color

    Hello guys I have this type of code in the following files do not know how to record the different colors, can someone help me?

    Setting.HPP

    #ifndef SETTINGS_HPP_
    #define SETTINGS_HPP_
    
    #include 
    
    class Settings: public QObject {
            Q_OBJECT
    
    public:
            Settings();
            virtual ~Settings();
    
            /**
             * This Invokable function gets a value from the QSettings,
             * if that value does not exist in the QSettings database, the default value is returned.
             *
             * @param objectName Index path to the item
             * @param defaultValue Used to create the data in the database when adding
             * @return If the objectName exists, the value of the QSettings object is returned.
             *         If the objectName doesn't exist, the default value is returned.
             */
            Q_INVOKABLE
            QString getValueFor(const QString &objectName, const QString &defaultValue);
    
            /**
             * This function sets a value in the QSettings database. This function should to be called
             * when a data value has been updated from QML
             *
             * @param objectName Index path to the item
             * @param inputValue new value to the QSettings database
             */
            Q_INVOKABLE
            void saveValueFor(const QString &objectName, const QString &inputValue);
    };
    

    Setting.cpp

    #include "Settings.hpp"
    
    #include 
    
    Settings::Settings() {
    }
    
    QString Settings::getValueFor(const QString &objectName, const QString &defaultValue) {
            QSettings settings;
    
            // If no value has been saved, return the default value.
            if (settings.value(objectName).isNull()) {
                    return defaultValue;
            }
    
            // Otherwise, return the value stored in the settings object.
            return settings.value(objectName).toString();
    }
    
    void Settings::saveValueFor(const QString &objectName, const QString &inputValue) {
            // A new value is saved to the application settings object.
            QSettings settings;
            settings.setValue(objectName, QVariant(inputValue));
    }
    
    Settings::~Settings() {
    }
    

    main.cpp

    #include "applicationui.hpp"
    
    #include 
    
    #include 
    #include 
    #include "Settings.hpp"
    #include 
    
    using namespace bb::cascades;
    
    QString getValue() {
        Settings settings;
        // use "theme" key for property showing what theme to use on application start
        return settings.getValueFor("theme", "primaryDropDown");
    }
    
    Q_DECL_EXPORT int main(int argc, char **argv)
    {
        // update env variable before an application instance created
        qputenv("CASCADES_THEME", getValue().toUtf8());
    
        Application app(argc, argv);
    
        // Create the Application UI object, this is where the main.qml file
        // is loaded and the application scene is set.
        ApplicationUI appui;
    
        // Enter the application main event loop.
        return Application::exec();
    }
    

    Applicationui.HPP

    #ifndef ApplicationUI_HPP_
    #define ApplicationUI_HPP_
    
    #include 
    
    namespace bb
    {
        namespace cascades
        {
            class LocaleHandler;
        }
    }
    
    class QTranslator;
    
    /*!
     * @brief Application UI object
     *
     * Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class ApplicationUI : public QObject
    {
        Q_OBJECT
    public:
        ApplicationUI();
        virtual ~ApplicationUI() {}
    private slots:
        void onSystemLanguageChanged();
    private:
        QTranslator* m_pTranslator;
        bb::cascades::LocaleHandler* m_pLocaleHandler;
    };
    
    #endif /* ApplicationUI_HPP_ */
    

    Applicationui.cpp

    #include "applicationui.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include "timer.hpp"
    #include "Settings.hpp"
    
    using namespace bb::cascades;
    
    ApplicationUI::ApplicationUI() :
            QObject()
    {
        // prepare the localization
        m_pTranslator = new QTranslator(this);
        m_pLocaleHandler = new LocaleHandler(this);
        qmlRegisterType("CustomTimer", 1, 0, "Timer");
        bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged()));
        // This is only available in Debug builds
        Q_ASSERT(res);
        // Since the variable is not used in the app, this is added to avoid a
        // compiler warning
        Q_UNUSED(res);
    
        // initial load
        onSystemLanguageChanged();
    
        // Create scene document from main.qml asset, the parent is set
        // to ensure the document gets destroyed properly at shut down.
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
        // Create settings object and export it to qml
        Settings *settings = new Settings();
        qml->setContextProperty("Settings", settings);
    
        // Create root object for the UI
        AbstractPane *root = qml->createRootObject();
    
        // Set created root object as the application scene
        Application::instance()->setScene(root);
        // CustomTimer library
    
    }
    
    void ApplicationUI::onSystemLanguageChanged()
    {
        QCoreApplication::instance()->removeTranslator(m_pTranslator);
        // Initiate, load and install the application translation files.
        QString locale_string = QLocale().name();
        QString file_name = QString("Vk10_%1").arg(locale_string);
        if (m_pTranslator->load(file_name, "app/native/qm")) {
            QCoreApplication::instance()->installTranslator(m_pTranslator);
        }
    }
    
            DropDown {
            id: primaryDropDown
            title: qsTr("Primary color")
            translationY: 5.0
            Option { text: qsTr("Default"); value: 0 }
            Option { text: qsTr("Red"); value: Color.Red }
            Option { text: qsTr("Green"); value: Color.Green }
            Option { text: qsTr("Yellow"); value: Color.Yellow }
            Option { text: qsTr("Blue"); value: Color.Blue }
            Option { text: qsTr("Gray"); value: Color.Gray }
            onSelectedValueChanged: {
            Application.themeSupport.setPrimaryColor(primaryDropDown.selectedValue, primaryBaseDropDown.selectedValue)
            Settings.saveValueFor("primaryColor", primaryDropDown.selectedValue);
            }
            }
    

    I do but not work

  • Notification when changes in the keyboard language

    On two physical keyboard devices and devices to contact user can change the language or the keyboard (i.e. the input language). Is there a way to the running application to detect when such a change happens?

    Any help is greatly appreciated.

    I don't think that BPS has this info anywhere, here how get it instead of the PPS.

    Don't forget to add some LIBS +=-lbb to your pro file.

    You can reuse the class PpsWatch for any other purpose PPS incidentally, my app "File System" allows you to navigate to the folder MAP to discover the various objects available PPS, or you can also use your BlackBerry browser and copy - paste this url:

    file:///PPS/

    // applicationui.cpp
    
    #include "applicationui.hpp"
    
    #include 
    #include 
    #include 
    #include 
    
    #include 
    
    using namespace bb::cascades;
    
    ApplicationUI::ApplicationUI() :
            QObject()
    {
        // Don't forget to add LIBS += -lbb to your pro file
        m_ppsWatch = new PpsWatch("/pps/services/input/options", this);
        connect(m_ppsWatch, SIGNAL(logMessage(const QString&)), this, SLOT(onLogMessage(const QString&)));
        connect(m_ppsWatch, SIGNAL(ppsFileReady(const QVariantMap&)), this, SLOT(onPpsFileReady(const QVariantMap&)));
    
        // prepare the localization
        m_pTranslator = new QTranslator(this);
        m_pLocaleHandler = new LocaleHandler(this);
    
        bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this, SLOT(onSystemLanguageChanged()));
        // This is only available in Debug builds
        Q_ASSERT(res);
        // Since the variable is not used in the app, this is added to avoid a
        // compiler warning
        Q_UNUSED(res);
    
        // initial load
        onSystemLanguageChanged();
    
        // Create scene document from main.qml asset, the parent is set
        // to ensure the document gets destroyed properly at shut down.
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
        // Create root object for the UI
        AbstractPane *root = qml->createRootObject();
    
        // Set created root object as the application scene
        Application::instance()->setScene(root);
    }
    
    void ApplicationUI::onLogMessage(const QString& message) {
        qDebug() << message;
    }
    
    void ApplicationUI::onPpsFileReady(const QVariantMap& ppsMap) {
        if (ppsMap.contains("languages.active_lang_layouts")) {
            QVariantMap active_lang_layouts = ppsMap["languages.active_lang_layouts"].toMap();
            QStringList locales = active_lang_layouts["locales"].toStringList();
    
            qDebug() << "Language list used right now:" << locales;
        }
    }
    
    void ApplicationUI::onSystemLanguageChanged()
    {
        QCoreApplication::instance()->removeTranslator(m_pTranslator);
        // Initiate, load and install the application translation files.
        QString locale_string = QLocale().name();
        QString file_name = QString("KeyboardLanguage_%1").arg(locale_string);
        if (m_pTranslator->load(file_name, "app/native/qm")) {
            QCoreApplication::instance()->installTranslator(m_pTranslator);
        }
    }
    
    // applicationui.hpp
    
    #ifndef ApplicationUI_HPP_
    #define ApplicationUI_HPP_
    
    #include 
    
    #include 
    
    namespace bb
    {
        namespace cascades
        {
            class LocaleHandler;
        }
    }
    
    class QTranslator;
    
    /*!
     * @brief Application UI object
     *
     * Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class ApplicationUI : public QObject
    {
        Q_OBJECT
    public:
        ApplicationUI();
        virtual ~ApplicationUI() {}
    
    private slots:
        void onLogMessage(const QString& message);
        void onPpsFileReady(const QVariantMap& ppsMap);
        void onSystemLanguageChanged();
    
    private:
        QTranslator* m_pTranslator;
        bb::cascades::LocaleHandler* m_pLocaleHandler;
    
        PpsWatch* m_ppsWatch;
    };
    
    #endif /* ApplicationUI_HPP_ */
    
    /*
     * PpsWatch.cpp
     *
     *  Created on: 2015-06-05
     *      Author: Roger
     */
    
    #include 
    #include 
    
    PpsWatch::PpsWatch(const QString& path, QObject *_parent) {
        emit logMessage("PpsWatch::PpsWatch()");
    
        if (_parent)
            this->setParent(_parent);
    
        m_path = path;
        m_mapTitle = "@" + path.split("/").last();
    
        m_ppsObject = new bb::PpsObject(path + "?wait,delta", this);
        connect(m_ppsObject, SIGNAL(readyRead()), this, SLOT(onPpsReadyRead()));
    
        if(!m_ppsObject->open(bb::PpsOpenMode::Subscribe)) {
            emit logMessage("Could not connect to " + path + " object: " + m_ppsObject->errorString());
        }
    }
    
    PpsWatch::~PpsWatch()
    {
        emit logMessage("PpsWatch::~PpsWatch()");
        delete m_ppsObject;
        m_ppsObject = NULL;
    }
    
    void PpsWatch::changePath(const QString& path) {
        emit logMessage("PpsWatch::changePath() " + path);
    
        if (m_path == path) {
            emit logMessage("Same path as before, return");
            return;
        }
    
        m_path = path;
        m_mapTitle = "@" + path.split("/").last();
    
        if(!m_ppsObject->close()) {
            emit logMessage("Could not disconnect from " + m_ppsObject->objectName() + " object: " + m_ppsObject->errorString());
        }
        else {
            disconnect(m_ppsObject, SIGNAL(readyRead()), this, SLOT(onPpsReadyRead()));
        }
    
        m_ppsObject = new bb::PpsObject(path + "?wait,delta", this);
        connect(m_ppsObject, SIGNAL(readyRead()), this, SLOT(onPpsReadyRead()));
    
        if(!m_ppsObject->open(bb::PpsOpenMode::Subscribe)) {
            emit logMessage("Could not connect to " + path + " object: " + m_ppsObject->errorString());
        }
    }
    
    void PpsWatch::onPpsReadyRead() {
        emit logMessage("PpsWatch::onPpsReadyRead()");
    
        bool readOk;
        QByteArray data = m_ppsObject->read(&readOk);
        if(!readOk) { return; }
    
        bool decodeOk;
        const QVariantMap map = bb::PpsObject::decode(data, &decodeOk);
        if(!decodeOk) { return; }
    
        const QVariantMap ppsFile = map[m_mapTitle].toMap();
        if (ppsFile.isEmpty()) { return; }
    
        emit ppsFileReady(ppsFile);
    }
    
    /*
     * PpsWatch.h
     *
     *  Created on: 2015-06-05
     *      Author: Roger
     */
    
    #ifndef PPSWATCH_H_
    #define PPSWATCH_H_
    
    #include 
    #include 
    
    class PpsWatch : public QObject
    {
        Q_OBJECT
    
    public:
        PpsWatch(const QString& path, QObject *_parent = 0);
        virtual ~PpsWatch();
    
        void changePath(const QString& path);
    
    private slots:
        void onPpsReadyRead();
    
    private:
        bb::PpsObject* m_ppsObject;
    
        QString m_path;
        QString m_mapTitle;
    
    signals:
        void logMessage(const QString&);
        void ppsFileReady(const QVariantMap&);
    };
    
    #endif /* PPSWATCH_H_ */
    
  • Duty slot in my sensor signal connection related problem class.

    I fanned simple class based on the NDK documentation found here - http://developer.blackberry.com/native/documentation/cascades/device_comm/sensors/

    But in my case signals do not plug on slots and returns always false. I was just wondering what I did wrong? Looks all logical.

    Here's the class:

    #include 
    #include "Sensors.h"
    
    Sensors::Sensors(QObject *parent) : QObject(parent) {
        // Create the compass sensor.
        m_CompassSensor = new QCompass(this);
        m_Accelerometer = new QAccelerometer(this);
    
        // Set the orientation mode to fixed so that sensor readings
        // aren't affected by device orientation.
        //m_CompassSensor->setAxesOrientationMode(QCompass::FixedOrientation);
    
        // If any Q_ASSERT statement(s) indicate that the slot failed
        // to connect to the signal, make sure you know exactly why this
        // has happened. This is not normal, and will cause your app
        // to stop working
        bool res = connect(m_Accelerometer,
                           SIGNAL(readingChanged()),
                           this,
                           SLOT(accelReadingChanged()));
    
        res = connect(m_CompassSensor,
                           SIGNAL(readingChanged()),
                           this,
                           SLOT(compassReadingChanged()));
        Q_ASSERT(res);
    
        // Since the variable is not used in the app, this is
        // added to avoid a compiler warning.
        Q_UNUSED(res);
    
        m_CompassSensor->start();
    }
    
    Sensors::~Sensors() {
        m_CompassSensor->stop();
    }
    
    void Sensors::compassReadingChanged()
    {
        QCompassReading *reading = m_CompassSensor->reading();
        qreal azimuth = reading->azimuth();
        qDebug() << "The azimuth is " << azimuth << " degrees.";
    }
    
    void Sensors::accelReadingChanged()
    {
        QAccelerometerReading *reading = m_Accelerometer->reading();
        qreal x = reading->x();
        qreal y = reading->y();
        qreal z = reading->z();
    
        // For debugging purposes
        qDebug() << "x acceleration: " << x;
        qDebug() << "y acceleration: " << y;
        qDebug() << "z acceleration: " << z;
    }
    

    Here is the header

    /*
     * Sensors.h
     *
     *  Created on: 2014-02-01
     *      Author: misha
     */
    
    #ifndef SENSORS_H_
    #define SENSORS_H_
    
    #include 
    #include 
    #include 
    #include 
    #include 
    
    using namespace QtMobility;
    
    class Sensors : public QObject{
    public:
        Sensors(QObject *parent = 0);
        virtual ~Sensors();
    
    private:
        QCompass *m_CompassSensor;
        QAccelerometer *m_Accelerometer;
    public slots:
        void compassReadingChanged();
        void accelReadingChanged();
    };
    
    #endif /* SENSORS_H_ */
    

    Please advise!  I was fighting with this for a few days already... I bet I missed something important but s mall

    Thank you

    Hello! Q_OBJECT macro is missing from the top of the class declaration:

    class Sensors : public QObject{  Q_OBJECT
    public:
      Sensors(QObject *parent = 0);
    

    p.s. This line changes, the first could not connect will not be detected. It should probably be & =

    res = connect(m_CompassSensor,
    
  • Previews not working do not under 10.3.1.2243?

    I was about to publish a new version of my app, when I noticed that previews are no longer works since I upgraded my Z10 10.2.1 to 10.3.1.2243. At first, I thought that I must have inadvertently turned off instant previews in my phone settings, but they continue to work properly when an email, text, or BBM comes in. I also checked the App specific notification settings and everything looks good. The notification is save in the hub and scratch the alarm, but the preview is not displayed. It worked perfectly until I upgraded my OS device.

    I'm doing something fancy in my application that allows me to build a single executable for OS 10.1 who can use the class of improved Notification of 10.2 if the application runs under 10.2 so I have to two generations. It worked fine under 10.2.1 but I was wondering if that ruse was causing my problem so I built a little app to Cascades coming fires a standard Notification 15 seconds after the start (which gives me enough time to switch to another application for the instant preview should be displayed). No matter if I have the build for Mac OS 10.2 or 10.3, in both cases the instant preview does not appear on my Z10. I can't test on a simulator since some sim versions are no notifications in the hub at all, and those that do will display previews not instant, even if the corresponding version of the ARM.

    I wonder if anyone test this for me on a device running 10.3.1.2243. Simply create a "Hello World" application standard Cascades, add the bbplatform library, and then replace the following code for the support. Set the level of the API on 10.2 to use the Notification class that is expected to review instant.

    I can't get my update until this is resolved. Thank you.

    UPDATE: I forgot to mention that you must ask permission to notice too.

    ApplicationUI.hpp

    #ifndef ApplicationUI_HPP_
    #define ApplicationUI_HPP_
    
    #include 
    
    namespace bb
    {
        namespace cascades
        {
            class LocaleHandler;
        }
    }
    
    class QTranslator;
    
    /*!
     * @brief Application UI object
     *
     * Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class ApplicationUI : public QObject
    {
        Q_OBJECT
    public:
        ApplicationUI();
        virtual ~ApplicationUI() {}
    private slots:
        void onSystemLanguageChanged();
        void notify();
    private:
        QTranslator* m_pTranslator;
        bb::cascades::LocaleHandler* m_pLocaleHandler;
    };
    
    #endif /* ApplicationUI_HPP_ */
    

    ApplicationUI.cpp

    #include "applicationui.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    using namespace bb::cascades;
    
    ApplicationUI::ApplicationUI() :
            QObject() {
        // prepare the localization
        m_pTranslator = new QTranslator( this );
        m_pLocaleHandler = new LocaleHandler( this );
    
        bool res = QObject::connect( m_pLocaleHandler, SIGNAL( systemLanguageChanged() ), this, SLOT( onSystemLanguageChanged() ) );
        // This is only available in Debug builds
        Q_ASSERT( res );
        // Since the variable is not used in the app, this is added to avoid a
        // compiler warning
        Q_UNUSED( res );
    
        // initial load
        onSystemLanguageChanged();
    
        // Create scene document from main.qml asset, the parent is set
        // to ensure the document gets destroyed properly at shut down.
        QmlDocument *qml = QmlDocument::create( "asset:///main.qml" ).parent( this );
    
        // Create root object for the UI
        AbstractPane *root = qml->createRootObject();
    
        // Set created root object as the application scene
        Application::instance()->setScene( root );
    
        QTimer::singleShot( 15000, this, SLOT( notify() ) );
    }
    
    void ApplicationUI::onSystemLanguageChanged() {
        QCoreApplication::instance()->removeTranslator( m_pTranslator );
        // Initiate, load and install the application translation files.
        QString locale_string = QLocale().name();
        QString file_name = QString( "InstantPreviewTest_%1" ).arg( locale_string );
        if ( m_pTranslator->load( file_name, "app/native/qm" ) ) {
            QCoreApplication::instance()->installTranslator( m_pTranslator );
        }
    }
    
    void ApplicationUI::notify() {
        bb::platform::Notification* notification = new bb::platform::Notification();
        notification->setTitle("Test Notification");
        notification->setBody("This is a test notification");
    
        notification->notify();
    }
    

    You must allow instant previews with the NotificationDefaultApplicationSettings class (take a long breath).
    http://developer.BlackBerry.com/native/reference/Cascades/bb__platform__notificationdefaultapplicati...

    Here is the code of a project without empty head, which includes the instant preview by default (sorry for the formatting, I'm on mobile):
    Parameters of NotificationDefaultApplicationSettings;
    settings.setPreview (NotificationPriorityPolicy::Allow);
    Settings.Apply ();

  • time based trigger sample applications?

    Hello, I spent the last 2 days trying to find a relax time based, and I still don't understand.

    Please, someone the code examples on this? The documentation is really hard to follow especially without code examples.

    Thank you.

    I use an app without a head for the handling of push messages and after the 10.3.1 update, I added a timer trigger. In the bar - descriptor.xml, I added another filter in the tag to invoke the application without a head target:

     
     
        
          application.headless
           myHeadlessService
           myHeadlessService
          
             bb.action.PUSH
             application/vnd.push
          
          
            bb.action.system.TIMER_FIRED
            *
          
        
    

    The app without head must manage timer invoke:

    handleInvoke(const bb::system::InvokeRequest & request)
    {
    if (request.action().compare("bb.action.system.TIMER_FIRED") == 0){
            qDebug() << "myHeadlessService: timer trigger!";
    }
    }
    

    When the GUI application starts, it creates a timer to invoke request that triggers the application without head every 15 minutes:

    void ApplicationUI::headlessInvokeTimerRequest()
    {
        qDebug() << "headlessInvokeTimerRequest()";
        InvokeRecurrenceRule recurrenceRule(bb::system::InvokeRecurrenceRuleFrequency::Minutely);
        recurrenceRule.setInterval(15);
        InvokeTimerRequest request;
        request.set(INVOKE_TIMER_ID, recurrenceRule, "myHeadless.invoke.push");
        m_invokeReply = m_invokeManager->registerTimer(request);
        // Connect to the reply finished signal.
        bool res = QObject::connect(m_invokeReply, SIGNAL(finished()), this, SLOT(onInvokeTimerResult()));
        // This is only available in Debug builds
        Q_ASSERT(res);
        // Since the variable is not used in the app, this is added to avoid a
        // compiler warning
        Q_UNUSED(res);
    }
    

    When the timer is no longer needed, stop:

    m_invokeReply = m_invokeManager->deregisterTimer(INVOKE_TIMER_ID);
    

    I hope this helps you.

  • Problem with the file opened in the application via InvokeRequest

    Hello

    my application opens the file and reads its binary content. I have a small problem to open a file from a navigation or an attachment.

    But first here's how my app works. I have a signal/slot-connection in my applicationUI constructor:

    ApplicationUI::ApplicationUI(bb::cascades::Application *app) : QObject(app), m_invokeManager(new bb::system::InvokeManager(this)) {
    
      bool ok;
    
      // Since the variable is not used in the app, this is added to avoid a
      // compiler warning.
      Q_UNUSED(ok);
    
      ok = QObject::connect(m_invokeManager, SIGNAL(invoked(const bb::system::InvokeRequest&)), this, SLOT(handleInvoke(const bb::system::InvokeRequest&)));
    
    }
    

    So if the user clicks on a file it can open in the following C++ function:

    void ApplicationUI::handleInvoke(const bb::system::InvokeRequest& request) {
    
        QString workingDir = QDir::currentPath();
    
    // Initiate the appropriate target based on the invoke.target-key
        if (request.target() == "com.myapp.card.previewer") {
    
            m_uri = request.uri().toString();
    
            QString FileToOpen = m_uri.replace(QString("file://"), QString(""));
    
            bb::cascades::Page* PageToOpen = ApplicationUI::doLoadPageDetails(FileToOpen);
    
            if (PageToOpen != NULL) {
                initPreviewerUI();
            } else {
                ShowToast("FEHLER! Seite kann nicht geladen werden");
            }
        }
    }
    

    The doLoadPageDetails () - function creates a page and filled with binary content of reading a file. If the file contains errors or is corrupted an exception is thrown.

    And here is my problem. When I opened a file corrupted first the screen becomes darker before opening the app. The I get error messages, exactly as I want. But the screen stays dark. I can't take another navigation element. Also, I can't use the back button. The only solution is to wipe the screen and then use the active frame to close the filebrowser and reopen it.

    That I can't use it with attachments to emails. When I open on and the screen is dark, I can't close the view for emails. So to see the mails again I have to restart the BB decive.

    I'm not fluent in English, but I hope you understand my problem. Is it possible to cancel the invokeRequest when the file is corrupted? Or what can I do here?

    Well, the solution was to use a Toast message but the dialog box. Because that prevents the application and I can't and shows just the message, with the button on this dialog box, I cannot tell the app to close.

  • How QMetaObject::invokeMethod solved: no method bb::cascades:QmlListView error?

    Hi all

    When I try to call QMetaObject::invokeMethod at that time where I get error below.

    "QMetaObject::invokeMethod: no such bb::cascades:QmlListView:detailNews (QVariant) method.

    Down here I have attached a code please check and let me know how I can fix this issue?

    ApplicationUI.cpp

    NewsList.cpp

    #include "applicationui.hpp"
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    using namespace bb::cascades;
    using namespace bb::data;
    
    QString getValueByKey(QVariant qVariant, QString qStrKey);
    QString getValueByKey(QVariant qVariant, QString qStrPath, QString qStrKey);
    QVariantList getListByPath(QVariant qVariant, QString qStrPath);
    
    ApplicationUI::ApplicationUI(bb::cascades::Application *app) :
            QObject(app), root(0)
    {
        // prepare the localization
        m_pTranslator = new QTranslator(this);
        m_pLocaleHandler = new LocaleHandler(this);
    
        bool res = QObject::connect(m_pLocaleHandler, SIGNAL(systemLanguageChanged()), this,
                SLOT(onSystemLanguageChanged()));
        // This is only available in Debug builds
        Q_ASSERT(res);
        // Since the variable is not used in the app, this is added to avoid a
        // compiler warning
        Q_UNUSED(res);
    
        // initial load
        onSystemLanguageChanged();
    
        // Create scene document from main.qml asset, the parent is set
        // to ensure the document gets destroyed properly at shut down.
        /* QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
         // Create root object for the UI
         AbstractPane *root = qml->createRootObject();
    
         // Set created root object as the application scene
         Application::instance()->setScene(root);*/
        QmlDocument *qmlLoadingDialog = QmlDocument::create("asset:///LoadingDialog.qml").parent(this);
        dialogLoading = qmlLoadingDialog->createRootObject();
        languageLocalList = languageList();
        home_Page();
    }
    
    void ApplicationUI::onSystemLanguageChanged()
    {
        QCoreApplication::instance()->removeTranslator(m_pTranslator);
        // Initiate, load and install the application translation files.
        QString locale_string = QLocale().name();
        QString file_name = QString("Godfessions_%1").arg(locale_string);
        if (m_pTranslator->load(file_name, "app/native/qm")) {
            QCoreApplication::instance()->installTranslator(m_pTranslator);
        }
    }
    
    void ApplicationUI::home_Page()
    {
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
        //QmlDocument *settingqml = QmlDocument::create("asset:///Setting_Page.qml").parent(this);
        qml->setContextProperty("app", this);
        root = qml->createRootObject();
        m_newListView = root->findChild("newsListView");
        root->setParent(this);
        Application::instance()->setScene(root);
    
        showLoadingDialog();
        getCategories("12143");
        newsListWebServices("12143");
        closeLoadingDialog();
    }
    
    void ApplicationUI::detailNews(QString news_Id)
    {
        qDebug() << "Detail News Get" << news_Id;
    }
    
    /** * Prepared by :- Umang Shah * **/#include "NewListItem.hpp"
    
    #include #include #include #include #include #include #include #include 
    
    using namespace bb::cascades;
    
    NewListItem::NewListItem(ListView * listView) : CustomControl(0){ this->listView = listView; QmlDocument *qml = QmlDocument::create("asset:///CustomRowNewsList.qml").parent(this); root = qml->createRootObject(); m_newsName = root->findChild

    It also seems that you have an incorrect class here.  You are detailNews method is in your ApplicationUI class, but you are trying to call on the ListView, not your ApplicationUI object.

    I recommend having a read through our documentation of signals and Slots , which should help you to achieve what you're trying to do.

Maybe you are looking for

  • Extend the Running Log-model

    Hello! A few months ago one began the race connect you that comes with numbers for iOS. I really like it, it's super easy to use and it gives me a lot of Nice information about my progress. I especially like the chart that illustrates the variation i

  • Satellite A135-S4666 - cooling fan turns on and turns off every 20 seconds

    Hello I'm from the Argentina... I just bought a new Satellite A135-S4666 and I noticed that the cooling fan turns on and turns off every 20 seconds.It is a little annoying and it disctracts me of what I'm doing... is there a solution? Thank you very

  • Y at - it a x 86 version of the patch KB2852386 for Server 2008?

    I want to run the cleaning utility disk with the updated Windows Cleanup option selected, according to the https://support.microsoft.com/en-us/kb/2852386.   My winsxs folder is too big I have an old 32-bit machine running Server 2008 SP2.  But he has

  • How can I manually turn on my screensaver in Windows 7

    In Windows XP, it was quite simple create a shortcut on your desktop to manually turn on your screen saver. I don't see how to do the same thing in Windows 7

  • Think BlackBerry Smartphones to do a unlocked ATT PRIV

    Hello I'm looking into a unlocked ATT PRIV (am on TMO U.S.) and a few questions. After much googling, it seems that if I get a PRIV ATT unlocked online, it will come with Lollipop. Assuming that I am capable of properly updated OTA to MM will I still