\AlphredDialog

Class to create standard AppleScript dialogs.

This class is awkward.

Summary

Methods
Properties
Constants
__construct()
execute()
set_icon()
set_text()
set_buttons()
set_default_button()
set_title()
set_default_answer()
set_timeout()
set_cancel()
set_hidden_answer()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
create_dialog()
No private properties found
N/A

Methods

__construct()

__construct(array  $values = array()) 

Initializes the AppleScript dialog, optionally setting values necessary

Parameters

array $values

an array of values to set

execute()

execute() : \Alphred\text

Executes the dialog

Returns

\Alphred\text —

the text returned from the dialog (button press/answer)

set_icon()

set_icon(string  $icon) 

Sets an icon to use in the dialog box

Parameters

string $icon

the path to the icon or the name of the icon

set_text()

set_text(string  $text) 

Sets the text for the dialog and adds slashes to ensure the dialog code does not break

Parameters

string $text

the text for the AppleScript dialog

set_buttons()

set_buttons(array  $buttons, string  $default = '') 

Sets the buttons for the dialog box

Parameters

array $buttons

[description]

string $default

[description]

set_default_button()

set_default_button(\Alphred\sting  $button) 

Sets the default button

Parameters

\Alphred\sting $button

the name of the button to set as default

set_title()

set_title(string  $title) 

Sets the title of the dialog

Parameters

string $title

title for the dialog

set_default_answer()

set_default_answer(  $text) 

Parameters

$text

set_timeout()

set_timeout(  $seconds) 

Parameters

$seconds

set_cancel()

set_cancel(  $cancel) 

Parameters

$cancel

set_hidden_answer()

set_hidden_answer(  $hidden = false) 

Parameters

$hidden

create_dialog()

create_dialog() : \Alphred\[type]

Assembles the AppleScript code for the dialog based on the object's values

Returns

\Alphred\[type] —

[description]