yomybaby / atom-titanium

[DEPRECATED] Atom package for Titanium Alloy
https://atom.io/packages/titanium-alloy
MIT License
49 stars 11 forks source link

Related files not opening on Windows 7 #32

Closed mcvendrell closed 8 years ago

mcvendrell commented 8 years ago

Hi.

I'm not able to open related files on a Windows 7 machine with CTRL+ALT+A/S/C/V.

No errors in console and Keybinding resolver is showing the right binds, so no clues. I thought that could be because Atoms was in C: and files was in W: but trying both in C: still doesn't work.

yomybaby commented 8 years ago

On ti-slack, you uploaded a below screenshot. What is the full path of recaida_completa.js? pasted image at 2016_04_19 13_10

mcvendrell commented 8 years ago

The full path is controller\tabaquismo\recaida_completa.js but I also tried with root controllers like controller\index.js

yomybaby commented 8 years ago

I found a reason. That is string concatantion to build a path. For cross-platform (windows, osx..), my pkg have to use path module for build path of related file.

https://github.com/yomybaby/atom-titanium/blob/master/lib/related.coffee#L19-L35

yomybaby commented 8 years ago

@mcvendrell I tried to fix this issue. But I'm not sure it work properly on Windows because I work with OSX. Please update package and let me know whether it work or not. 😄

mcvendrell commented 8 years ago

Ok, now the behaviour is other. I think you are close.

When pressing CTRL+ALT+V it opens a "non-existing" file views.xml When pressing CTRL+ALT+C it opens a "non-existing" file controller.js When pressing CTRL+ALT+S it opens a "non-existing" file styles.tss

All in the app folder, which is right. When pressing CTRL+ALT+A nothing is opened.

So basically seems it is trying to open the corresponding folders but "lost" the right file.

DouglasHennrich commented 8 years ago

ctrl+option+ V/S/C are opening the files from the first project folder on the atom's tree

yomybaby commented 8 years ago

This pkg didn't support multi project on one Atom window. Because I open a single project every Atom window usually.

If change getTiProjectRootPath function, it will work property. @DouglasHennrich, if you have time, please make a PR :)

Check below code : https://github.com/yomybaby/atom-titanium/blob/master/lib/ti-pkg-util.js#L31-L34

https://discuss.atom.io/t/project-folder-path-of-opened-file/24846/14

DouglasHennrich commented 8 years ago

on previous version, it worked fine oO

yomybaby commented 8 years ago

@DouglasHennrich I fixed the issue you mentioned. Update to 0.9.7 and check result. :)

DouglasHennrich commented 8 years ago

@yomybaby Thanks dude! now it's working like a charm :D

yomybaby commented 8 years ago

@mcvendrell Update 0.9.8, and check result. Now it work properly on Windows.

@mcvendrell @DouglasHennrich Thanks for reporting 👍

mcvendrell commented 8 years ago

Excellent, I will check next Monday when I have access to mi PC and will give feedback. Thank you!

mcvendrell commented 8 years ago

And... YES now it is working perfectly. You did it! :) Thank you