Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

error with boutton

$
0
0

hi I have this error when i click in the botton: TextView: TextView does not support text selection. Action mode cancelled. titanium this is the code: var favButton = Titanium.UI.createButton({ title: 'J y vais', font: {fontSize: 14, fontFamily:"SpicyRice-Regular"}, // color:'#FFFF00', left: 10, top: 10, width: 140, height: 40, added: 0
}); //testt(); favButton.addEventListener('click',function(){ // Ti.include('database.js'); // var affectedRows = e.row; if (favButton.added == 0) { var newId = insertFavorite(detailWindoww.title,detailWindoww.description); Ti.API.info('Newly created favorite id = ' + newId); detailWindoww.id = newId; alert('This recipe has been added as a favorite!'); favButton.added = 1; favButton.title = 'Remove Favorite'; } else { deleteFavorite(detailWindoww.id); Ti.API.info('Deleted ' + affectedRows + ' favorite records. (id ' + detailWindoww.id + ')');
detailWindoww.id = 0; alert('This recipe has been removed from favorites!'); favButton.added = 0; favButton.title = 'Add Favorite'; } });

detailWindoww.add(favButton);

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>