module in a module not supported?

  1. ‹ Older
  2. 7 months ago

    Lars L

    28 Nov 2019 Testers, Xojo Pro Europe (Germany) -> ///entire....
    Edited 7 months ago

    @Emile S You know you can add a folder in the navigation pane and place Modules (and windows, etc.) in them ?

    Sure, but what we always do is, we build easy to use namespaces like via.api.get(param). Folders don't give us this ability.

    It helps to structure your code better. Especially if you have hundreds of functions like we usually have.

  3. Emile S

    28 Nov 2019 Europe (France, Strasbourg)

    Lars, you know I do not understand “why you want to do that” part ! ;)

    I do not even know it is possible to ember modules in modules…

    How many nested modules can you … embed ?

    The idea is to group the modules by kind:
    one master module
    many Master.Childs // Sorted by affinity with short names

    and each Master.Childs holds a bunch of GrandChilds.

    But you may already done that.

  4. Lars L

    28 Nov 2019 Testers, Xojo Pro Europe (Germany) -> ///entire....

    I totally agree that there are other ways to structure your code.

    In fact, nesting modules in one and another is possible and we've done this several times in the past.

    The thing is, that now this behaviour occurs and I wanted to know why and if some else experience this as well.

    :)

  5. Emile S

    28 Nov 2019 Europe (France, Strasbourg)

    USA’s east coast will awake soon and so an answer will certainly come too.

  6. Rick A

    28 Nov 2019 Testers, Xojo Pro (Brazil. UTC-3:00)

    Nested modules is a must for Xojo that already misses basic things like local functions and local classes (writing functions inside functions and nesting classes inside other classes).
    Q: We have folders, so why this is important?
    A: Modules have scopes and folders not. So you can hide large and complex private functionality from the outside world while allowing a parent public module expose the public "interfaces" to the public functionality. It's a kind of nesting folders but with scope hierarchy.

  7. Thom M

    28 Nov 2019 Greater Hartford Area, CT

    It’s definitely supported. Something else is going on, I just can’t tell what.

  8. Beatrix W

    28 Nov 2019 Testers, Third Party Store Europe (Germany)

    Nested folders are only supported for text format. See Feedback Case #8265 .

  9. Rick A

    28 Nov 2019 Testers, Xojo Pro (Brazil. UTC-3:00)
    Edited 7 months ago

    I've noticed that the pointed clash was in Module.Name , another guy had a problem in code, also broken, due to his "Object.Name" that always worked before. Some Gremlin seems introduced in the naming of things. Here is the Gremlin: https://forum.xojo.com/57207-smtp-secure-socket-r2019-2-1

  10. Greg O

    28 Nov 2019 Xojo Inc scout.galaxy.barn

    @Lars L - Do you happen to have a folder at the same level as the Module with the exact same name?

  11. Lars L

    29 Nov 2019 Testers, Xojo Pro Europe (Germany) -> ///entire....

    @Greg OLone @Lars L - Do you happen to have a folder at the same level as the Module with the exact same name?

    No, I don't. :/

    What I made is, I completely recreated the module and compiled it after each step. Took me two hours of work, but now I have the module structure I wanted.

    It seems that copying methods into nested modules are responsible for this bug.

  12. Anthony C

    29 Nov 2019 Testers, Xojo Pro, XDC Speakers, Third Party Store, Forum Moderators, MVP GraffitiSuite Developer
    Edited 7 months ago

    Make sure everything in API is Protected, not Global. That property should be Protected, IIRC.

    Also, when copy/pasting methods in nested modules, sometimes they look Protected, but you need to update their scope anyway.

  13. Lars L

    29 Nov 2019 Testers, Xojo Pro Europe (Germany) -> ///entire....

    @Anthony C Make sure everything in API is Protected, not Global

    Yes, this is smthng we noticed already, but our methods are all protected.

  14. Rick A

    29 Nov 2019 Testers, Xojo Pro (Brazil. UTC-3:00)

    Solved or still broken?

  15. Lars L

    29 Nov 2019 Testers, Xojo Pro Europe (Germany) -> ///entire....
    Edited 7 months ago

    Was still broken. As I mentioned, this is something we already knew. And as you can see in Screenshot, all methods are yellow, which means they are protected.

    Edit:
    the property in the screenshot was also protected. The color just applies if you change it again (which seems to be a bug as well).

  16. Anthony C

    29 Nov 2019 Testers, Xojo Pro, XDC Speakers, Third Party Store, Forum Moderators, MVP GraffitiSuite Developer

    And it still doesn't work after manually re-setting the property scope? I improperly said earlier that the Copy/Paste bug only effects methods, and was just testing and found that it applies to all. Once I reset scope manually, I was then able to run my test project.

  17. Lars L

    29 Nov 2019 Testers, Xojo Pro Europe (Germany) -> ///entire....

    @Anthony C And it still doesn't work after manually re-setting the property scope?

    Yes I am sure ;)

  18. Greg O

    29 Nov 2019 Xojo Inc scout.galaxy.barn

    @Lars L And as you can see in Screenshot, all methods are yellow, which means they are protected.

    I would verify that. Copy & Paste will often just use whatever the original values are, but it wouldn’t surprise me if the Navigator is trying to be “smart” and only displaying what they should be.

  19. Edited 7 months ago

    I reported a similar issue a month ago... Dealing with it costed me a lot of time!

    Feedback Case #57990

  20. Derk J

    1 Dec 2019 Testers, Xojo Pro

    @Greg OLone I would verify that. Copy & Paste will often just use whatever the original values are, but it wouldn’t surprise me if the Navigator is trying to be “smart” and only displaying what they should be.

    How could that be "smart". It would be smart if it "automates" fixes for you there so it just works.

  21. Tim J

    1 Dec 2019 Testers, Xojo Pro N. Phoenix, AZ

    @Derk J How could that be "smart". It would be smart if it "automates" fixes for you there so it just works.

    Greg's quoted "Smart" there was cynicism in that he said it's "Trying" to be smart. It's obviously failing :D.

or Sign Up to reply!