mobileFX JavaScriptX - Google V8 JavaScript Embedded Framework
JavaScriptXLib ActiveX DLL / Procedures Collection / Item Property
Required. Variant with either the string name of the procedure or an integer with its index.
Item Property
Description
Get a procedure indexed by position or procedure name
Property type
Read-only property
Syntax
Visual Basic
Public Property Item( _
   ByVal Index As Variant _
) As Procedure
Parameters
Index
Required. Variant with either the string name of the procedure or an integer with its index.
Example
Private Sub Form_Load()
    
    Dim SC As ScriptControl
    Dim m As Module
    Dim f As Procedure
    
    Set SC = New ScriptControl
    SC.Language = "JavaScript"
    SC.AllowUI = True
    SC.SitehWnd = Me.hWnd
    SC.UseSafeSubset = False
    SC.Timeout = 60
        
    SC.AddCode "function foo(a,b,c){ return a+b+c; }"
    
    Set m = SC.Modules("GlobalModule")
    m.AddCode "function goo(a,b,c){ return a+b+c; }"
    
    Set f = m.Procedures.Item(1)
    Set f = m.Procedures("goo")
        
    For Each m In SC.Modules
        For Each f In m.Procedures
            Debug.Print m.Name & "." & f.Name & "( args = " & f.NumArgs & ")"
        Next
    Next
    
End Sub
See Also