Read Only project

Is there a way to open a project read only?

Frequently I copy classes, modules or any other object from other projects and If not very cautious, sometimes I finish modifying the source project.

I mean something like selecting File/Open iwith a keys pushed then the project file is opened as read only.

1 Like

Just make backups of finished projects. An easy way is to Zip it, naming it accordingly, and storing at a safe place. In case of cataclysms restore it. Some snapshots during the development is also advised.

I won’t consider something like GIT for you right now, but it is also a way to handle it.

As far as I remember there is a video on GIT in the Xojo videos. Seriously, do some sort of version control. I’m on SVN which is easier IMO. It will save your behind. I even put my RapidWeaver projects into SVN because I screwed up.

2 Likes

Obviously I have back-ups,
The fact is that is usual to work on several project at the same time, when looking for a method on another project, that could be used there with few modifications, I make the modifications and then I Notice the source has the bullet indicating that something has changed… Other’s I modify the source because now I found a better way to do this task… I know it’s just a question to be more cautious and organized. But should not be complicated to add to Xojo IDE an Open Read Only option. I though it could be useful.

1 Like

Open a feature request in the Feedback app.

1 Like

There’s already a case for a Read Only mode in the IDE, albeit for different reasons.
<https://xojo.com/issue/64571>

Set the Lock to True in the project Gei Info window (macOS: sure; Windows, Linux: unknown).

Then, do what you want with the project (excepted save; Xojo do not like that).

This is not convenient for me. I want to be able to open a project read-only, but just a little later open it as read/write,

1 Like

it would also be useful if we can select which parts of the project is protected.
we could open it as usual and then protect what should absolutely not editable.

You can already do that.

Else:
Feedback and don’t hold your breath.

What’s wrong with copying your modified code to the place you intended to write it in the first place and closing the wrong modified project without saving?
And if you have the normally-but-not-this-time-good habit to save regularly and it’s “too late” to don’t save changes, hit Command-Z (undo) until you can’t anymore and the project will be back to when you opened it; just save again.

In the past I have added a request for Feedback with the possibility to lock classes, methods etc. the same way as you can lock controls. See FB_58242: Write protect methods in the IDE entered 21st October 2016.
Locking classes, methods etc. would help you copying from one project to another project without the fear of unintentional modification of the source project.
Unfortunately the change of this request being implemented is very low. :frowning:

2 Likes

I like the idea of locking parts of the tree, or the entire tree (equivalent to “open read only”), because such states and preferences can be saved with the project and the choices made returns on each loading, and locking/unlocking all or parts are at a “right click” of distance.

2 Likes