In other kind of installer which is made by tools like Inno or NSIS, the installer can be run as many instances as you want, but there can only be one instance of Windows Installer running, so I was wondering how installers (.MSI) which are using Windows Installer to install files install pre-requested software which is also using Windows Installer?
Thursday, May 3, 2012
Tuesday, April 10, 2012
What must have for my next smart phone
1. Bigger than3.5".
3.2" is just big enough for A4 size PDF, but it hurts for long time reading.
2. Auto-focus camera. Barcode scanner does not work well with camera that can't auto-focus.
3. A louder speaker. For alarm in the morning of course.
Wednesday, March 21, 2012
Switch from code control to property control
In Delphi, we can control an Edit’s length and what can go in in the event KeyPress, for example, I have found my old code (code I have inherited from somebody else) do such things like this:
//Control only numbers can go in
if not (CharInSet(Key , ['0'..'9', #8])) then
key := #0;//Control the length
if (Length(edtFileNumber.Text) > 8) and (key <> #8) then
key := #0;
But there are easier ways, they can be accomplished by the component’s properties (confirmed in Delphi XE).
For example, the property TLabeledEdit.MaxLength can control the length of editing text.
The property TLabledEdit.NumbersOnly can control only numbers can go in.
(Please note that I have found a lot places using above code-control pattern in my old code but I have not change all of them to property control, the reason will be worth another topic, long in short, that is about risk control while changing working code)
How to pass in and out address function/procedure ?
VBScript 5.0 has a new feature which is allow you to assign a function to an event handler. In a web page, it looks like this
Window.click = getref(window_click)
It is easy isn’t? That is because “Window” is accessible to the script engine, what if it is not? For example, how do we pass
in the event handler’s variable to the script so that the script can assign a function to it, or vise versa, how do we return the
function’s address back to the host application so that it can assign it to the event handler?