Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Review of TLuaInterpreter.cpp #2069

Open
JorMox opened this issue Oct 19, 2018 · 1 comment
Open

Review of TLuaInterpreter.cpp #2069

JorMox opened this issue Oct 19, 2018 · 1 comment

Comments

@JorMox
Copy link
Contributor

JorMox commented Oct 19, 2018

I went through TLuaInterpreter.cpp looking for functions that still don't handle "main" as a window argument appropriately, and found a significant number of issues in the process, which I'll try to detail below.

First, functions that don't accept "main" as a window argument.

  • setBgColor
  • setFgColor
  • cut
  • setWindowWrapIndent
  • getLineCount
  • getColumnNumber
  • replace
  • deleteLine
  • echoUserWindow
  • setLink
  • insertPopup
  • insertText
  • insertHTML
  • echoLink

Next, functions that require "main" as a window argument to work in the main window.

  • setWindowWrap
  • getLastLineNumber
  • setPopup

Next, functions that are public, but not documented in the wiki.

  • loadRawFile
  • removeMapMenu
  • getMapMenus
  • cut
  • setWindowWrapIndent
  • setMapperView
  • auditAreas
  • getAllAreaUserData
  • insertHTML
  • setMergeTables
  • pasteWindow
  • setDefaultAreaVisible

Next, functions that are mentioned as being public, but aren't.

  • dirToString
  • dirToNumber

Next, functions that, based on a discussion with Vadi, were handling a "main" window argument in some way other than the "right" way.

  • selectString
  • selectCurrentLine
  • getFgColor
  • getBgColor
  • wrapLine
  • getCurrentLine
  • getLineNumber
  • copy
  • paste
  • moveCursor
  • setConsoleBufferSize
  • deselect
  • resetFormat
  • moveCursorEnd
  • getLastLineNumber
  • insertLink
  • echo

And finally, assorted issues I noticed that don't fit well into any particular category.

  • setWindowWrapIndent - doesn't seem to do anything, might be using it wrong -> setWindowWrapIndent('window', spaces_to_indent)
  • enableScrollBar - does nothing with either "main" or no argument, no errors
  • disableScrollBar does nothing with either "main" or no argument, no errors
  • createButton - //TODO FIXME
  • closeUserWindow - apparently intentionally undocumented
  • hideUserWindow - publicly available as "hideWindow", uses "hideUserWindow" in error message
  • showUserWindow - publicly available as "showWindow", uses "showUserWindow" in error message
  • solveRoomCollisions - apparently does nothing. entire function is just "return 0;"
  • deselect - mentions not yet handling non-ASCII window names
  • resetFormat - mentions not yet handling non-ASCII window names
  • tempButtonToolbar - all errors for wrong arg types reference first arg
  • getRoomChar - says it isn't documented, but it is
  • insertPopup - documentation has a messed up argument documented
  • insertHTML - doesn't seem to act as expected? may be using it wrong

Note: This isn't intended to be a comprehensive list of issues in the file (I'm fairly certain I saw several places that don't use UTF-8 that probably should, for example), but these are all things I was confident about.

JorMox added a commit to JorMox/Mudlet that referenced this issue Oct 19, 2018
hideWindow and showWindow had 'hideUserWindow' and 'showUserWindow' in their error messages. This changes the error messages to match the proper name of the function. Part of Issue Mudlet#2069.
vadi2 pushed a commit that referenced this issue Oct 20, 2018
hideWindow and showWindow had 'hideUserWindow' and 'showUserWindow' in their error messages. This changes the error messages to match the proper name of the function. Part of Issue #2069.
@Kebap
Copy link
Contributor

Kebap commented Oct 29, 2018

About public/documented functions, I had a stab at it a while ago as well. Happy to see the ball picked up again. Feel free to review my notes here: https://wiki.mudlet.org/w/User:Kebap/documentation-in-wiki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants