use strict; use warnings; use Wx; use Wx::STC; # To import Wx::StyledTextCtrl
package MyApp; use base 'Wx::App'; sub OnInit { my $frame = Wx::Frame->new(undef, -1, "Hello World"); my $ctrl = Wx::StyledTextCtrl->new($frame); $frame->Show( 1 ); } package main; MyApp->new()->MainLoop(); --------------------------------------------- Have fun, Ahmad On Wed, Aug 4, 2010 at 3:44 PM, Daniel Carrera <dcarr...@gmail.com> wrote: > Hello Ahmad, > > Thanks for the links. I feel dumb because I still can't figure out how > to make a simple hello-world editor with Wx::StyledTextCtrl. I can't > find anything remotely like a simple example. I tried writing my own: > > -------------%<-------------- > use strict; > use Wx; > > package MyApp; > > use base 'Wx::App'; > > sub OnInit { > my $frame = Wx::Frame->new(undef, -1, "Hello World"); > my $ctrl = Wx::StyledTextCtrl->($frame, -1); # <-- LINE 10 > $frame->Show( 1 ); > } > > package main; > > MyApp->new()->MainLoop(); > -------------%<-------------- > > > But this fails with the error: `Can't locate object method "new" via > package "Wx::StyledTextCtrl" (perhaps you forgot to load > "Wx::StyledTextCtrl"?) at mini.pl line 10.` > > :-( > > Has anyone here managed to get it working? Can you show me a HelloWorld > example? > > Daniel. > > > On Wed, Aug 4, 2010 at 12:02 PM, Ahmad Zawawi <ahmad.zaw...@gmail.com> > wrote: > > Oops i forgot to CC the group. Sorry :) > > > > On Wed, Aug 4, 2010 at 1:01 PM, Ahmad Zawawi <ahmad.zaw...@gmail.com> > wrote: > > > >> Hi, > >> > >> Padre is already using it. You can find the code here: > >> http://search.cpan.org/~plaven/Padre-0.68/lib/Padre/Wx/Editor.pm > >> > >> <http://search.cpan.org/~plaven/Padre-0.68/lib/Padre/Wx/Editor.pm > >wxStyledTextCtrl > >> reference (python): > >> http://www.yellowbrain.com/stc/index.html > >> > >> <http://www.yellowbrain.com/stc/index.html>Hope this helps you, > >> Ahmad > >> > >> > >> On Wed, Aug 4, 2010 at 12:23 PM, Alessandro < > >> alessandro.scanfe...@gmail.com> wrote: > >> > >>> http://docs.wxwidgets.org/trunk/classwx_styled_text_ctrl.html > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> > >>> 2010/8/4 Daniel Carrera <dcarr...@gmail.com> > >>> > >>> > Hello, > >>> > > >>> > I just learned about a possibly-cool widget: wxStyledTextCtrl. > >>> > Apparently it is the Scintilla editor. I'm trying to figure out how > to > >>> > add it to my program: > >>> > > >>> > 1) I cannot find it on the wxWidgets reference: > >>> > > >>> > http://docs.wxwidgets.org/stable/wx_classref.html#classref > >>> > > >>> > 2) But I'm pretty sure it exists and that wxPerl has it: > >>> > > >>> > http://www.mail-archive.com/wxperl-users@perl.org/msg00748.html > >>> > > >>> > > >>> > Can anyone point me to some documentation for Wx::StyledTextCtrl? I > am > >>> > keen to try it. > >>> > > >>> > Cheers. > >>> > Daniel. > >>> > -- > >>> > Intolerant people should be shot. > >>> > > >>> > >> > >> > > > > > > -- > Intolerant people should be shot. >