2012/10/30 alex23 wuwe...@gmail.com:
On Oct 30, 2:33 am, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
I'm currently looking for a good solution to the following problem: I
have two classes A and B, which interact with each other and which
interact with the user. Instances of B are always created
Hi there,
I'm currently looking for a good solution to the following problem: I
have two classes A and B, which interact with each other and which
interact with the user. Instances of B are always created by A.
Now I want A to call some private methods of B and vice versa (i.e. what
C++ friends
2012/10/29 Johannes Bauer dfnsonfsdu...@gmx.de:
Hi there,
I'm currently looking for a good solution to the following problem: I
have two classes A and B, which interact with each other and which
interact with the user. Instances of B are always created by A.
Now I want A to call some
On Mon, Oct 29, 2012 at 9:33 AM, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
Hi there,
I'm currently looking for a good solution to the following problem: I
have two classes A and B, which interact with each other and which
interact with the user. Instances of B are always created by A.
Now
On Tue, Oct 30, 2012 at 3:33 AM, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
Hi there,
I'm currently looking for a good solution to the following problem: I
have two classes A and B, which interact with each other and which
interact with the user. Instances of B are always created by A.
Now
On 2012-10-29, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
I'm currently looking for a good solution to the following problem: I
have two classes A and B, which interact with each other and which
interact with the user. Instances of B are always created by A.
Now I want A to call some private
On 29.10.2012 17:47, Chris Angelico wrote:
The usual convention for private methods is a leading underscore on the name:
Yup, that's what I'm using.
It's only a convention, though; it doesn't make it hard to call
them, it just sends the message this is private, I don't promise that
it'll be
On 29.10.2012 17:52, Grant Edwards wrote:
By decleare them privide do you mean using __ASDF__ name-munging?
It sounds to me like you're just making life hard on yourself.
Gaah, you are right. I just noticed that using the single underscore
(as I do) does not restrict usage in any
Johannes Bauer wrote:
Now I want A to call some private methods of B and vice versa (i.e. what
C++ friends are), but I want to make it hard for the user to call
these private methods.
Currently my ugly approach is this: I delare the internal methods
private (hide from user). Then I have a
Johannes Bauer dfnsonfsdu...@gmx.de writes:
This makes the source files largish however (they're currently split up
in different files). Can I use the nested class advantage and somehow
include the inner class from another file?
You could possibly duck-punch class A:
import B
class A:
Johannes Bauer wrote:
On 29.10.2012 17:52, Grant Edwards wrote:
By decleare them privide do you mean using __ASDF__ name-munging?
It sounds to me like you're just making life hard on yourself.
Gaah, you are right. I just noticed that using the single underscore
(as I do) does not
On 2012-10-29, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
On 29.10.2012 17:47, Chris Angelico wrote:
The usual convention for private methods is a leading underscore on the name:
Yup, that's what I'm using.
It's only a convention, though; it doesn't make it hard to call
them, it just sends
On Mon, Oct 29, 2012 at 10:58 AM, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
Ah, that's nice. I didn't know that nested classes could access their
private members naturally (i.e. without using any magic, just with plain
old attribute access).
There is nothing at all special about nested
On Mon, 29 Oct 2012 17:33:24 +0100, Johannes Bauer wrote:
Hi there,
I'm currently looking for a good solution to the following problem: I
have two classes A and B, which interact with each other and which
interact with the user. Instances of B are always created by A.
Now I want A to
On Oct 30, 2:33 am, Johannes Bauer dfnsonfsdu...@gmx.de wrote:
I'm currently looking for a good solution to the following problem: I
have two classes A and B, which interact with each other and which
interact with the user. Instances of B are always created by A.
Now I want A to call some
15 matches
Mail list logo