Akira-Hayasaka / ofxGLEditor

Script editor for oF Live Coding
GNU General Public License v2.0
100 stars 16 forks source link

Fix `setLangSyntax` and `clearSyntax` return types in `ofxGLEditor` #20

Closed munshkr closed 9 years ago

danomatika commented 9 years ago

Do we need return variables on theses. I didn't inten to have them, that was only a copy paste error on my part.

munshkr commented 9 years ago

I'm more inclined to return them, to let the caller know if the operation was succesful. I've seen it being used in other functions too, like loadFont or openFile. In these functions in particular, it might fail if the editor parameter is invalid.

danomatika commented 9 years ago

True, but it's not as important as knowing if a file has loaded correctly. It's just a warning print that does't really affect very much ie. only no syntax set. setText, getText, & insertText don't return anything since the editor int check is really more of a hint to the programmer than to a user.

munshkr commented 9 years ago

Hmm, you've got a point there. It's true that it is more an error of the programmer than the user...

I'm AFK right now so feel free to change it, otherwise I'll push the change myself later today.

danomatika commented 9 years ago

I removed the return values a commit already. I didn't mean to have them there in the first place :P

munshkr commented 9 years ago

Nevermind then :) thanks!

danomatika commented 9 years ago

Sure. I don't mean to sound (read) unappreciative. It was pretty late when I did that last commit, so it was more of an error than a design decision. I'm currently adding color scheme & syntax json loading.