Help on trigger event
- From: Manuel Ferrero <mferrero reer it>
- To: gtk-app-devel-list gnome org
- Subject: Help on trigger event
- Date: Mon, 30 Jan 2012 14:33:04 +0100
I'm writing a simple application.
I have a source file with multiple text lines like this:
12345
23456
34567
and so on.
I also have a compare file with a single line like this:
23456
My application needs to check if the source file has some line matching
the line in the compare file and in case display the matching line.
I thougth to open the compare file, load its line in memory, then open
the source file and load all its lines in memory and then check for
comparison.
The opening and load of the compare file is done before creating the GUI
while the opening and load of the source file is done in the button
pressed callback.
So my pseudo code will be:
in main function:
open compare file;
load its content in a global variable $COMPARE_VAR;
create the GUI with one button and one text entry;
call gtk_main;
in the callback for button pressed:
open a file dialog;
open the selected file;
load its content in a vector of strings $STRING_VECTOR;
Now my problem is when to check for every single element of
$STRING_VECTOR with the global $COMPARE_VAR: I don't have the trigger
for that, do I have to do the comparison and the display all in the
button pressed callback or do I have to create some sort of custom
signal in it to trigger some other callback in wich I can do the display?
Sorry if the question is dumb, I'm really new to GTK+ and GUI programming.
TIA
--
Regards,
Manuel Ferrero
R&D department
Reer SpA
Tel. +39 011 2482215
Fax. +39 011 859867
L'utilizzo non autorizzato del presente messaggio e' vietato e potrebbe costituire reato.
Se il presente messaggio non e' a Lei indirizzato, il suo contenuto non deve essere considerato
come trasmesso o autorizzato dalla Reer SpA; in tale caso Le saremmo grati se, via e-mail,
ce ne comunicasse l'errata ricezione.
The unauthorized use of this e-mail is prohibited and could constitute an offence.
If you are not the intended recipient of this message its contents shall be understood as neither
given nor endorsed by Reer SpA. Please notify Reer SpA by e-mail immediately in that case.
[
Date Prev][
Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]