View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0002704 | NoesisGUI | C# SDK | public | 2023-09-29 00:59 | 2025-06-03 11:36 |
| Reporter | ai_enabled | Assigned To | jsantos | ||
| Priority | normal | Severity | minor | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 3.2.1 | ||||
| Summary | 0002704: RaiseTextureChanged doesn't update image source with relative path | ||||
| Description | Hi guys,
the texture reloading with RaiseTextureChanged doesn't work.
Regards! | ||||
| Platform | Any | ||||
|
Providers know nothing about relative paths. They always work in absolute paths (relatives to their own base root). 'RaiseTextureChanged' must provide the same path that was used when previously loading the resource. |
|
|
Hi Jesus, So, the problem is that when I use the relative path (Source="Images/Player.png") I get this output: LoadTexture: UI/Controls/Game/Map/Images/Player.pngApparently the path doesn't match due to the missing slash and the RaiseTextureChanged call has no effect. For comparison, when I use the absolute path (Source="/UI/Controls/Game/Map/Images/Player.png") I get this output: LoadTexture: /UI/Controls/Game/Map/Images/Player.pngSo it works properly. I think it will be better if the TextureProvider provided an identical path in the both cases for the sake of consistency. Regards! |
|
|
You are totally right, this should be fixed. |
|
I think this is happening because the XAML containing the texture has a URI that doesn't start with "/", for example: "Game/UI/Panel.xaml". If you change this to "/Game/UI/Panel.xaml" it should work. Relative texture URIs are just using the base URI of the XAML. We normalize the URI as much as possible, but the first '/' is quite tricky to remove, because it changes the meaning of the path ("Game/UI/Panel.xaml" is a path relative to your provider, but "/Game/UI/Panel.xaml" may be interpreted as a global filesystem path. Please, let me know if this makes sense to you. |
|
|
Hi Jesús, XAML Source="Images/Player.png"which is basically an absolute path (with missing "/" prefix). And my TextureProvider treat it as an absolute path. Obviously I don't take into account the inner workings and can consider the situation only from my point of view so forgive me if I'm missing something. But I cannot simply comprehend why someone may treat this resolved path as a non-absolute path even if it's missing the "/" prefix. I think it will be correct (and perfect) if TextureProvider always receives an absolute path in the LoadTexture method (and so the same absolute path is provided on RaiseTextureChanged). So, just add the "/" prefix and voila, the issue is resolved! Regards! |
|
|
If the XAML is loaded with a 'prefix' (like for example /Game/UI/Panel.xaml) and it contains a "Images/Player.png", the texture provider should receive this uri = "/Game/UI/Images/Player.png". Could you verify this? We can't add/remove automatically the prefix because it changes the meaning. Imagine I have my own provider with a root set at (/home/game/UI). If I receive a request for loading "Main.xaml" I will open the file at "/home/game/UI/Main.xaml" but if I receive the request "/Main.xaml" I should load (/Main.xaml, root of the filesystem, ignoring my root path). Not sure if this is clear, I can train with a better example, but I first I want to understand if loading your XAMLs with prefix fixes the issue. |
|
|
Hi Jesús! I'm sorry for replying so late. The issue was indeed related to the XAML loading without the prefix I've verified and everything related to XAML and Texture loading works exactly as you've described so there is no issue. Please close this ticket. Regards! |
|
|
Thanks! By the way, in 3.2.8 we implemented a few URI normalizations (like |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2023-09-29 00:59 | ai_enabled | New Issue | |
| 2023-10-04 13:42 | jsantos | Assigned To | => jsantos |
| 2023-10-04 13:42 | jsantos | Status | new => assigned |
| 2023-10-04 13:43 | jsantos | Note Added: 0008788 | |
| 2023-10-04 13:43 | jsantos | Status | assigned => feedback |
| 2023-10-04 14:21 | ai_enabled | Note Added: 0008789 | |
| 2023-10-04 14:21 | ai_enabled | Status | feedback => assigned |
| 2023-10-05 12:25 | jsantos | Note Added: 0008793 | |
| 2023-10-05 12:25 | jsantos | Target Version | => 3.2.3 |
| 2024-01-22 11:46 | sfernandez | Target Version | 3.2.3 => 3.2.4 |
| 2024-01-22 11:59 | jsantos | Target Version | 3.2.4 => 3.2.3 |
| 2024-01-25 00:49 | jsantos | Note Added: 0009117 | |
| 2024-01-25 00:50 | jsantos | Status | assigned => feedback |
| 2024-01-25 00:50 | jsantos | Target Version | 3.2.3 => |
| 2024-01-25 00:50 | jsantos | Note Edited: 0009117 | |
| 2024-01-25 00:50 | jsantos | Note Edited: 0009117 | |
| 2024-01-25 00:51 | jsantos | Note Edited: 0009117 | |
| 2024-01-26 12:48 | ai_enabled | Note Added: 0009130 | |
| 2024-01-26 12:48 | ai_enabled | Status | feedback => assigned |
| 2024-01-26 20:16 | jsantos | Note Added: 0009132 | |
| 2024-01-26 20:16 | jsantos | Status | assigned => feedback |
| 2024-01-26 20:16 | jsantos | Note Edited: 0009132 | |
| 2025-06-03 11:22 | ai_enabled | Note Added: 0010769 | |
| 2025-06-03 11:22 | ai_enabled | Status | feedback => assigned |
| 2025-06-03 11:31 | jsantos | Description Updated | |
| 2025-06-03 11:31 | jsantos | Note Edited: 0009117 | |
| 2025-06-03 11:35 | jsantos | Relationship added | related to 0003765 |
| 2025-06-03 11:36 | jsantos | Status | assigned => resolved |
| 2025-06-03 11:36 | jsantos | Resolution | open => fixed |
| 2025-06-03 11:36 | jsantos | Note Added: 0010770 |