Unable To Create SAX Basic Classes & Modules 
Author Message
 Unable To Create SAX Basic Classes & Modules

Help! I am unable to run examples of class and object modules taken from the
SAX BASIC help files. I emailed SAX, but got no reply Any suggestions would
be gratefully receieved. I have inclued two examples (straight out of the
help files with the error line commented. Thanks.

Brett Sheran

'#Uses "File.CLS"
Sub Main
     Dim File As New File
     File.Attach "C:\AUTOEXEC.BAT"
     Debug.Print File.ReadLine
End Sub

'File|New Module|Class Module  'ERROR HERE 'Expecting Specific Object Type'
Option Explicit
Dim FN As Integer
Public Sub Attach(FileName As String)
     FN = FreeFile
     Open FileName For Input As #FN
End Sub
Public Sub Detach()
     If FN <> 0 Then Close #FN
     FN = 0
End Sub
Public Function ReadLine() As String
     Line Input #FN,ReadLine
End Function

Private Sub Class_Initialize()
     Debug.Print "Class_Initialize"
End Sub

Private Sub Class_Terminate()
     Debug.Print "Class_Terminate"
End Sub
'#Uses "System.OBM"
Sub Main
     Debug.Print Hex(System.Version) 'ERROR HERE: unexpected text
End Sub

'File|New Module|Object Module
Option Explicit
Declare Function GetVersion16 Lib "Kernel" _
     Alias "GetVersion" () As Long
Declare Function GetVersion32 Lib "Kernel32" _
     Alias "GetVersion" () As Long

Public Function Version() As Long
     If Win16 Then
         Version = GetVersion16
         Version = GetVersion32
     End If
End Function

Tue, 08 Nov 2005 21:23:30 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Unable To Create SAX Basic Classes & Modules

2. Class Modules & Modules

3. Q(VB5) : Different between module & class module

4. Class Module & Module

5. Class modules 97 - Refering to array within a custom class module

6. Accessing procedures of a class module from another class module

7. type statement & class modules

8. Arrays in Class Modules & how to access

9. Class Module & Form together

10. Problems with Paramaters & Class Modules

11. Class Module - Cannot create an event procedure for control on form

12. Creating Class Module????


Powered by phpBB® Forum Software