Re: [SailfishDevel] Refrence dynamically created QML object?

2014-10-06 Thread Peter Pykäläinen
Thank you Adam! Almost there, I think I nailed it with storing the objects in a javascript array and then destroying them once not needed anymore. Still needs a lot of polishing and testing. Thanks to all of you for your great help! // Peter Pykäläinen On 6 October 2014 20:57, Adam Pigg wrote:

Re: [SailfishDevel] Refrence dynamically created QML object?

2014-10-06 Thread Adam Pigg
I have this kind of code in a .js file, referenced from the .qml file: var aliens = new Array(10*5); //Create all aliens and position them on the board in rows function createAliens() { //Row 1 component = Qt.createComponent("alien1.qml"); var y = topline.y + topline.height + Siz

Re: [SailfishDevel] Refrence dynamically created QML object?

2014-10-06 Thread Peter Pykäläinen
Thanks Andrey! Will test that too tonight. // Peter Pykäläinen On 6 October 2014 10:39, Andrey Kozhevnikov wrote: > use > > property Item object1 > property Item object2 > > ... > > function createObjects() { > object1 = component1.createObject(parent, paraneters) > object2 = compon

Re: [SailfishDevel] Refrence dynamically created QML object?

2014-10-06 Thread Andrey Kozhevnikov
use property Item object1 property Item object2 ... function createObjects() { object1 = component1.createObject(parent, paraneters) object2 = component2.createObject(parent, paraneters) checkCollisionsFunction(object1, object2) } 06.10.2014 12:26, Peter Pykäläinen пишет: Hi, I h

Re: [SailfishDevel] Refrence dynamically created QML object?

2014-10-06 Thread Peter Pykäläinen
en > *Sent: *Monday, 6 October 2014 8:15 AM > *To: *Sailfish OS Developers > *Reply To: *Sailfish OS Developers > *Subject: *Re: [SailfishDevel] Refrence dynamically created QML object? > > Thank you for your reply. > That sounds like it could work. > Care to share your

Re: [SailfishDevel] Refrence dynamically created QML object?

2014-10-06 Thread piggz1
y 10 smartphone.From: Peter PykäläinenSent: Monday, 6 October 2014 8:15 AMTo: Sailfish OS DevelopersReply To: Sailfish OS DevelopersSubject: Re: [SailfishDevel] Refrence dynamically created QML object?Thank you for your reply.That sounds like it could work.Care to shar

Re: [SailfishDevel] Refrence dynamically created QML object?

2014-10-06 Thread Peter Pykäläinen
mes 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? >

Re: [SailfishDevel] Refrence dynamically created QML object?

2014-10-06 Thread piggz1
phone.From: Peter PykäläinenSent: Monday, 6 October 2014 7:26 AMTo: develReply To: Sailfish OS DevelopersSubject: [SailfishDevel] Refrence dynamically created QML object?Hi,I have a problem with a dynamically created QML objec

[SailfishDevel] Refrence dynamically created QML object?

2014-10-05 Thread Peter Pykäläinen
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 us