[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta
Subject:    [Quanta] quata and php actions
From:       Sasha Andric <sasha () goldnet ! ca>
Date:       2005-10-10 19:36:46
Message-ID: 200510101636.46742.sasha () goldnet ! ca
[Download RAW message or body]



Some of my php files are automatically encoded when they are saved. These 
actions are scripted in php. Someone might find this useful.

// this will find currently active/focused instance of quanta
$dcopid = '';
$dcopids = trim(`dcop | grep quanta`);
$dcopids = explode ("\n" , $dcopids) ;
foreach ($dcopids as $d ) {
  $d = trim($d);
  if ($d  && trim(`dcop $d Quanta focus`) == 'true' ){
    $dcopid = $d ;
    break;
  }
}

// this is how to print error message so it returns to quanta 
// and pop up messages dock
if ($err) {
	$fp = fopen("php://stderr", "w");
	if ($fp) {
		fputs($fp, "$err\n");
		fclose($fp);
	}
	exit (1);
}
_______________________________________________
Quanta mailing list
Quanta@mail.kde.org
https://mail.kde.org/mailman/listinfo/quanta

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic