|
Notice a few COM guys on the board. Was just tracing the Kixtart -> Forms COM interface and noticed (discovered) something interesting. Know how sometimes you want to silence a COM call because it returns an object - and your not interested in keeping a handle to that object so you silence it like this:
$ = $Excel.Sheets.Add
If you don't silence it - Kixtart will throw an exception anyway ... but with Forms, noticed that this syntax also works to silence the call.
$Excel.Sheets.Add.
Notice the period at the end of the statement ... I think I understand why this works (in Kixtart anyways). By specifying the period - your instructing Kixtart to take the object returned by this portion in brackets:
[$Excel.Sheets.Add].
and use it in the next nested operation - which in this case - doesn't exist [.(nothing)]
Basically what I think is going on here is that we are fooling Kixtart into think that a method or property call will be performed (after the period) - when in fact there isn't any .. so the Object handle that would normally roll into the next operation - gets discarded into the bit bucket ... heheee [ 28. September 2002, 22:08: Message edited by: Shawn ]
|