Автор вопроса: SDL | Web-сайт:StarTeleport.Narod.Ru | ICQ: 272678283
!!!ПОМОГИТЕ!!!
У меня есть два класса:
класс для описания геом. фигур
коллекция на нем основанная
При запуске возникает ошибка (см. ниже ):
Only public user defined types defined in public object modules can be used as parameters or return types for public procedures of class modules or as fields of public user defined types.
Подскажите, что делать!
У меня в модуле (не класса):
Enum PascalColors Black = 0 Blue Green Cyan Red Purple Brown LightGrey Grey LightBlue LightGreen LightCyan Pink LightPurple Yellow White End Enum
Enum LineStyles Solid = 0 Dot Dash_Dot Dash End Enum
Enum TextFonts Bitmap = 0 Bold Small Book Gothic End Enum
Enum TextDirections Left_To_Right = 0 Bottom_To_Top End Enum
Type Style LineTextColor As PascalColors LineStyle As LineStyles LineWidth As LineWidth FillStyle As FillStyles FillColor As PascalColors Text_Font As TextFonts Text_Direction As TextDirections End Type
В классе-основе (Graph):
Private mvarObjStyle As Style 'local copy
Public Property Set ObjStyle(ByVal vData As Style) 'used when assigning an Object to the property, on the left side of a Set statement. 'Syntax: Set x.ObjStyle = Form1 Set mvarObjStyle = vData End Property
Public Property Get ObjStyle() As Style 'used when retrieving value of a property, on the right side of an assignment. 'Syntax: Debug.Print X.ObjStyle Set ObjStyle = mvarObjStyle End Property
У меня в коллекции (Graphs):
Public Function Add(ObjType As Integer, P1 As Variant, P2 As Variant, P3 As Variant, P4 As Variant, P5 As Variant, P6 As Variant, ObjName As String, ObjStyle As Style, Optional sKey As String) As Graph ... Set objNewMember.ObjStyle = ObjStyle ... End Function
Те ответы, которые пришли в прошлый раз, не помогли