Topener / nl.fokkezb.pullToRefresh

Widget to implement a table pull-to-refresh header in Titanium Alloy
184 stars 60 forks source link

added ability to not include PTR based on an argument #70

Closed Topener closed 8 years ago

Topener commented 8 years ago

I renamed it to hidden. It might be confusing naming (both this one and the previous one) because it is not actually hidden, it is never initialised. But I guess that speaks for itself

nuno commented 8 years ago

I do not like the "hidden" to be honest! Some name: "stopInit", "notAutoInit", "blockInit", "blockAutoInit" ... all except "hidden", that will confuse.

FokkeZB commented 8 years ago

Mmm, it might be confusing with the widget's hide() method.

Actually Rene, the way you coded it the table/listview the widget wraps will also not display if you use the new argument because https://github.com/Topener/nl.fokkezb.pullToRefresh/blob/28fa80d66a1766932516ec2280451f5e57e75d07/nl.fokkezb.pullToRefresh/controllers/widget.js#L17 never runs.

So either you need to still run the above line (and stop after that) or you can simply achieve the same effect by using Alloy's if attribute.

Topener commented 8 years ago

Yeah the reason for this functionality to be added was actually to prevent PTR from being added, not hide it. So... it is terminology.

Topener commented 8 years ago

Adding if doesn't work because then it wouldn't render the ListView either as PTR is a parent of the ListView

Topener commented 8 years ago

Ok changed name a final time to dontInit. I guess that solves any confusion?

FokkeZB commented 8 years ago

Hey, you are the boss now! I'd just suggest to also document the new arg in the readme.