newImageRect inside tableView won't show up

Hi all!

I’ve created a tableView for a high score overview. I need some icons in there using display.newImageRect, but they just won’t show up.

When I replace the newImageRect with a newRect, these rectangles DO show up. Weird, right?
Also, when I DON’T add the icon to the rowGroup, they appear on screen, but won’t move with the tableView.

Here’s the code of the onRowRender ( render listener of the tableView ):

[lua]local onRowRender = function( e )

local rowGroup = e.view

– icon
local icon = display.newImageRect( “img/icon.png”, 50, 52 )
icon.x, icon.y = 100, 25

rowGroup:insert( icon )

end[/lua]

Anybody has a suggestion? I’ve been working with tableViews before, but they are so incredibly buggy, that this is the last time I’ll be using them until it works the way it should. Unless I’m doing something wrong myself, of course, but the fact that all other elements do show up is pretty weird. [import]uid: 86582 topic_id: 31189 reply_id: 331189[/import]

I’m working on a project right now and I’m running into a similar frustration… It is masking related which I bet it’s why newImage works and newImageRect doesn’t. I’m able to get some images in with newImageRect but ther are all smaller than the row height… Hmmmm… [import]uid: 19626 topic_id: 31189 reply_id: 124807[/import]

Any words from the devs? [import]uid: 86582 topic_id: 31189 reply_id: 124977[/import]

I’m working on a project right now and I’m running into a similar frustration… It is masking related which I bet it’s why newImage works and newImageRect doesn’t. I’m able to get some images in with newImageRect but ther are all smaller than the row height… Hmmmm… [import]uid: 19626 topic_id: 31189 reply_id: 124807[/import]

Hey guys, hadn’t seen this previously but will pass it on in the AM and try to get some input for you.

Peach :slight_smile: [import]uid: 52491 topic_id: 31189 reply_id: 125212[/import]

I filed a bug report a few days ago and got a response that its a duplicate of an already reported bug that has to do with masks.

However I found a temporary work around. Use display.newImage() instead of display.newImageRect($

[import]uid: 19626 topic_id: 31189 reply_id: 125215[/import]

@ferdiwillemse: Can i see more code?

I’m presuming this is due to a masking bug where if you set the alpha value of a vector line object inside a masked object (ie a tableView) any images inserted into that masked group will inherit the lines alpha value.

So for instance, if you set the lineColor property’s alpha to 0 and you have applied a mask to your tableView, any images you insert it into it will be invisible due to inheriting the 0 alpha value from the lineColor. [import]uid: 84637 topic_id: 31189 reply_id: 125254[/import]

@Danny, in my case, I am setting both the rowColor and the lineColor to an Alpha of 0… But interestingly enough this only impacts display.newImageRect(). display.newImage() inserts the images just fine.

Interesting… [import]uid: 19626 topic_id: 31189 reply_id: 125271[/import]

Rob, for now a possible workaround is to set:

noLines = true

In your tableView constructor, as opposed to setting the line to invisible.

Let me know if that helps, [import]uid: 84637 topic_id: 31189 reply_id: 125273[/import]

Thank you all for responding!

Although I already changed my code, when I posted this topic I also set the lineColor to ( 0, 0, 0, 0). So I think this is where it went wrong for me. Right now, my app is waiting approval in the App Store. I might try to add images to the tableView again once it responds like display.newImage(), like Rob said.

@Danny, if I still had the code the way it was, I would have posted a longer excerpt, but it is of no use now. Sorry! Thank you for helping, though! [import]uid: 86582 topic_id: 31189 reply_id: 125275[/import]

Any words from the devs? [import]uid: 86582 topic_id: 31189 reply_id: 124977[/import]

Hey guys, hadn’t seen this previously but will pass it on in the AM and try to get some input for you.

Peach :slight_smile: [import]uid: 52491 topic_id: 31189 reply_id: 125212[/import]

I filed a bug report a few days ago and got a response that its a duplicate of an already reported bug that has to do with masks.

However I found a temporary work around. Use display.newImage() instead of display.newImageRect($

[import]uid: 19626 topic_id: 31189 reply_id: 125215[/import]

@ferdiwillemse: Can i see more code?

I’m presuming this is due to a masking bug where if you set the alpha value of a vector line object inside a masked object (ie a tableView) any images inserted into that masked group will inherit the lines alpha value.

So for instance, if you set the lineColor property’s alpha to 0 and you have applied a mask to your tableView, any images you insert it into it will be invisible due to inheriting the 0 alpha value from the lineColor. [import]uid: 84637 topic_id: 31189 reply_id: 125254[/import]

@Danny, in my case, I am setting both the rowColor and the lineColor to an Alpha of 0… But interestingly enough this only impacts display.newImageRect(). display.newImage() inserts the images just fine.

Interesting… [import]uid: 19626 topic_id: 31189 reply_id: 125271[/import]

Rob, for now a possible workaround is to set:

noLines = true

In your tableView constructor, as opposed to setting the line to invisible.

Let me know if that helps, [import]uid: 84637 topic_id: 31189 reply_id: 125273[/import]

Thank you all for responding!

Although I already changed my code, when I posted this topic I also set the lineColor to ( 0, 0, 0, 0). So I think this is where it went wrong for me. Right now, my app is waiting approval in the App Store. I might try to add images to the tableView again once it responds like display.newImage(), like Rob said.

@Danny, if I still had the code the way it was, I would have posted a longer excerpt, but it is of no use now. Sorry! Thank you for helping, though! [import]uid: 86582 topic_id: 31189 reply_id: 125275[/import]