Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example doesn't work #73

Open
AhmedMSayed opened this issue Sep 26, 2017 · 23 comments
Open

example doesn't work #73

AhmedMSayed opened this issue Sep 26, 2017 · 23 comments

Comments

@AhmedMSayed
Copy link

The example doesn't work and crash with alloy example.
The real module name is 'de.marcelpociot.collectionview', so why you write 'ti.collectionview'

@nuno
Copy link
Owner

nuno commented Sep 26, 2017

@hansemannn can you please explain to him?
we have to
1 rename android too or
2 Put Back on iOS

Thanks

@hansemannn
Copy link
Contributor

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?

@AhmedMSayed
Copy link
Author

and please check the examples in the example/ and android/example/ folders, they are different and crashes with alloy

Thanks

@nuno
Copy link
Owner

nuno commented Sep 27, 2017

@m1ga do you want change the mod id to "ti.collectionview" in android and bump to version 2.0 ?

@m1ga
Copy link
Contributor

m1ga commented Sep 27, 2017

sure: #76

@nuno
Copy link
Owner

nuno commented Sep 27, 2017

Many thanks to both @hansemannn and @m1ga you guys rock!

@nuno nuno closed this as completed Sep 27, 2017
@ottopic
Copy link

ottopic commented Oct 8, 2017

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.(CollectionViewTemplate.java:110)
[ERROR] : TiApplication: at de.marcelpociot.collectionview.CollectionView.processTemplates(CollectionView.java:682)
[ERROR] : TiApplication: at de.marcelpociot.collectionview.CollectionView.processProperties(CollectionView.java:435)
[ERROR] : TiApplication: at org.appcelerator.kroll.KrollProxy.setModelListener(KrollProxy.java:1222)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:516)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:507)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:485)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.realizeViews(TiViewProxy.java:523)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleGetView(TiViewProxy.java:507)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.getOrCreateView(TiViewProxy.java:485)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.handleAdd(TiViewProxy.java:695)
[ERROR] : TiApplication: at org.appcelerator.titanium.proxy.TiViewProxy.add(TiViewProxy.java:588)
[ERROR] : TiApplication: at ti.modules.titanium.ui.WindowProxy.windowCreated(WindowProxy.java:261)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivityWindows.windowCreated(TiActivityWindows.java:33)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.windowCreated(TiBaseActivity.java:564)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiBaseActivity.onCreate(TiBaseActivity.java:684)
[ERROR] : TiApplication: at org.appcelerator.titanium.TiActivity.onCreate(TiActivity.java:21)
[ERROR] : TiApplication: at android.app.Activity.performCreate(Activity.java:6237)
[ERROR] : TiApplication: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
[ERROR] : TiApplication: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
[ERROR] : TiApplication: ... 9 more`

@nuno
Copy link
Owner

nuno commented Oct 9, 2017

@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 -> 4062319#diff-48e9c12d1852e32be67c8c6b697b42b3R18

@ottopic
Copy link

ottopic commented Oct 9, 2017

@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?

@nuno
Copy link
Owner

nuno commented Oct 9, 2017

@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 ;)

@ottopic
Copy link

ottopic commented Oct 9, 2017

@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

@nuno
Copy link
Owner

nuno commented Oct 9, 2017

@ottopic I think I found the cause, on android the new module name is not 100& migrated yet.

Look at #79

Sorry about that.

@nuno nuno reopened this Oct 9, 2017
@ottopic
Copy link

ottopic commented Oct 9, 2017

@nuno thank you. No problem for the bug, the goal is fix it. :)
I think this module is very important!

@nuno
Copy link
Owner

nuno commented Oct 9, 2017

attach the project please

@m1ga
Copy link
Contributor

m1ga commented Oct 9, 2017

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.

@AhmedMSayed
Copy link
Author

@ottopic try it without nl.fokkezb.pullToRefresh

@m1ga
Copy link
Contributor

m1ga commented Oct 9, 2017

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!)

@ottopic
Copy link

ottopic commented Oct 9, 2017

@AhmedMohamed2014
@nuno
I confirm my problem. Project in attachment

collectionview.zip

@m1ga
Copy link
Contributor

m1ga commented Oct 9, 2017

The Alloy version works fine. Looks like the vanilla versions makes problems

@nuno
Copy link
Owner

nuno commented Oct 9, 2017

Thanks @m1ga
I submitted the PR on both
Topener/nl.fokkezb.infiniteScroll#64
Topener/nl.fokkezb.pullToRefresh#74

also with my last commit I changed all the names to ti.collectionview

@nuno
Copy link
Owner

nuno commented Oct 9, 2017

@ottopic for now you must use Alloy see #79

@ottopic
Copy link

ottopic commented Oct 10, 2017

@nuno thank you but my app is already build in Vanilla mod and I can't change to Alloy. I'll wait the fix.

@ottopic
Copy link

ottopic commented Oct 20, 2017

Are there news about this fix? Does someone try to solve it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants