Sponsored Content
Operating Systems OS X (Apple) Installing applications by avoiding GUI Post 302490165 by codecaine on Monday 24th of January 2011 05:55:34 AM
Old 01-24-2011
Thanks, I will check it out.
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Installing GTK to develop Perl GUI's

Hi! What do I need to do to install GTK so I can use Perl GUI's in UNIX? I want to install it in my account. I am not a sys admin or anything. Thanks in advance, P. (1 Reply)
Discussion started by: pmcg
1 Replies

2. UNIX for Dummies Questions & Answers

If a is windows gui ( client), b is a unix gui ( Server for a) and c is a shell scrip

Hello all, 1) I want to have a GUI application that will call Unix shell scripts, 2) that GUI application should be able to reside on windows ( if possible) and then call Unix shell script either directly or through a server residing on unix. That is for example. If a is windows gui (... (1 Reply)
Discussion started by: hchivukula
1 Replies

3. BSD

Installing GUI

Hi there, I am a new FreeBSD. I am entirely new to tihs OS, I just have good dos/windows skills. So I am comparing everything with dos/windows. I have installed FreeBSD with default settings. When FreeBSD starts, the GUI (if there is any ?!?!?) doesn't start; just the command line. So thats... (4 Replies)
Discussion started by: koraykazgan
4 Replies

4. Programming

GUI applications on SunSolaris and RedHat Linux

Hello, I want know about building a product on Sun solaris and Redhat Linux. Product would contain C,C++, Java, UNIX Shell scripts and so on. It will not be a client server programme. Thanks! Shafi (5 Replies)
Discussion started by: shafi2all
5 Replies

5. Shell Programming and Scripting

GUI Applications

Hi Experts, Can anyone suggest me kindly, whether designing some small GUI applications are possible in shell scripting..... Like a small calculator kind of stuff....... I fit is possible guide me with some examples. Thanks, Newbie....... (0 Replies)
Discussion started by: kritibalu
0 Replies

6. UNIX for Dummies Questions & Answers

Avoiding the second run of the script

Hi all, I want to put a check in my script to check if the same instance is already running and not finished and if not then does not allow it to run! in which part of my script I should put this? and any idea how I should write it? tx (4 Replies)
Discussion started by: messi777
4 Replies

7. UNIX for Dummies Questions & Answers

Avoiding the history

In bash shell, how we can avoid the commands getting recorded in history file. One way i can think of is : export HISTSIZE=0 Is there any other way to achieve this? Thanks (1 Reply)
Discussion started by: pandeesh
1 Replies

8. Programming

Python gui or C++ gui or java gui?

python gui or c++ gui or java gui? and when to use etch one? (1 Reply)
Discussion started by: kaja
1 Replies
Wx::Thread(3)						User Contributed Perl Documentation					     Wx::Thread(3)

NAME
Thread - using wxPerl with threads SYNOPSIS
# the order of these use()s is important use threads; use threads::shared; use Wx; my $DONE_EVENT : shared = Wx::NewEventType; my $worker = threads->create( &work ); # create frames, etc my $frame = Wx::Frame->new( ... ); EVT_COMMAND( $frame, -1, $DONE_EVENT, &done ); $app->MainLoop; sub done { my( $frame, $event ) = @_; print $event->GetData; } sub work { # ... do stuff, create a shared $result value my $threvent = new Wx::PlThreadEvent( -1, $DONE_EVENT, $result ); Wx::PostEvent( $frame, $threvent ); } # event handler sub OnCreateThread { # @_ = () is necessary to avoid "Scalars leaked" my( $self, $event ) = @_; @_ = (); threads->create( ... ); } DESCRIPTION
Threaded GUI application are somewhat different from non-GUI threaded applications in that the main thread (which runs the GUI) must never block. Also, in wxWidgets, no thread other than the main thread can manipulate GUI objects. This leads to a hybrid model where worker threads must send events to the main thread in order to change the GUI state or signal their termination. Order of module loading It's necessary for "use Wx" to happen after <use threads::shared>. Sending events from worker threads "Wx::PlThreadEvent" can be used to communicate between worker and GUI threads. The event can carry a shared value between threads. my $DONE_EVENT : shared = Wx::NewEventType; sub work { # ... do some stuff my $progress = new Wx::PlThreadEvent( -1, $DONE_EVENT, $progress ); Wx::PostEvent( $frame, $progress ); # ... do stuff, create a shared $result value my $end = new Wx::PlThreadEvent( -1, $DONE_EVENT, $result ); Wx::PostEvent( $frame, $end ); } The target of the event can be any "Wx::EvtHandler" Receiving events from worker threads "Wx::PlThreadEvent" is a command event and can be handled as such. The "->GetData" method can be used to retrieve the shared data contained inside the event. my $DONE_EVENT : shared = Wx::NewEventType; EVT_COMMAND( $frame, -1, $DONE_EVENT, &done ); sub done { my( $frame, $event ) = @_; print $event->GetData; } Creating new threads Creating new threads from event handlers works without problems except from a little snag. In order not to trigger a bug in the Perl interpreter, all event handler that directly or indirectly cause a thread creation must clean @_ before starting the thread. For example: sub OnCreateThread { my( $self, $event ) = @_; @_ = (); threads->create( ... ); } failure to do that will cause "scalars leaked" warnings from the Perl interpreter. perl v5.10.0 2007-04-28 Wx::Thread(3)
All times are GMT -4. The time now is 07:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy