# `GSFeaBlock`

*Class*

A snippet of feature code.

## Declaration

```swift
class GSFeaBlock
```

```objc
@interface GSFeaBlock : NSObject
```

```python
class GSFeaBlock(NSObject)
```

## Topics

### Instance Properties

- [`GSFeaBlock.canBeAutomated`](/Core/GlyphsCore/GSFeaBlock/canBeAutomated) — Whether the code can be generated automatically.
- [`GSFeaBlock.canBeEdited`](/Core/GlyphsCore/GSFeaBlock/canBeEdited)
- [`GSFeaBlock.code`](/Core/GlyphsCore/GSFeaBlock/code) — The feature code representation in AFDKO syntax.
- [`GSFeaBlock.errorIcon`](/Core/GlyphsCore/GSFeaBlock/errorIcon)
- [`GSFeaBlock.errorTooltip`](/Core/GlyphsCore/GSFeaBlock/errorTooltip)
- [`GSFeaBlock.errorType`](/Core/GlyphsCore/GSFeaBlock/errorType)
- [`GSFeaBlock.errors`](/Core/GlyphsCore/GSFeaBlock/errors)
- [`GSFeaBlock.filePath`](/Core/GlyphsCore/GSFeaBlock/filePath) — A file path relative to the `features` directory in a Glyphs Package file.
- [`GSFeaBlock.identifier`](/Core/GlyphsCore/GSFeaBlock/identifier) — A persistent, per-font unique identifier of the block.
- [`GSFeaBlock.automatic`](/Core/GlyphsCore/GSFeaBlock/automatic) — Whether the code is generated automatically.
- [`GSFeaBlock.disabled`](/Core/GlyphsCore/GSFeaBlock/disabled) — Whether the block is included in the exported font.
- [`GSFeaBlock.isVisibleInUI`](/Core/GlyphsCore/GSFeaBlock/isVisibleInUI)
- [`GSFeaBlock.lastOperationInterval`](/Core/GlyphsCore/GSFeaBlock/lastOperationInterval) — A time interval that is incremented whenever the title or code of the block is updated.
- [`GSFeaBlock.nameUI`](/Core/GlyphsCore/GSFeaBlock/nameUI) — A way to access tag/name regardless of the feature/class
- [`GSFeaBlock.notes`](/Core/GlyphsCore/GSFeaBlock/notes) — Additional notes about the block that are not part of the code.
- [`GSFeaBlock.parent`](/Core/GlyphsCore/GSFeaBlock/parent) — A reference to the font containing the block.
- [`GSFeaBlock.preferredFileNameStem`](/Core/GlyphsCore/GSFeaBlock/preferredFileNameStem) — The file name stem (file name without extension) that best matches the block.
- [`GSFeaBlock.tempData`](/Core/GlyphsCore/GSFeaBlock/tempData) — A dictionary that stores data that is not written to disk.
- [`GSFeaBlock.undoManager`](/Core/GlyphsCore/GSFeaBlock/undoManager)
- [`GSFeaBlock.undoManagerCheck`](/Core/GlyphsCore/GSFeaBlock/undoManagerCheck)

### Instance Methods

- [`GSFeaBlock initWithDict:format:`](/Core/GlyphsCore/GSFeaBlock/initWithDict:format:)
- [`GSFeaBlock propertyListValueFormat:error:`](/Core/GlyphsCore/GSFeaBlock/propertyListValueFormat:error:) — Returns the content of the block to store it in pList.
- [`GSFeaBlock saveToFile:format:context:error:`](/Core/GlyphsCore/GSFeaBlock/saveToFile:format:context:error:)
- [`GSFeaBlock saveCode`](/Core/GlyphsCore/GSFeaBlock/saveCode)
- [`GSFeaBlock saveNotes`](/Core/GlyphsCore/GSFeaBlock/saveNotes)
- [`GSFeaBlock setAutomaticFast:`](/Core/GlyphsCore/GSFeaBlock/setAutomaticFast:)
- [`GSFeaBlock setCodeFast:`](/Core/GlyphsCore/GSFeaBlock/setCodeFast:) — Sets the code, skipping the undo system.
- [`GSFeaBlock setTempData:forKey:`](/Core/GlyphsCore/GSFeaBlock/setTempData:forKey:) — Adds key/value to tempData. Pass nil as value to remove previous set data
- [`GSFeaBlock tempDataForKey:`](/Core/GlyphsCore/GSFeaBlock/tempDataForKey:) — Returns a value for the given  key in tempData.
- [`GSFeaBlock update`](/Core/GlyphsCore/GSFeaBlock/update) — If the block is automatic, updates the code. Otherwise, does nothing.
- [`GSFeaBlock validateName:error:`](/Core/GlyphsCore/GSFeaBlock/validateName:error:)

### Type Methods

- [`GSFeaBlock blockTitleFromFileName:blockType:`](/Core/GlyphsCore/GSFeaBlock/blockTitleFromFileName:blockType:) — Extracts the title and type of a block from its file name.

## Relationships

### Inherits From

- `NSObject`

### Inherited By

- [`GSClass`](/Core/GlyphsCore/GSClass)
- [`GSFeature`](/Core/GlyphsCore/GSFeature)

### Conforms To

- `NSCoding`
- `NSCopying`

## See Also

### Layout Features

- [`GSFeaturePrefix`](/Core/GlyphsCore/GSFeaturePrefix) — The class defining the Prefix object
- [`GSClass`](/Core/GlyphsCore/GSClass) — The class represents the OpenType classes
- [`GSFeature`](/Core/GlyphsCore/GSFeature) — The class defining the feature object

