Announcement

Collapse
No announcement yet.

Property Get Access

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roberto Valois
    replied
    Hi José,

    Yes, it does compile the way you sugest.

    The point is that I think it should work the way I wrote to be more consistent.
    See, you can do -> ArvFile.Frm = bmp to set a Property.

    No big deal.

    Thank you,
    RValois.

    Leave a comment:


  • José Roca
    replied
    Instead of bmp = ArvFile.Frm use TYPE SET bmp = ArvFile.Frm.

    Leave a comment:


  • Roberto Valois
    started a topic Property Get Access

    Property Get Access

    This Code:

    Code:
    #Compile Exe
    #Dim All
    
    #Include "win32api.inc"
    
    Class CArvFile
    
      Interface IArvFileMaipulation
        Inherit  IUnknown
    
        Property Get Frm As Bitmap
          Local bmp As Bitmap
          bmp.bmWidth = 333
          Property = bmp
        End Property
    
      End Interface
    
    End Class
    
    Function PBMain As Long
      Local bmp As Bitmap
    
      Dim ArvFile As IArvFileMaipulation
      Let ArvFile = Class "CArvFile"
    
    '  ArvFile.Frm To bmp           'Ok
    '  call ArvFile.Frm To bmp      'Ok
    *****************************************************************
      bmp = ArvFile.Frm            'Does not Compile - Error 482: Data type mismatch
    *****************************************************************
      ? Str$(bmp.bmWidth)
    
    End Function
    Should compile, right? Am I doing something wrong? Maybe I misunderstand the help file...

    Regards,
    RValois.
Working...
X