Comments (9)
Can you show me the XML and JS where you used it?
from nl.fokkezb.infinitescroll.
Let me try with the latest version of the widget before ... 🐤
from nl.fokkezb.infinitescroll.
Ok still crashing, hope this code will help you:
XML :
<TableView id="tableView">
<Widget id="is" src="nl.fokkezb.infiniteScroll" onEnd="loadMore" />
</TableView>
JS:
addManyToView = function(collection) {
var baseData, limitedVideos, newData;baseData = $.tableView.data;
newData = [];
limitedVideos = Alloy.createCollection('Video', collection.first(_displayAmount));limitedVideos.each(function(V) {
newData.push((Alloy.createWidget($.__widgetId, 'Row', {
video: V
})).getView());
});$.tableView.data = baseData.concat(newData);
};
from nl.fokkezb.infinitescroll.
What Alloy version are you using? Does it work when using Alloy 1.4.1?
from nl.fokkezb.infinitescroll.
Currently using Alloy 1.5.0-rc3 with CLI version 3.4.0-rc4
Same with Alloy 1.4.1
here is the full error trace:
backtrace = "#0 init()
at file://.../wz_rc.app/alloy/widgets/nl.fokkezb.infiniteScroll/controllers/widget.js:31\n#1 Controller()
at file://.../wz_rc.app/alloy/widgets/nl.fokkezb.infiniteScroll/controllers/widget.js:145\n#2 ()
at file://.../wz_rc.app/alloy.js:227\n#3 ()
at file://.../wz_rc.app/app.js:50\n#4 Controller()
at file://.../wz_rc.app/alloy/widgets/wz.StreamTableView/controllers/widget.js:31\n#5 ()
at file://.../wz_rc.app/alloy.js:227\n#6 ()
at file://.../wz_rc.app/app.js:50\n#7 Controller()
at file://.../wz_rc.app/alloy/controllers/Stream.js:34\n#8 ()
at file://.../wz_rc.app/alloy.js:231\n#9 ()
at file://.../wz_rc.app/app.js:44\n#10 Controller()
at file://.../wz_rc.app/alloy/controllers/index.js:94\n#11 ()
at file://.../wz_rc.app/alloy.js:231\n#12 ()
at file://.../wz_rc.app/app.js:44";line = 41;
message = "'undefined' is not an object (evaluating '__parentSymbol.sections[sectionIndex]')";
name = TypeError;
sourceURL = file://.../wz_rc.app/alloy/widgets/nl.fokkezb.infiniteScroll/controllers/widget.js";
from nl.fokkezb.infinitescroll.
I don't see a call to $.is.init()
in your JS snippet, nor the method loadMore
you have in the XML snippet. The line mentioned in the error trace should only be executed if the widget is used in a list view, but it might also execute if it isn't initialised properly.
from nl.fokkezb.infinitescroll.
I do call $.is.init($.tableView)
within my widget's constructor now, but the crash happens before the controller's code.
Looking into file://.../alloy/widgets/wz.StreamTableView/controllers/widget.js:31, I found out:
$.__views.is = Alloy.createWidget("nl.fokkezb.infiniteScroll", "widget", {
id: "is",
__parentSymbol: __parentSymbol
});
loadMore ?$.__views.is.on("end", loadMore) : __defers["$ .__views.is!end!loadMore"] = true;
$.__views.tableView = Ti.UI.createTableView({
separatorColor: "#dbdbdb",
scrollsToTop: true,
minRowHeight: 0,
rowHeight: 0,
footerView: $.__views.is.getProxyPropertyEx("footerView", {
recurse: true
}),
id: "tableView"
});
If titanium is trying to instantiate your widget before creating the tableView, that'd explain a lot... no ?
edit: after moving the call to $.is.init($.tableView)
, I realise this issue is not related to iOS8 and also happens on ios7.1 copiled with Ti 3.2.3. To be continued tomorrow...
from nl.fokkezb.infinitescroll.
Could you try https://github.com/FokkeZB/nl.fokkezb.infiniteScroll/blob/master/controllers/widget.js ?
Alloy 1.5.0 has some weird changes to __parentSymbol
If it is being used in a required controller e.g. then it may point to the parent controller instead of a view ;)
from nl.fokkezb.infinitescroll.
Awesome ! Works flawless
Thanks a lot Fokke 👍
from nl.fokkezb.infinitescroll.
Related Issues (20)
- Using widget with tabbed window HOT 1
- Remote data not available. HOT 3
- How to combine this module with module ticollectionview HOT 5
- crash with backbone.js and underscore.js libs HOT 1
- Remove footer when done? HOT 7
- Crash on Android after closing app with tab group and infinite scroll HOT 10
- Nice to have: Example without models/collections but normal payloads HOT 10
- Nice to have: onStart HOT 3
- May want to provide a warning for those who use postLayout in TableViewRow/ListViewRow HOT 1
- undefined is not an object (evaluating 'Ti.UI.ActivityIndicatorStyle.DARK') HOT 1
- There's a way to block? HOT 2
- Enhancement request - any plans to add "reverse scrolling" similar to a typical chat app? HOT 5
- Using with search option HOT 1
- How to combine this widget with Pull to Refresh Widget HOT 1
- Add To List and Rest List HOT 1
- Load all items in the list HOT 3
- Success Events not firing on Android (sometimes) if the ListView using the widget is not in focus HOT 4
- Odd loading issue with ListViews in iOS and latest SDKs (6-7) HOT 1
- Help Me!! HOT 1
- IOS error HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nl.fokkezb.infinitescroll.