Loop link detected for the property "previewImage" how to solve?

Hello

I'm periodiacally to receive the following error message:

Asset:///controls/DisplayResultsNavPages.QML:118:25: SearchResultsListItem QML: link detected loop for the property "previewImage".

Here's a sample of my code, the error occurs in ListItemComponent, I need to call a function that will scrape a page in real time and then update the datmodel if the previewImage is empty.   I don't know if there is a better place to call the scrapePictureIfNeeded() thereby avoiding loop link detected the error, if there is or if you have some tips on how to avoid this error, it would be greatly appreciated...

Thank you, in advance...

Container {
            ListView {
                function scrapePictureIfNeeded( ExternalUrl, source, Index )
                {
                    if ( sIndexesSoFar.indexOf(Index+"|") == -1 )
                     {
                         sIndexesSoFar += Index + "|";
                         netscrape2.setadImages("");
                         netscrape2.setadId(Index);
                         netscrape2.scrapeSite(ExternalUrl);
                    }
                    return "";
                }
                id: searchListView
                dataModel: searchDataModel
                listItemComponents: [
                    ListItemComponent {
                        id: listComponentSearchResultsListItem
                        type: ""
                        SearchResultsListItem {
                            pubDate: ListItemData.TimeStamp + " - " + ListItemData.Location
                            previewImage: ( ListItemData.PreviewImage == "" ) ? ListItem.view.scrapePictureIfNeeded( ListItemData.ExternalUrl, ListItemData.Source, ListItem.indexPath ):ListItemData.PreviewImage
                            sourceImage: ListItemData.Source
                        }
                    }
                ]
                onTriggered: {
                    // launch second page
                }
                attachedObjects: [
                        ScrapeHttp {
                        id: netscrape2
                        onComplete: {
                            var aPictures = netscrape2.adImages.split("|");
                            var data = searchDataModel.data([netscrape2.adId]);
                            if ( aPictures.length > 0 )
                            {
                                data.PreviewImage = aPictures[0];
                                searchDataModel.replace([netscrape2.adId], data);
                            }
                        }
                    }

                ]
             } // end of ListView
        }   // End of Container

Hello

I solved it, after some research, I have dicsocvering that QML actually binds the function to the property, so I moved the fuction call to: and now, everythign works...

itemType function (data, row) {}

scrapePictureIfNeeded (data. ExternalUrl, data. Source, row)

Return ' ';

}

Tags: BlackBerry Developers

Similar Questions

Maybe you are looking for

  • An instrument names

    Hello community, It is available for type a name of instruments into a column of partition tools, game, software, mixer Instruments. I see here some of the names of my score, but have no idea how they appear here. (Drums, Horns2/4) Thanks in advance

  • Buttons settings of comfort wireless keyboard 1. 0 has (1027)

    For the life of me, I don't know how do to change/set the keys on the keyboard, specifically the 'My Favorites' keys and assign a web browser to open from the Web/home"button". Can someone please refresh my memory.  Thank you!!

  • Old system disk formatting

    Hi, I'm trying to format the hdd old system which is no longer in use, but windows not format shrink or delete data - 50 GB of a value on a hard drive of raptor 10000 RPM. Any ideas? See you soon

  • Pocket of 9720 of blackBerry Smartphones

    I bought a pocket of 9720 in whick my 9720 corresponds very closely. The area of the Pocket said 9720, although the bag inside said HDW-38844-001, which is supposed to be for a 9900. The 9720 is 12 mm thick and the 9900 is 10.5 mm thick. 9720 product

  • HP Deskjet d2330

    The printer prints blank pages. Completely, I filled the black and even impossible to print black cartridge.  I went through all the troubleshooting, cleaned, aligned, reinstalled, rebooted, unplugged, replugged, running tests, and all I can think. T