Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Disable Files in the Project Folder Or Files List
#1
I want to quickly disable a script/class in the project folder without deleting it, making it as if it doesn't exist. This is similar to the effect produced by pressing Ctrl+D in QM. I think this is a great feature. When I press Ctrl+D, a red prohibition symbol appears on the project's icon. When I press Ctrl+D again, the prohibition symbol disappears, and the file is re-enabled.

This feature is really useful and applies to other item types in LA as well.
#2
Where it can be useful? Do you want to place triggers (hotkey etc) in separate scripts, and then quickly disable/enable the trigger?
#3
Yes, In QM, disabling macros and triggers with Ctrl+D is indeed very convenient.
there is another scenario. For instance, in a project, I've defined a library file. I want to create its second version, so I intend to disable the first version. I don't want to delete it. If I don't disable it, some variables or functions in the two library files might conflict. Or is there a better way to handle this?
#4
I usually move the old file or its clone from the project folder to somewhere else.

@Project
- MainFile
- ClassFile
Garbage
- ClassFile
- ClassFile2
- ...
#5
Sometimes I need to switch back and forth between two versions of class files.
Still, under QM, pressing Ctrl+D is convenient.

Is it complex to implement? Is it feasible? Looking forward to it.

Another minor question, just out of curiosity:
In LA, renaming an item's filename requires pressing F2. Would it be difficult to implement a double-click feature like in QM for this purpose?
#6
Unlikely this feature will be added soon.
#7
Quote:Sometimes I need to switch back and forth between two versions of class files.

Sometimes for it I use #if.

Project main file:
/*/ define TEST_NEW_CODE; /*/
//To switch back and forth quickly, change TEST_NEW_CODE eg to _TEST_NEW_CODE and back; /*/

OldClassFile:
#if !TEST_NEW_CODE
code
#endif

NewClassFile:
#if TEST_NEW_CODE
code
#endif

Or both code versions can be in the same file:
#if TEST_NEW_CODE
new code
#else
old code
#endif
#8
Thanks for the solution you provided.

I have an idea:
When I press Ctrl+D, the bottom right corner of the icon of the currently selected item in the LA project list will display a disabled symbol.
Additionally, a new entry will be added to the first line comment of the file, for example:
/*/ disabled; /*/


Forum Jump:


Users browsing this thread: 4 Guest(s)