Drag Drop not working

Mac OSX specific forum
codeit
User
User
Posts: 62
Joined: Sat Apr 15, 2017 5:53 pm
Location: Leicestershire

Drag Drop not working

Post 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
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: Drag Drop not working

Post 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 ?
Windows (x64)
Raspberry Pi OS (Arm64)
WilliamL
Addict
Addict
Posts: 1214
Joined: Mon Aug 04, 2008 10:56 pm
Location: Seattle, USA

Re: Drag Drop not working

Post by WilliamL »

Use 'Drag Drop' in 'Advanced search' and select Mac Bugs forum to many threads about it.
Last edited by WilliamL on Sat Jul 29, 2017 4:04 pm, edited 1 time in total.
MacBook Pro-M1 (2021), Sonoma 14.3.1 (CLT 15.3), PB 6.10b7 M1
codeit
User
User
Posts: 62
Joined: Sat Apr 15, 2017 5:53 pm
Location: Leicestershire

Re: Drag Drop not working

Post by codeit »

Small code or not you are spot on again wilbert
Thank's :mrgreen:
Post Reply