Alphred
  • Namespace
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Namespaces

  • Alphred
  • None

Classes

  • Alfred
  • AppleScript
  • Choose
  • Config
  • Date
  • Dialog
  • Filter
  • Globals
  • i18n
  • Ini
  • Keychain
  • Log
  • Notification
  • Request
  • Result
  • ScriptFilter
  • Text

Interfaces

  • ConfigKeyNotSet
  • Exception
  • FileDoesNotExist
  • InvalidKeychainAccount
  • InvalidScriptFilterArgument
  • InvalidSecurityAction
  • InvalidXMLProperty
  • PasswordExists
  • PasswordNotFound
  • PluginFunctionNotFound
  • RunningOutsideOfAlfred
  • ShouldBeBool
  • TooManyArguments
  • UnknownSecurityException
  • UseOnlyAsStatic

Class Dialog

Class to create standard AppleScript dialogs.

This class is awkward.

Namespace: Alphred
Used by: Alphred::get_password_dialog()
Todo: Revisit developer experience of creating dialogs
Located at Dialog.php

Methods summary

public
# __construct( array $values = [] )

Initializes the AppleScript dialog, optionally setting values necessary

Initializes the AppleScript dialog, optionally setting values necessary

Parameters

$values
an array of values to set

Since

1.0.0

Todo

Add in better error checking
private [type]
# create_dialog( )

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

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

Returns

[type]
[description]

Since

1.0.0
public text
# execute( )

Executes the dialog

Executes the dialog

Returns

text
the text returned from the dialog (button press/answer)
public
# set_icon( string $icon )

Sets an icon to use in the dialog box

Sets an icon to use in the dialog box

Parameters

$icon
the path to the icon or the name of the icon

Since

1.0.0

Todo

Add in exceptions?
public
# set_text( string $text )

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

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

Parameters

$text
the text for the AppleScript dialog

Since

1.0.0

Todo

Check to make sure that this is necessary
public
# set_buttons( array $buttons, string $default = '' )

Sets the buttons for the dialog box

Sets the buttons for the dialog box

Parameters

$buttons
[description]
$default
[description]

Since

1.0.0

Todo

Check for what I need to do to santize these
public
# set_default_button( sting $button )

Sets the default button

Sets the default button

Parameters

$button
the name of the button to set as default

Since

1.0.0
public
# set_title( string $title )

Sets the title of the dialog

Sets the title of the dialog

Parameters

$title
title for the dialog

Since

1.0.0
public
# set_default_answer( $text )
public
# set_timeout( $seconds )
public
# set_cancel( $cancel )
public
# set_hidden_answer( $hidden = false )

Magic methods summary

Alphred API documentation generated by ApiGen