aScriptControl.Procedures("foo") returns an object (type ScriptProcedure)
for procedures that are defined within that control. Can anyone explain why
the [censored] doesn't aScriptControl.Procedures("nonexistant") return
Nothing, but instead errors out with the silly "Invalid procedure call or
argument" message? Does anyone in Microsoft ever think?
Why would I want to error out? I guess just to make the code more messy
right? So that instead of nice and clean
If Not aScriptControl.Procedures("foo") Is Nothing Then value =
aScriptControl.Run( "foo", value)
I'm supposed to write something like
On Error Goto HeyItAintThere
value = aScriptControl.Run( "foo", value)
StirTheSpaghetti:
...
HeyItAintThere:
If Err.Number = 438 Then
Err.Clear
GoTo StirTheSpaghetti
End If
TheOrdinaryErrorHandler:
other load of bull^B^B^B^BVB
End Function
Aint that sweeeeeeet?
And no I do not expect any reply. Just like I do not expect the VB/COM/.Net
Framework objects to behave sanely.
Jenda
P.S.: I'd also like to meet the guy who decided that VB will evaluate
conditions fully.
While (Not rst.EOF and rst.Fields("Type").Value = 1)
Hey, don't be silly, that'd be too simple, dude!
Archived from group: microsoft>public>vb>ole