Page 1 of 1

Drag Drop not working

Posted: Sat Jul 29, 2017 12:47 pm
by codeit
Hi can anyone help me to get this working as the event never triggers!

Code: Select all

Repeat
  Event = WaitWindowEvent()
  Select Event
      
    Case #PB_Event_Timer
      If State = #playing
        CocoaMessage(@time, NSSound, "currentTime")
        SetGadgetState(ProgressBar_0, PeekD(@time))
        SetGadgetText(Text_2, FormatDate("%ii:%ss", time))
      EndIf
      
    Case #PB_Event_GadgetDrop
      Files = EventDropFiles()
      FileCount = CountString(files, #LF$) + 1
      For i = 1 To FileCount
        AddAudio(PlayList(), StringField(Files, i, #LF$), #False)
      Next
      RefreshList()
   EndSelect
Untill quit

Re: Drag Drop not working

Posted: Sat Jul 29, 2017 3:26 pm
by wilbert
codeit wrote:Hi can anyone help me to get this working as the event never triggers!
It's hard to help with only that small piece of code.
For example, did you enable drag/drop somewhere in your code with EnableGadgetDrop ?

Re: Drag Drop not working

Posted: Sat Jul 29, 2017 3:57 pm
by WilliamL
Use 'Drag Drop' in 'Advanced search' and select Mac Bugs forum to many threads about it.

Re: Drag Drop not working

Posted: Sat Jul 29, 2017 3:59 pm
by codeit
Small code or not you are spot on again wilbert
Thank's :mrgreen: