newScrollView Crashes

I am using storyboard. I create my scrollview in the create scene:

scrollView = widget.newScrollView{

            id =“overViewScrollView”,

            left = 0,

            top= 0,

            topPadding = 46+display.screenOriginY,

            bottomPadding = 50,

            width = display.contentWidth,

            height = display.contentHeight,

            hideBackground = true

        }  

Before the enterscene is launched, I get multiple of these errors when compiling with xCode. Note that: 

I get no errors in the corona simulator.

Any help would be appreciated

2013-07-24 13:35:54.283 BlockStruggle[82939:c07] Runtime error

?:0: attempt to index field ‘topFrame’ (a nil value)

stack traceback:

    [C]: ?

    ?: in function 'createScrollBar’

    ?: in function '_listener’

    ?: in function <?:141>

    ?: in function <?:218>

2013-07-24 13:35:54.284 BlockStruggle[82939:c07] Runtime error

Note: I found out this only happens when I put more stuff into the scrollView than can be in the contentHeight: i.e. when scrolling becomes neccesary. And still, it only happens when testing in the xCode simulator, not in the corona simulator

Another update, this even happens when i use the following scrollview:

scrollView = widget.newScrollView{

            id = “newGameScrollView”,

            left = 0,

            top= 32,

            width = display.contentWidth,

            height = 448,

            scrollWidth = display.contentWidth,

            scrollHeight = display.contentHeight*1.5,

            maskFile = “graphics/mask-320x448.png”,

            hideBackground = true

        }  

Are you linking CoronaResources.bundle into your Xcode project?

Sweet, linking it properly fixed it. Thanks man!

You are welcome :slight_smile:

Note: I found out this only happens when I put more stuff into the scrollView than can be in the contentHeight: i.e. when scrolling becomes neccesary. And still, it only happens when testing in the xCode simulator, not in the corona simulator

Another update, this even happens when i use the following scrollview:

scrollView = widget.newScrollView{

            id = “newGameScrollView”,

            left = 0,

            top= 32,

            width = display.contentWidth,

            height = 448,

            scrollWidth = display.contentWidth,

            scrollHeight = display.contentHeight*1.5,

            maskFile = “graphics/mask-320x448.png”,

            hideBackground = true

        }  

Are you linking CoronaResources.bundle into your Xcode project?

Sweet, linking it properly fixed it. Thanks man!

You are welcome :slight_smile: