Yes, I have seen that in the Nim manual.

Unfortunately such a concept construction is a bit difficult because all the 
code is automatically generated by use of gobject-introspection. Maybe I will 
make one manual test case to see if it would work. For now I have broken down 
the procs into multiple instances in the macro:
    
    
    proc connect_for_signal_editing_started2(self: CellRenderer;  p: proc 
(self: CellRenderer; editable: CellEditable; path: string)): culong 
{.discardable.} =
      scediting_started(self, connect_for_signal_cdecl_editing_started2, nil)
    
    proc connect_for_signal_editing_started2(self: CellRenderer;  p: proc 
(self: CellRenderer; editable: SpinButton; path: string)): culong 
{.discardable.} =
      scediting_started(self, connect_for_signal_cdecl_editing_started2, nil)
    
    proc connect_for_signal_editing_started2(self: CellRenderer;  p: proc 
(self: CellRenderer; editable: ComboBox; path: string)): culong {.discardable.} 
=
      scediting_started(self, connect_for_signal_cdecl_editing_started2, nil)
    
    proc connect_for_signal_editing_started2(self: CellRenderer;  p: proc 
(self: CellRenderer; editable: SearchEntry; path: string)): culong 
{.discardable.} =
      scediting_started(self, connect_for_signal_cdecl_editing_started2, nil)
    
    proc connect_for_signal_editing_started2(self: CellRenderer;  p: proc 
(self: CellRenderer; editable: ComboBoxText; path: string)): culong 
{.discardable.} =
      scediting_started(self, connect_for_signal_cdecl_editing_started2, nil)
    
    proc connect_for_signal_editing_started2(self: CellRenderer;  p: proc 
(self: CellRenderer; editable: AppChooserButton; path: string)): culong 
{.discardable.} =
      scediting_started(self, connect_for_signal_cdecl_editing_started2, nil)
    
    proc connect_for_signal_editing_started2(self: CellRenderer;  p: proc 
(self: CellRenderer; editable: Entry; path: string)): culong {.discardable.} =
      scediting_started(self, connect_for_signal_cdecl_editing_started2, nil)
    
    connect_for_signal_editing_started2(r, handler2)
    
    

Seems to work, due to overloading the compiler can select a proc definition 
which matches for handler2.

At least the test case which a user posted compiles now -- I have to wait for 
user reply: 
[https://github.com/StefanSalewski/gintro/issues/14#issuecomment-330171244](https://github.com/StefanSalewski/gintro/issues/14#issuecomment-330171244)

Reply via email to