Module Nesting and scope (REALbasic network user group Mailinglist archive)

Back to the thread list
Previous thread: Re: Why Not use GDI+ all the time
Next thread: [OT] Our Next REAL Studio Project


Re: Adding Rows quickly   -   Rubber Chicken Software Co.
  Module Nesting and scope   -   Karen
   Re: Module Nesting and scope   -   Charles Yeomans
    Re: Module Nesting and scope   -   Kem Tekinay
     Re: Module Nesting and scope   -   Norman Palardy
     Re: Module Nesting and scope   -   Norman Palardy
     Re: Module Nesting and scope   -   Charles Yeomans
     Re: Module Nesting and scope   -   Karen
     Re: Module Nesting and scope   -   Norman Palardy

Module Nesting and scope
Date: 03.03.10 09:45 (Wed, 03 Mar 2010 03:45:48 -0500)
From: Karen
If I have sub-module in a parent module. I want the contents of the sub-module ONLY accessible to the parent module. Logically I THOUGHT setting the scope of the sub-module to private SHOULD allow that... but it does not seem to work.

1) Am I doing something wrong?
2) If not is this a bug or intended behavior.
3) Is there another easy way to accomplish this?

Thanks,
- karen
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Module Nesting and scope
Date: 03.03.10 15:15 (Wed, 3 Mar 2010 09:15:54 -0500)
From: Charles Yeomans

On Mar 3, 2010, at 3:45 AM, Karen wrote:

> If I have sub-module in a parent module. I want the contents of the
> sub-module ONLY accessible to the parent module. Logically I THOUGHT
> setting the scope of the sub-module to private SHOULD allow that...
> but it does not seem to work.
>
> 1) Am I doing something wrong?
> 2) If not is this a bug or intended behavior.
> 3) Is there another easy way to accomplish this?
>

Try the middle setting; I think it's called 'public' in this case.

Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Module Nesting and scope
Date: 03.03.10 15:37 (Wed, 03 Mar 2010 09:37:08 -0500)
From: Kem Tekinay
On 3/3/10 9:15 AM, "Charles Yeomans" <<email address removed>> wrote:

> Try the middle setting; I think it's called 'public' in this case.

I don't think that's what she wants either, although it might be the best
she can do. "Public" would still allow an outside method to call
Outer_Module.Inner_Module.Method.

BTW, in testing, I just discovered that the "Global" option is removed for
methods in nested modules. There are only two choices.

__________________________________________________________________________
Kem Tekinay (212) 201-1465
MacTechnologies Consulting Fax (914) 242-7294
http://www.mactechnologies.com

To join the MacTechnologies Consulting mailing list, send an e-mail to:
<email address removed>






_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Module Nesting and scope
Date: 03.03.10 18:59 (Wed, 3 Mar 2010 10:59:32 -0700)
From: Norman Palardy

On 3-Mar-10, at 10:34 AM, Charles Yeomans wrote:

>
> On Mar 3, 2010, at 12:16 PM, Karen wrote:
>
>>
>> On Mar 3, 2010, at 10:01 AM, Norman Palardy wrote:
>>
>>>
>>> Yes
>>> Modules nested in modules cannot have global scope
>>> That's by design
>>
>> But what about my question?
>>
>> Is there a way to set inner module scope so it's members can be
>> accessed from outer module, but NOT by using
>> OuterModule.InnerModule.Method (or property)? I would expect that
>> to be private, but that does not work. Is that a bug, is it by
>> design> I there some way to get what i want?
>>
> If you're doing this for your project you hope to sell, I advise
> against it. Nested modules and classes do not work for me as
> external items, and so anyone else for whom this doesn't work would
> be unable to use your stuff as external items.

Correct
We'd need to export one module, with all enclosed classes, as a single
project item or group of items all contained in one file.
There are some very fundamental, and incredibly hard to alter,
assumptions in the IDE about what can / cannot be contained in a
single external file.
You'll note there are no external types that can contain more than one
item :)

I'd love to change these assumptions and have looked at this and even
worked on it several times with Aaron way back when I first started.
It's just that hard to actually do as the IDE assumes this is the case
in many places and ways.


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Module Nesting and scope
Date: 03.03.10 18:51 (Wed, 3 Mar 2010 10:51:22 -0700)
From: Norman Palardy

On 3-Mar-10, at 10:16 AM, Karen wrote:

>
> On Mar 3, 2010, at 10:01 AM, Norman Palardy wrote:
>
>>
>> Yes
>> Modules nested in modules cannot have global scope
>> That's by design
>
> But what about my question?
>
> Is there a way to set inner module scope so it's members can be
> accessed from outer module, but NOT by using
> OuterModule.InnerModule.Method (or property)? I would expect that to
> be private, but that does not work. Is that a bug, is it by design>
> I there some way to get what i want?

That roughly amounts to "friend" scope and no there is no way

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Module Nesting and scope
Date: 03.03.10 18:34 (Wed, 3 Mar 2010 12:34:12 -0500)
From: Charles Yeomans

On Mar 3, 2010, at 12:16 PM, Karen wrote:

>
> On Mar 3, 2010, at 10:01 AM, Norman Palardy wrote:
>
>>
>> Yes
>> Modules nested in modules cannot have global scope
>> That's by design
>
> But what about my question?
>
> Is there a way to set inner module scope so it's members can be
> accessed from outer module, but NOT by using
> OuterModule.InnerModule.Method (or property)? I would expect that to
> be private, but that does not work. Is that a bug, is it by design>
> I there some way to get what i want?
>

If you're doing this for your project you hope to sell, I advise
against it. Nested modules and classes do not work for me as external
items, and so anyone else for whom this doesn't work would be unable
to use your stuff as external items.

Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Module Nesting and scope
Date: 03.03.10 18:16 (Wed, 03 Mar 2010 12:16:56 -0500)
From: Karen

On Mar 3, 2010, at 10:01 AM, Norman Palardy wrote:

>
> Yes
> Modules nested in modules cannot have global scope
> That's by design

But what about my question?

Is there a way to set inner module scope so it's members can be accessed from outer module, but NOT by using OuterModule.InnerModule.Method (or property)? I would expect that to be private, but that does not work. Is that a bug, is it by design> I there some way to get what i want?

- karen


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Re: Module Nesting and scope
Date: 03.03.10 16:01 (Wed, 3 Mar 2010 08:01:47 -0700)
From: Norman Palardy

On 3-Mar-10, at 7:37 AM, Kem Tekinay wrote:

> On 3/3/10 9:15 AM, "Charles Yeomans" <<email address removed>> wrote:
>
>> Try the middle setting; I think it's called 'public' in this case.
>
> I don't think that's what she wants either, although it might be the
> best
> she can do. "Public" would still allow an outside method to call
> Outer_Module.Inner_Module.Method.
>
> BTW, in testing, I just discovered that the "Global" option is
> removed for
> methods in nested modules. There are only two choices.

Yes
Modules nested in modules cannot have global scope
That's by design

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>





Links
MBS Realbasic Chart Plugins - Christians Software aus Nickenich