Re: need dev hints

Paul Rohr (paul@abisource.com)
Fri, 25 Jun 1999 19:29:20 -0700


At 05:35 PM 6/21/99 +0200, Ove Kaaven wrote:
>First, maybe a backup option could be added, so when a file is saved and
>the file already exists, the previous version is renamed to something that
>ends with ~ or something, just in case. Where would I do that?

Whenever you're trying to locate functionality for a specific menu item,
take a look at:

abi/src/wp/ap/xp/ap_EditMethods.cpp

In this case, you'd need the fileSave or fileSaveAs edit methods, which
invoke a call chain which looks roughly like the following:

UI primitive -- menu item, toolbar button, keybinding, etc.
edit method fileSave fileSaveAs
view FV_View::cmdSave() FV_View::cmdSaveAs()
document PD_Document::save() PD_Document::saveAs()
exporter IE_Exp::writeFile() IE_Exp::writeFile()

Presumably, the best place to put such logic would be down in the document.
However, I'm not clear how to cleanly implement the feature. How would a
user know which documents were backups which could be safely deleted so as
not to clutter up their hard drive (or floppy, for that matter)?

>And then there's that annoying bug (found it as #431, but both font and
>size is affected) where if I use a font (Helvetic), start a new paragraph,
>backspace it, the font is reverted to Times New Roman. Urgh. Any ideas
>how I should fix that, or where to look?

This one's probably harder, because I believe it's an interaction between
the editing code and the piece table's defaults. I didn't pay attention the
last time Jeff was in there working on stuff like this, and he's on vacation
next week.

Actually though, the hardest part about fixing bugs like this is getting a
sufficiently well-specified sense of what the behavior should be. Usually
it takes more than a little time experimenting with an existing
implementation you like to understand what it's really doing.

If you've gotten the desired behavior figured out by the time Jeff gets
back, I'm sure he'd be glad to help you figure out where to put the
implementation.

Paul



This archive was generated by hypermail 1.03b2.