OpenSourcePFCLibraries / 2017

The open source PowerBuilder Foundation Class libraries for Appeon PowerBuilder 2017
MIT License
24 stars 19 forks source link

DataWindow SortDraw sub-service cannot be customized or extended #34

Open JohnFauss opened 5 years ago

JohnFauss commented 5 years ago

The SortDraw sub-service of the DW Sort service (pfc_n_cst_dwsrv_sortdraw & n_cst_dwsrv_sortdraw) cannot be customized or extended due to the design & coding of both of these objects.

Access to most of the instance variables in the ancestor are assigned Private access, which prevents the descendant object from accessing the values. Additionally, many of the object functions in the ancestor are assigned Private access. As currently implemented, the descendant object essentially serves no purpose, because code to modify and/or extend functionality by overriding existing ancestor object functions in the descendant will not compile. This issue can be addressed, but only by modifying the ancestor...and this is not how the rest of the PFC has been designed.

In the pfc_n_cst_dwsrv_sort ancestor object, the instance reference variable to the SortDraw sub-service has Protected access and no public access method is provided. This also makes the SortDraw sub-service difficult to extend without modifying this ancestor object.

After examining the code in these objects in detail, I'm disappointed that the author made no attempt to structure the code consistent with the rest of the PFC. I don't want to discourage code contributions to the PFC, but why would you not make the effort to try and match the variable and argument naming schema and coding style of the PFC?

mjl38 commented 5 years ago

I think I've seen similar with other objects. I've even seen pfc classes which inherit from pfe classes, cannot remember which ones though.