[Psi-devel] Re: a patch for auto-replace
kevin at kismith.co.uk
Mon Feb 7 02:48:02 PST 2005
On Mon, Feb 07, 2005 at 08:48:52AM +0300, Michail Pishchagin wrote:
> > > And rename
> > > workOnTextChange() to "public slot: correctTextEdit()", or something
> > > like that.
> > That function doesn't make much sense from a design point of view. I
> > would expect an Auto Correction framework to get a string as input, and
> > give another string as output. I don't understand why you would pass a
> > widget to something that has nothing to do with a user interface.
> Well... It has not only to replace one string with another, it also needs to
> know cursor position, to know what last typed word was. Also it needs to
> reposition the cursor after the successful replace.
While this is true on the implementation level, it makes no sense on the API level to be passing around arbitrary widgets, it's really the job of the chatdlg (or whatever) to do the actual replacing, and to just have the replace function work at the string level.
PhD Research Student, Dept. Computer Science, University Of Exeter
Taekwon-Do Club Captain, University of Exeter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://listserver.dreamhost.com/pipermail/psi-devel-affinix.com/attachments/20050207/816873da/attachment.bin
More information about the Psi-devel-affinix.com