Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 01/09/2025 in all areas

  1. I am attaching a simplified example and but I'm going to describe an example of where I'm running into this problem. Lets say I have a class "Dialog" and from that I have a child class "Channel Config Dialog" The Dialog class accepts Dialog Pages and puts them in its private data, and the Channel Config Dialog accepts Channel Config Dialog Pages (a subclass of dialog page), but wants to reuse the fact that its parent already caries around pages. So there is a protected set method defined in the dialog class that allows the Channel Config Dialog to put Channel Config pages into the Parent Dialog Class's private data. So, I do this by having a static method in the child class, call it "set pages," and this method only accepts Channel Config Dialog Pages on its connector pane. This method then calls the protected method of the parent class to set the pages in the parent data. However, now the pages are being carried around on a parent Dialog Pages wire. If I want to call a Channel Config Dialog Pages method I'm out of luck. So, I was using to more specific class, assuming it's fairly safe because I have specified the connector pane on the child class's "Set Pages" method to not accept any Dialog Page type other than the type it expects. What I can't determine is if this is Ok or if it's pointing to a bad design decision and there is a better way. If you are confused hopefully the attached code helps config.zip
    1 point
×
×
  • Create New...

Important Information

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