You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So when i press on the button the in '$frame1' i can create one button without errors. Unfortunately the second time i press the main window closes with seg fault.
I was reading the manual and tried to find some examples of the exact procedures of dynamically adding widgets but could not find any, at least for perl-iup.
Any ideas what i might be doing wrong? Or how to resolve the issue?
Thank you for your time and efforts!
Cheers
D.
The text was updated successfully, but these errors were encountered:
Hi,
i am trying to add some buttons dynamically to a frame. The frame itself is in another frame.
----------- SAMPLE CODE -----------
use IUP ':all';
my ($frame1,$subFrame,$hbox1,$dlg,$butt);
$subFrame=IUP::Frame->new(SIZE=>'200x200',TITLE=>'Projects',SCROLLBAR=>'VERTICAL');
sub create_project{
print "\n create proj\n";
$butt=IUP::Button->new(TITLE=>"proj",ACTION=>&bla);
}
sub bla{
print " bla\n";
}
create the main dialog
sub init_dialog {
my $menu = IUP::Menu->new( child=>[
IUP::Item->new(TITLE=>"Message", ACTION=>&my_cb ),
IUP::Item->new(TITLE=>"Quit", ACTION=>sub { IUP_CLOSE } ),
]
);
}
main program
$dlg = init_dialog();
$dlg->Show();
IUP->MainLoop();
----------- SAMPLE CODE -----------
So when i press on the button the in '$frame1' i can create one button without errors. Unfortunately the second time i press the main window closes with seg fault.
I was reading the manual and tried to find some examples of the exact procedures of dynamically adding widgets but could not find any, at least for perl-iup.
Any ideas what i might be doing wrong? Or how to resolve the issue?
Thank you for your time and efforts!
Cheers
D.
The text was updated successfully, but these errors were encountered: