Page 2 of 2
Re: 『QT』about click mouse to select the sprite(image)
Posted: Sun Feb 05, 2012 2:04 pm
by poorenglish
modify the AnAL.lua
get the get getImageData()function support.
I don't know why can't cover to *.love file.
Re: 『QT』about click mouse to select the sprite(image)
Posted: Sun Feb 05, 2012 2:37 pm
by coffee
poorenglish wrote:modify the AnAL.lua
get the get getImageData()function support.
I don't know why can't cover to *.love file.
You should ask about AnAL implementation or problems in the library thread
viewtopic.php?f=5&t=948
Re: 『QT』about click mouse to select the sprite(image)
Posted: Sun Feb 05, 2012 7:01 pm
by TechnoCat
If it works as loose files and not as a love file and you are Windows. Then your capital/lower case letters are wrong most likely.
Re: 『QT』about click mouse to select the sprite(image)
Posted: Mon Feb 06, 2012 9:36 am
by poorenglish
Work fine when I use the SciTE.
It seems the newFramebuffer error when create .love file.
attempt to call field 'newFramebuffer' <a nil value> stack traceback:
same found in the
viewtopic.php?f=4&t=3891&p=39065&hilit= ... fer#p39065
I does not update the love to 0.80 version.
Work fine on the my another computer.
Re: 『QT』about click mouse to select the sprite(image)
Posted: Mon Feb 06, 2012 10:08 am
by ston
coffee wrote:
Nice, your Z-code works but you probably have something wrong eating memory or infinite looping. I change and move some circles but some time after always crash.
Morning :-)
It's some combination of mouse clicking which seems to upset it; if you just leave it alone it's stable. I need to understand more about love's theading model and what, if any, synchronisation needs to be done in the lua script. Anyway, hopefully it was of some help.
[edit] Think I've found the BUG now, if the mouse is released whilst these two lines of code are being executed in the mousepressed event handler:
table.remove(t, i)
table.insert(t, this_layer)
...then there's a window of opportunity for the mouse released code to run after the .remove call, but before the .insert, so the table won't then have an item at index [10]. I added a global 'm_pressed' flag which I set to true at the start of mousepressed() and false at the end. Then in mousereleased() I added:
Code: Select all
while m_pressed do
love.timer.sleep(1)
end
...before the call to 'unbind' the top level circle. That seems to have done the trick.
Re: 『QT』about click mouse to select the sprite(image)
Posted: Mon Feb 06, 2012 12:51 pm
by Robin
ston wrote:[edit] Think I've found the BUG now, if the mouse is released whilst these two lines of code are being executed in the mousepressed event handler:
table.remove(t, i)
table.insert(t, this_layer)
...then there's a window of opportunity for the mouse released code to run after the .remove call, but before the .insert, so the table won't then have an item at index [10].
Ehm... I think not. LÖVE is not multithreaded (at least, unless you're using love.thread, but it doesn't sound like it), so handlers are run sequentially, not asynchronously.
Re: 『QT』about click mouse to select the sprite(image)
Posted: Mon Feb 06, 2012 1:57 pm
by ston
Robin wrote:
Ehm... I think not. LÖVE is not multithreaded (at least, unless you're using love.thread, but it doesn't sound like it), so handlers are run sequentially, not asynchronously.
Ah, thx for the info. Another theory bites the dust