Was your custom view created dynamically (via an Access type)? If it
was just created as a standard statically allocated view type, it will
disappear when the submit handler is finished. Consider to two
On_Click events:
procedure On_Click1(Object : in out Gnoga.Gui.Base.Base_Type'Class) is
v : Gnoga.Gui.View.View_Type;
begin
v.Create(Main_View);
v.On_Double_Click_Handler(On_DoubleClick1'Unrestricted_Access);
v.Width(100);
v.Height(60);
v.Background_Color("Blue");
v.Border;
end On_Click1;
procedure On_Click2(Object : in out Gnoga.Gui.Base.Base_Type'Class) is
va : Gnoga.Gui.View.View_Access := new Gnoga.Gui.View.View_Type;
begin
va.Dynamic;
va.Create(Main_View);
va.On_Double_Click_Handler(On_DoubleClick1'Unrestricted_Access);
va.Width(100);
va.Height(60);
va.Background_Color("Red");
va.Border;
end On_Click2;
Clicks on the Blue area will give the message you see while clicks on
the Red area will work correctly. My guess is you have something
similar to the On_Click1 style, which won't work out.
On Wed, Apr 22, 2015 at 11:24 AM, Olivier Henley
<[email protected]> wrote:
> Hey!
>
> Inside a submit handler callback I create a custom view to which I bind a
> double click callback. Now when I double click the custom_view in the
> browser I get the following to stdout:
>
> Request to dispatch message to non-existant object
>
> At the double-click the event is triggered but it looks my custom view does
> not exist any more. Is it because I created the custom view on the stack?
> Now where should I put it? I tried to create a vector in my app data to push
> these new views but because Gnoga.Gui.Base_Type is limited I can't even
> create the vector type.
>
> Any help on how this pattern should be implemented (dynamic creation of
> elements that will themselves be called back) would be really appreciated.
>
> THX!
>
> Olivier
>
>
>
> ------------------------------------------------------------------------------
> BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
> Develop your own process in accordance with the BPMN 2 standard
> Learn Process modeling best practices with Bonita BPM through live exercises
> http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
> source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
> _______________________________________________
> Gnoga-list mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/gnoga-list
>
------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
_______________________________________________
Gnoga-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gnoga-list