Jump to content

Possibility to include XControls into classes


Recommended Posts

Hi,

XControls seem to violate the encapsulation scheme of LabVOOP as they cannot be included into a class. This means that the developer cannot class private or protected methods in an XControl. As a result the developer is forced to make some unnecessary methods public so that these methods can be used in an XControl. These methods will then become as an API of the class which may not be ideal, as this may unnecessarily expose the implementation. After all one important concept in OOP alltogether is hiding the implementation.

Consider that you want to encapsulate graphics objects as a class. You only want to expose the graphics objects to an XControl, there would be no methods to query any of the properties of the graphics objects. You would like to write a dynamic method draw, but make it only accessible to the XControl, as it makes no sense outside the XControl. XControl may be integral part of the class, but LabVOOP forces it to be separated from the class.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.