Re: GNOME::Editor; new try

On Sun, 21 Mar 1999, Martijn van Beers wrote:

>    typedef SearchOption REG_REGEX = 1
>    typedef SearchOption REG_ICASE = 2;
>    typedef SearchOption REG_NOSUB = 4;
>    typedef SearchOption REG_NEWLINE = 8;

This part is definitely incorrect.

>    interface EditorFactory : GNOME::FileFactory {
>       Object new ();
>    };

Why do you need an EditorFactory with just this operation? You should
inherit from GNOME::GenericFactory instead.

>       void replace (in string             regexp,
>                     in string             newstring,
>                     in GNOME::SEEKFROM    whence,
>                     in GNOME::SearchOption flags) raises (NotFound);

Rather than raising an exception, it would probably be better to just
return the number of occurrences found/replaced. Exceptions are usually
used to indicate error conditions, not for returning processing results.

-- Elliot
Lbh'er fhccbfrq gb gel bar bs gubfr fvyyl EFN-va-guerr-yvarf .fvtangherf
ba guvf, svefg

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]