Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 02-23-2021, 07:52 AM   #1
amagalma
Human being with feelings
 
amagalma's Avatar
 
Join Date: Apr 2011
Posts: 3,451
Default [IDE] Highlight all native lua modules



Lua lets you overwrite its modules.

"reaper" is highlighted, so you know if you are overwriting it or not. For example, this:
Code:
reaper = nil
Would remove all the reaper API from the script! By having it highlighted in the IDE (as it now is), you know it when doing it, so that you don't do it accidentally/unintentionally.

On the other hand, the methods of the lua modules are always highlighted no matter if you have overwritten them or not (which is good) *but* the modules' names are not highlighted! So you may accidentally overwrite them (by giving a value to the variables "table", "string", "debug" etc) and then wonder why their methods do not work..

For example:
Code:
table = {1,2,3,4,5}
a = table.concat(table)
Table.concat no longer exists, but since "table" is not highlighted like "reaper" is, I didn't understood that I overwrote it unintentionally.
__________________
Most of my scripts can be found in ReaPack.
If you find them useful, a donation would be greatly appreciated! Thank you! :)

Last edited by amagalma; 02-23-2021 at 07:59 AM.
amagalma is offline   Reply With Quote
Old 02-23-2021, 08:15 AM   #2
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,333
Default

+1 from me
vitalker is offline   Reply With Quote
Old 02-23-2021, 08:25 AM   #3
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,622
Default

Yes, I totally agree.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is online now   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 07:49 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.