New Storyboard Module? Composer?

Hello i was quickly testing some sample and created a new automated app in corona…

I noticed this:

local composer = require( “composer” )

local scene = composer.newScene()

is this a newer version of storyboard?

any dev’s seen this before?

Which sample app are you talking about? And which build do you use?

Latest build - 2146 - open simulator > create new project > app >

 

local composer = require( "composer" ) local scene = composer.newScene() function scene:create( event ) local sceneGroup = self.view end function scene:show( event ) local sceneGroup = self.view local phase = event.phase if phase == "will" then -- Called when the scene is still off screen and is about to move on screen elseif phase == "did" then -- Called when the scene is now on screen -- -- INSERT code here to make the scene come alive -- e.g. start timers, begin animation, play audio, etc. end end function scene:hide(event) local sceneGroup=self.view local phase=event.phase if event.phase == "will" then -- Called when the scene is on screen and is about to move off screen -- -- INSERT code here to pause the scene -- e.g. stop timers, stop animation, unload sounds, etc.) elseif phase == "did" then -- Called when the scene is now off screen end end function scene:destroy( event ) local sceneGroup = self.view -- Called prior to the removal of scene's "view" (sceneGroup) -- -- INSERT code here to cleanup the scene -- e.g. remove display objects, remove touch listeners, save state, etc. end scene:addEventListener( "create", scene ) scene:addEventListener( "show", scene ) scene:addEventListener( "hide", scene ) scene:addEventListener( "destroy", scene )

Hm, interesting discovery :wink:

Indeed, and I cannot find any support or information regarding it… Corona staff? anyone?

There will be information on this coming soon. 

Rob

Ahh! Okay, thank you!

Seems like an improved storyBoard variant. Interesting news. Yet more code migration ahead of us it seems… Great job discovering this and letting the cat out the bag.

EDIT : I take it back… Not interesting news. Scary news… Just for fun I tried bunch of storyBoard API calls… see what I got : 

WARNING: composer.purgeScene() is deprecated. This now calls through to composer.removeScene( true ) instead.    

 

WARNING: composer.getCurrentSceneName() is deprecated. This now calls through to composer.getSceneName( “current” ) instead.

 

WARNING: composer.printMemUsage() has been removed.    

 

WARNING: composer.purgeAll() is deprecated. This now calls through to composer.removeHidden( true ) instead.    

On a positive note, seems like the deprecated API is now internally routing to the new equivalent code. This will certainly help ease the transition so thanks for that!

On a negative note, really Corona Labs? Just as we all got comfortable with the storyBoard and learned all the API now go do it all over again. What was it? Did you run out of urgent bugs to fix? I think not… I really wish you wouldn’t try to fix what isn’t broken while there are still major issues here and there. Cough, widgets! 

I can’t wait to read Walter’s BAM! post for Composer on the Blog soon. I think I will start framing those things. 

Kerem,

It’s way too premature to be trying to figure it out. Please wait until we provide more details before you form conclusions. Until then, enjoy your weekend.

Brent

Sure. Have a good weekend too.

“It’s way too premature to be trying to figure it out.”

Not if you make tutorial videos for a living.

That light at the end of the tunnel? It’s an oncoming train. <-- how I’m feeling.

Jay

Jay I feel for you. All these changes are devastating to your existing library of material. Look at it on the bright side… So many new things that so many folks need to learn. Maybe there is a silver lining somewhere in there for you. Just wondering when it will all stabilize though.

“All these changes are devastating to your existing library of material.”

Kerem,

Once again, jumping to conclusions at this point is misleading to the community.

Brent

It is a fact that the recent G2 changes, specifically the color definitions and object placement methods made all existing books, tutorials, videos relating to these topics inaccurate. Prior to this, I recall Jay having to redo lots of videos during widget 1 to widget 2 transition. I’m not in the tutorial business but a casual observer. Jay and other affected parties can chime in to support your remark if I’m wrong.

The first version of my post was deleted. So was the second. Way too inflammatory for a Monday morning. :slight_smile:

 Because I thought it’s possible composer is an internal thing so they can run it at the same time as storyboard and when the bugs are all worked out, then it becomes storyboard. Composer could just be an internal, temporary name that accidentally leaked.

I’m hoping for something like that. :slight_smile:

 Jay

Jay, I think, again I’m speculating and I know Brent will call me on it but I think its much more than that. As of 2147 even the samples started getting updated. Just open WidgetDemo and check it out for yourself. It is no longer using Storyboard but now Composer. 

Not sure if more information was provided yet, but docs are live for a library named composer.

http://docs.coronalabs.com/daily/api/library/composer/index.html

Cat getting out of the bag early must have meant some overtime for Brent or someone else rushing these docs over the weekend. Thanks for sharing. 

no mention of params in the main doc or the migration guide. Are they dropped? Hope not!!!