Home » Post Item » …xms v2.0 continued…
this is where i waste my English words and lay my thoughts on C#, how this language came to be, and how i was able to make it through this programming language... :D i am just an ordinary programmer trying to make a living... and this is an interesting blog you've got to read...!!!

…xms v2.0 continued…

February 14, 2006

this is getting more expensive than i thought….

i have to spend at least 2 hours in an internet cafe when i want to continue creating my XMS, usually adding two to five functionalities that i have in mind for this project. and that’s about P40 at least!!!

think about it, i spend 2 hours at least per day just to get this done… *sigh* sometimes i just want to give this up…

but to think of the possibilities that i will be encountering and problems i’ll be solving, like this one…. what do you think this will do?

void CmbExpenseTypeTextChanged(object sender, System.EventArgs e)
{
bool bNotItem = false;

try {
foreach(string strTmp in cmbExpenseType.Items) {
if (!(strTmp.Trim().Equals(cmbExpenseType.Text.Trim()))){
bNotItem = true;
MessageBox.Show(”bNotItem”);

}
}
if (bNotItem)
cmbExpenseType.Text = “Others”;
}
catch {
MessageBox.Show(”Error occured when changing comboBox text”, “Error: Data Entry”);
}
}

this was supposed to change the text inside the combo box with just “Others” when the text in it is not listed in the items. instead, it creates an endless loop showing the messagebox with “bNotItem”… *sigh*

well, still solving this one…

Posted by acemtrace at 6:15 pm | permalink

All comments are moderated. Your comments will not appear here unless approved by the blog owner. Thank you.

Add a comment