Sorry for your loss. Its unfortunate that you lost your little chameleon, but its good that you want to learn from it.
Here's the short course on keeping veiled chameleons....
CAGING: depending on where you live...you can use either a screen cage or a partial screen/glass cage or one of the exo-terras that are glass but have ventilation in the front and screen lids. I prefer long low cages that are not too big for hatchlings (approx. 24"L x 12"W x 15"H). If you use a glass cage you need to be careful not to leave water laying on the floor of the cage.
You will need branches and foliage for cover...preferably live plants, non-toxic and well-washed (both sides of the leaves). You need a thermometer to be able to read the temperature. Two thermometers are even better because you can place one near the basking area and one elsewhere in the cage.
For the hatchlings, I try to keep the temperatures in the low 80's in the warmest areas with slightly lower temperatures at one end since their bodies are small and can dehydrate/overheat easier than an adult can.
LIGHTING/TEMPERATURE: I use a regular incandescent household bulb in a metal dome of a wattage that produces the proper temperature range for the chameleon to bask. With hatchlings I have not found it necessary to use a basking light...I use a double fluorescent fixture with a Repti-Sun 5.0 bulb in one half and a regular fluorescent tube in the other half. Some of the compacts, spirals and even long tubes have been found to cause problems, but this one has a clean record. (I already gave you the temperatures for a hatchling above.) For adult males I keep the basking area in the mid 80's to low 90's.
I place the basking light on/over the lid of the cage at one corner of the cage and I run the fluorescent tube lights along the length of the cages. Be aware that the UVB light should not pass through glass or plastic.
Watering: For hatchlings, I mist the cage a couple of times a day with warm water trying to make sure the water doesn't pool in large drops. I don't use a dripper for hatchlings because they can aspirate the water and drown. I use a dripper for adults...it can be as simple as a deli cup with a tiny hole in the bottom so it drips at the rate of a couple of drops per second.
FEEDING: I feed hatchlings mostly crickets of an appropriate size that have been gutloaded/fed a nutritious diet and dusted at most feedings with a phosphorus-free calcium powder (Rep-cal) to help make up for the usually poor ratio of calcium to phos. I feed the hatchlings as many crickets as they can eat in a couple of minutes. I feed them at least once a day. Adults I feed every second day. (Female veileds have to be regulated to prevent health issues...males can have a little more leeway.)
I dust lightly twice a month with a phos.-free calcium/D3 powder (Rep-cal). D3 from supplements can build up in the system and cause problems..so don't overdo it. Its best that the chameleon gets most of the D3 as a result of exposure to UVB.
Twice a month, I dust with a vitamin powder (herptivite) that has a beta carotene source of vitamin A. Beta carotene (prOformed) vitamin A can not build up in the system...but there is controversy as to whether any/all chameleons can convert it...so some people give them a little prEformed vitamin A. Excess prEformed vitamin A may prevent the D3 from doing its job and push the chameleon towards MBD.
I gutload/feed the crickets, roaches, superworms a wide assortment of greens (dandelions, collards, kale, endive, escarole, mustard greens, etc.) and veggies (carrots, squash, zucchini, sweet red pepper, sweet potato, celery leaves, etc.).
BONE HEALTH: Calcium, phos., D3 and vitamin A are 4 of the main players in bone health and need to be in balance. The above supplementing, gutloading/feeding of the insects, temperatures, UVB lighting, etc. seems to keep them in balance....at least, my chameleons seem to live long healthy lives.
Hope I haven't missed anything! Sorry if its overpowering!
Background information: I have been keeping/breeding/hatching/raising chameleons (and numerous other reptiles) for over 20 years now.
Here are some articles that might help too...
http://www.uvguide.co.uk/
http://web.archive.org/web/200605020...Vitamin.A.html
http://web.archive.org/web/200604210...d.Calcium.html
http://chameleonnews.com/?page=article&id=102
http://adcham.com/
http://raisingkittytheveiledchameleon.blogspot.com/
http://chameleonnews.com/?page=article&id=109
If you have any other questions, just ask. This is a great forum with lots of knowledgeable people to help!