Back again in my never-ending quest to assert dominance over the Machine …
I’m messing around with handlers with labeled parameters. Here’s my test script:
to displayADialog with textTodisplay
display dialog "" & textTodisplay
end displayADialog
set textTodisplay to "Hello"
displayADialog with textTodisplay
-- Returns a dialog showing "true" with or without setting textToDisplay to a value
Why ??? Meanwhile…
to displayADialog with textTodisplay
display dialog "" & textTodisplay
end displayADialog
displayADialog given textTodisplay:"Hello"
-- Returns dialog showing "Hello"
Is this stuff nonintuitive or do I have kind of disconnect where I’m not seeing the logic of these statements. Logically doesn’t it seem like if I structure the request “to displayADialog with textToDisplay” then I would call it the same way? And is there any good info on the variants usable with these handlers. [i] to findAFish under theSea[/i]
Slightly Confused,
Jim