D17404: [GCI 2018] GCompris: Add keyboard controls support to Memory activities

Ruixuan Tu noreply at phabricator.kde.org
Sat Dec 8 18:23:04 GMT 2018


turx added inline comments.

INLINE COMMENTS

> memory.js:158
>      for(var i = 0;  i < cardList.length; ++i) {
> -        if (items.cardRepeater.itemAt(i).isFound == false &&
> -            items.cardRepeater.itemAt(i).isBack)
> -            listCardNonReturned.push(items.cardRepeater.itemAt(i))
> +        if (items.cardRepeater.itemAt(i % columns, i / columns).isFound == false &&
> +            items.cardRepeater.itemAt(i % columns, i / columns).isBack)

I changed the implementation here because there is only itemAt(x, y) in grid objects.
i % columns here represents x, while i / columns represents y.
But the program is failed to work with error qrc:/gcompris/src/activities/memory/memory.js:225: TypeError: Cannot call method 'selected' of undefined qrc:/gcompris/src/activities/memory/memory.js: 225 and I had no idea with it.
Could you please help me to figure it out a little?

REPOSITORY
  R2 GCompris

REVISION DETAIL
  https://phabricator.kde.org/D17404

To: turx, #gcompris_improvements, jjazeix
Cc: jjazeix, kde-edu, narvaez, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-edu/attachments/20181208/ffa91c93/attachment-0001.html>


More information about the kde-edu mailing list