<div dir="ltr"><div><div>I have exactly the same use case as Ragnar.<br><br></div>Probably a bug in ContextMenu and / or the handling of a delegate with dynamic height from SilicaListView?<br><br></div>Anyway, warning apart, it seems to not affect usability at all.<br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Apr 2, 2014 at 10:41 PM, Ragnar Kurm <span dir="ltr"><<a href="mailto:ragnar@waalaskala.com" target="_blank">ragnar@waalaskala.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
Stumbled again into binding loop<br>
and asking for help<br>
1) how to track down the loops on my own?<br>
2) how to solve particular problem (below)?<br>
<br>
Context: Screen is filled with ListItems which can be manipulated by ContextMenu.<br>
When held on last item on screen it would open submenu below screen,<br>
but it is accommodated by changing contentY which:<br>
* causes binding loop warnings<br>
* but visually it actually works ok by scrolling screen<br>
<br>
I prefer to write code without warnings.<br>
Included minimal code below.<br>
<br>
I consider myself quite new here<br>
and havent seen much Silica talk here...<br>
Is it appropriate place for Silica related questions?<br>
<br>
Ragnar<br>
<br>
<br>
<br>
import QtQuick 2.0<br>
import Sailfish.Silica 1.0<br>
<br>
Page {<br>
<br>
SilicaListView { // QML SilicaListView: Binding loop detected for property "contentY"<br>
<br>
anchors.fill: parent // prevent "Binding loop" type 1<br>
<br>
model: ListModel {<br>
id: model<br>
Component.onCompleted: {<br>
for (var i=0 ; i<12 ; i++) model.append({"i": i});<br>
}<br>
}<br>
<br>
delegate: ListItem {<br>
menu: ContextMenu { MenuItem { text: "Delete?" } } // hold on last item on screen to open the menu<br>
Label { text: i }<br>
}<br>
}<br>
}<br>
<br>
______________________________<u></u>_________________<br>
SailfishOS.org Devel mailing list<br>
</blockquote></div><br><br clear="all"><br>-- <br>Luca Donaggio
</div>