example doesn't work
The example doesn't work and crash with alloy example. The real module name is 'de.marcelpociot.collectionview', so why you write 'ti.collectionview'
@hansemannn can you please explain to him? we have to 1 rename android too or 2 Put Back on iOS
Thanks
Mhh, I didn't touch the Android naming, damn. "ti.collectionview" is easier to use (e.g. for Alloy views like <CollectionView module="ti.collectionview" />, so we should just change the Android module ID and bump it as well?
and please check the examples in the example/ and android/example/ folders, they are different and crashes with alloy
Thanks
@m1ga do you want change the mod id to "ti.collectionview" in android and bump to version 2.0 ?
sure: https://github.com/nuno/TiCollectionView/pull/76/
Many thanks to both @hansemannn and @m1ga you guys rock!
I'm trying android 2.0 version with your last example but it seems doesn't works. Who can help me?
` [ERROR] : TiApplication: (main) [1,3112] Sending event: exception on thread: main msg:java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.collection/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void de.marcelpociot.collectionview.CollectionViewTemplate$DataItem.setDefaultProperties(org.appcelerator.kroll.KrollDict)' on a null object reference; Titanium 6.2.2,2017/09/19 16:01,undefined
[ERROR] : TiApplication: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.test.collection/org.appcelerator.titanium.TiActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'void de.marcelpociot.collectionview.CollectionViewTemplate$DataItem.setDefaultProperties(org.appcelerator.kroll.KrollDict)' on a null object reference
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
[ERROR] : TiApplication: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
[ERROR] : TiApplication: at android.app.ActivityThread.-wrap11(ActivityThread.java)
[ERROR] : TiApplication: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
[ERROR] : TiApplication: at android.os.Handler.dispatchMessage(Handler.java:102)
[ERROR] : TiApplication: at android.os.Looper.loop(Looper.java:148)
[ERROR] : TiApplication: at android.app.ActivityThread.main(ActivityThread.java:5417)
[ERROR] : TiApplication: at java.lang.reflect.Method.invoke(Native Method)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
[ERROR] : TiApplication: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
[ERROR] : TiApplication: Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void de.marcelpociot.collectionview.CollectionViewTemplate$DataItem.setDefaultProperties(org.appcelerator.kroll.KrollDict)' on a null object reference
[ERROR] : TiApplication: at de.marcelpociot.collectionview.CollectionViewTemplate.bindProxiesAndProperties(CollectionViewTemplate.java:152)
[ERROR] : TiApplication: at de.marcelpociot.collectionview.CollectionViewTemplate.processChildProperties(CollectionViewTemplate.java:172)
[ERROR] : TiApplication: at de.marcelpociot.collectionview.CollectionViewTemplate.processProperties(CollectionViewTemplate.java:161)
[ERROR] : TiApplication: at de.marcelpociot.collectionview.CollectionViewTemplate.
@ottopic Thanks, seems the example was not updated to reflect the new mod. id name. Check my last commit. Remember the name of the module changed, to "ti.collectionview", so if you see any error with name "de.marcelpociot.collectionview.CollectionView" try find and replace.
Some widgets like: nl.fokkezb.pullToRefresh and nl.fokkezb.infiniteScroll may need add this "ti.collectionview" the array, like I did in the example -> https://github.com/nuno/TiCollectionView/commit/40623191431ed4d13c6b76aa0eff049e5e0bb114#diff-48e9c12d1852e32be67c8c6b697b42b3R18
@nuno that's the problem. I have used your example https://github.com/nuno/TiCollectionView/blob/master/example/app.js that report correct name and android dist 2.0.0 (https://github.com/nuno/TiCollectionView/blob/master/dist/ti.collectionview-android-2.0.0.zip) .
So, how I can solve it?
@ottopic please make sure the name is correct on tiapp.xml or you have to give me more info.
with the example fixed and with correct name on tiapp.xml should work. Please clear the project first before the next build ;)
@nuno I can confirm the problem because I have created new project to test it. I add the module width Titanium interface than I use:
var TiCollectionView = require('ti.collectionview');
and
var collectionView = TiCollectionView.createCollectionView(
I can attach the project if necessary.
Probably the problem is the scroll to refresh
@ottopic I think I found the cause, on android the new module name is not 100& migrated yet.
Look at https://github.com/nuno/TiCollectionView/issues/79
Sorry about that.
@nuno thank you. No problem for the bug, the goal is fix it. :) I think this module is very important!
attach the project please
I was running the example without any errors so I'm not sure if changing the getApiName() method will change anything. I'll do the changes in #79 but I think the problem is somewhere else.
@ottopic try it without nl.fokkezb.pullToRefresh
right, I removed that widget, since it isn't part of the module (and if you use 6.2.2 you can use the build in Refresh SDK!)
The Alloy version works fine. Looks like the vanilla versions makes problems
Thanks @m1ga I submitted the PR on both https://github.com/Topener/nl.fokkezb.infiniteScroll/pull/64 https://github.com/Topener/nl.fokkezb.pullToRefresh/pull/74
also with my last commit I changed all the names to ti.collectionview
@ottopic for now you must use Alloy see https://github.com/nuno/TiCollectionView/issues/79
@nuno thank you but my app is already build in Vanilla mod and I can't change to Alloy. I'll wait the fix.
Are there news about this fix? Does someone try to solve it?