Tabs don't display

Starting a new topic for this bug.

If have the “Open in Tabs” preference on. I drag and drop a number of scripts into an SD window and invoke the open handler.

The open handler opens the scripts in SD, gets the name of the script then closes the script.

The tabbing seems off. The script that opens seems to open in a new window. But they open in tabs. When the script stops, the script window is visible but no tabs are visible, but if you try to close the script, it acts as if there are two unsaved tabs open. Also if you select the script’s window from the Windows menu, there’s a sub menu for the tabs that are not visible.

Movie linked to here.

I think this tab issue is a serious bug.

It’s not related stationary setting. (That’s why I moved this discussion to its own topic).

In the movie the first few scripts do not have the stationary setting. You can see in the script that if they open without an error, the script sets the label index.

Open this script in SD. Turn open in tabs on. Make a copy a few saved scripts and drop the copies on the script to run the open handler. I’ve noted out the close file line, so at the end of this run this script should result in a script window with tabs for each of the dropped scripts.

The result I get is one window with no tabs visible, but in the window menu a submenu showing what should be tabs. You can select these, and they will replace the open script in the window, moving that to an invisible tab.

Can anyone else repeat this behavior?

–>>Script Debugger 6.0.1 (6A180) on OSX 10.10.4

(I’ll try on my El Capitan machine when I get home)

on open (scriptList)

repeat with ThisScript in scriptList
	local thisDoc
	tell application "Finder" to set thisExt to name extension of ThisScript
	
	if thisExt is in {"scpt", "scptd", "applescript"} then
		
		tell application "Script Debugger"
			set thisDoc to open ThisScript
			thisDoc
			try
				set docName to the name of thisDoc
				--close thisDoc without saving
				tell application "Finder" to set the label index of ThisScript to 2
				
			on error errMsg number errNum
				
				set thisScriptsSource to source text of thisDoc
				close thisDoc without saving
				set replacementScript to make new document at beginning
				set sourceText of replacementScript to thisScriptsSource
				compile replacementScript
				set newScriptPath to ThisScript as text
				tell application "Finder" to delete ThisScript
				save replacementScript ¬
					in file newScriptPath
				
				close replacementScript without saving
				tell application "Finder" to set the label index of ThisScript to w
				
			end try
		end tell
		
	end if
	
end repeat

end open

I can’t reproduce that here (10.11.6).

To clarify, I think you’re saying that the Tab Bar is not appearing, but it’s otherwise behaving correctly – yes?

Does the Tab Bar appear if you choose New Script Tab?

No. The tab bar does not appear if I choose New Script Tab in that window.

It does appear if I do a new script window and choose New Script Tab.

It also appears if I drop the files directly on the SD icon.

However, I’ve also noticed that once a window has gone into that no tab bar mode, it leaves SD in an odd state. If I drop the scripts on the SD Icon they open as tabs without displaying the tab bar.

It stays in that odd state until I quit and relaunch SD.

OK, Bingo. This is reproducible on all three of my systems. After opening the first script, it has to close to get the buggy behavior. Took me a while to figure out that’s what was happening when I discovered it.

Below is the simples, bare bones method of reproducing. Drag any applescript on it. (doesn’t make any changes so no need to use copies.)

Make sure Open in Tabs is set to on.

OMM a new window is created, the first script opens in a new tab. That script closes and the tab bar goes away. The rest of the scripts open in invisible tabs.

on open (scriptList)
tell application "Script Debugger"
	make new document
	set firstScript to open item 1 of scriptList
	close firstScript without saving
end tell
repeat with ThisScript in scriptList
	tell application "Finder" to set thisExt to name extension of ThisScript
	if thisExt is in {"scpt", "scptd", "applescript"} then
		tell application "Script Debugger"
			set thisDoc to open ThisScript
		end tell
	end if
end repeat
end open

You need to drag multiple applescripts for this to show the bug.

Can anyone else reproduce this?

Yes, I can reproduce it here.

This has not been fixed.

–>Script Debugger 6.0.2 (6A182) on OSX 10.10.5

We are not going to be able to address this issue in 6.0.2.