KeychainItem.ServiceName

From Xojo Documentation

Revision as of 14:04, 28 July 2017 by PLefebvre (talk | contribs)

Property (As String )


aKeyChainItem.ServiceName = newStringValue
or
StringValue = aKeyChainItem.ServiceName

Supported for all project types and targets.

Contains the name of the service (required for adding, can be Nil to find). To add a password for an application, set ServiceName to the application’s name.

Example

This example set the text of a TextField to the description of a KeyChainItem.

Dim kc As KeyChain
Dim kci As KeyChainItem

kc = New KeyChain(Listbox1.ListIndex)

If kc <> Nil Then
kci = New KeyChainItem
kci.ServiceName = SearchField.Text

PasswordField.Text = kc.FindPassword(kci)

ServiceNameField.Text = kci.ServiceName
AccountNameField.Text = kci.AccountName
CommentField.Text = kci.Comment
LabelField.Text = kci.Label
End If