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