Book a Demo

Author Topic: Private getter/setter  (Read 3131 times)

Jeanluc

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Private getter/setter
« on: April 14, 2005, 06:41:53 am »
Hi,

When I generate getter/setter property , the default scope is public. Is it possible to set private in default ?

Regards,

Jean-Luc !

mikewhit

  • EA User
  • **
  • Posts: 608
  • Karma: +0/-0
  • Accessing ....
    • View Profile
Re: Private getter/setter
« Reply #1 on: April 14, 2005, 08:27:15 am »
I thought usually the point of a getter/setter was to be a public interface ...? but don't let this stop you asking the question !

I can imagine you might want to manage access to an attribute even among private functions/methods.

Jeanluc

  • EA User
  • **
  • Posts: 23
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Private getter/setter
« Reply #2 on: April 14, 2005, 09:53:13 am »
If I need to generate private getter/setter, it's to manage delphi property access.  But perhaps is it a better method to generate delphi property ?


Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Private getter/setter
« Reply #3 on: April 14, 2005, 03:13:18 pm »
No, there isn't any way to set the default scope for properties to anything other than public.

Simon