Thread Kephra: Texteditor nur in Perl
(538 answers)
Opened by lichtkind at 2008-03-09 00:08
Da passt aber noch nicht alles 100%ig:
* $panel->Clear würde ich in run aufrufen, sonst bekommt man immer nur die letzte Zeile angezeigt: Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 sub output { my $panel = _ref(); $panel->AppendText( @_ ); } sub clear_output { my $panel = _ref(); $panel->Clear; } sub run { my $win = Kephra::App::Window::_ref(); my $doc = Kephra::Document::_get_current_file_path(); Kephra::File::save_current(); if ($doc) { clear_output(); my $proc = Wx::Perl::ProcessStream->OpenProcess(qq~perl "$doc"~ , 'Output-Extention', $win); } else { Kephra::App::StatusBar::info_msg( $Kephra::localisation{app}{menu}{document} . ' ' . $Kephra::localisation{app}{general}{untitled} . "\n" ); } } * Wenn Leerzeichen im Pfad enthalten sind, macht es auch Probleme. OpenProcess sollte daher so aufgerufen werden: Code (perl): (dl
)
my $proc = Wx::Perl::ProcessStream->OpenProcess(qq~perl "$doc"~ , 'Output-Extention', $win); Ansonsten echt cool! OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/) -- Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html Perl-Entwicklung: http://perl-services.de/ |