Re: Question about property & method access scope.

2021-05-11 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 10:48:03 UTC, Mike Parker wrote: On Tuesday, 11 May 2021 at 09:10:02 UTC, Vinod K Chandran wrote: So in many situations, I need to check some boolean properties of Window class and call some functions of Window class in WndProc. But I don't want to expose those props

Re: Question about property & method access scope.

2021-05-11 Thread Vinod K Chandran via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 10:47:15 UTC, cc wrote: The `package` protection attribute should work here if the modules reside in the same package (directory)? Thanks. "package" scope worked.

Re: Question about property & method access scope.

2021-05-11 Thread Mike Parker via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 09:10:02 UTC, Vinod K Chandran wrote: So in many situations, I need to check some boolean properties of Window class and call some functions of Window class in WndProc. But I don't want to expose those props and functions to the user. So if I make them private, I can

Re: Question about property & method access scope.

2021-05-11 Thread cc via Digitalmars-d-learn
On Tuesday, 11 May 2021 at 09:10:02 UTC, Vinod K Chandran wrote: Hi all, I am practising D with a win api GUI hobby project. I have a Window class and it resides in module window.d My WndProc function resides in another module named wnd_proc_module.d Inside my WndProc, I get the Window class li

Re: Question about property & method access scope.

2021-05-11 Thread drug via Digitalmars-d-learn
11.05.2021 12:10, Vinod K Chandran пишет: Hi all, I am practising D with a win api GUI hobby project. I have a Window class and it resides in module window.d My WndProc function resides in another module named wnd_proc_module.d Inside my WndProc, I get the Window class like this. ```d Window win

Question about property & method access scope.

2021-05-11 Thread Vinod K Chandran via Digitalmars-d-learn
Hi all, I am practising D with a win api GUI hobby project. I have a Window class and it resides in module window.d My WndProc function resides in another module named wnd_proc_module.d Inside my WndProc, I get the Window class like this. ```d Window win = cast(Window) (cast(void*) GetWindowLong