Tuesday, October 26, 2010

 

Error Creating Control

I recently came across this error in a web app I had taken over from a previous developer. The app compiled fine, and ran just fine too.

The pain is caused when you need to adjust properties via the smart tag of the control. The control is no longer visible, so the only way to make the adjustments is to hand code the markup code. That can be slow, and in my case, impossible as it was a control I was not familiar with.

After much Googling, and filtering out results that dealt with VS2003, 2005, 2008, I found a solution.
VS2010 is doing a lot of things in the background, like checking your web.config file and your session variables.

Now the link at the beginning of this post refers to the OnInit() method. If you don't use this method, you may need to check your Page_Init() method.

If you are coding in VB then place this snippet at the beginning of the Sub

If Not DesignMode Then
If Context IsNot Nothing AndAlso Context.Session IsNot Nothing Then

... your code goes in here...

End If
End If

If you code in C# then place this snippet at the beginning of your method

If (!this.DesignMode)
{
... your code goes in here...
}

Save and Close the page/s, Clean and Rebuild your project.
You should now be able to see your controls again :-)

Labels: ,


Tuesday, November 10, 2009

 

Inno Setup

I spent some time today re-acquainting myself with an old friend. Back around the turn of the century, InnoSetup was a little tool by Jordan Russell that created install packages for my custom applications. My development tool of choice at the time was Computer Associates attempt at an OOP-based, windows development platform called Visual Objects. The power and elegance of the language was excellent, and even today with the advent of the .Net development platform, there are still things VO can do better than most.

Never heard of Visual Objects? I'm not surprised.

VO could truly have been a very serious contender against Microsoft's .Net platform. But for every powerful verb, for every gracious class and method, for every sublime implementation of a model, the IDE provided with VO lacked an essential piece of functionality. To say it was incomplete was an understatement. Bug-ridden, cantankerous, reluctant - oh, I could go on! I put up with this jumble of malfunctioning ones and zeroes for almost seven years. Yes, yes, I know. I have the patience of a saint.

Anyway, I digress.

InnoSetup was a brilliant utility that output perfectly working install routines with very little effort. Once I moved to Visual Objects though, I had no need of it. Or so I thought.

Somewhere in the past few weeks I have somehow scrambled Visual Studio's setup project wizard. It runs; it creates Setup.exe and msi files; but they are empty. No Primary Output. No supporting DLLs. Nothing.

So while I was searching the Internet was a solution, I came across a reference to InnoSetup, and my love affair started all over again. There's so much to love about Innosetup. It has an intuitive interface supported by a considerate host of tool tips that never get in the way but provide just enough assistance if you get stuck. There is a wonderful little addition called ISTool, written by Bjornar Henden that improves an already masterful interface.

I love using software that an individual has written that solves a common problem, especially if that software works in a manner that exceeds the performance of products from big publishing houses.

Congratulations Jordan and Bjornar! Well done. Producing tools that remain relevant through multiple generations of improvement in any industry is a feat few can lay claim to.



Labels: , ,


Saturday, June 13, 2009

 

Windows 7 Problem Steps Recorder

I lead what I think is an interesting and varied life. I am involved in a wide range of activities both professionally and socially, and I rarely find myself bored or lacking something to do. This is not to say that my life is all beer and skittles either. There are aspects of my professional life, in particular, that I would love to minimize or eradicate all together.

As I have mentioned before, much of my working life involves developing business applications, variably as a coder, an analyst or a project leader. One thing that irks me is when a user reports an error. It irks me for two reasons. Firstly, I'm disappointed that someone found an error in an application I am responsible for. I know, there is no such thing as an application without bugs, but I can't help it - I'm still disappointed.

The second reason is because the user almost always (well, 99.999999% of the time) reports very little in the way of useful information about the problem. "The program won't work." "There was an error message." "It's broken." "Something isn't right." Now I know it's the nature of things to go to as little effort as possible to get a result. We teach it at our business schools across the country. It called being efficient. Obviously these user comments provide exactly zero information about what will be required to help them. I spend far too much time reproducing and identifying errors from the tiniest scrap of evidence. This is not a part of my life that I call interesting.

However, my life is about to change for the better.

Microsoft has introduced a wonderful little app in Windows 7 called the Problem Steps Recorder (PSR). No longer will help desks need to decipher a short cryptic message about some vague problem with some application or other.

PSR provides the user with a simple tool that records what they are doing when the error occurs, and then sends it to their support professional. PSR is easy to use, has an intuitive interface, and allows you to start, pause and stop whenever you need to. It creates a zip file ready for emailing, and the delivered product not only shows all the screen shots that the user saw, but also includes a text description of the user's journey to the problem.

Unlike previous Windows troubleshooting wizards, this one works for applications other than those that form part of the O/S. Any program running on the computer can make use of this applet. Now that's true support.

You can check it out at this URL. http://technet.microsoft.com/en-au/windows/dd320286.aspx




Labels: , ,


Friday, June 12, 2009

 

OpenDNS

Many of my clients use a computer at home to access work servers or even their desktop. Some have a laptop they kart around, and when this is home, their children often use these computers for school assignments, social networking, general entertainment and, I suspect, for things their parents are either totally unaware of, or simply don't realise can be done on the web.

So I regularly receive requests for some kind of filtering or other protection to secure little children from net nasties, or from prying into company secrets. There are many good products available for this, but I have just discovered Open DNS. Now, I swear I have no pecuniary interest in this company; I don't sell their products (They're free any way), but boy have they made life a lot easier for me.

A free account, simple to configure, no rocket science involved - in a couple of minutes I had my home network configured to keep LOTS of bad things out. No more emails pretending to be from someone else (including my self). No more cursing from my daughter when she receives 300 emails from a chat site.

Do yourself a favour and check out Open DNS.

Labels: , ,


Thursday, October 16, 2008

 

DVR Card Scam

I don't normally get involved with quasi-computer technologies like PC-based security systems, but I had a customer beg me for help, and so began a journey that has uncovered, for me at least, a nice little scam being played on unsuspecting buyers on Internet auction sites.

My customer's security PC, the one that ran her security cameras and recording software, crashed and burned. I replaced it after lifting the elementary recording software off the old disk and everything transferred well - until I came to the DVR card. No matter what I did, it would not load.

After trawling through support forums, I discovered the cryptic error message actually meant that the card could not be "seen". The BIOS saw it, the operating system saw it, but the security software driver could not see it. Thinking that the DVR card may have been damaged by the power surge that brought the PC down in the first place, I went hunting for a new one.

I found dozens of them. No, probably even hundreds of them. All on Ebay.
"Great!", I thought. Spend a few dollars and my troubles are over. Not so.

After waiting for the card to arrive, installing it, loading the software driver provided with the card, I finally got... the same error rmessage! It was about this time that I noticed some tiny print on the very scant "manual" (Can a single page ever be called a manual?). "Card may not work in bus speeds greater than 533".

When was the last time you sold a PC with a bus speed that slow? It seems there is a reason why 4 port DVR cards are so cheap on Ebay. So cheap that the cost of return postage is more than the cost of the card. Oh well, I'll chalk this one down to experience. It reminds me of Robert E. Lee's Truce. Judgement comes from experience; experience comes from poor judgement.


Labels: , ,


Tuesday, October 7, 2008

 

It's the tiniest things...

I had a customer ring me the other day in a mad panic. It was a local carnival and lots of extra people around so their small business was very busy. Very early in the morning one of her touch screen POS terminals had started misbehaving.
No matter what she did, the mouse cursor would not move from the bottom right hand corner of the screen. The very tip of the mouse arrow was peeking above the bottom edge, and after a fleeting attempt to break free from its bondage, it would scurry straight back to the same position.

The strange thing was this. When I plugged a USB mouse into the unit, the cursor was happy to roam around the desktop wherever I desired, but as soon as I used my finger, or a stylus, the arrow would duck for cover underneath the bottom edge and I would have to coax it back out with the mouse.

The last time a touch screen customer had a screen problem, I had to replace the LCD unit due to a dead board. This time however, it turned out to be a cheaper solution. A tiny seed had become lodged in between the touch screen surface and the plastic bezel that surrounds the screen. This was placing pressure on the touch surface, causing the mouse cursor to move to that spot. I cleaned the groove out, firstly with a business card, and then with a small paint brush, and the cursor was suddenly happy to recommence its old habits of following a finger across the surface.

Sometimes new technology can be halted by the tiniest thing.

Labels:


This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]