Go Back   Rhinocerus > Newsgroup > Newsgroup comp.lang.* 1 > Newsgroup comp.lang.clipper.visual-objects

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 02-22-2012, 07:23 PM
Grzegorz Ramotowski
Guest
 
Posts: n/a
Default DragOver() is not called...

Hi Folks,
I'm digging out old thread because my DragOver (neither of window's or
control's) never gets called. Both clients (MyRightSLE and
oDCbBrowser) are enabled as drag clients and Drop() works. Only
DragOver() does not. Why? Where shall I look for an error (it there is
any)? (VO2.8SP1 b2822)

CLASS DragBBrowser INHERIT BBROWSER

METHOD DragOver(oDragEvent) CLASS DragBBrowser
LOCAL iCount AS INT
LOCAL lAcceptDrop AS LOGIC
// Check files that are being dragged over the window
// Only accept if all files are .DBF
lAcceptDrop := TRUE
FOR iCount := 1 TO oDragEvent:FileCount
IF RAt(".PDF", oDragEvent:FileName(iCount)) == 0
lAcceptDrop := FALSE
EXIT
ENDIF
NEXT
RETURN lAcceptDrop

CLASS MyRightSLE INHERIT DATAWINDOW
PROTECT oDCbBrowser AS DRAGBBROWSER
//{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)

METHOD DragOver(oDragEvent) CLASS MyRightSLE
LOCAL iCount AS INT
LOCAL lAcceptDrop AS LOGIC

#IFDEF __DEBUG
DebOut("DragOver MyRightSLE")
#ENDIF

// Check files that are being dragged over the window
// Only accept if all files are .DBF
lAcceptDrop := TRUE
FOR iCount := 1 TO oDragEvent:FileCount
IF RAt(".PDF", oDragEvent:FileName(iCount)) == 0
lAcceptDrop := FALSE
EXIT
ENDIF
NEXT
RETURN lAcceptDrop
Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

  #2 (permalink)  
Old 02-22-2012, 11:24 PM
Stephen Quinn
Guest
 
Posts: n/a
Default Re: DragOver() is not called...

Grzegorz

Reading the bBrowser help file - there is NO DragOver() method.
Try using the DragDrop() method and testing for BCDM_DRAGOVER in the
callback event.

Could be a similar prob;em with the window but I'll leave you to read the
help file<g>

CYA
Steve


Reply With Quote
  #3 (permalink)  
Old 02-23-2012, 04:00 PM
Grzegorz Ramotowski
Guest
 
Posts: n/a
Default Re: DragOver() is not called...

On 23 Lut, 01:24, "Stephen Quinn" <stevej...@bigpondSPAM.net.au>
wrote:
> Grzegorz
>
> Reading the bBrowser help file - there is NO DragOver() method.
> Try using the DragDrop() method and testing for BCDM_DRAGOVER in the
> callback event.
>
> Could be a similar prob;em with the window but I'll leave you to read the
> help file<g>
>
> CYA
> Steve


Hello Stephen,
thank You for replying but...

even if there is no DragOver() for bBrowser but IS for DataWindow -
and this is not called either...
The example above is just same as in helpfile (VO).

I can drag and drop (to both window and bbrowser as control) BUT I
can't check if drop is accepted/rejected before Drop just because
DragOver is not called. Everything above is just from VO helpfile
(Help->DragDropClient Class)

Gregory
Reply With Quote
  #4 (permalink)  
Old 02-24-2012, 12:21 AM
Stephen Quinn
Guest
 
Posts: n/a
Default Re: DragOver() is not called...

Grzegorz

> even if there is no DragOver() for bBrowser but IS for DataWindow -
> and this is not called either...


DataWindow is a combination of several Window types - it's in the help<g>

You probably need to talk with the hidden 'Window' part of the DataWindow

Add something like the following to your subclassed datawindow
- you'll need to check the SDK
or search Google groups for the correct internal variable
as I'm writing this from memory

ACCESS xSurface CLASS WhateverDataWindow
RETURN SELF:_Surface

This should allow you to talk with the hidden part of the DataWindow for
your DragDrop stuff.
Eg
IF SELF:xSurfaceragOver()

If not then you'll probably need to use the Dispatch() method to capture the
messages.

What your experiencing has been covered in the past (see Google groups),
there's probably a demo available online.
Have you checked KnowVO or Cavo.com for sample code??

CYA
Steve


Reply With Quote
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 05:01 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.