Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

My own file copy and empty trash in OS 9.2.2

1 view
Skip to first unread message

Cliff Huylebroeck

unread,
Dec 5, 2011, 11:10:48 AM12/5/11
to
I want to replace file copy and empty trash
with my own procedure and dialog in OS 9.2.2.
How can I intercept/patch/overload these 2 functions in C++?
I'm using CodeWarrior Pro 5.

The reason is:
It has to be suspended when I'm using the mouse or the keyboard.
It has to be resumed after x seconds of inactivity.
I want a different dialog.

David Stone

unread,
Dec 5, 2011, 3:55:34 PM12/5/11
to
In article <gastacara-...@macgui.com>,
It has been a very long time since I've done classic OS programming,
but I don't think you can do what you are asking. OS 9 and earlier
had methods to add to the default file open and save dialogs
within an application, including custom event handling code within
the dialogs, but not system wide across all Finder dialogs/alerts
from within an application.

If you don't want files being copied or the trash being emptied
in the background while you're doing something important, why not
simply avoid triggering such events until you're done? Those things
shouldn't happen unless the user makes them happen...

nospam

unread,
Dec 5, 2011, 4:36:10 PM12/5/11
to
In article <no.email-46DC22...@news.eternal-september.org>,
David Stone <no.e...@domain.invalid> wrote:

> > I want to replace file copy and empty trash
> > with my own procedure and dialog in OS 9.2.2.
> > How can I intercept/patch/overload these 2 functions in C++?
> > I'm using CodeWarrior Pro 5.
> >
> > The reason is:
> > It has to be suspended when I'm using the mouse or the keyboard.
> > It has to be resumed after x seconds of inactivity.
> > I want a different dialog.
>
> It has been a very long time since I've done classic OS programming,
> but I don't think you can do what you are asking. OS 9 and earlier
> had methods to add to the default file open and save dialogs
> within an application, including custom event handling code within
> the dialogs, but not system wide across all Finder dialogs/alerts
> from within an application.

it's definitely possible to intercept it, but it requires patching a
bunch of traps and is not at all straightforward.

Cliff Huylebroeck

unread,
Dec 7, 2011, 10:26:14 AM12/7/11
to
nospam wrote:
> it's definitely possible to intercept it, but it requires patching a
> bunch of traps and is not at all straightforward.

Is it possible to intercept it with AppleScript,
for example a system-wide AppleEvent handler?

nospam

unread,
Dec 7, 2011, 3:31:04 PM12/7/11
to
In article <gastacara-...@macgui.com>, Cliff Huylebroeck
no. you need to patch traps, and probably quite a few of them. consider
an alternate solution.

Cliff Huylebroeck

unread,
Dec 9, 2011, 1:52:49 PM12/9/11
to
Rewriting the whole Finder?
I don't know:
- the complete list of tasks that is done by the Finder,
- how to draw on the desktop,
- the meaning of the folder view flags.

What I can certainly do better is fast drawing and scrolling of windows with
many items.
I can easily scroll a window with one million items while using almost no
processor time.
The Finder behaves oddly when I try to display 40,000 items.
I can improve that, and also copying and emptying the trash.
I would also use normal menus instead of the Mercutio MDEF.
I would use plug-ins for the commands, so they can be easily replaced.
I would use a task window like in Puppy Linux.
If you want to do something, then a task is added to the list.
When your task list is complete then you click "Start".
Then the tasks are done one after the other, instead of simultaneously like
the current Finder does.
0 new messages