NoteWorthy Composer Forum

Forums => Tips & Tricks => User Tools => Topic started by: Opagust on 2015-02-26 07:52 am

Title: ! Error in lua documentation (nwcut.askbox) !
Post by: Opagust on 2015-02-26 07:52 am
I discovered an error in the lua documentation for nwwcut.askbox:

http://lua.noteworthycomposer.com/nwcut.html##(nwcut).askbox (http://lua.noteworthycomposer.com/nwcut.html##(nwcut).askbox)

The return value seems to be 1 for Yes and 0 for No
The flags work as mentioned : 1 for Yes (default), and 2 for No
Title: Re: ! Error in lua documentation (nwcut.askbox) !
Post by: Rick G. on 2015-02-26 08:39 am
Confirmed. No returns zero
Sample User Tool:
Code: (Lua) [Select · Download]
nwcut.warn(nwcut.askbox('','',2))
Title: Re: ! Error in lua documentation (nwcut.askbox) !
Post by: NoteWorthy Online on 2015-03-07 05:52 am
I discovered an error in the lua documentation for nwwcut.askbox:

http://lua.noteworthycomposer.com/nwcut.html##(nwcut).askbox (http://lua.noteworthycomposer.com/nwcut.html##(nwcut).askbox)

Thanks for the report. This has been updated with correct info.

Title: Re: ! Error in lua documentation (nwcut.askbox) !
Post by: Opagust on 2015-03-07 07:46 am
Thanks for the report. This has been updated with correct info.

I don't see any correction yet
Quote
nwcut.askbox(msg, msgtitle, flags)
nwcut question box.
Prompts the user with a standard message box. The user is given the opportunity to answer the question, or cancel the user tool.
Parameters

msg : the message text to issue to the user
msgtitle : the title for the message box (optional)
#number flags : assigns the default action, 1 for Yes (default), and 2 for No
Return value

#number: the answer, 1 for Yes, and 2 for No
Title: Re: ! Error in lua documentation (nwcut.askbox) !
Post by: NoteWorthy Online on 2015-03-07 07:50 am
Are you looking at a cached copy?
Title: Re: ! Error in lua documentation (nwcut.askbox) !
Post by: Rick G. on 2015-03-07 07:59 am
I don't see any correction yet
I do.
Title: Re: ! Error in lua documentation (nwcut.askbox) !
Post by: Opagust on 2015-03-07 08:54 am
Are you looking at a cached copy?
Indeed I was. After erasing the cashed copies I got
Quote
Return value
#number: the answer, 1 for Yes, and 0 for No

Thanks, I should erase my cache more often...