Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Bug Reports

Reply
 
Thread Tools Display Modes
Old 01-20-2019, 12:48 PM   #1
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 2,274
Default Extension API: Optional boolean parameter "unsupported" in IDE and API help

Optional parameters can be added to extension-provided API functions by adding the "Optional" suffix to parameter names:

Quote:
// When defining/documenting API function parameters:
// - if a (char*,int) pair is encountered, name them buf, buf_sz
// - if a (const char*,int) pair is encountered, buf, buf_sz as well
// - if a lone basicType *, use varNameOut or varNameIn or
// varNameInOptional (if last parameter(s))
bool* myNameOptional works fine, and if the script does not omit the optional parameter, the IDE will only accept boolean input.

However, in the API help webpage and in the IDE inline help, the parameter type is named "unsupported":

Code:
Lua: identifier reaper.JS_Mouse_LoadCursorFromFile(string pathAndFilename, unsupported forceNewLoad)
juliansader 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 04:48 PM.


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