Re: Perl and OO ?

2000-04-02 Thread Marc Lehmann

On Sun, Apr 02, 2000 at 11:39:15PM +0200, Axel Rousseau <[EMAIL PROTECTED]> wrote:
> gimp_file_save(RUN_NONINTERACTIVE,$img,$lay,"$$imgname","$imgname");
> 
> I can see the procedural method in the PDB browser, but how know the
> parameter for the OO method ?

The "OO-methods" do not really exist, but are autogenerated according to a
few rules (read the manpage). As a help, the "gimpdoc" commandline tool
tries to give a few possible alternatives, e.g.

   gimpdoc gimp_file_save

outputs (among other things):

   gimp_file_save (run_mode,image,drawable,filename,raw_file-name)
   $drawable->file_save(filename,raw_filename)
   $image->file_save(drawable,filename,raw_filename)
   gimp_file_save (drawable,filename,raw_filename)
   Gimp->file_save(drawable,filename,raw_filename)
   gimp_file_save (image,drawable,filename,raw_filename)

Of which the most sensible ones are (imho)

   $drawable->file_save(filename,raw_filename)
   $image->file_save(drawable,filename,raw_filename)

and

   gimp_file_save(image,drawable,filename,raw_filename)

HTH,

-- 
  -==- |
  ==-- _   |
  ---==---(_)__  __   __   Marc Lehmann  +--
  --==---/ / _ \/ // /\ \/ /   [EMAIL PROTECTED] |e|
  -=/_/_//_/\_,_/ /_/\_\   XX11-RIPE --+
The choice of a GNU generation   |
 |



Perl and OO ?

2000-04-02 Thread Axel Rousseau

Hi all,
I try to write a perl script (just try for the moment) and my help is
the PDB browser, but in the sample script, I see a lot of OO method with
less argument than the procedural method
ex : $img->gimp_file_save(NON_INTERACTIVE,"$imgname","$imgname");

but :

gimp_file_save(RUN_NONINTERACTIVE,$img,$lay,"$$imgname","$imgname");

I can see the procedural method in the PDB browser, but how know the
parameter for the OO method ?

Thank's

Axel R.