kendo-labs / kendo-bootstrapper

GNU General Public License v3.0
49 stars 20 forks source link

Bootstrapper Options button doesn't work #20

Closed toddanglin closed 11 years ago

toddanglin commented 11 years ago

Unless I'm missing something (entirely possible), the Bootstrapper's "Options" button (the wrench) doesn't seem to respond to any mouse clicks. Tested in both "chrome free" Bootstrapper instance and in browser hosted instance.

mishoo commented 11 years ago

It works for me. Any errors in the JS console?

bsatrom commented 11 years ago

works for me as well

toddanglin commented 11 years ago

Should have thought to check for JS errors. There is an error being generated when I click on the wrench:

Uncaught TypeError: Cannot read property 'path' of undefined (app.js: 1241)

This is the variable: SERVER_CONFIG.editor.path. Note, when my bootstrapped starts, the Terminal says: 'Warning: No code editor found.' Assume these are now related. :)

Let me know what else can help.

bsatrom commented 11 years ago

I suspected this might be it. The bootstrapper looks for a couple of IDEs by default (SublimeText, GEdit, etc.) But you can also set your own in the settings window and it shouldn't error out before you. That said, I just pushed a fix. Can you pull and test it out?

toddanglin commented 11 years ago

The patch has fixed the original problem. The settings dialog now opens.

That said, the dialog itself seems to have two problem (using a Mac):

  1. When I try to find a code editor (like Sublime Text), the dialog complains that "SublimeText.app" is a directory.
  2. Even though I just specified the path to my Kendo UI files on startup, the dialog calls the path undefined and shows an empty text box

For the second problem, when you open the "browse" dialog to re-locate your Kendo UI sources, this error is generated:

Uncaught TypeError: Cannot call method 'replace' of null (app.js:1523, in function "makePathLink")

Finally, if I reselect my Kendo UI sources via the dialog and then click "Ok," the Bootstrapper says "File doesn't exist." No JavaScript console errors.

Should I create new issues? Or will you investigate in this issue?

bsatrom commented 11 years ago

new issues, please

bsatrom commented 11 years ago

fwiw, I can't repro those last two issues

bsatrom commented 11 years ago

the first issue is going to be Mac-specific because apps on OSX are just directories, as opposed o executables. If you're setting the path for ST, you're really looking for the "subl" command, which is usually found in /usr/local/bin/subl I'm not sure I count this as a bug, but we could probably expand the docs/getting started a bit to clarify which editors the bootstrapper looks for by default, and how to set your own properly across OSes. @mishoo, what do you think?

toddanglin commented 11 years ago

Well, as a Mac user, I think of the .app package as "the app." I get what you're saying, but it would be nice if the Bootstrapper could "figure it out" if pointed at a .app package. (Not sure how challenging that is.) It would be more intuitive.

For the other issues, I have a feeling they could be related to the first. Let me see what happens after I get the Bootstrapper to recognize a code editor.

(Also, FWIW, I had Sublime Text 2 installed but the Bootstrapper did not detect/use it. Not sure why...)

bsatrom commented 11 years ago

the problem, as I see it, is knowing where the "real" executable lives inside of the app, as it's not consistent from one IDE to the next. To be intuitive now, we try to keep a list of popular editors (for which we know where the executable lives) and use those first. Interesting that it didn't pick up ST2 for you, though. I didn't have that problem. @burkeholland @derickbailey did you guys have any issues with the bootstrapper picking up an editor for you?

toddanglin commented 11 years ago

Ultimately, to make Sublime Text work, I located the "Sublime Text 2" command in:

Sublime Text 2.app > Contents > MacOS

I originally looked at the location you suggested (/usr/local/bin/subl), but I had no Sublime Text commands there.

bsatrom commented 11 years ago

makes sense, now that I think about it. I have ST2 symlinked to that location so that I can launch it from the terminal. Common, but not universal.

toddanglin commented 11 years ago

I am your Mac Mort. :)

bsatrom commented 11 years ago

that's fair :) and this is good. we want to make this as frictionless as possible.

toddanglin commented 11 years ago

I am experiencing the original problem again. This time the JavaScript error is:

Uncaught TypeError: Cannot call method 'join' of undefined [ln 1309] cmd2: SERVER_CONFIG.editor ? SERVER_CONFIG.editor.args.cmd2.join(" ") : ""

I suspect the solution is adding error checking similar to what we did for path. In the meantime, the Options window does not open.