Persistent componement definition data

Hello

I use a definition of componnement of unlimited entry of object in my application, but when the application is near, all objects are deleted. I use some QSettings to store a lot of data, but how to keep a container?

So this is an example of my application:

hand. QML

page{
    container{
        id: root

        textField{
           id: input
        }
        button{
            text: "add"
            onClicked {
                 var createdControl = new.createObject();
             root.add(createdControl);
             createdControl.text = input.text
            }
        }
    }
    attachedObjects: [
         ComponentDefinition {
             id: new
             source: "new.qml"
         }
     ]
}

and with another qml file, I add what I want.

I just have this when I open the app, it'll be the same previous in the root container.

Hi all and thanks for your reply!

I found my answer on a sample here

This is a sample Blackberry app and they use serialization to store objects.

bool FileStorage::serializeDataModel(int lastID, GroupDataModel* model, QDataStream* stream)
{
    // This is a simple serialization function.
    // For more info on dealing with complex types,
    // or incorporating file versions see "Serializing data type in Qt"
    // http://qt-project.org/doc/qt-4.8/datastreamformat.html
    bool addedData = false;

    *stream << lastID;
    if (stream->status() == QDataStream::Ok) {
        for (int i = 0; i < model->size(); i++) {
            Person *person = (Person *) model->children()[i];
            *stream << person->customerID() << person->firstName()
                    << person->lastName();
            if (stream->status() != QDataStream::Ok) {
                return addedData = false;
            }
        }
        addedData = true;
    }

    return addedData;
}

Tags: BlackBerry Developers

Similar Questions

  • RT construction specifications: category of component definition does not

    Hello

    I use LabVIEW 2013 SP1 f2, with real-time 13.0.1

    When I open the properties page of a build specification Application in real-time (to run on a cRIO-9075) and select the category of component definition, I find that the following occur:

    -LabVIEW unresponsive and think for a while. It takes about 20-30 seconds to finally display the component definition page.

    -When I click on create a component definition file (.cdf), nothing happens. As I write this, I see 'required software components', and then they are grayed out: "The software component Description" and "Software version" - but there is nothing to choose or change?

    -If I click on another category, it takes in the order of 20 seconds to finally see the establishment of this category.

    -To close the build specification (press OK), it also takes a long time (more than 60 seconds).

    -Things are fine with the construction specifications if I ever fall into the category of component definition.

    Everyone knows this?

    Any help would be appreciated.

    Hey Chris,

    I believe that the next patch is the solution you're looking for.

    LabVIEW Real-time Module 2013 SP1 Application Builder Patch details

    http://digital.NI.com/public.nsf/allkb/D72B45C6905D327A86257CC800547992?OpenDocument

    There is a link to download the patch at the bottom of this page.

    Kind regards

    Ryan

  • Deploying an application by using a component definition file does not work (cRIO 9035 - LV2015)

    Hello
    I created an application for the cRIO 9035 only in real-time with the component definition file, but when I try to deploy with MAX, I don't see the application - MAX has the dialog add/remove software standards. The files are created in the folder "National Instruments\RT Images\User Components".
    I was able to do with cRIO 9068 in the past with no problems. Do you know what I'm missing?
    I want to sent build files to a colleague from another place so it can deploy on a similar system without me having to create a large image with the wheel for every little change in the code.
    Thank you!

    Hello, Lucien.

    What you describe is actually a known problem with the cRIO-903 x family. It is already a CAR on the same subject when I won't be able to give you a deadline for a solution, it is already handled by R & D. The number of CAR is 545686, so if you see a bug in trouble with that number in a future version, it means, it was fixed.

    Unfortunately, currently there is no workaround solution identified, so the only way to get the application running on any cRIO-903 x is either by pushing through a project, or deploy an image (this is what we are trying to avoid the definition of the component).

    Kind regards

  • Set the date value pick for a component of Date of entry.

    Hello

    Am using jdeveloper 11.1.1.6.0

    I slipped and fell to choose Date and Date component.

    When my user selects the vale of the ChooseDate component, it must be included in the component of Date of entry.

    Could someone help me pls?

    Kind regards
    Prasad K T,.

    Hello

    Take a look at the property of chooseId: http://docs.oracle.com/cd/E23943_01/apirefs.1111/e12419/tagdoc/af_inputDate.html

    Frank

  • Component definition

    I'm looking from a book example code. A symbol is called from the library and used on the stage. The class seems dynamic as a reference to a variable called cardface appears anywhere in the file (fla STRICT value). When debugging, the variable does not exist until the line where it is used. After that, the variable can be seen. I think to myself that the library "Definition of the component" option would allow me to set the variable so that it is available in the class. Unfortunately, there is no indication in the help on that system. I have to constantly search to try to get help (not yet found). Why Adobe don't gives us this indispensable aid - i.e. the use of their dialog boxes? I'm a fan of Flash (AS3) but there is a part of the still painfully inadequate system.

    Pointers would be appeciated.

    You can assign the default value of the variable in the component definition dialog box, but you must initialize the variable in your class definition and you define what's this variable in your class definition.

  • Manipulate the properties of component definition

    Currently I have containers that are separate pages in main.qml

    pages: main.qml, CustomContainer.qml

    Page {
      CustomContainer{
         id: myCustomContainer
      }
    
    }
    

    I want to use this

    Page {
      attachedObjects: [
        componentDefinition: {
           id: myCustomContainer
           source: "CustomContainer.qml"
        }
      ]
    
    }
    

    I want to make the definitions of component so I can destroy them when not used however

    I don't know how to access the properties of CustomContainer subsequently

    Here are some examples of how I do now

    Page {
      CustomContainer{
         id: myCustomContainer
      }
    
      onSomePropertyAliasChanged: {
    
      }
    }
    

    or

    myCustomContainer.somePropertyAlias = somethingNew
    

    Although more sense, you should be able to access the standard way, if for example alias property in the component of property you want to edit and navigate through the object you created...

                            myPage.source = "Custom.qml";
                            var page = myPage.createObject();
                            page.myProperty = "test";
    
    // Custom.qml
    
    Page {
        property alias myProperty: lab.text
    
        Label {
            id: lab
            text: "Replace me"
        }
    }
    
  • best component of data to deal with the mysql table

    Hello.

    I have an LMS (learning management system) with a lot of info in a mysql with a few tables dbb. I also use a lot of php.

    They said data flash components are not the best in the world so what do I do?

    Partyman said I should use Flex data components as they were built for this sort of thing and are much more powerful. So where can I get me one of those for the IE: do I have to download something that I only have Flash Cs5.5. So how this component in flash?

    Or would it be better to use a third-party plugin for display of the tables. Someone mentioned that excel and the PivotTable is amazing and simple.

    At the end of the day, I want to also customers can see a dashboard.

    Oh, and I missed the other parts of your post.

    There is no silver bullet in AS3 in terms of getting data unless your application is made in the AIR. If your applications are webgame - you must always write the data on the server layer to return with subsequent SQL queries feeding the data components.

    As far as databases Excel vs goes, DBs are much more powerful than the storage and data recovery facilities.

  • Reminders do not persist beyond the date of end in lightning. Error or design?

    Reminders do not reappear after having reached the date of "END". Other programs of the calendar, I used keep reminding until the user manually terminates it.

    This is a mistake of lightning or this is normal behavior?

    Currently using:
    TB 31.0b2
    3.3B1
    Vista

    You set the repeat appropriately? In lightning, you will need to define an event to repeat to infinity and ending.

    It seems quite reasonable to me; I guess it's mostly a matter of terminology.

    My calendar is full of repeat events; reminders to change passwords, take out the trash, attend renewals, anniversaries, birthdays etc. So yes, he can do events that recur indefinitely.

    Why you run a beta version?

  • field definition date...

    Hi all

    I installed Oracle 10 g version 1 server and I set up a couple of tables.
    I was able to create all the tables with content except one.
    With this last table I encounter the following error.

    To give a better explanation of the situation as a whole, I surround of everything that I did.

    -I first created a table named sessions:
    SQL-> is invites it that I use to enter my DDL and DML commands

    SQL >
    (Sessions) CREATE TABLE
    SNO SMALLINT NOT NULL,
    sdate DATE NOT NULL,
    sins_pno SMALLINT NOT NULL,
    sloc_cono SMALLINT NOT NULL,
    sroom TANK (8) NOT NULL,
    sorg_cono SMALLINT,
    skind char (1) NOT NULL,
    sincomes DECIMAL (9, 2) NOT NULL,
    s tank (1),
    s_cid tank (4) NOT NULL
    );

    -Were asked to describe the table to give you a preview of the table;
    SQL > describe sessions;

    output:

    Sessions TABLE
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    SNO NOT NULL NUMBER
    SDATE NOT NULL DATE
    SINS_PNO NOT NULL NUMBER
    SLOC_CONO NOT NULL NUMBER
    SROOM NOT NULL CHAR (8)
    NUMBER OF SORG_CONO
    SKIND NOT NULL CHAR (1)
    SINCOMES NOT NULL NUMBER (9.2)
    S CHAR (1)
    S_CID NOT NULL CHAR (4)

    -I then changed the setting of the sdate

    SQL > ALTER SESSION SET NLS_DATE_FORMAT = 'YYYY-MM-DD ";

    output:
    Modified session.

    -I wanted to and then insert the following line into the table

    SQL >
    INSERT INTO sessions VALUES (1, ' 2005-01-12', 1, 3, 'C', 3, 'p', 4730.00, NULL, '7850');

    output:

    ORA-01861: literal does not match the format string




    Details:
    INSERT INTO sessions VALUES (1, ' 2005-01-12', 1, 3, 'C', 3, 'p', 4730.00, NULL, '7850')
    Error on line 1
    ORA-01861: literal does not match the format string

    Issues related to the:
    -What I am doing wrong?
    There's something that I am missing?
    -Need information more?

    Kind regards

    Herman

    I do not know what is happening here, it seems strange, but try to the following syntax:

    INSERT INTO sessions VALUES ( 1 , date '2005-01-12' , 1 , 3 , 'C' , 3 , 'p' , 4730.00 , NULL , '7850' ) ;
    
  • Send the property in the component definition

    I have an object attached with a webview on my page qml

    attachedObjects:]

    {ComponentDefinition}

    ID: statPortalDef

    {Page}

    string urlString property

    WebView {}

    ID: webView

    URL: urlString

    }

    }

    }

    ]

    I'm trying to create and define this webview url with the following

    statPopUp = statPortalDef.createObject)

    activePane.push (statPopUp)

    statPopUp.urlString = ""http://google.com " "

    But set the urlString always breaks the code. Does anyone have advice on how I can accomplish sending my url in the attached webview?

    try to add "var" in front of statPopup to make a local variable that is accessible.

  • Data acquisition component

    I am writing my first app Measurement Studio DAQ but the model NI DAQ component not available under PROJECT > add new item.

    -Execution of Visual Studio 2008 with VB and Measurement Studio Professional 2009.

    It seems that I do not have access to the DAQ Assistant of Measurement Studio.

    Download

    More ms-help://MS. VSCC.v90/MS. VSIPCC.v90 / NOR. MeasurementStudio.2008/DAQIntegration/XML/Create_NET_DAQ_Component.html

    1. Open the project in which you want to create a component of data acquisition. ... Ok
    2. "SELECT project ' add a new item to launch the add new item dialog box.  ... Ok
    3. In the categories pane, select Visual Basic components if you use Visual Basic .NET. Select Visual c# project items , if you are using Visual c#.  ... NO... "Visual Basic items" is not part of the list of categories
    4. In the Templates pane, select OR DAQ component... Not available in the models pane

    Help, please!

    -David

    Hello Panorama,

    After installing Measurement Studio, OR-DAQmx have you installed?  If so, you should make sure that the Measurement Studio for VS2008 component is selected to be installed.  You can select the custom Setup option to check this setting.

    Kind regards

  • Destroy the definition component qml in c ++ destructor

    I install some components, but they can only be destroyed if the application will be closed.  Currently, a mistake is cause attesting that they are not made when the application is closed.

    What I am unsure of is how to reference the alias or objectname to a definition of compoenent in c ++ and then destroy it.

    ApplicationUI::~ApplicationUI()
    {
      // Destroy the sound manager.
        ComponentDefinition *myDef = bb::cascades::Application::instance()->findChild("myDef");
            qDebug() << "Destroying Definition";
            myDef->destroy();
    }
    

    Only, I was not able to find how to link the component definition in c ++ because it doesn't have a #include<>

    If not, is there something in qml who inform me just before the application closes, so can I do this?

    Normally, you can solve it by setting the parent of all objects you create in your definition. The parent must be something that you know will be destroyed when your application is closed, as the app itself class.

    I don't think you should look for ComponentDefintion but because it's just a factory for components, you do not create. You should rather look for the type of object that creates the definition.

    Also, do you you know that some objects of Cascades don't clean up after them properly and may generate errors no 'no' even if you do everything right. Why don't post it your console error messages because it can help you get an answer better than this one.

    slashkyle wrote:

    I install some components, but they can only be destroyed if the application will be closed.  Currently, a mistake is cause attesting that they are not made when the application is closed.

    What I am unsure of is how to reference the alias or objectname to a definition of compoenent in c ++ and then destroy it.

    ApplicationUI::~ApplicationUI()
    {
      // Destroy the sound manager.
        ComponentDefinition *myDef = bb::cascades::Application::instance()->findChild("myDef");
            qDebug() << "Destroying Definition";
            myDef->destroy();
    }
    

    Only, I was not able to find how to link the component definition in c ++ because it doesn't have a #include<>

    If not, is there something in qml who inform me just before the application closes, so can I do this?

  • Delete a dynamic component created with QML?

    Hello

    How can I keep the reference to the created object, for example to remove it later.

    In the example below the reference "createdControl" is stored in a local variable of Manager 'onClicked' and is not accessible afterwards.

    It is not possible to use a property of the container to store, because then I need to specify a data type (curiously its possible to store it in a javascript imported the file into a variable typless...).

    Therefore this reference seems to be pretty useless at the moment, or did I miss something?

    Thank you.

    Container {
        id: rootContainer
        Label  {
            text: "Example Component Definition"
        }
        Button  {
            text: "Click to create dynamic component"
            onClicked :  {
                // Create the component and add it to the Container
                var createdControl = compDef.createObject();
                rootContainer.add(createdControl);
            }
        }
        attachedObjects: [
            ComponentDefinition {
                id: compDef
                source: "test.qml"
            }
        ]
    }
    

    OK, the right kind of data is 'variant', sorry, I searched for an hour, just found

  • Date field (not not mandatory) causing an error... Please help!

    Hello, I'm a beginner when it comes to ColdFusion could someone please help with this question?

    I have a field date in my application which is not necessary, I want that the users have the choice to leave this field blank.

    Here's a breakdown of what I have in progress:

    On the add/edit page:

    < component cfinvoke = 'test '.

    method = 'get '.

    ReferenceNumber = '#URL. "RefIDNum #

    returnvariable = "record" >

    < cfset ThisIsTheDateField = DateFormat (record. ThisIsTheDateField, ' MM/DD/YYYY') >

    < cfform action = "process.cfm" >

    < cfinput type = "Text".

    name = "ThisIsTheDateField".

    value = "" #ThisIsTheDateField # ""

    message = "ThisIsTheDateField must be a valid date."

    required = "no".

    validate = 'date '.

    validateAt = 'onSubmit '.

    size = "50".

    MaxLength = "10" >

    On process.cfm:

    < name cfinvokeargument = "ThisIsTheDateField."

    value = "#DateFormat (FORM." ThisIsTheDateField) #">"

    On the SWC's Page:

    <!--> method arguments

    < cfargument = "ThisIsTheDateField" name

    Type = "date".

    required = "no".

    Hint = 'Field ThisIsTheDateField' >

    The value for this field of application:

    #CreateODBCDate (ARGUMENTS. ThisIsTheDateField) #.

    The error I get is:

    Error occurred while processing request

    The THISISTHEDATEFIELD argument passed to the add function is not of type date.

    If the component name is specified as a type of this argument, it is possible that a file of the component definition is not found or is not accessible.

    The error occurred in E:/site/test.cfc: line 56

    54:

    55: <! - add a record - >

    56: < cffunction = name 'Add '.

    57: returntype = "boolean".

    58: index = 'add record' >

    I need a way to make this field accepts empty input... when I leave the field blank, I get the error above.

    Thank you!


    ear,

    If you want to use an optional argument in your function, you must be able to check whether or not a value for the argument had passed.  Use IsDefined ("arguments. ThisIsTheDataField') for its determination:

    Looks like you can also consult the documentation on Coldfusion functions here (http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7ff3.html).

  • Get the response time data VI

    Hi guys,.

    I am trying to use CD get time response data VI my VI. When I choose the pair of input-output, I can get the response data determined by the digital input to the output value. However, I need more of a pair of response data. I try to use the list of input-output, but there is no output data and response time of the VI with table 1 d of numbers.

    My question is how to use the CD get time VI data response with the list of inputs-outputs configuration? Thank you.

    Hey, Shapiro,.

    I think the problem is you have two 0 items in the above table for you will be out this definition data twice. Let me know if this does not solve the problem for you.

Maybe you are looking for

  • Is 'Report spam' in iMessage a real connection?

    This is my first time see "sender is not in your contacts list. Adverse report ". Is this an iMessage real feature?

  • How to use Air Print to my Canon prinnter

    When my son bought me A printer, back to the end of June, beginning of July the printer works fine But now the printer will not sync with my IPAD? no idea why?

  • Google shortcuts 2.1.8.2.1 plugin resets to default

    I'm on Firefox 38.0.5 and all of a sudden yesterday that my most used plugin - shortcuts google 2.1.8.2.1 - reset default. I added my custom buttons back in and used it on the rest of the day - opening and closing firefox several times. So this morni

  • I have iPhotos on external hard drive, but can not read on my Yosemite

    My old mac is 2008 updated to lion. All my photos are on iPhoto and I was saving to external hard drive. My new computer which has the Photo can not read the photos. Is it possible without downloading to my computer.  My computer's OS X El Capitan 21

  • Ready remote NAS simply stopped to show my files

    I've been using ReadyNAS Remote for years on my Android phone and an iPad - now it connects, or so it seems, but I show nothing - no directory structure, no file - it just stopped working. I reinstalled software/applications on both devices - NOTHING