OS5 HTML5 gear - openDatabase fails - undefined database

Hello..

Today, I tried to create a simple widget with intervention from the database. I started with reading a few articles on the blackberry developer pages and found some interesting resources. Especially since the support gear was abandoned with OS6.  Widgets my future must run on OS5 OS6 devices, so I followed the instructions to support the gears using HTML5 in the BlackBerry Widget applications.

After reading a few things about this Api WebSQL, I tried to create a little Gizmo, which stores a simple text input in the database. I tried the WebSQL Code in my browser (Opera) normal and it worked, but not when I test it in the BlackBerry Simulator.

I created my widget as described in the tutorial "how to avoid recompiling a BlackBerry Widget during development.

In my widget, the "openDatabase" call fails, even if this function exists. I tried to get the error with a try-catch block information, but the call fails "silently". After investigating this feature (display its content in a textarea component) I found creating a database object in a try-catch block.

When I try to create these objects in database for me, it throws the following exception: ReferenceError: "Database" is not defined.

You have any ideas?

I use the widget in a Curve 8520 Simulator, OS Version 5.0.0.50 9, Version 2.13.0.97 Simulator.

If you would like more information, please ask!

Thank you for your help and I hope that my English is not too bad. (It is not my native language)

Here is my html and javascript code:




    Test
    
    
    
    
    
    




You simulate a SD card inserted in the Simulator?  A SQLite database on 5.0 must either be stored on a card inserted SD or built in the MEM card.  Built in card MEM is only on storm devices and 9000 "BOLD".

If you simulate a SD card on your curve Simulator, the database must be created

Tags: BlackBerry Developers

Similar Questions

  • Clone fails - auxiliary database listener running but not no projection in LSNRCTL

    Hello

    I'm a DBA again working with databases Oracle 11.2.0.2 on Solaris.

    With RMAN, I'm trying to clone a database of production of server1 to the database of test on server2. The RMAN process fails with the error: RMAN-04006: auxiliary database error: ORA-12528: TNS:listener: all appropriate instances are blocking new connections.

    When I look at the auxiliary database (test), it is up and running, I can't tnsping it. However, under the heading 'lsnrctl services' I noticed that the corresponding listener is missing... even though when I check the running processes using ' ps - ef | grep LSNR", I can see the process.

    I can start and stop the listener for this database successfully, but it is still not listed under lsnrctl show or lsnrctl services. The entry for this database in the listener.ora file corresponds to the exact same format as other listeners of DB on the same server that display correctly.

    The use of generic names, the entry is:

    LOGGING_LSNR_XXXX = OFF

    LSNR_XXXX =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP (PORT = 1529))(HOST = server2))
    )
    )
    )

    SID_LIST_LSNR_XXXX =
    (SID_LIST =
    (SID_DESC =
    (GLOBAL_DBNAME = XXXX.domain.LOCAL)
    (SID_NAME = XXXX)
    (ORACLE_HOME = u01/app/oracle/product/11.2.0.2/dbhome_1)
    )
    )

    TRACE_LEVEL_LSNR_XXXX = OFF

    Our previous DBA is not available for assistance.

    I would greatly appreciate any ideas or advice.

    Thank you.

    user13258951 wrote:
    I've renamed the listener.ora and stopped and restarted the listener, wait a minute, as you suggest. All databases on the server, but two appear in the commands below. One of the two that does not appear is the database in question. Is this provides additional clues? Thank you.

    It suggests to me that two missing databases have a value assigned to their 'LOCAL_LISTENER' init parameter, pointing to the non-standard port.

    It gives to think that the missing DBA has tried to look at things and created an environment unnecessarily complex.

    A single listener, with the default name for LISTENER, using the default port of 1521 is quite capable of--indeed, was designed for - several databases of several versions of several ORACLE_HOMEs service. Try to "name" a listener or put it on a default undefined port does nothing but confuse those who come behind.

    But I digress from the topic of your immediate problem. Return the listener.ora file, restart your receiver. Then note what JohnWatson said about the way of lsnrctl commands addressed to this non-standard listener.

    Published by: EdStevens on 8 may 2013 14:23

  • The use of HTML5 to access a local database

    I'm working on an application that will need to access information from a database.

    I would like to inculde a database sqllite as part of my installation file and use html5 to search this database file and present the data in it to the user. Is it possible to deploy an application like that?

    To improve the user experience, I don't want to save the data in an xml file, scan this file and load the data into a database local html5.

    There are several options, but I personally find it's very convenient.

    In a JavaScript file, lets call it 'data.js', that I would define the content you want to import.

    Branches of var =]
    {'id': 135, 'name': 'Chicago', 'widgets': 5493},.
    {'id': 217, 'name': 'Los Angeles', 'widgets': 5443},.
    {'id': 491, 'name': 'Waterloo', 'widgets': 9544},.
    ...
    {"id": 854, 'name': 'Orlando', 'widgets': 2834}
    ];

    And then when your page loading, store these data in the D

    {DB.transaction (Function (TX)}
    Var branch = null;
    for (var i = 0; i)<>
    Branch branches = [i];
    tx.executeSql ("INSERT INTO branches (id, name, widgets) VALUES (?,?,?)", ")
    [branch.id, branch.name, branch.widget]
    );
    }
    });

    adjust according to your names of tables/columns, of course, but I find a JSON format as simple is easier to import from.

    See you soon,.

    Steve

  • RC-00126: inventory update failed during database cloning

    Hi gurus,

    I need help on the below question.

    I am cloning the Oracle Applications 11.5.10.2 with 10.2.0.4 on HP-UNIX and I use the # 230672.1 metalink note.

    I'm under Appendix B, according to the note.

    The database and the earpiece is down and ran

    Perl adcfgclone.pl dbtechStack


    LASRD [hct431oracdd001] [10g/app/oracle/product/10.2.0/lasrd/appsutil/clone/bin] > perl adcfgclone.pl dbTechStack
    Enter the password [APPS] APPS:
    Apps

    First create a new context for the cloned system file.
    The program will ask you for information on the new system:


    Provide the values required for the creation of the new context database file.

    You want to use a virtual host for the node name target (y/n) [n]? :

    The target is an instance of Real Application Cluster (RAC) (y/n) [n]:

    Name of target system [LASRT] database: LASRD

    User Oracle BONES [oracle]:

    Target directory RDBMS ORACLE_HOME [10g/app/oracle/product/10.2.0/lasrm]:/10g/app/oracle/product/10.2.0/lasrd system

    List of available directories target system utl_file [usr/tmp]:

    Number of DATA_TOP on the target [4]:

    Target system DATA_TOP 1 [+ LASR/lasrt/onlinelog]: + LASR/lasrd/onlinelog

    Target system DATA_TOP 2 [+ FLASH/lasrt/onlinelog]: + FLASH/lasrd/onlinelog

    Target system DATA_TOP 3 [+ LASR/lasrt/tempfile]: + LASR/lasrd/tempfile

    Target system DATA_TOP 4 [+ LASR/lasrt/datafile]: + LASR/lasrd/data file

    You want to preserve the display set to localhost: 10.0 (y/n) [o]? :

    Executable location perl is defined as:
    / bin/perl

    You want to keep the values of source on the system system port target (y/n) [o]? :

    Context of clone uses the same mechanism of pool of port as quick installation
    After selecting a basin of the port, Clone context will validate the availability of port.

    Enter the number of the port pool [0-99]:


    Database port is 1524

    Backup of /10g/app/oracle/product/10.2.0/lasrd/appsutil/LASRD_hct431oracdd001.xml to /10g/app/oracle/product/10.2.0/lasrd/appsutil/LASRD_hct431oracdd001.xml1.bak

    Create the new file of database context of:
    /10G/app/Oracle/product/10.2.0/lasrd/appsutil/template/adxdbctx.tmp

    The new context of database file was created:
    10G/app/Oracle/product/10.2.0/lasrd/appsutil/LASRD_hct431oracdd001. XML

    Logfile located at /tmp/CloneContext_0308050816.log

    Clone of fast running with the command:
    Perl /10g/app/oracle/product/10.2.0/lasrd/appsutil/clone/bin/adclone.pl java=/10g/app/oracle/product/10.2.0/lasrd/appsutil/clone/bin/... /JRE mode = apply... component stage=/10g/app/oracle/product/10.2.0/lasrd/appsutil/clone/bin/ = dbTechStack = dbctxtg=/10g/app/oracle/product/10.2.0/lasrd/appsutil/LASRD_hct431oracdd001.xml contextValidated = true showProgress CUSTOM method

    Early RDBMS House apply - Mar Mar 8 17:10:46 2011
    Logfile located at /10g/app/oracle/product/10.2.0/lasrd/appsutil/log/LASRD_hct431oracdd001/ApplyDBTechStack_03081710.log


    Completed apply...
    Kill Mar 8 17:12:44 2011

    APPSDB_LASRD beginning of central inventory record...

    ORACLE_HOME NAME: APPSDB_LASRD
    ORACLE_HOME PATH: /10g/app/oracle/product/10.2.0/lasrd
    Location of inventory in /var/opt/oracle/oraInst.loc by
    Logfile located at /u01/app/oracle/oraInventory/logs/OracleHomeCloner_03080512.log

    ERROR: Failed to save... Check the log file.

    You can restart this recording with the following script:
    /10G/app/Oracle/product/10.2.0/lasrd/appsutil/out/LASRD_hct431oracdd001/regOUI_APPSDB_LASRD.sh

    The departure LASRD database listener:
    Running:
    /10G/app/Oracle/product/10.2.0/lasrd/appsutil/scripts/LASRD_hct431oracdd001/addlnctl.sh start LASRD

    You are running version 115.8 addlnctl.sh

    Logfile: /10g/app/oracle/product/10.2.0/lasrd/appsutil/log/LASRD_hct431oracdd001/addlnctl.txt

    From process to listen LASRD...


    LSNRCTL for Solaris: release 10.2.0.4.0 - Production on March 8, 2011 17:12:48

    Copyright (c) 1991, 2007, Oracle. All rights reserved.

    From /10g/app/oracle/product/10.2.0/lasrd/bin/tnslsnr: Please wait...

    TNSLSNR for Solaris: release 10.2.0.4.0 - Production
    System settings file is /10g/app/oracle/product/10.2.0/lasrd/network/admin/LASRD_hct431oracdd001/listener.ora
    Log messages written to /10g/app/oracle/product/10.2.0/lasrd/network/log/lasrd.log
    AMT-01151: lack listener name, LASRD, listener. ORA

    Listening port could start. See the above error messages...


    addlnctl.sh: leave with the State 1


    Error:
    ===
    I got the error

    Location of inventory in /var/opt/oracle/oraInst.loc by
    Logfile located at /u01/app/oracle/oraInventory/logs/OracleHomeCloner_03080512.log

    ERROR: Failed to save... Check the log file.

    Log file:
    ----------
    Local record Oracle Home, located in /10g/app/oracle/product/10.2.0/lasrd in the central stock oracle
    RC-00126: inventory update has failed.
    null
    Asked by oracle.apps.ad.clone.util.OracleHomeCloner


    Thank you.

    Refer to the documentation mentioned above.

    Thank you
    Hussein

  • Exchange of 2013 database checksum failed.

    When the verification of checksum for data bases will start on my exchange server, it runs VERY slowly (currently running for 9 hours and has more than 3 to go) and fails on several databases. Some are successful.

    System.AggregateException: One or more errors occurred. ---> System.AggregateException: one or more errors occurred. ---> Replay.Core.Contracts.Exchange.ChecksumChecks.ChecksumCheckFailedException: checksum verification failed for database '.edb F:\Region 900 - Executive (ex2013) \Region 900 - Executive (ex2013) ' with '486' incompatibilities of checksum at Replay.Core.Implementation.Exchange.ChecksumChecks.ExchangeDatabaseChecker.ThrowChecksumCheckfailedExceptionIfErrorLimitReached () at Replay.Core.Implementation.Exchange.ChecksumChecks.ExchangeDatabaseChecker. <> cDisplayClass2.b0 () at System.Threading.Tasks.Task.Execute ()---end of inner exception stack trace - at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken, cancellationToken) at Replay.Core.Implementation.Exchange.ChecksumChecks.Jobs.DatabaseChecksumCheckJob.CheckDatabase () at System.Threading.Tasks.Task.Execute () - end of inner---> System.AggregateException (Inner Exception #0) exception stack trace: one or more errors occurred. ---> Replay.Core.Contracts.Exchange.ChecksumChecks.ChecksumCheckFailedException: checksum verification failed for database '.edb F:\Region 900 - Executive (ex2013) \Region 900 - Executive (ex2013) ' with '486' incompatibilities of checksum at Replay.Core.Implementation.Exchange.ChecksumChecks.ExchangeDatabaseChecker.ThrowChecksumCheckfailedExceptionIfErrorLimitReached () at Replay.Core.Implementation.Exchange.ChecksumChecks.ExchangeDatabaseChecker. <> cDisplayClass2.b0 () at System.Threading.Tasks.Task.Execute ()---end of inner exception stack trace - at System.Threading.Tasks.Task.Wait (Int32 millisecondsTimeout, CancellationToken, cancellationToken) at Replay.Core.Implementation.Exchange.ChecksumChecks.Jobs.DatabaseChecksumCheckJob.CheckDatabase () at System.Threading.Tasks.Task.Execute ()---> (Inner Exception #0) Replay.Core.Contracts.Exchange.ChecksumChecks.ChecksumCheckFailedException: checksum verification failed for database '.edb F:\Region 900 - Executive (ex2013) \Region 900 - Executive (ex2013) ' with '486' incompatibilities of checksum at Replay.Core.Implementation.Exchange.ChecksumChecks.ExchangeDatabaseChecker.ThrowChecksumCheckfailedExceptionIfErrorLimitReached () at Replay.Core.Implementation.Exchange.ChecksumChecks.ExchangeDatabaseChecker . <> cDisplayClass2.b0 (System.Threading.Tasks.Task.Execute ())<><>

    I saw an article in tech on a similar issue with Exchange 2013 that had me change the registry (support.software.dell.com/.../127986), but that doesn't seem to help.

    Any ideas what I can check why the checksum fails? I also disabled the mountability control because it took MUCH too long and interfere with other work. Not sure if this is related or not.

    The Reg is step 2, step 1 have you tried?

  • openDatabase problem with O.S. 6 simulators

    I use the following code

    var Dataset = function() {}
    This.Database = null;
    this.currentData = null;
    this.onTransact = null;
    this.onDataLoaded = null;
    try {}
    Alert ('a')
    If (window.openDatabase! = "undefined") {}
    Alert ('b');
    try {}
    This.Database = window.openDatabase ('trinisceneapp', ' 1.0', 'gallery', 50 * 1024, function () {alert ('ok open') ;}); ")
    Alert ('cc');
    () This.Database.transaction
    function (c) {alert('c');
    c.executeSql ("CREATE TABLE IF NOT EXISTS cache (key unique int, unique uri text, json text)", [], function () {alert ('ok create') ;});})
    }, function() {alert ('ok tx')}; function() {alert ('fail tx') ;})} ;
    Alert ('SD')
    } catch (e) {}
    Alert ('fail');
    }

    } else {alert ('fail b') ;}}
    } catch (e) {}
    Alert ('failed to open the database');
    }
    };

    a simulator of O.S. 6 9780.

    the performance of a var d = new Dataset(); the code does not work after alert ('b');

    IF I run this code on a simulator of O.S. 5 8520 code will run successfully

    What is the problem with 6 O.S. and openDatabase... I thought it was a HTML5 / feature OS 6?

    Car simulator! device = real. It is not specific to the RIM is: no mobile simulators are not enough for the final testing. They are just not quite representative of the actual device. They are narrow, often very close, but I guarantee that you will always find new bugs not known on a simulator, and the Simulator will not always behave as a real device. It's just the nature of the simulation.

    It is easier said than done, but you really need to test on devices real as much as possible before the production.

  • WebWorks development: several generations for OS5 OS6

    Hello

    I'm developing an application using WebWorks and I would like to know if it is possible to have multiple versions of the application according to the version of the operating system?

    Indeed, I first started developing the application in OS6 and I see that there are a few changes to OS5 (HTML5).

    App World allows him to push more files *. next version of cod?

    Thank you

    Philippe

    In the supplier portal, you can select which versions of OS file applies to.

  • Gears - error when you try to insert values into a table with multiple columns

    Hello

    I started playing with the gears and SQlLite today and I get an error when I try to insert values into a table with multiple columns.

    I have:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text, DeveloperAge int)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?, ?)', [devName, devAge]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I get the error:

    net.rim.device.api.database.DatabaseException; insert into developers values (?,?): SQL logic error or missing database.

    I use this reference: http://code.google.com/apis/gears/api_database.html

    Everything works if I have only one field as:

    var db = google.gears.factory.create('beta.database');
        db.open('developerSet');
        db.execute('create table if not exists Developers (DeveloperName text)');
    
        var devName = "Davy"
        var devAge = 32;
    
        try {
            db.execute('insert into Developers values (?)', [devName]);
            alert('success');
        }
        catch (e) {
            alert(e);
        }
    

    I use the plug-in Visual Studio 2.0 for 2008 that are running Windows XP SP and Simulator 2.13.0.56

    Thank you

    Davy

    Yes, a SQLite database will persist between battery pulls.  The database is registered either to internal MEM or removable media (not the device memory), depending on which is available on your device.

    In general, its not considered a best practice to remove your table as soon as it is empty and re - create it again when you want to add data.  This adds extra overhead fresh for the final, delete and insert first for a given table.  Instead, define and finalize your drawing before you create your table.  Once created, review the static schema.

    That being said, for development purposes, it may be easier to provide an easy way to drop your tables while you develop your schema.

    See you soon,.

    Adam

  • with a 2 drive formatting issues to WD cannot format passed 1 TB (931 gb)

    I have a problem of formatting with my new 2 Terabyte Western Digital Drive using Windows tools (computer management: storage: disk management)

    I am running Vista Ultimate 32 bit SP2 all patches current
    ASUS P5NSLI MB (award bios) bios is more recent (1801) of the site of ASUS
    Western Digital Caviar Green WD20EADS is 2 TB drive

    I can't format beyond the point of 1 TB if I do formatting in windows full it stops at 54% and crashes if I do a formatting quick I get an IO error. I've already replaced the drive once through new eggs. the replacement drive is having the exact same issues. full format stops at 54% or quick format gives me a failure.

    If I partiion drive (usually get mistakes of e/s through the windows Disk Manager) I can create a partion of 1 TB and sucessfully do a quick format. Player appears to sucessfully read and files right. I made several transfers of multi GB files to this partion sucessfully. However the rest of 1 TB is not able to be formatted or partitioned through the windows. I get an IO error every time. I also tried to expand the disk through windows unsucessfully, it will not alow me or to increase the 1 TB storage. (931 GB).

    try a different aproach I downloaded the WD diagnostic tools executed through vista and they always give me an error "cable" in vista. I replaced the cables 2 x just to dismiss it as a problem. (I ran other readers on this port sata very well with the same cables).

    I also used what seems to be successfully using gparted (linux) to format the drive to NTFS. GParted reported a success on the format, but look in windows it usually shows as a drive of 1 MB for some reason any. tweak in windows, that I managed to access a partition of 1 TB. The part funny though when I express this partition to its maximum, this is where things get weird. The reader in vista Disk Manager displays as a 1963,1 GB disk but look through 'My computer' its only shows a 931 GB drive empty.

    I'm at my wits end trying to figure this. I made many calls to western digital and Asus to see if it is a bios issue or a conversation about drive failure nearly goes like this. Western Digital blamed the bios, Asus gripe with vista.

    Can someone help me?

    See this discussion on the gaming PC from HP, the final post on page 2 forum:

    http://www.thenextbench.com/HPG/board/message?board.ID=desktops&thread.ID=7453&view=by_date_ascending&page=2

    -----------
    I have just solved this problem for my HP Blackbird PC and am now able to easily partition and format a new Seagate 2 TB internal hard drive of 32-bit Vista running on this PC.

    The solution was to update my drivers Nvidia 680i chipset, available in a package update of Nvidia, not through normal driver of Microsoft and pages of OS update as much as I know.  See the above URL for more details.

    I had already tried using a stand-alone and formatting utility drive partition and even if I could create and do a quick format of the drive 2 TB, it would still fail software database to hard drive diagnostics, falsely showing hard drive looking for errors.  Also, when I ran the Windows chkdsk/f/r half of the hard drive has been marked as containing bad sectors, which later proved to be false.  After the update of the driver, no material errors are produced and no large number of defective sectors found.

    It's a problem of confusion since it seems due to disk problems hard or maybe a Vista problem.  Actually, I only update my SATA controller driver, which is Nvidia nForce 680i driver in my case.  NVIDIA has a web page with a script that will scan your PC and tell you what you need to update, for the GPU and their nForce chipset SATA hard drive controller drivers.

    Seagate also has a page to discuss the need to update the nForce drivers, which can be true for drivers of other manufacturers.

    http://Seagate.custkb.com/Seagate/CRM/selfservice/search.jsp?docid=206391&NewLang=en&HiLite=

    I hope this information is useful.

  • My CD will not eject

    I just burn the music to a CD with itunes and when it was done I took it out and put it back to test. all the songs were there and I tried to remove it to make the next cd (I was doing the audio CD and there were 29 songs) but it would not eject. no lights when I pressed the button or anything (I'm using a toshiba laptop with a compact disc DVD player rewritable ultra-high speed). I also tried the eject button on iTunes and nothing happened

    Hi Tarn25,
    There are reasons a little DVD tray in your laptop can not open when you click on the eject button. The worst thing if the engine or the gear train failed, which would mean to replace the drive. If the disc in the drive is OK, you know the power and connector are fine. If this isn't the case, you should try to replace the drive in the Bay. It is also possible for the reader to be locked in the software by operating system, or a system of management of power to have cut the power to the car. Check these by right clicking on the drive icon and checking the properties or watching you power settings management. But when all else fails and you can't get the disc from the drive, there's always THE MIGHTY TROMBONE.

    Start by unfolding one leg for most of a paper clip diameter that can fit into the hole on the front of the player. Then insert it directly into the hole and if you're lucky, there will bee a small click before it goes very far, and the tray ejects a fraction of an inch.

    Let me know if you still experience this issue.

    Martin
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • License terms for SQL Server

    Gina

    (If you want the split to its own thread, which might be a good idea)

    It would be GREAT if you could follow someone on the SQL License req. Full budget for a SQL lic is breaker budget for many people. And others want to simply add another instance / overhead to SQL existing production installs so those who are outside also.

    It would be great if we could get some reasons why change suddenly. For example all old dos (5.3 times if not OLD) said use Express because the SQL instance was not active. In fact, here's a copy of the old Appassure documentation of web.archive

    http://Web.archive.org/Web/20130122023709/http :// www.appassure.com/support/KB/sql-licensing-requirements-for-core-instances-within-appassure-5/

    We spent around this issue since the year / month and no ONE will answer any information, they just changed the docs and no excuse why (I guess that its because Microsoft says you did wrong) but if there is a problem, it would be great if we were told.

    Here are some of the old threads on this issues

    http://Forum.AppAssure.com/topic/full-version-of-SQL-required-for-attachability-checks/page/8

    http://Forum.AppAssure.com/topic/quick-SQL-question

    The Express of SQL version works very well. We run it on multiple cores (lab) and we use it to protect the SQL DB well above the limit of 10 GB (I tested with a DB GB 800 filled with garbage from test) the ceiling of the DB Express is not serious in the ability to fix because the DB is only mounted, not written to. All entries to a plu 10 GB DB would fail using SQL express, but it can mount them very well (see Web.archive article for more information)

    So now, we are here alone, with no information. If the issue is with Microsoft license, is an acceptable Express version as long as the DB is less than 10 GB (for licenses, not technical issues) if there is a problem with SQL Express, please tell us

    Thanks Gina

    Hi Wes,

    Indeed, on 5.3 versions had a problem with false positive mimesis controls (this is why mimicry control completed successfully with SQL Express). For now, this problem is solved and mimicry checks will fail for databases with size more than 10 GB if you are using SQL Express (it is as expected due to the limitation of SQL Express).

    Thank you

    Anton Kolomiiets.

  • Accident app: "all discussions of WebKit for this process have been closed.

    Hi bbdevs,

    develop a webworks app that uses the

    watchPosition()
    

    function.

    During the function watchPosition is active my app breaks down.

    This happens on a Z10 where my app is installed in debug mode.

    I use SDK Webworks 1.0.4.11 and bbUI.js 0.9.6.131.

    The 'watchPosition()' function calls a function where I do a little database to insert on the devices websql.

    This also works well - what app is backgrounded.

    Before the application blocks the last thing that has happened is a successful insertion of data to the database. That's what says my console.log.

    For better debugging, I installed the Momentics IDE (from the tools of waterfalls) and attached to the device via ssh.

    With the command 'slog2info w', I see more balls then in my browser chrome (thanks to ΕΚΚΕ for this great tip!).

    Happening in the slog before the app crahes:

    Apr 05 14:06:15.042      webkit_launcher.233201698               webkit      0  All WebKit threads for this process have been shut down.
    Apr 05 14:06:15.063      webkit_launcher.233201698               webkit      0  WebKit graphics for this process has been shut down.
    Apr 05 14:06:15.134      webkit_launcher.233201763               webkit      0  Received unexpected connection death 1073741825 from parent process! Exiting...
    

    A few minutes ago, I found this in the journal too:

    Apr 05 14:04:58.440      webkit_launcher.233201698               webkit      0  Thread 5: responding to low memory
    Apr 05 14:04:58.440      webkit_launcher.233201698               webkit      0  Thread 7: responding to low memory
    Apr 05 14:04:58.440      webkit_launcher.233201698               webkit      0  Thread 1: responding to low memory
    Apr 05 14:04:58.441      webkit_launcher.233201763               webkit      0  Thread 4: responding to low memory
    Apr 05 14:04:58.441      webkit_launcher.233201763               webkit      0  Thread 1: responding to low memory
    Apr 05 14:04:58.441      webkit_launcher.233201763               webkit      0  Thread 6: responding to low memory
    Apr 05 14:04:58.441      webkit_launcher.233201763               webkit      0  Thread 14: responding to low memory
    Apr 05 14:04:58.446      webkit_launcher.233201698               webkit      0  Thread 4: responding to low memory
    Apr 05 14:04:58.619      webkit_launcher.233201763               webkit      0  Thread 3: responding to low memory
    

    For more information:

    It's my SQL Transaction, which is called by the watchPosition function:

    database = window.openDatabase('mydbname', '', 'my Database', 1 * 1024 * 1024);
                try {
                    database.transaction(
                        function (tx) {tx.executeSql('INSERT INTO tbl_gps (lon, lat, alt, acc, altacc, head, speed) VALUES (?, ?, ?, ?, ?, ?, ?)',
                            [posData.coords.longitude, posData.coords.latitude, posData.coords.altitude, posData.coords.accuracy, posData.coords.altitudeAccuracy, posData.coords.heading, posData.coords.speed],
                            function (tx, res) {
                                onInsertSuccess = true;
                                console.log('Data insert into Table GPS Data Successfully');
                            },
                            function (tx, err) {
                                onInsertSuccess = true;
                                showToast("ERROR - DB INSERT Trail GPS Data - code: "+err.code+", message: "+err.message, "OK", 60000);
                            });
                        }
                    );
                 } catch (err) {
                     console.log('There was an Error during database transaction! '+err.message);
                 }
    

    Someone at - it an idea for this problem resolved? I'll be happy on any comment to bring me a little bit forward to make this work.

    Thank you in advance to all those who have read this thread... and thanks much for any tip!

    Lars.

    Hi adam,.

    Thank you for your message. I tested a lot last weekend and after hours and hours, I figured out more details on this memory problem.

    First of all:
    It was not a problem of database :-)
    The database transaction is accidentally the last only asynchronous thing happens. But the reason for the crash of the app is another.

    I also draw a line on the map with each update location.  I use openlayers for this feature. When the application is in the background, it seems that there is a problem with openlayers.

    I found a solution for this problem:

    I store my data to the line in a table when the application is backgrounded - when he returns to the foreground I take the data in the table and draw the line again.

    When I get the error again - hope not, of course - I'll open a subject in jira.

    Thanks also to luca for a brainstorming!

  • Output of widget with red button.

    Hello

    This blackberry.app.event.onExit (handleExit) function does not work when we exit the widget with the red button.

    Is there another function to intercept this event?

    If I use the red button to leave my application when I reopen it the application, I got a "file system (12) error" error when I do that:

    Private = google.gears.factory.create('beta.database');
    _db. Open ('notesBase');

    Any idea?

    Thanks in advance

    The (red) end call button will not end an app.  He moves to the background.

    If you want your 'handleExit' method that is called when the user clicks on this button, register you the handler in your application:

    blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_ENDCALL, handleExit);
    
  • ListBox or TreeView can store dynamic localization of objects/items?

    Example of

    The code below a few lists selected layers and clicking on an element triggers the point name.

    Below triggers code layer/article name undefined as it does not store the dynamic location of the object.

    Is it possible to store the dynamic location of the object/item in the list. ???

    Another way to do the stuff below?

    function buildUI (thisObj) {}

    var myPanel = (thisObj instanceof Panel)? thisObj: new window ('pallet', 'Gear of Stress', undefined, {resizable: true});

    myPanel.win = myPanel.add ('Committee', [0,0,400,300], 'list');

    myPanel.win.listb = myPanel.add ('ListBox', [0,0,100,200]);

    myPanel.win.but = myPanel.add ('button', [110,50,160,90], "listit");

    var myProjectFolder = app.project.rootFolder;

    var myLayers = app.project.activeItem.selectedLayers;

    var StoreAry = [];

    var myLocalLoc = myProjectFolder;

    {myPanel.win.but.onClick = function ()}

    for {(i in myLayers)

    myPanel.win.listb.add ('item', myLayers [i]);

    }

    }

    {myPanel.win.listb.onChange = function ()}

    Alert (myPanel.win.listB.Selection.Name);

    }

    Return myPanel;

    }

    var myToolsPanel = buildUI (this);

    I want to create a selection set of layers of different compositions and if possible save the selection set for later use would be great.

    What you described works with what you typed here

    var myLayers = app.project.activeItem.selectedLayers;

    var StoreAry = [];

    for {(i in myLayers)

    StoreAry.push (myLayers [i]);

    }

    Store the objects in the layer in a table will allow you access to them later in the same project as the user session has not changed these indices of layer. If the user adds / removes a layer once you have saved the layer opposes a table, then the table becomes invalid. You need to check that the array elements are still valid by doing a loop through them one by one, making sure that they 1. There are 2. There's still the layer even somehow.

    A possible solution is to create an array of objects that contains the layer obj and string data for the listbox control.

    var StoreAry.push ({"layerObj": myLayers [i], 'layerObjStr':myLayers[i].name});})

    In this way, you can use the string to your listbox and still have the layer object referred to. If the for a listbox item onDoubleClick event is triggered, you can use the ListBox to loop the string in your StoreAry and finds a match. Then treat the object layer associated with your code. You can use anything other than the name of the layer as it may not be unique, but that's the general idea.

  • How to change the size and color of 'staticText '?

    Can anyone share please how to change the size and color of the object "staticText"?

    function buildUI (thisObj) {}

    var myPanel = (thisObj instanceof Panel)? thisObj: new window ('pallet', 'Gear of Stress', undefined, {resizable: true});

    var txt is myPanel.add ("staticText", [0,0,100,20], "txt");.

    txt. newFont, fontSize, color?

    Return myPanel;

    }

    var myToolsPanel = buildUI (this);

    I did a quick test on a PC at the office and it seems that Gill without isn't a stock PC police. You could comment on these out or change them to a police stock as Helvetica or something. Once I removed that it has launched on PC very well.

Maybe you are looking for