Adding canvas items dyanamically to Sencha Touch List

Below example can be tried on!/api/Ext.dataview.List

Ext.define(‘Contact’, {
extend : ‘’,
config : {
idProperty : ‘firstName’,
fields : [‘firstName’, ‘lastName’]
Ext.define(‘Contacts’, {
extend : ‘’,
config : {
model : ‘Contact’,
storeId : ‘Contacts’,
data : [{ firstName : ‘Tommy’, lastName : ‘Maintz’},
{ firstName : ‘Rob’, lastName : ‘Dougan’},
{ firstName : ‘Ed’, lastName : ‘Spencer’},
{ firstName : ‘Jamie’, lastName : ‘Avins’}
var store = Ext.create(‘Contacts’);
Ext.create(‘Ext.List’, {
fullscreen : true,
itemTpl : ‘<div> <div class=”contact”>{firstName} <strong>{lastName}</strong></div>’ +
‘<div> <canvas class = “drawCanvas” id=”{firstName}” width=”200″ height=”100″ “> <div>’ +
store : ‘Contacts’,
listeners : {
‘refresh’ : function () {
console.log(‘calling refresh’);
‘initialize’ : function (cmp) {
console.log(‘calling initialize’);
cmp.getStore().on(‘addrecords’, function (store, records, eOpts) {
var c = document.getElementById(records[0].data.firstName);
var ctx = c.getContext(“2d”);
ctx.fillStyle = “#FF0000”;
ctx.fillRect(0, 0, 150, 75);
var canvasArray = cmp.element.dom.getElementsByClassName(‘drawCanvas’);
Ext.Array.each(canvasArray, function (canvas, index) {
var ctx = canvas.getContext(“2d”);
ctx.fillStyle = “#FF0000”;
ctx.fillRect(0, 0, 150, 75);

‘select’ : function (cmp, record, eOpts) {
var store = cmp.getStore();
var no = Math.round(Math.random() * 100);
var name = ‘te’ + no;
firstName : no,
lastName : ‘Maintz’

Posted in Sencha Touch, Uncategorized | Tagged , , | Leave a comment



These days we hear lot about doomsday and it’s supposed to be happening this year 2012 December 21st. interestingly it’s on my birthday. As a curious case of mine, it required my attention. As analysis begun the mind bombarded with obvious questions?  What, When, Why? Without any surprise I had answers for former duos. But latter pricked needle into my consciousness. No where it is mentioned why world should end.

Let us understand this.World means universe which consists of earth, earth’s atmosphere and earth’s surroundings which are other planets and solar system as whole. What are we? We are human being carrying body which is nourished by earth.  Mother gave birth to us. So with all respect we do take care of her till her life span ends. But earth also played a magnificent role in nurturing our body and mind. As an infant we crawled across, as a kid we played across and as an adult we enjoyed being in this beautiful earth. But have we ever cared for even a single moment for mother earth? Have we cared for fresh air we breathe?  Have we cared for water we drink? We assumed all these as our patrimonial to us.

Every human being thought went same way, without showing any gratitude to mother earth.  Significant years have been passed earth has become more polluted and water has been diluted. As motherly role earth gave as much as it can. But even it has physical structure, which has to go through change. So some or other day it has to end. Actually it is our luck earth still exists. It should have ended long ago. It only exists because planet has other animals then human beings who don’t have brains and they just live.

At least now everyone should plant one or two plants and make sure that it grows into tree. Let us thank this earth for sustaining for millions of years and further. Let us make oath to take care of our mother earth. Forget about doomsday, let us celebrate earth’s day and give as much as we can give to this earth.

Posted in Peppy | Leave a comment

Pursuit of Happiness vanishes in expression of happiness

Pursuit of Happiness vanishes in expression of happiness.

As I meet lot of people everyday, I always like to involve in depth conversation. My general understanding from all conversation is same. Nobody is happy neither with their job nor with their manager. They take lot pride to be querulous about their job. They keep complaining or nagging about their fate.

As analyze I conceived it as human tendency towards negativity. Everybody likes negativity. We like to watch news about murder or clash or terrorist attack. Instead we could have watched a news about development activities or Amendment under discussion or biography of freedom fighter. Our inclination towards negativity leads us to complain all the negative impacts in our life. Because In a day they might have encounter so many good incidents like they might have seen beautiful lady in office premises, or they might have listened  to new song or they might have watched a thrilling movie or they have had delicious Dosa as morning breakfast. Instead of all these beautiful events or much more then this, we tend to be whiny. We take lot of pride to be petulant.

Life is more expression of happiness then pursuit of happiness. If we endeavor to enjoy small events, we will see big difference in our life. For example instead of being fretful about traffic jam try to change your office timings. Make small contributions to society or humanity like ‘Always say no to ATM cash withdrawal receipt or prefer E bills instead of paper based bills’. These small acts by everyone will be like buffer fly effect.

Its the time to change within then outside. Lets live in better world with synergism.

Posted in Peppy | Leave a comment



ಮೂಢನ ನೇಸರದಲ್ಲಿ ರವಿ ಮಲಗ ಹೋರಟ
ಹಸಿರಿನ ಭುವಿಯಲ್ಲಿ ಕತ್ತಲೆಯ ಕೂಟ
ಮನದ ಗವಿಯಲ್ಲಿ ನೆನಪಿನ ಆಟ
ಕನಸಿನ ಕಂಗಳಲ್ಲಿ ನನ್ನಾಕೆಯ ನೋಟ.

ಮೆಘದ ಮಳೆಗೆ ಮೋಡಗಳೆ ಹೂವು
ಹಸಿದ ಭುವಿಗೆ ಮಳೆಯೇ ಜೇನು
ತರುವಿನ ಕೊನೆಗೆ ದರೆಯೆ ಬಸಿರು
ತನುವಿನ ನಗೂವಿಗೆ ನಲ್ಲೆಯ ಉಸಿರು

ದಿನದ ನಾಟ್ಯದಲ್ಲಿ ನನ್ನವಳ ನರ್ತನ
ನೆನಪಿನ ಮೌನದಲ್ಲಿ ನನ್ನಕೆಯಾ ಗಾಯನ
ನಯನದ ಬಿಂಬದಲ್ಲಿ ನಲ್ಲೆಯ ಆಯನ
ಲೇಖನೀಯ ಅಂಚಿನಲ್ಲಿ ಕನ್ನಿಕೆಯ ಕವನ

ಜೀವನದ ಪಥದಲ್ಲಿ ಆಸೆಗಳ ಸಾಗರ
ಆಲೆಗಳ ಸುಳಿಯಲ್ಲಿ ನೌಕೆಯ ಪಯಣ
ನೌಕೆಯ ಚಲನಕೆ ದಡ ಸೇರುವ ತವಕ
ಮನದ ಓಟಕೆ ನಾನಾದೆ ಬಾವುಕ.

Posted in ಕಲ್ಪನೆ | Leave a comment


ಅರಿವಿಲ್ಲದ ತಲೆಗೆ ಕಾಣದ ಕಳವಳ
ಚಿಂತೆ ಚಿತೆ ಎಲ್ಲವೂ ನಿರ್ಲಿಪ್ತ

ಬದುಕಿನ ನಿರ್ವಿಕಾರ ರೂಪದ ಮಳೆಗೆ
ಭಕ್ತಿಯ ಕೊಡೆ ಹಿಡಿದು ನಡೆ.

ಅಲ್ಲಲ್ಲಿ, ಮಗದಲ್ಲಿ ದುಕ್ಕ ಸಂತೋಷದ ಹೊಳೆ.
ಮತ್ ಅದೇ, ಮಗದೊಮ್ಮೆ ಕೂಡಿ ಬಾಳುವ ಕಲ್ಪನೆ.

ತಿಳಿದು ತಿದ್ದಿದರು ಸಿಗುವವನು ನಾನೊಬ್ಬನೇ.
ನನಗ್ಯಾರೂ, ನಿನಗ್ಯಾರೂ ಅನ್ನುವ ಹಗೆ.

ಇತ್ತ ನೋಡು, ಅತ್ತಾ ನೋಡು
ನಡೆದೇ ನೀ ಬಲೂದೂರ,

ಕೊಂಚ ತಾಳು, ಹಣ್ಣಾಗೂಡು ಕೂಡಿಮಿಸೆ
ಹಿಂದೆ ನೋಡು , ನೋವುವುದೂ ನಿನ್ನ ತೊಡೆ..

ಏಕೆ ನೀ ನಡದೇ, ತಿಳಿಯದೇ ನೀ ಹಡೇದೇ..
ಕಾಲ ಚಂಚಲ, ನೀನು ನಿತ್ಯ ನಿಶ್ಚಲ

Posted in ಕಲ್ಪನೆ | 1 Comment


ಭಾವೆನೆಗಳ ಸೇರಗಿನ ಅಂಗಳದಲ್ಲಿ ಅಡಗಿ
ಕನ್ ಗೊಂಬೆಯ ಬಿಂಬದಲ್ಲಿ ಮಲಗಿ
ತಂಗಾಳಿಯ ಮಡಿಲಲ್ಲಿ ಮಗುವಾಗಿ
ಕಲ್ಪನೆಯ ಕನ್ನಡಿಯಲ್ಲಿ ಕಾಧಿಹೆ ನಿನಗಾಗಿ.

ಉಸಿರಿನ ಕಸೀರಿನ ಕಡಲ ಕೀನಾರೆಯಲ್ಲಿ
ನೈದಿಲೆಯ ದಳದ ಅಂಚಿನ ಇಂಚಿನಲ್ಲಿ
ಹಸಿರಿನ ಬಸಿರ ಇಬ್ಬನಿಯ ಬನದಲ್ಲಿ
ಕನಸಿನ ಕವನದಲ್ಲೂ ಕನವರಿಸಿದೆ ನಿನಗಾಗಿ.

ಚಂದಿರನಾ ಬೆಳೆದಿಂಗಳ ತಂಪಾದ ಬಳ್ಳಿಯಲ್ಲಿ
ಸುರಿಯುವ ಸೋನೆ ಮಳೆಯ ಹನಿಯ ಕವನದಲ್ಲಿ
ಹೂಬನದ ಕನ್ನೆ ಮೂಢೀದಿರುವ ಮಲ್ಲಿಗೆಯಲ್ಲಿ
ತೊರೆಯ ತೆರೆಯಲ್ಲ್ಲು ತಡಕಾಡಿದೆ ನಿನಗಾಗಿ.

ಆಗಸದ ಅಂಚಿನ ಕೋಲ್ಮಿಂಚಿನ ಕಿರಣದಲ್ಲಿ
ಮಿಟಿದಾ ತಂತಿಯಲ್ಲಿ ಜನಿಸಿದ ಸ್ವರದಲ್ಲಿ
ಹೃದಯದಲ್ಲಿ ಚಿತ್ರಿಸಿ ಚಿಮಿಕಿಸೀದ ರಂಗೋಲಿಯಲ್ಲಿ
ಮನದ ಬಾಗಿಲಲ್ಲಿ ತೋರಣಕಟ್ಟಿ ಹಲುಬಿಧೆ ನಿನಗಾಗಿ…..

Posted in ಕಲ್ಪನೆ | Leave a comment

Everlasting views of selfish intellect

Every individual adores celebs. Even they show lot of respect to their closed ones, especially friends. Now lets take a scenario where one of adored celeb goes around with another celeb. In a similar situation one of your friend start going out with girl. After some months let’s think both them have ditched their girlfriend and caught a new one.

Now lets understand our behaviour. We take lot of pride tell our friends about celeb’s new affair.But we make disparaging remarks about our own friend’s affair. Here our mind shows double standards on our views.

If we analyse the above situation, we can see selfishness our mind. In case of celeb, mind finds lot of happiness by explaining celeb’s lasciviousness. In case of our own friend, our mind  finds itself being competitor with friend’s mind. Our mind tries to end the frusturation of being defeated in its own field. This leads in making derogatory comments about your friend. So that our mind finds little happiness by bringing them down in your conversation.

Ultimately our mind being selfish for happiness in its own hypocritical world.

Posted in Peppy | Leave a comment