There’s an unfortunate bug in Xojo (and Real Studio) that decreases the value of namespaces for those of us who sell and provide code to other developers. You currently cannot encrypt a module that contains classes due to a major bug in the IDE. You can encrypt the classes inside of the module in binary and XML formats, but if you do, then you can’t save in version control format.
The main benefit of namespaces is to avoid unintentional clashes with names in code that you don’t own or control. If it was only a matter of our own internal projects we could just change names if and when a clash arises but we’re shipping our code to other people and we can’t reasonably ask them to modify their code if there’s a name conflict.
In Xojo, we have two choices:
- Use modules as a namespace. It would be nice if there was better support for this but it works fairly well.
- Give our classes long names that have some kind of prefix or suffix (this is the approach taken by Monkeybread Software, which predates namespace support).
We’ve chosen to go with namespaces but that won’t work for encrypted classes. This is unfortunate because the same people who deliver encrypted classes are also the most likely to be creating the sort of project that would benefit from namespaces.
Right now there’s not a good work-around for this. The options are basically to stop using namespaces or tell our customers they can’t use version control format. Either solution stinks. Not using namespaces eliminates much of the advantages of using them and we would have to name our classes so that conflicts would be rare (if not impossible). Furthermore, we recommend that all developers use version control so not allowing it for certain licenses would be hypocritical to say the least.
This is an important bug to get fixed. Please sign on to <feedback://showreport?report_id=28891>