Topener / nl.fokkezb.pullToRefresh

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

Crash on single tap #66

Closed Luca4k4 closed 7 years ago

Luca4k4 commented 8 years ago

Hi, i'm trying to add your widget to my app but i have a problem:

my index.xml

<Alloy>
    <Collection src="books" />
    <TabGroup id="tabGroup">
        <Tab>
            <Require id="showcase" src="showcase" />
        </Tab>

        <Tab>
            ...
        </Tab>
    </TabGroup>
</Alloy>

This is my showcase.xml:

<Alloy>
    <Collection src="books" />
    <Window id="showcaseWin">
        <Picker id="picker" onChange="pickerChanged">
            <PickerColumn>
                ....
            </PickerColumn>
        </Picker>
        <Widget id="ptr" src="nl.fokkezb.pullToRefresh" onRelease="myRefresher">
            <TableView id="booksList" dataCollection="books" dataFilter="filterBooksList">
                <SearchView id="searchView" ns="Ti.UI.Android" platform="android" />
                <TableViewRow title="{title}" model="{alloy_id}">
                    <CardView>
                        <View id="detailsBook">
                            <Label>Title: {title}</Label>
                            ....
                        </View>
                    </CardView>
                </TableViewRow>
            </TableView>
        </Widget>
    </Window>
</Alloy>

and in my controller i just do:

$.ptr.refresh();

function myRefresher(e) {
  if(Ti.Network.online) net.getBooksList(setBooksList);
  e.hide();
}

The app starts correctly but when i do a single tap on the "showcase" window i get a crash: "Unfortunately, TiShadow has stopped".

I'd like to use your widget but i'm a novice with Appcelerator Titanium.. any suggestions? (I'm using Titanium SDK 5.4.0 GA, last version of TiShadow and Genymotion emulator with Android 6.0) Thank you!

FokkeZB commented 8 years ago

You mention Unfortunately, TiShadow has stopped. If you run into bugs, always try without TiShadow (or LiveView) first to rule that out as a factor. Could you do that?

FokkeZB commented 7 years ago

Closing for no activity