Re: [lazarus] DropFiles Implementation

2008-01-30 Thread Paul Ishenin

Tom Gregorovic пишет:

Then there will be problem, how to track this feature inside some
custom controls. Assigning to a published event is not a clear
solution. Maybe instead of property there can be some protected
function like SetAllowDropFiles for these cases.

But I think the others want to handle it via OnDragDrop and then you
need some enable flag.



I think that TWinControl.AllowDropFiles (TWinControl.AllowOSDrop ?) can 
be added.


Best regards,
Paul Ishenin.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DropFiles Implementation

2008-01-30 Thread Tom Gregorovic
On Jan 29, 2008 8:25 PM, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:
> Did OnDropFiles make it to 0.9.24? If so, any radical change can
> potentially cause a lot of headache for people already using it.
>
> On Jan 29, 2008 3:46 PM, Tom Gregorovic <[EMAIL PROTECTED]> wrote:
> > - there must be some property to enable accepting files, like does
> > AllowDropFiles now
>
> Maybe it could be simply defined as OnDropFiles <> nil so no new
> property is needed. We can hook when OnDropFiles is set and call an
> widgetset function to warn the widgetset it is being (de)activeated.
> Do you think this would work on windows?
>

Then there will be problem, how to track this feature inside some
custom controls. Assigning to a published event is not a clear
solution. Maybe instead of property there can be some protected
function like SetAllowDropFiles for these cases.

But I think the others want to handle it via OnDragDrop and then you
need some enable flag.

Tom

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DropFiles Implementation

2008-01-29 Thread Christian U.



One idea: Maybe OnDropFiles could represent drag-drop between app and
system and OnDragDrop simply inside the app?
  

Paul Isenheim had the same idea some Time bevore in this thread:

>>>What for we need OnDropFiles? We already have OnDragOver and 
OnDragDrop. To distinct that we are dragging files we can invent new 
descendant of TDragObject. This way dragging/dropping files will be very 
LCLisch.



thanks,
  


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DropFiles Implementation

2008-01-29 Thread Christian U.

Felipe Monteiro de Carvalho schrieb:

Did OnDropFiles make it to 0.9.24? If so, any radical change can
potentially cause a lot of headache for people already using it.
  

We should remove it as fast as possible. (Just my Opinion).


On Jan 29, 2008 3:46 PM, Tom Gregorovic <[EMAIL PROTECTED]> wrote:
  

- there must be some property to enable accepting files, like does
AllowDropFiles now



Maybe it could be simply defined as OnDropFiles <> nil so no new
property is needed. We can hook when OnDropFiles is set and call an
widgetset function to warn the widgetset it is being (de)activeated.
Do you think this would work on windows?

  

We must also take into account that there can be implemented general
drag and drop between App and OS in future.



One idea: Maybe OnDropFiles could represent drag-drop between app and
system and OnDragDrop simply inside the app?

thanks,
  


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DropFiles Implementation

2008-01-29 Thread Felipe Monteiro de Carvalho
Did OnDropFiles make it to 0.9.24? If so, any radical change can
potentially cause a lot of headache for people already using it.

On Jan 29, 2008 3:46 PM, Tom Gregorovic <[EMAIL PROTECTED]> wrote:
> - there must be some property to enable accepting files, like does
> AllowDropFiles now

Maybe it could be simply defined as OnDropFiles <> nil so no new
property is needed. We can hook when OnDropFiles is set and call an
widgetset function to warn the widgetset it is being (de)activeated.
Do you think this would work on windows?

> We must also take into account that there can be implemented general
> drag and drop between App and OS in future.

One idea: Maybe OnDropFiles could represent drag-drop between app and
system and OnDragDrop simply inside the app?

thanks,
-- 
Felipe Monteiro de Carvalho

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DropFiles Implementation

2008-01-29 Thread Tom Gregorovic
On Jan 28, 2008 10:35 PM, Felipe Monteiro de Carvalho
<[EMAIL PROTECTED]> wrote:
> bump.
>
> I think this is a relevant discussion which needs an answer from Tom
> to progress.
>

Well, we can extend the recent drop files functionality to every
TWinControl and change its handling to OnDragDrop, as someone has
suggested. We can use some TDragObject descendant, which will hold the
list of filenames.
There are some things which must be taken into account on various platforms:
Windows
- there must be some property to enable accepting files, like does
AllowDropFiles now
- for functional OnDragOver you have to use OLE (IDropTarget)
Carbon
- there some function to track dropped files on Application level,
which is suitable also for other platforms

We must also take into account that there can be implemented general
drag and drop between App and OS in future.
Personally, I have no taste to improve it - especially the gtk part.

Tom

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DropFiles Implementation

2008-01-28 Thread Felipe Monteiro de Carvalho
bump.

I think this is a relevant discussion which needs an answer from Tom
to progress.

thanks,
-- 
Felipe Monteiro de Carvalho

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DropFiles Implementation

2008-01-20 Thread Christian U.

Paul Ishenin schrieb:

Christian U. wrote:
The second thing is I think it is not very LCLisch. I think an 
correct implementation add an OnDropFiles event to TWinControl or 
TCustomControl and not to TForm.
I think we should think twice about these and implement it bevore 1.0 
after that we shouldnt break existing code.
What for we need OnDropFiles? We already have OnDragOver and 
OnDragDrop. To distinct that we are dragging files we can invent new 
descendant of TDragObject. This way dragging/dropping files will be 
very LCLisch.

nice idea.
100% agree.



Best regards,
Paul Ishenin.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives



_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


Re: [lazarus] DropFiles Implementation

2008-01-20 Thread Paul Ishenin

Christian U. wrote:
The second thing is I think it is not very LCLisch. I think an correct 
implementation add an OnDropFiles event to TWinControl or 
TCustomControl and not to TForm.
I think we should think twice about these and implement it bevore 1.0 
after that we shouldnt break existing code.
What for we need OnDropFiles? We already have OnDragOver and OnDragDrop. 
To distinct that we are dragging files we can invent new descendant of 
TDragObject. This way dragging/dropping files will be very LCLisch.


Best regards,
Paul Ishenin.

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] DropFiles Implementation

2008-01-20 Thread Christian U.

Hi,

We had an discussion about the OnDropFiles implementation in german 
lazarus forum lately.
And most people had the meaning that the current implementation is not 
so good.


The main problem is that it is impossible to drop files to special 
controls. In most cases the people dont

need the Files on the whole Form but in special controls.

AllowDropFiles makes no sense for me.

The second thing is I think it is not very LCLisch. I think an correct 
implementation add an OnDropFiles event to TWinControl or TCustomControl 
and not to TForm.
I think we should think twice about these and implement it bevore 1.0 
after that we shouldnt break existing code.


best regards
Christian


_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives