---
title: "property(with:code:)"
framework: Scripting Bridge
role: symbol
role_heading: Instance Method
platforms: [Mac Catalyst 13.0+, macOS 10.5+]
path: "scriptingbridge/sbobject/property(with:code:)"
---

# property(with:code:)

Returns an object of the designated scripting class representing the specified property of the receiver

## Declaration

```swift
func property(with cls: AnyClass, code: AEKeyword) -> SBObject
```

## Parameters

- `code`: A four-character code that uniquely identifies a property of the receiver.

## Return Value

Return Value An instance of the designated class that represents the receiver’s property identified by code.

## Discussion

Discussion SBObject subclasses use this method to implement application-specific property accessor methods. You should not need to call this method directly. note: This method doesn’t retrieve the value of the property. To get the value, call get().

## See Also

### Getting Properties and Elements

- [property(withCode:)](scriptingbridge/sbobject/property(withcode:).md)
- [elementArray(withCode:)](scriptingbridge/sbobject/elementarray(withcode:).md)
