Combing the code from 2 Corona SDK examples.

Hello! I am new to Corona and to programming, but am making good progress with the Corona SDK!

I have a question…
The issue that is coming up for me is about the hierarchy of the code statements in the text editor and the way it effects the outcome.

It is obviously important that the statements be laid out in an appropriate order or some statements will block or interfere with other ones thus creating an error.

I have experimented with moving the statements around and have managed to clear up a problem and have had the app run successfully.

Also, I am interested to know how one would combine blocks of code from 2 separate Corona SDK examples such as the “SlideView” and the “ScrollView” demo codes.

When it comes to combining the code from the 2 examples, the SlideView folder has build.settings, slideView.lua and config.lua files and the ScrollView folder has build.settings, scrollView.lua and config.lua files and I’m wondering how these would be integrated if one wanted an app with both SlideView and ScrollView features.

Would it be possible for anyone to give me some input on this?

Thank you. [import]uid: 25238 topic_id: 9586 reply_id: 309586[/import]

Hi Camson,

Theoretically, you will only need 1 config.lua and 1 build.settings in the folder for your app you are creating.
You really need to combine the scrollView and the SlideView into one lua file.

This could be tricky because both of those codes we’re not designed in a way they can be easily combined.

If you are new to Corona I would look around at the Director Class tutorials and you can incorporate separate pages into your app that has this functionality. This might help you with an overall feel of what you want to accomplish.

To combine them into one is possible but will take some effort.

[import]uid: 50045 topic_id: 9586 reply_id: 35149[/import]

Hi shawn,

Thank you for your help. I will look at the Director Class tutorials.

Chris. [import]uid: 25238 topic_id: 9586 reply_id: 35395[/import]