View Issue Details

IDProjectCategoryView StatusLast Update
0005323NoesisGUIC++ SDKpublic2026-11-06 15:49
ReporterDitzy1571 Assigned To 
PrioritynormalSeveritymajor 
Status newResolutionopen 
Product Version4.0 
Summary0005323: Converter and control types registered after Studio::Create aren't listed after ClearTypeCache + PopulateTypeCache
Description

Our integration registers runtime types for the project's value converters and controls while Studio is open,
then calls Studio::ClearTypeCache() and Studio::PopulateTypeCache(), as the integration guide says to "if you
hot-reload custom components" (Gui.Core.StudioIntegration, Cache Control).

The registration

A type registered before Studio::Create is listed: a converter in Studio's resource types (the Resources panel's
menu, its Converters group), a control in the Add Element panel. A type registered after Studio::Create is
listed in neither: not after the two calls, and not after the document is opened again. A Studio made after the
registration lists both, so the types themselves are fine.

The repro reads both lists by reflection from Studio's DataContext.

The repro registers each type (Repro.EarlyConverter, Repro.EarlyControl and then after Studio::Create it registers Repro.LateConverter and Repro.LateControl). For each type it makes a TypeClassBuilder with a native base, then registers
it with Reflection and the Factory. The base is a class derived from BaseValueConverter for a converter, and
UserControl for a control.

The repro doesn't use any renderer. Studio is the root of a view that is updated, not drawn.

Steps to reproduce

  1. On Windows, with NOESIS_SDK_DIR set, run powershell -ExecutionPolicy Bypass -File build.ps1 in minimal/.
    It builds repro.cpp against Noesis.lib and NoesisEditor.lib and runs repro Repro.noesis refresh 3 times
    and repro Repro.noesis new-studio once, on a fresh copy of project/ each time.
  2. What refresh does:

    1. registers Repro.EarlyConverter and Repro.EarlyControl;
    2. Studio::Create in a view, 60 updates; both lists printed;
    3. registers Repro.LateConverter and Repro.LateControl;
    4. Studio::ClearTypeCache(), Studio::PopulateTypeCache(), 60 updates; both lists printed;
    5. Studio::OpenProjectFile(studio, "Page.xaml"), 60 updates; both lists printed.

    new-studio then releases Studio and its view and makes them again (one Studio at a time), and prints the lists.

  3. The repro exits 1 if LateConverter or LateControl is missing from the last lists; build.ps1 exits 1 if a
    refresh run did.

Expected and actual

Expected: LateConverter and LateControl are listed after step 4.

Actual:

registered Repro.EarlyConverter
registered Repro.EarlyControl
after Studio::Create: converters: AlternationConverter BooleanToVisibilityConverter EarlyConverter (81 resource types); Add Element's controls: ContentControl HeaderedContentControl ItemsControl TabControl HeaderedItemsControl EarlyControl Control UserControl (78 elements in 11 categories)
registered Repro.LateConverter
registered Repro.LateControl
after ClearTypeCache + PopulateTypeCache: converters: AlternationConverter BooleanToVisibilityConverter EarlyConverter (81 resource types); Add Element's controls: ContentControl HeaderedContentControl ItemsControl TabControl HeaderedItemsControl EarlyControl Control UserControl (78 elements in 11 categories)
after OpenProjectFile(Page.xaml): converters: AlternationConverter BooleanToVisibilityConverter EarlyConverter (81 resource types); Add Element's controls: ContentControl HeaderedContentControl ItemsControl TabControl HeaderedItemsControl EarlyControl Control UserControl (78 elements in 11 categories)
refresh: LateConverter and LateControl NOT both listed

The control, after the same steps:

after Studio released and made again: converters: AlternationConverter BooleanToVisibilityConverter EarlyConverter LateConverter (82 resource types); Add Element's controls: ContentControl HeaderedContentControl ItemsControl TabControl HeaderedItemsControl LateControl EarlyControl Control UserControl (79 elements in 11 categories)
new-studio: LateConverter and LateControl both listed
Attached Files
minimal.zip (5,011 bytes)
PlatformWindows

Activities

Issue History

Date Modified Username Field Change
2026-11-06 15:49 Ditzy1571 New Issue
2026-11-06 15:49 Ditzy1571 File Added: minimal.zip