Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^2: console editor

by misc (Pilgrim)
on Sep 02, 2007 at 13:01 UTC ( #636601=note: print w/ replies, xml ) Need Help??


in reply to Re: console editor
in thread console editor

gtk2 is a c-library -?
Here is an example in cpp pseudo code how I understood coding with tvision:

class button { // The tvision class public: virtual void buttonclick(){ //Overwrite me ... } ... } class mybutton public Button { // This is my button ... virtual void buttonclick(){ //do something exit(0); } } int main(){ //Initialize the app.. app->mainloop(); }

TVision is object oriented, and I don't know howto implement the example of the class mybutton in perl in a useful manner.

I thought already about a wrapper which implements event style hooks.

Would look something like this:
--- cpp layer class perlwrapper_button public Button{ virtual void buttonclick(){ if ( !call perl->this_instance->buttonclick() ){ Button::buttonclick(); // Call tvision's buttononclick } } } --- perl module package Button; sub buttonclick{ return 0; } 1; --- The perl code of mybutton: package MyButton; push @ISA, 'Button'; sub buttonclick{ exit(0); } 1;
I doubt, however, this concept is wise.


Comment on Re^2: console editor
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://636601]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (3)
As of 2014-07-31 04:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (244 votes), past polls