dmitry boyarintsev schrieb:

I'd be in favour of Hans-Peter's solution until something more standard
works.
Carbon widgetset is not ideal in implementation, but i don't think
that brining more "features" to it would make it better.

Think about multi-platform applications. Lazarus/RTL/LCL should offer one unique way to deal with dropped files on app start, independent from the target platform. Since it's impossible to distinguish commandline arguments from dropped files on other platforms, special handling is possible only for Carbon, in dedicated Carbon applications.

The problem with converting AEOpenDocument to params is that you won't
be able to see the difference, between real command params and
generated by LCL.
If additional params are always generated and event is fired then
application might make double-file openning or the app need some way
to know what params are real.

When the event is not handled (Message.Result), the default handler (TApplication.WndProc?) can do whatever seems to be appropriate. On Carbon it can set a flag, in addition to converting the dropped files into commandline arguments. Also Application.Run can try to send the message once more, but this makes things more complicated (when the command line arguments already have been processed by the application...).

A TApplication.OnOpenDocument handler can be introduced, which can be implemented by an application, or a flag can indicate how things should be handled.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to