Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » ArrayCtrl, HeaderCtrl & GridCtrl » Declare some methods of ArrayCtrl as protected
Declare some methods of ArrayCtrl as protected [message #46636] Fri, 17 June 2016 15:06 Go to next message
Novo is currently offline  Novo
Messages: 642
Registered: December 2006
Veteran
Hi Mirek,

Could you please change visibility of methods GetCellRect and GetCellRectM to protected? These methods are useful for development of new controls.
IMHO, the only reason to declare something as private is when it can invalidate state of an object without proper use.

TIA


Novo
Re: Declare some methods of ArrayCtrl as protected [message #46767 is a reply to message #46636] Sun, 31 July 2016 13:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 10978
Registered: November 2005
Ultimate Member
Novo wrote on Fri, 17 June 2016 15:06
Hi Mirek,

Could you please change visibility of methods GetCellRect and GetCellRectM to protected? These methods are useful for development of new controls.
IMHO, the only reason to declare something as private is when it can invalidate state of an object without proper use.

TIA


Well, another reason is when it is implementation issue and you are not sure whether you want to fix it in public interface. When something is made public, it is hard(er) to remove.

Anyway, in this case, I made them public.

Mirek
Re: Declare some methods of ArrayCtrl as protected [message #46774 is a reply to message #46767] Mon, 01 August 2016 03:18 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 642
Registered: December 2006
Veteran
Thank you!
mirek wrote on Sun, 31 July 2016 07:48
When something is made public, it is hard(er) to remove.

You are right.


Novo
Re: Declare some methods of ArrayCtrl as protected [message #47507 is a reply to message #46767] Tue, 24 January 2017 15:56 Go to previous messageGo to next message
Novo is currently offline  Novo
Messages: 642
Registered: December 2006
Veteran
mirek wrote on Sun, 31 July 2016 07:48

Anyway, in this case, I made them public.

It looks like they are private again.

I do see GetScreenCellRect and GetScreenCellRectM, which are public and are based on GetCellRect and GetCellRectM.

Could you please make GetCellRect and GetCellRectM public/protected again? They are more generic than GetScreenCellRect and GetScreenCellRectM.

TIA


Novo
Re: Declare some methods of ArrayCtrl as protected [message #47705 is a reply to message #47507] Tue, 07 March 2017 23:56 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 10978
Registered: November 2005
Ultimate Member
OK, they are back.
Re: Declare some methods of ArrayCtrl as protected [message #47709 is a reply to message #47705] Wed, 08 March 2017 02:52 Go to previous message
Novo is currently offline  Novo
Messages: 642
Registered: December 2006
Veteran
Thank you.

I believe GetCellRect was mentioned in release notes of 2017 release as a new method, but it is not there.


Novo
Previous Topic: GridCtrl Paste issue (fixed)
Next Topic: GridCtrl::InsertColumn breaks proportional column widths
Goto Forum:
  


Current Time: Wed Apr 26 07:57:55 CEST 2017

Total time taken to generate the page: 0.27390 seconds