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

__parentSymbol is undefined on SDK 3.2.0 (Android & iOS) #12

Closed
arifje opened this issue Dec 16, 2013 · 5 comments
Closed

__parentSymbol is undefined on SDK 3.2.0 (Android & iOS) #12

arifje opened this issue Dec 16, 2013 · 5 comments

Comments

@arifje
Copy link

arifje commented Dec 16, 2013

Widget doesn't work anymore when compiling the app with SDK 3.2.X. Android & iOS are generating the same error:

message = "'undefined' is not an object (evaluating '__parentSymbol.addEventListener')";

__parentSymbol seems to be undefined.

Tested on empty Alloy project, index.xml:

Code: http://pastebin.com/Gf9wyd4B

Screenshot:

screen shot 2013-12-16 at 22 52 28

SDK 3.2.X with Studio 3.2.0.201312142258. Tested on Android and iOS (7.0.3).

@FokkeZB
Copy link
Collaborator

FokkeZB commented Dec 17, 2013

To use the workaround give the table an id and in the controller call $.is.init($.tableId)

@arifje
Copy link
Author

arifje commented Dec 17, 2013

Controller of the widget?

Can you give an example? This is new for me.

Thanks!

@FokkeZB
Copy link
Collaborator

FokkeZB commented Dec 17, 2013

In your testproject, the app/controller/index.js, change it to:

function doClick(e) {
    alert($.label.text);
}

$.is.init($.table);
// $.ptr.init($.table);

$.index.open();

function onEnd() {}

And in app/views/index.xml:

<Alloy>
    <Window>
        <TableView id="table">
            <Widget id="is" src="nl.fokkezb.infiniteScroll" onEnd="onEnd" />    
            <!-- <Widget id="ptr" src="nl.fokkezb.pullToRefresh" onRelease="onEnd" />    -->
        </TableView>
    </Window>
</Alloy>

@arifje
Copy link
Author

arifje commented Dec 17, 2013

Thanks!

Don't forget to add the init() function to exports: exports.init = init;

It doesn't exist by default in your widget.

@FokkeZB
Copy link
Collaborator

FokkeZB commented Dec 17, 2013

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

2 participants