Saturday, September 26, 2009

how to enumerate enum?

internal enum ChartRendererTypes
{  TabularTextual,  GanntChartFX }
foreach (ChartRendererTypes suit in Enum.GetValues(typeof(ChartRendererTypes)))
{
}

Thursday, September 24, 2009

Debugger issues

Debugger cannot start if

Protected ReadOnly Property Logger() As ILogger
Get
CreateLogger()
Return mLogger
End Get
End Property

Why? This is not good. First, this property is intended to be get only, not set so VB requires adding ReadOnly key. Fine so far! But CreateLogger() is a function call that ensures mLogger comes out alive i.e. if mLogger is not already instantiated, then the function instantiates it, sets to specific log file etc. But we cannot test that, the VS debugger does not like that function and just simply says the debugger cannot be started! The release version bombs as well and prompts you with that dialog box asking if you want to see the error with a debugger (however, I noticed the dialog had VS2003 debugger!! I'm using VS2008 IDE!!)

Solution: Write "Me.CreateLogger()"

Saturday, September 12, 2009

Samsung 4500W printer info

Support

Things like how to scan using Scan Thru, where to buy a toner etc.

Should be able to see the printer's own website (thru a web service). Just type in its IP address as set up by DHCP router.

Ctrl panel should have Samsung Scan Manager thru which you can quick scan also - may need to set up the IP there though.