yabIDE
#1
In my version of yab (bbjimmy) is an bug selecting the "open project folder", it always opens the last loaded project in the project list and not the selected.
Reply
#2
Hmmm. It has always done that to me, but I never looked into it.
Reply
#3
It seems globalProjectDir$ is only set when a project is opened. I will need to add an array with a globalProjectDir$ for each file in the file listing and set globalProjectDir$ when the file is selected. I haven't found the right place in the code to do that yet.
Reply
#4
(01-09-2017, 12:49 PM)bbjimmy Wrote: It seems globalProjectDir$ is only set when a project is opened. I will need to add an array with a globalProjectDir$ for each file in the file listing and set globalProjectDir$ when the file is selected. I haven't found the right place in the code to do that yet.

Why so complicated. Add a array for the CurrentOpenProject$ and then the user select one item in the listbox switch deh array path
Reply
#5
The Spagheti code complicates this simple fix.
Reply
#6
OK, I got it... I added at 475
OpenProjectDir$ = getprojectdir$()
snd changed
system("open " + globalProjectDir$)
to
system("open " + OpenProjectDir$)

and added this subroutine:

sub getprojectdir$()
local CurrentSelection, CurrentSelection$, i,OpenProjectDir$
CurrentSelection = columnbox get "FileBox"
CurrentSelection$ = columnbox get$ "FileBox", 2, CurrentSelection
for i=1 to COLUMNBOX COUNT "FileBox"
if (GetFileName$(globalAllNames$(i)) = CurrentSelection$) OpenProjectDir$ = GetDirectory$(globalAllNames$(i)):break
next
return OpenProjectDir$
end sub

It seems to work ok.
Reply
#7
Commited the change, it will be in the next release!

https://github.com/bbjimmy/YAB/commit/cf...d3b72797ed
Reply
#8
(01-13-2017, 11:40 AM)bbjimmy Wrote: Commited the change, it will be in the next release!

https://github.com/bbjimmy/YAB/commit/cf...d3b72797ed

Good job, thanks
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)
Free Web Hosting