Why Does "Display Dialog" Sometimes Require "Use Scripting Additions"?

This works:

display dialog "hello world"

but this doesn’t even compile:

use framework "Foundation"
display dialog "hello world"

Instead you have to do this:

use scripting additions
use framework "Foundation"
display dialog "hello world"

Why is that?

If you include any use statement, scripting additions are ignored unless specifically included via a use scripting additions statement. That’s just the way it has been designed – it provides an option to leave out additions terminology (because of a conflict, for example).

2 Likes