Complete ArrayDataModel QML and filling data in ListView

Hello

the filepicker, I get the file + the path to a file. Now I extracted the path and the name of the file to the string «selectedFile»

Now, I want to add these two channels to an ArrayDataModel, which displays the data in a listview, the file name as the title and filepath as description.

Here is my code:

// Main.qml

ListView {
  id: listview

  dataModel: ArrayDataModel {
    id: theDataModel
  }

  listItemComponents: [
    ListItemComponent {

      StandardListItem {

         title: ListItemData   <------------------ here I want to display the filename
         description: "filepath"   <-------------- and here I want to display the filepath
         imageSource: "asset:///images/icon.png"

[...]

onFileSelected: {  selectedFile = selectedFiles[0];  [...]    var filepath = *a string*    var filename = *a string*    theDataModel.append([filename, filepath]); <-------------- how can I add the two strings correctly to the datamodel?}

What my code for the time when I take a file is that it adds two items to the list the first file name as title the second filepath as a title.

How to manage to give the file name-path to the datamodel so that I can read both of them and put them in the view list?

// Main.qml

ListView {
  id: listview

  dataModel: ArrayDataModel {
    id: theDataModel
  }

  listItemComponents: [
    ListItemComponent {

      StandardListItem {

         title: ListItemData.name       <---------------------------------------------------|
         description: ListItemData.path  <-----------------------------------------------|
         imageSource: "asset:///images/icon.png"                                              |
                                                                                                                        |
[...]                                                                                                                  |
                                                                                                                        |
onFileSelected: {                                                                                             |
  selectedFile = selectedFiles[0];                                                                     |
  [...]                                                                                                                |
    var filepath = *a string*                                                                              |
    var filename = *a string*                                                                            |
    theDataModel.append([filename, filepath]); <----------- how do I add the strings correctly so that I can us them in the list
}

Hello!

For the arrayDataModel, I suggest you use this

data var = {}
'name': name of file,.
'path': filepath
}

theDataModel.append (data);

If you still have a problem, let me know!

Simon

Tags: BlackBerry Developers

Similar Questions

  • complete the loop and get data

    I need to acquire the acquisition values of data every x seconds. Waiting in the loop of data acquisition is defined so that the next N samples are acquired after x seconds. Pressing stop the loop of consumer DAQ stops after the sec x which is connected to the wait function.

    1. how to stop the inner loop immediately when you press a stop?

    I also write acquired samples after doing some calculations on the samples.

    1. plan of sample of the queue to file consumer loop. Is there any other recommendations such as drop loop is not without samples? How many data can an expectation of the queue?

    Thank you.

    sonotk,

    You've missed the point. Rather than having a 5000 milliseconds of wait, use an expectation of 100 ms and count the number of times that you have been waiting for 100 ms.  When the count reaches 50, sample and start the count again.

    The counter is just in the shift register containing an integer. Inside the while loop you have a box structure. Test the shift count register to see if it is 50. If set to True, use the real case of the structure of the case. Inside, it's all in your loop except waiting and the logic of the judgment. In the case of false, you add 1 to the shift register and wait 100 ms.

    Looking at your picture code once again, it seems that the shift with TempData and VoltData regsiters are not necessary because you never use the data previous iteration on the left side.

    Ranjeet,

    Make a simple VI with two loops and some expectations.  Run with execution highlighting market to see what is happening.  It is a good learning tool.

    Lynn

  • [Explanation necessary] Clears the listview data and fill it again with new data

    Hello

    I correctly filled a listview in c ++, data analysed and does interesting things with it. However, I am drunk stumbling, unable to find a way delete and repopulate my display of the list...

    Question 1:

     

    1. How can after I insert data in the list view, I clear the list data and run again the same method (init) who populated the list view with the data in the first place?

    Here are the docs that I referenced and I don't understand how to implement the methods in my code.

    QList - clear() method

    https://developer.BlackBerry.com/Cascades/reference/QList.html#clear

    Using the data access Code, example
                              
    data_access/using_data_source

    GroupDataModel - Clear()

    https://developer.BlackBerry.com/Cascades/reference/bb__cascades__groupdatamodel.html#clear

    CODE

    Here is my code - filling of the display of the list of C++ and display of data in a ListView.

    MyApp.cpp

    MyApp::MyApp(bb::cascades::Application *app)
    : QObject(app){
        // create scene document from main.qml asset
            // set parent to created document to ensure it exists for the whole application lifetime
            QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
                AbstractPane *root = qml->createRootObject();
                qml->setContextProperty("yoyo",this);
                //grab references
                list_view = root->findChild("listView");
    
                // set created root object as a scene
                app->setScene(root);
    
                mNetworkAccessManager = new QNetworkAccessManager(this);
                bool result = connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*)));
    
                 Q_ASSERT(result);
                 Q_UNUSED(result);                 json = new QFile("data/file.json");
    }
    
    void MyApp::init(){
        QNetworkRequest request = QNetworkRequest();
         // i call some service here
         mNetworkAccessManager->get(request);
    }
    
    void MyApp::requestFinished(QNetworkReply *reply){
        qDebug() << reply->error();
        qDebug() << reply->errorString();
        if (reply->error() == QNetworkReply::NoError) {
            qDebug() << "No error";
    
                    QByteArray data = reply->readAll();
    
                    if (!json->open(QIODevice::ReadWrite)) {
                        qDebug() << "Failed to open file";
                        return;
                    }
                    json->write(data);
    
            bb::data::JsonDataAccess jda;
            QVariantMap results = jda.loadFromBuffer(data).toMap();
                    QVariantList lst = jda.loadFromBuffer(data).toList();
                GroupDataModel *m = new GroupDataModel();
                       m->insertList(lst);
                       m->setGrouping(ItemGrouping::None);
                       if(list_view) list_view->setDataModel(m);
    
        }else{
            showDialog("Boo",reply->errorString());
        }
    }
    

    MyApp.hpp

    // Tabbed pane project template
    #ifndef MyApp_HPP_
    #define MyApp_HPP_
    
    #include 
    #include 
    #include 
    #include 
    #include 
    #include 
    
    namespace bb {
    namespace cascades {
    class Application;
    }
    }
    namespace bb {
    namespace data {
    class Application;
    }
    }
    
    /*!
     * @brief Application pane object
     *
     *Use this object to create and init app UI, to create context objects, to register the new meta types etc.
     */
    class MyApp: public QObject {
    Q_OBJECT
    public:
        MyApp(bb::cascades::Application *app);
        virtual ~MyApp() {
        }
        Q_INVOKABLE
        void init();
    private slots:
        void requestFinished(QNetworkReply *reply);
    private:
        QNetworkAccessManager *mNetworkAccessManager;
        QNetworkRequest *request;
        QFile *json;
        bb::cascades::ListView *list_view;
    };
    
    #endif /* MyApp_HPP_ */
    

    hand. QML

    import bb.cascades 1.0
    
    Page{
    Container {
                            background: Color.White
                            ListView {
                                id: listView
                                preferredHeight: maxHeight
                                objectName: "listView"
                                listItemComponents: [
                                    ListItemComponent {
                                        type: "item"
                                        Container {
                                            Container {
                                                Label {
                                                    text: ListItemData.id
                                                }
                                            }
    
                                        }
                                    }
                                ]
                                onTriggered: {
                                    console.log("selected_index: " + indexPath)
                                }
                                horizontalAlignment: HorizontalAlignment.Center
                                verticalAlignment: VerticalAlignment.Center
                            }
    
    }
    }
    

    Question 2:

    How reference to the ListView object with the name "listView" in different parts of the MyApp.cpp file? Is there anything else I should add to the header file to make the accessible listView?

    Question 3:

    What happens when you call the clear() method? How the data model is affected? How the user interface is affected? What happens in memory?

    Question 4:

    How do you verify that the data in the list has been deleted so that you can go ahead and fills again with new data? What is the cheque that I perform?

    I would also like to know how you manage multiple views of lists and data sources in your applications. Best practices or ideas?

    Thank you

    I was able to clear the listview with the following code, if anyone is interested.

    listView.dataModel = null
    

    The dataModel must be set to "null".

  • Complete dataModel with CustomObjects and show in a ListView

    Hey all,.

    I created a class with properties.

    Now, I want to add this class objects to a DataModel and view the properties of a ListView.

    A simple example:

    class CustomClass
    {
       QString name;
       QString age;
       QString something;
    }
    

    I create the ListView in Qml, set listItemComponents.

    ListView
    {
        id: list
        objectName: "list"
    
        dataModel: ArrayDataModel {}
    
        listItemComponents:
        [
            ListItemComponent
            {
                Container
                {
                    id: itemContainer
    
                    Label { Text: itemContainer.ListItem.data.name }
                    Label { Text: itemContainer.ListItem.data.age }
                }
            }
        ]
    }
    

    in c ++, I use findchild to get the ListView.

    Now the problem starts, I don't know how to get my items into the datamodel.

    You can only add QVariants to the model.

    So, I tried to create a QVariant and used its setValue() function to add my CustomClass object.

    But when I run my application, I get the error: could not assign [undefined] QString and no data is displayed.

    If I assign the String (itemContainer.ListItem.data) to the Label.Text, is to see my class classname, then objects seem to be there.

    I also tried to set the property as Q_PROPERTYS and used Q_DECLARE_METATYPE() but nothing works.

    Maybe someone has an idea what im doing wrong.

    Gretings.

    Hello

    I have a solution for you. I created a simple class:

    class CustomElement : QObject {
    
        Q_OBJECT
    
    public:
        CustomElement(QObject* parent);
        virtual ~CustomElement();
    
        QString getCode();
        QString getName();
    
        void setCode(QString aCode);
        void setName(QString aName);
    
    private:
        QString code;
        QString name;
    };
    

    Adds a listView QML:

    ListView {
                objectName: "list"
               listItemComponents: [
                       ListItemComponent {
                          //type: "listItem"
    
                           Container {
                               id: itemRoot
                               Label { text: ListItemData.code }
                               Label { text: ListItemData.name }
                           }
                       }
                   ]
            }
    

    And defines the appearance of the items in the list with ListItemComponent. A single list item contains 2 labels. A code and a name.

    Side of C++, I first initialize a CustomElement QList *.

    In header:
    QList list;
    
    In cpp:
    
    for (int i = 0; i < 20; i++)
        {
            CustomElement* element = new CustomElement(this);
            element->setCode(QString::number(i));
            element->setName("name " + QString::number(i));
    
            list << element;
        }
    

    And here comes from the 'magic '. If you don't want to use Q_Properties, the best option that you have is QVariantListDataModel. You can directly assign this class to the model of the listView. Definition:

    #include 
    
    bb::cascades::QVariantListDataModel listModel;
    

    You must complete this object with QVariantMap objects. I'll show you how:

    QVariantMap map = QVariantMap();
    
        for (int i = 0; i < 20; i++)
        {
            map["code"] = list.at(i)->getCode();
            map["name"] = list.at(i)->getName();
    
            listModel << map;
        }
    
        ListView* listView = root->findChild("list");
    
        listView->setDataModel(&listModel);
    

    This code snippet is started after these lines:

    // set created root object as a scene
        app->setScene(root);
    

    Thus, QVariantMap can contain the name of a property and its value too.

    So the filling with data is very simple.

    I tested and works like a charm

  • Update of the completion Date and the Date of booking

    I have a question regarding completion dates and the dates of reservation.

    If we have an online class that the learner is part of 01/01/2011 and ends on 01/01/2011.

    The user then goes back on 01/07/2011 and follows the course again that it does not refresh the completion date.

    If a new class is created under the same courses and the same offering and the user is part of the new class it auto fills the date of completion of the previous registration.

    How do some work around that?

    Thank you!

    Hi Mike,.

    For online courses that are not certifications, the completion date is still on the first date that the user completed the course. Once it's done, it's done, no matter how many times the user going in and going through the content again. You might look attempt data if necessary to see all attempts of the user and the State of each such attempt is "gross" as described by the content.

    What problem are you trying to solve?

    Scott
    http://www.seertechsolutions.com

  • Create a ListView in QML and then use it in C++

    Hi all, I've been struggling with QML and C++ integration for some time now.

    I'm at a point where I need a ListView in my application.

    Is it possible for me to create a ListView with its ListItemComponent and DataModel in QML and then use it in my code c ++?

    If so, a kind enough to provide a code sample on creating a QML object and then use it in c ++?

    Thank you very much

    Hey jayvd, there is a "CallaPizza" example call, the documentation links to the example is in the following link

    http://BlackBerry.github.IO/Cascades-samples/callapizza.html

    and you can download the example from github.

    In this example, they use a list written on QML the datamodel is managed on a C++ class, so you can use these same aproach to solve your problem. On the other hand, the propouse of Kanaksony solution might also work, you must have a reference to the object (qml) that contains the ListView, and then find the listView object, using the findChild method, once you have the reference to the list, you get access to all methods of properties.

    Cordially, Cristian.

  • Can I evaluate and fill out a form with data from a custom data object?

    I'm not a developer, but I'm trying to find as much information for my web team so they can implement this for me.  We use the E10.

    I have some information for the contacts stored in a data object custom I want to use for pre-population information access door and in another form.  For example:

    1. User enters his email address into a form and hands
    2. A search and contact and custom data object (CDO)
      1. If the contact has a CDO with the required information, he fills the following form with the information
      2. If the contact does not have the required ORDER, it displays information and a link to the place where to go next

    Is it possible, and where should I direct my developers learn more about treatments?

    Richard

    Hi Richard,

    You can certainly do so using data for the Eloqua Web search (Setup > data Web Look Ups). A database search allows you to request data stored in Eloqua, bring up the page and with a few JS, we determine if they will go on track 1 or 2 you described above.

    Is that an advanced feature requires knowledge of HTML and JS. Here is a good article on data search that should help:

    Using the Eloqua Cookie to customize your Web site

    If you have any specific questions, our support team is very familiar with this feature and can help to solve problems or answer specific questions.

    -Andrew.

  • Ligtroom 6 best, I will describe my problem once the hour 1. After 4 weeks, I get the message "trial version Ligtroom 6 expired 2. You will be asked to fill out my license number 3. After completing the restart and get the message "error 16" 4. Never

    Ligtroom 6
    Better, I will describe my problem once right
    1. always after 4 weeks, I get the message "trial version expired Ligtroom 6a
    2. you will be asked to fill out my license number
    3. After completing the restart and get the message "error 16".
    4. all again manager install Adobe again and install this once again repeated problem Ligtroom each month can ensure that this stops my version is a purchased official version
    Now repeat the problem after only 4-5 days!
    Caveat! I'm not a computer specialist are not too complicated solution

    Since this is an open forum, not Adobe support... you must contact Adobe personnel to help

    Chat/phone: Mon - Fri 05:00-19:00 (US Pacific Time)<=== note="" days="" and="">

    Don't forget to stay signed with your Adobe ID before accessing the link below

    Creative cloud support (all creative cloud customer service problems)

    http://helpx.Adobe.com/x-productkb/global/service-CCM.html

  • Loading XML data in ListView of C++ after extraction of http data

    I'm sorry did searh but could not find any refrence related to my problem
    I am trying to load the xml data returned from a web service HTTP Post QNetworkRequest and QNetworkReply in c ++.

    My XML that gets donwloaded is as

    
     http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://tempuri.org/">
      
        tu7652
        F
        Marry
        Wijaya
      
      
        23
        F
        Marry
        Wijaya
      
    
    

    In My QML, it comes to the ListView can say SearchResult.qml

    ListView {
              objectName: "resultlist"
              dataModel: feedsdatamodel
              listItemComponents: [
                ListItemComponent {
                            type: "item"
                            PeopleListItem {
                                name: ListItemData.givenName + ", " + ListItemData.sn
                                role: ListItemData.ExtFunction
                                leftPaddingText: 40
                            }
                        }
               ]
            }
     attachedObjects: [
           // The data model that contains the content of a XML file
            GroupDataModel {
                id: feedsDataModel
                sortingKeys: [
                    "givenName"
                ]
                grouping: ItemGrouping.None
            }
        ]
    

    PeopleListItem.qml

    import bb.cascades 1.0
    
    Container {
        property alias name: titleLabel.text
        property alias role: functionLabel.text
        property alias leftPaddingText: textcontainer.leftPadding
    
        layout: StackLayout {
            orientation: LayoutOrientation.TopToBottom
        }
        preferredWidth: 768
        preferredHeight: 135
        Container {
    
            id: textcontainer
            topPadding: 10
    
            layout: StackLayout {
                orientation: LayoutOrientation.TopToBottom
            }
            Label {
    
                id: titleLabel
                textStyle.base: SystemDefaults.TextStyles.TitleText
                textStyle.color: Color.Black
            }
            Label {
                id: functionLabel
                textStyle.base: SystemDefaults.TextStyles.BodyText
                textStyle.color: Color.Gray
            }
        }
        Divider {
            verticalAlignment: VerticalAlignment.Bottom
        }
    }
    

    This is the function I'm using to display the QML it is called from main.qml and works correctly.

    void PeopleFinder::onSearchClicked() {
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\t" << "begin";
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\tfname:"
                << m_fname << "\tlname:" << m_lname;
    
        // Create a network access manager and connect a custom slot to its
        // finished signal
        mNetworkAccessManager = new QNetworkAccessManager(this);
    
        // create a data model with sorting keys for lastname and firstname
        Q_ASSERT(
                connect(mNetworkAccessManager, SIGNAL(finished(QNetworkReply*)), this, SLOT(requestFinished(QNetworkReply*))));
    
        //Load the bew QML file of Search from here
        QmlDocument *qml = QmlDocument::create("asset:///SearchResults.qml").parent(
                this);
        qml->setContextProperty("peoplefinder", this);
    
        Page *mypage = qml->createRootObject();
        qml->setParent(mypage);
        qDebug() << "PeopleFinder::PeopleFinder::onSearchClicked::\t s444444";
    
        // Retrieve the activity indicator from QML so that we can start
        // and stop it from C++
    //  mActivityIndicator = mypage->findChild("myIndicator");
    
        // Retrieve the list so we can set the data model on it once
        // we retrieve it
        mListView = mypage->findChild("resultlist");
    
        mNavigator->push(mypage);
    }
    

    Once the page loads in the QML it call the launch request providing c ++ file and once the
    query is completed under function is called with the data. I checked that data are downloaded properly

    void PeopleFinder::requestFinished(QNetworkReply* reply) {
        qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                << "response received";
        // Check the network reply for errors
        if (reply->error() == QNetworkReply::NoError) {
    
            // Open the file and print an error if the file cannot be opened
            qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                    << "No error";
    
            // Write to the file using the reply data and close the file
            QByteArray xml = reply->readAll();
            qDebug() << "Data: \n" << xml;
    
            // load the xml data
            XmlDataAccess xda;
            QVariant list = xda.load(xml, "ArrayOfPeople");
    
            qDebug() << "List:::\n" << list;
    
            GroupDataModel *datamodel = (GroupDataModel*)mListView->dataModel();
            // add the data to the model
            datamodel->clear();
            datamodel->insertList(list.value());
            datamodel->setSortingKeys(QStringList() << "givenName" << "sn");
            qDebug() << "PeopleFinder::PeopleFinder::requestFinished::\t"
                    << "Datamodel set size:: " << datamodel->size();
    
            // Set the new data model on the list and stop the activity indicator
    
        } else {
            qDebug() << "\n Problem with the network";
            qDebug() << "\n" << reply->errorString();
        }
    }
    

    But now, the real problem begins as in how to convert QByteArray data type of QVariantList which can be loaded into the datamodel
    I don't want to write the data to the XML file and then pass that as a list his will is very slow, once I move test environment to the production environment.

    Please help me solve this problem

    I got it to work using xml parsing with QXmlStreamReader

  • QML and C++ integration

    I have a problem with QML and C++ integration.

    I have second attached to hand qml (next to main.qml):

    attachedObjects: [
                 ComponentDefinition {
                        id: dataPage
                        source: "dataPage.qml"
                    }
                ]
    

    When the subject is raised in the listview, this page is pushed in navigationPane:

    onTriggered: {
             var selectedItem = dataModel.data(indexPath);
                 var page = dataPage.createObject();
                  page.name = selectedItem.title;
                  navigationPane.push(page);
                                }
    
    ApplicatonUI::ApplicationUI(bb::cascades::Application *app):QObject(app)...dataPageqml = QmlDocument::create("asset:///dataPage.qml").parent(qml);
    dataPageqml->setContextProperty("pageC", this);
    ...}
    
    void ApplicationUI::processChoice(){
         Page *page = dataPageqml->createRootObject();
         page->setProperty("label", "New text");
    }
    

    DataPage.qml I call onCreationCompleted to call the processChoice() function:

    Page {
        id: page
        onCreationCompleted: {
            pageC.processChoice();
        }
        property string name
        Container {
            WebView{
                horizontalAlignment: HorizontalAlignment.Fill
                minHeight: 700.0
                maxHeight: 700.0
    
            }
            Label{
                id: lb
                objectName: "label"
                text: page.name
            }
        }
    }
    

    In this case, I want to change the text in the label, but nothing happens.

    What I am doing wrong?

    Ty for answers.

    Change

    QML-> setContextProperty ("INAC", this);

    TO

    QmlDocument::defaultDeclarativeEngine()-> rootContext()-> setContextProperty ("INAC", this);

  • connect and read data from the windows host's Web site

    Hello, I have a Web site hosted by windows server with SQL server, I want to create an application to read all about me and write in the listview. When tcoh each title in the listview opens a new .qml window or call to view or order specific goodbye data thereon in the mode list. like .aspx

    you would need a server component that uses the data, for example a web service soap or json.

  • very simple custom DataModel derived from bb::cascades:DataModel will not display data in ListView

    Hello

    A model of custom data in C++, I did nothing appears in a ListView

    It seems that the link

    listView.dataModel = _dataModel

    on QML side don't ask the DataModel data. I'm not really sure what I'm doing wrong.

    PS. Place the CustomDataModel in QML as an attachedObject and insert data it works, but I have a specific need to keep the DataModel in C++.

    Below the example of code reduced to the simplest case which cause me problem:

    //customdatamodel.h
    
    #include 
    #include 
    #include 
    
    class CustomDataModel : public bb::cascades::DataModel
    {
    Q_OBJECT
      public:
        CustomDataModel(QObject * parent=0) : bb::cascades::DataModel(parent)
        {
        }
        virtual void ~CustomDataModel()
        {
        } 
    
        virtual int CustomDataModel::childCount(const QVariantList& indexPath)
        {   //just one level deep
            return 0;
        }
    
        virtual bool CustomDataModel::hasChildren(const QVariantList& indexPath)
        {
            return childCount(indexPath) > 0;
        }
    
        virtual QVariant CustomDataModel::data(const QVariantList& indexPath)
        {
            if (indexPath.count() == 1)
            {
                return m_values[indexPath[0].toInt()];
            }
            return QVariant();
        }
    
        void CustomDataModel::insert(const QVariantMap &item)
        {
             m_values.append(item);
             emit itemAdded(QVariantList() << m_values.count()-1);
        }
    
        private:
          QVariantList m_values;
    }
    
    //application.cpp
    
    ApplicationUI::ApplicationUI(bb::cascades::Application *app)
    : QObject(app)
    {
        qmlRegisterType("app.datamodels", 1,0, "CustomDataModel");
        QmlDocument *qml = QmlDocument::create("asset:///main.qml").parent(this);
    
        CustomDataModel *dataModel = new CustomDataModel(this);
    
        QVariantMap map;
        map["field"] = "value1";
        dataModel->insert(map);
    
        map = QVariantMap();
            map["field"] = "value2";
        dataModel->insert(map);
    
        map = QVariantMap();
        map["field"] = "value3";
        dataModel->insert(map);
    
        qml->setContextProperty("_dataModel", dataModel);
    
        AbstractPane *root = qml->createRootObject();
        app->setScene(root);
    }
    
    //main.qml
    
        Page {
            Container {
                layout: DockLayout {
                }
    
                ListView {
                    id:listView
                    dataModel: _dataModel
    
                    function itemType(data, indexPath)
                    {
                        if (indexPath.length == 1)
                        {
                            return "item";
                        }
                    }
    
                    listItemComponents: [
    
                        ListItemComponent {
                            type: "item"
                            StandardListItem {
                                title: ListItemData.field
                            }
                        }
                    ]
                }
            }
        }
    

    Hello
    You always return a zero childCount, so he thinks that the template is empty.

  • Quick question from a newbie... Can I use an API of the Adobe Reader to open and fill out a PDF form to my MFC application?

    Hello people.

    If I'm in the wrong forum, might well want to suggest a more appropriate forum?

    It is a pretty basic question.

    I downloaded the SDK and watched, but I'm still a little uncertain. Simply because there is a ton of information to this site, and it's all new to me.

    I have a Visual Studio MFC application. (Visual Studio 2008)

    I want to change the application to read a PDF form to fill out, and I want to programmatially fill in some of the data in the field as it appears on the screen. This could be considered writing a PDF file, but I think it's only complete, because I can do this with Acrobat Reader. I assume that there is an API available to do this.

    I saw something on IAC, then maybe that where I need to study.

    I'm the developer. I need to buy Adobe Acrobat? Or is the right drive for this?

    My customers will need to purchase Adobe Acrobat? Or the drive will be enough?

    It's one thing for me as a developer to buy the tool to improve enforcement, but another question, if I go to the end users and tell them that they need to buy and install Adobe Acrobat.

    I'm not afraid to have a discussion, I just want to know ahead what debate, I need to have.

    Are there different APIs available for different Windows OS? One for XP for Vista 32-bit, one for Vista 64-bit, for Windows 7... etc.

    Or is this the same way, regardless of the platform?

    I'm looking for advice.

    All would be appreciated.

    Thank you

    The only way to fill a form in Adobe Reader is to use the file in FDF or XFDF format.   They are text-based formats that you can put the form data and a link to the PDF document in and then ask the REader to open it (and the associated PDF file) upwards and fill automatically.

    You can't poll drive for more information, however.

  • Prob w/Importing Favorites and other data from Internet Explorer

    Everything by following the steps described in the forum article titled "Importing Favorites and other data from Internet Explorer" after completing step 3, select which points to import, if I select all the option or just the Favorites, I get the same error "Firefox has stopped working... close the program."

    I am importing of IE 8 on laptop Win7 OS. I tried importing every time and cannot get past this error. I made an export of IE8 that takes the form of a html file that there is apparently no option in Firefox to use.

    in Firefox:
    Bookmarks > organize bookmarks-> import and backup - import HTML... = HTML file

  • Year (date) and Month (date) "YYMM" in number.

    In the column 'G' I use the formula = month (date)

    In the column 'H' I use the formula = year (date)

    Is it possible to use the formula above to create a "YYMM' as the column 'I '?

    Column 'G and H' will be deleted if the column 'I' is the work.

    Hi LV.

    Here is an example of use of Numbers ' 09. The first method (in column (C) is feasible in 3 numbers; the second is maybe not.

    Columns C and D are left in the default auto format (and alignment).

    Column C, automatically align left, excerpts from the last two formatted numbers Year() then extracts and oncatenates the last two digits of a string built consisting of two zeros & the number Month() one or two. The result is a text string of four digits, as shown.

    C2 and filled down: = RIGHT ((B), 2 YEAR) & RIGHT ("00" & MONTH (B), 2)

    Column D simply copies the string Date and time of B and displays it by using a custom format, showing that the two-digit year & the monthnumber double-digit.

    D2 and filled down: = B

    Custom format for the cells D2 - D8:

    Kind regards

    Barry

Maybe you are looking for