From d2aae157c8002cf0937a1fa38fb31a9d4b483f53 Mon Sep 17 00:00:00 2001 From: Kingsley Stephens Date: Wed, 17 Dec 2014 11:50:28 +0000 Subject: Fix builder.example to work with updated ItemView code. Change-Id: Id2a566a93648690cd1a308302e0047149c8f2c31 --- examples/builder/examples.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'examples/builder') diff --git a/examples/builder/examples.cpp b/examples/builder/examples.cpp index 1f98958f..0e26bdf9 100644 --- a/examples/builder/examples.cpp +++ b/examples/builder/examples.cpp @@ -280,6 +280,9 @@ public: { Stage stage = Stage::GetCurrent(); + mTapDetector = TapGestureDetector::New(); + mTapDetector.DetectedSignal().Connect( this, &ExampleApp::OnTap ); + if( mItemView ) { stage.Remove( mItemView ); @@ -361,15 +364,6 @@ public: } } - mTapDetector = TapGestureDetector::New(); - - for( unsigned int i = 0u; i < mItemView.GetChildCount(); ++i ) - { - mTapDetector.Attach( mItemView.GetChildAt(i) ); - } - - mTapDetector.DetectedSignal().Connect( this, &ExampleApp::OnTap ); - // Display item view on the stage stage.Add( mItemView ); @@ -413,6 +407,10 @@ public: t.SetText( fontString.str() ); t.SetTextAlignment( Alignment::HorizontalLeft ); + + // Hook up tap detector + mTapDetector.Attach( t ); + return t; } -- cgit v1.2.3