0
안녕하세요 친구 나는 toolbar.Now에 검색 버튼을 추가 한 sencha touch 2.0에서 아래 이미지와 같이 투명한 배경으로 검색 필드를 열고 싶습니다. 난 내 컨트롤러 클래스를 추가하고 file.Below아래 코드는 sencha touch 2.0에 적용 가능합니다
난 내 프로젝트를 실행하는 동안 로그 캣 나 그 오류를 나타냅니다 컨트롤러입니다.
Ext.define('MyApp.controller.search',{
extend: 'Ext.app.Controller',
config: {
refs: {
groupList: "groupList"
},
control: {
groupList: {
searchField: "searchField"
}
}
},
searchField: function(){
// console.log("SearchField Tapped");
if (! this.searchView)
{
this.searchView = this.render({
xtype: 'searchView',
});
var cancelSearchBtn = this.searchView.query('#'+cancelSearchBtn)[0];
cancelSearchBtn.setHandler(function(){
this.searchView.hide();
}, this);
}
this.searchView.show({
type: 'slide',
direction: 'up',
duration: 500,
});
},
launch: function(){
alert('Hello search');
},
});
나는 로그 캣에서 다음과 같은 오류를 얻고있다 : -
TypeError: Result of expression 'this.render' [undefined] is not a function. at
file:///android_asset/www/app/controller/SearchController.js:18
내가 문제를 제거하는 데 도움이됩니다.
고지.
누가 저에게 이유를 설명해 주시겠습니까? – himanshu