flexible space item identifier question

Hi guys,

Since the new toolbar functionality in IB3 is only for leopard, I will still have to grab back to the original method of making them.

i presume they are going from left to right (as in arrangement). so i have three icons. 2 on the left and one on the right. separated by a flexible space divider.

i tried this coding to accomplish it:


on awake from nib theObject
	set documentToolbar to make new toolbar at end with properties {name:"document toolbar", identifier:"document toolbar identifier", allows customization:false, auto sizes cells:true, display mode:default display mode, size mode:default size mode}

	set allowed identifiers of documentToolbar to {"compile item identifier", "run item identifier", "stop item identifier", "print item identifier", "customize toolbar item identifier", "flexible space item identifier", "space item identifier", "separator item identifier"}
	set default identifiers of documentToolbar to {"compile item identifier", "run item identifier", "stop item identifier"}

	make new toolbar item at end of toolbar items of documentToolbar with properties {identifier:"compile item identifier", name:"compile item", label:"Compile", palette label:"Compile", tool tip:"Compile", image name:"CompileScript"}
	make new toolbar item at end of toolbar items of documentToolbar with properties {identifier:"run item identifier", name:"run item", label:"Run", palette label:"Run", tool tip:"Run", image name:"RunScript"}

-- HERE COMES THE NOT WORKING SEPARATOR:

make new toolbar item at end of toolbar items of documentToolbar with properties {identifier:"flexible space item identifier", name:"flexible spacer", label:"", palette label:"", tool tip:"", image name:""}

-- END IT
	make new toolbar item at end of toolbar items of documentToolbar with properties {identifier:"stop item identifier", name:"stop item", label:"Stop", palette label:"Stop", tool tip:"Stop", image name:"StopScript"}

	set toolbar of theObject to documentToolbar
end awake from nib

i got the code from the sample project - but its not working :frowning: Any ideas why?

Max

i figured it out. apparently, apple has a spelling mistake in this coding (which of course explains why this isnt working).

here is a explanation on how it should work: http://applescriptsourcebook.com/viewtopic.php?id=17575

thanks topic solved

This link doesn’t go anywhere, so could you please explain what the misspelling is and how to get the flexible space to work in 10.4? This spelling works in 10.5 “flexible space item identifier”, but does not work in 10.4

OK, I found the spelling mistake guimkie was talking about. It seems the word identifier is mispelled for both the flexible space and the customize button. So to make these work in 10.4 you have to misspell them. The word needs to be wrongly liked like this… “indentifer”… note the missing ‘i’.

They need to be this and note that the misspelling works in 10.5 as well.
“customize toolbar item identifer”
“flexible space item identifer”

Crazy toolbar has caused me so much trouble!

Here’s where I found the answer: http://lists.apple.com/archives/applescript-studio/2006/Aug/msg00076.html