Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
egokb committed Jan 8, 2025
2 parents 100ea91 + 552d621 commit 08a1d7d
Show file tree
Hide file tree
Showing 9 changed files with 68 additions and 0 deletions.
19 changes: 19 additions & 0 deletions Rules/FUI0001.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# FUI0001

## Target 'xxx' not 'FUI.IElement'

This error occurs when the target element is not inherited from FUI.IElement.

```c#
[Binding("txt_test", nameof(UnityEngine.UI.Text.text))]
public string TestString{get; set;} => string.Empty
```

The UnityEngine.UI.Text is not inherited from FUI.IElement.

<span style="color: #e6e6e6;">The following example resolves the error:</span>

```c#
[Binding("txt_test", nameof(TextElement.Text))]
public string TestString{get; set;} => string.Empty
```
19 changes: 19 additions & 0 deletions Rules/FUI0002.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# FUI0002

## Target property 'xxx' not 'FUI.Bindable.BindableProperty<>'

This error occurs when the target property is not inherited from FUI.Bindable.BindableProperty&lt;T&gt;.

```c#
[Binding("txt_test", nameof(TextElement.name))]
public string TestString{get; set;} => string.Empty
```

The TextElement.name is not inherited from FUI.BindableProperty&lt;T&gt;.

The following example resolves the error:

```c#
[Binding("txt_test", nameof(TextElement.Text))]
public string TestString{get; set;} => string.Empty
```
30 changes: 30 additions & 0 deletions Rules/FUI0003.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# FUI0003

## Converter 'xxx' not 'FUI.IValueConverter&lt;,&gt;'.

This error occurs when the ValueConverter is not inherited from FUI.IValueConverter&lt;,&gt;.

```c#
[Binding("txt_test", nameof(TextElement.Text), typeof(UnityEngine.GameObject))]
public int TestInt{get; set;} => 0
```

The UnityEngine.GameObject is not inherited from FUI.IValueConverter&lt;,&gt;

You can use other value converters or inherit custom value converters from FUI.IValueConverter&lt;,&gt;.

The following example resolves the error:

```c#
[Binding("txt_test", nameof(TextElement.Text), typeof(IntToStringConverter))]
public int TestInt{get; set;} => 0
```

or

```c#
public class CustomConverter : FUI.IValueConverter<int, string>{}

[Binding("txt_test", nameof(TextElement.Text), typeof(CustomConverter))]
public int TestInt{get; set;} => 0
```
Empty file added Rules/FUI0004.md
Empty file.
Empty file added Rules/FUI0005.md
Empty file.
Empty file added Rules/FUI0006.md
Empty file.
Empty file added Rules/FUI0007.md
Empty file.
Empty file added Rules/FUI0008.md
Empty file.
Empty file added Rules/FUI0009.md
Empty file.

0 comments on commit 08a1d7d

Please sign in to comment.