Possible bug in properties which set/return objects? 
Author Message
 Possible bug in properties which set/return objects?

Has anyone out there noticed that a VB property field
which accepts/returns an object is problematic when used
in a Windows Control library?

i.e.

Public ReadOnly Property DateObject() As EBFDate
    Get
    End Get
End Property

produces an error for me when(presumably because it is
trying to instantiate the object????  when I drag an
instance of the control onto a form.

whereas the following works fine

Public Function DateObject() As EBFDate
End Function

This looks like a bug.



Sat, 02 Apr 2005 12:02:18 GMT  
 Possible bug in properties which set/return objects?

Quote:
> Has anyone out there noticed that a VB property field
> which accepts/returns an object is problematic when used
> in a Windows Control library?

> i.e.

> Public ReadOnly Property DateObject() As EBFDate
>     Get
>     End Get
> End Property

> produces an error for me when(presumably because it is
> trying to instantiate the object????  when I drag an
> instance of the control onto a form.

> whereas the following works fine

> Public Function DateObject() As EBFDate
> End Function

> This looks like a bug.

Both work well for me. Do you get an error or how does the problem show?
For testing, I declared an empty class called EBFDate.

Armin



Sat, 02 Apr 2005 17:44:30 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Width property, Possible bug?

2. SHFileOperation...set of possible error values returned by same

3. BUG: Default property returning null

4. BUG: Default property returning null

5. Setting Field Properties in Access 2000 possible?

6. Set EmailAddresses property, it's possible?

7. Set EmailAddresses property, it's possible?

8. BUG: Anchor property cannot be set on TabPages

9. array object property possible?

10. Possible Bug, Possible Faulty code

11. MaskEdBox .Text property Binding object bug in VB 6

12. CDO: Parent property always returns session object

 

 
Powered by phpBB® Forum Software