{"id":1065,"date":"2013-12-15T15:48:32","date_gmt":"2013-12-15T15:48:32","guid":{"rendered":"https:\/\/zogspat.tk\/blog\/?p=1065"},"modified":"2013-12-15T15:48:32","modified_gmt":"2013-12-15T15:48:32","slug":"new-versions-of-pin-your-pics-and-weighme","status":"publish","type":"post","link":"https:\/\/the-plot.com\/blog\/?p=1065","title":{"rendered":"New Versions of Pin Your Pics and WeighMe"},"content":{"rendered":"<p>I&#8217;ve just submitted new versions of both of my apps on the App Store. Pin Your Pics had a bug in the &#8216;group by 50&#8217; table, which meant that the cells comprising the sets of images was empty. I actually need to do a pretty major overhaul of the code base, as I learned a lot about threading in the process of updating WeighMe with the motion activity functionality. I finally got the async functionality [which I <a href=\"https:\/\/the-plot.com\/blog\/?p=1028\">posted<\/a> an update on a few weeks ago] working. I didn&#8217;t change the algorithm that I discussed in the post that substantially, however testing indicated that putting counters in the KVO wasn&#8217;t reliable. The KVO still checks to see if the queue is at zero. What I simply did was to shift the &#8216;gatekeeper&#8217; functionality into the method call which executes the plot.<\/p>\n<p>The queue might be empty at the point in time the KVO executes, but that doesn&#8217;t mean that there isn&#8217;t more activity is in the pipe for the operation queue. As a consequence, in earlier versions of this code I was seeing my plotting method getting called repeatedly. On entry to the plotting method &#8211; which is going to be called every time the queue hits zero &#8211; I check for two values: the length of an array, which gets appended to by assignment to the operation queue, and also a boolean, which effectively ensures that the method is only ever executed once, when the array has the right number of values.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve just submitted new versions of both of my apps on the App Store. Pin Your Pics had a bug in the &#8216;group by 50&#8217; table, which meant that the cells comprising the sets of images was empty. I actually &hellip; <a href=\"https:\/\/the-plot.com\/blog\/?p=1065\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-1065","post","type-post","status-publish","format-standard","hentry","category-ios-development"],"_links":{"self":[{"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1065","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1065"}],"version-history":[{"count":1,"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1065\/revisions"}],"predecessor-version":[{"id":1066,"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1065\/revisions\/1066"}],"wp:attachment":[{"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1065"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1065"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/the-plot.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1065"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}