gabrielrcouto / php-gui

Extensionless PHP Graphic User Interface library
2.24k stars 175 forks source link

Implementing TFileNameEdit #111

Closed everton3x closed 7 years ago

everton3x commented 7 years ago

I implemented TFileNameEdit (with a big help from @reisraff).

reisraff commented 7 years ago

Hey @everton3x, your code seems really good, I just see something that you could improve:

OptionMgr and OpenOption should be inside InputFile, all constants, and the static public methods shouldn't be static and should be private.

I see also blank lines after opening braces and before closing braces, you could remove them.

This PR seems the same that #109, close one of them, it is preferred the older.

Thank you for your contribution ;)

everton3x commented 7 years ago

Tanks @reisraff.

For PR duplicity, #109 is based on the master branch, and #111 is a branch I created to implement TFileNameEdit.

Since I have already mixed the TFileNameEdit branch with the master, I think it is appropriate to keep #109.

As for the blank lines, I'll make the adjustment. I use NetBeans and yesterday I found a way to set it up for PSR2, so I'll see how it behaves now.

As for OptionMgr and OpenOption, I initially thought about putting everything into the implementation of TFileNameEdit. However I realized that the same options could be used in other implementations, especially getOptionString () and parseOptionString (), which could be used with other types of options (such as TSaveOptions - does this exist?).

In any case, I will also make the modification. If in the future the possibility of reusing this code appears, then we can adapt.

As soon as I can work on this, I'll make these changes.

everton3x commented 7 years ago

Implemented at #109