[SailfishDevel] Refrence dynamically created QML object?

Peter Pykäläinen peter.pykalainen at gmail.com
Mon Oct 6 07:14:47 UTC 2014


Thank you for your reply.
That sounds like it could work.
Care to share your solution how you store your objects?



// Peter Pykäläinen

On 6 October 2014 10:12, <piggz1 at gmail.com> wrote:

> Can't you just store each object in a different javascript object? When I
> create a bunch of objects in my games I store them in javascript arrays.
>
> Sent from my BlackBerry 10 smartphone.
>   *From: *Peter Pykäläinen
> *Sent: *Monday, 6 October 2014 7:26 AM
> *To: *devel
> *Reply To: *Sailfish OS Developers
> *Subject: *[SailfishDevel] Refrence dynamically created QML object?
>
> Hi,
>
> I have a problem with a dynamically created QML object and referencing it.
> The problem is as follows:
>
> - Create a dynamic QML object with createObject, assign signal to it. This
> works fine.
> - Create another dynamic QML object.
> - I would need to check collision of these two new objects, I am using a
> timer to check that.
> - Now since I can not reference both objects with their IDs I can't get
> the collision check to work.
>
> Any ideas how to achive this?
>
> I have tried to use a LlistModel to store all my objects, but looping
> through them with JavaScript slows down my application significantly, so
> this is not an option.
>
> // Peter Pykäläinen
>
>
> _______________________________________________
> SailfishOS.org Devel mailing list
> To unsubscribe, please send a mail to
> devel-unsubscribe at lists.sailfishos.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.sailfishos.org/pipermail/devel/attachments/20141006/f6a6c8b7/attachment.html>


More information about the Devel mailing list