Bugfix Includes:
- Now check Includefile to constant "#PB_Compiler_Home" and with added "+" Strings
Please test it
GT

Code: Select all
IncludePath #PB_Compiler_Home + "path_to_DirectX\"
XIncludeFile "d3dx9.pbi"
Class MyClass Extends BaseClass
EndClass
[COMPILER] Line 3: Syntax error!
Code: Select all
...
Interface IMyClass Extends IUnknown
...
Translate( Translation.D3DXVECTOR2)
EndInterface
...
Code: Select all
...
structure D3DXVECTOR2
...
endstructure
Code: Select all
IncludeFile "dx.pbi"
class myclass extends baseclass
Translation.D3DXVECTOR2
endclass
(topfile.oop)Line XX: Structure not found: D3DXVECTOR2
Code: Select all
; Organization for OOP with structures
; All needed structures as first
Structure udtStruct
value1.l
value2.l
EndStructure
; All classes and methods
Class MyClass Extends BaseClass
; Attributes
val1.s
val2.udtStruct
; etc
EndClass
Method MyClass_Function(*this.MyClass, *mystruc.udtStruct)
With *this
EndWith
EndMethod
; Create Object
*myObject.iMyClass = NewObject(MyClass)
*myObject\Function(MyData.udtStruct)
; Release Object
*myObject\Release()
Code: Select all
; Organization for OOP with structures
; Structures for MyClass ******************************************************
Structure udtStructMyClass
value1.l
value2.l
EndStructure
Class(MyClass)
; Attributes
val1.s
values.udtStructMyClass
; etc
EndClass
Method MyClass_Function(*this.MyClass, *mystruct.udtStructMyClass)
With *this
\values\value1 = *mystruct\value1
EndWith
EndMethod
; Structures for SubClass *****************************************************
Structure udtStructSubClass
value1.l
value2.l
EndStructure
Class(SubClass)
; Attributes
val1.s
values.udtStructSubClass
; etc
EndClass
Method SubClass_Function(*this.MyClass, *mystruct.udtStructSubClass)
With *this
\values\value1 = *mystruct\value1
EndWith
EndMethod
; test ************************************************************************
; Create Object
*myObject.iMyClass = NewObject(MyClass)
*myObject2.iSubClass = NewObject(SubClass)
*myObject\Function(MyData.udtStructMyClass)
; Release Object
*myObject\Release()
*myObject2\Release()