OpenFile Bug on MAC?

Just starting out? Need help? Post your questions and find answers here.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

OpenFile Bug on MAC?

Post by collectordave »

using this code

Code: Select all

 StandardFile$ = ""   ; set initial file+path to display
  ; With next string we will set the search patterns ("|" as separator) for file displaying:
  ;  1st: "Text (*.txt)" as name, ".txt" and ".bat" as allowed extension
  ;  2nd: "PureBasic (*.pb)" as name, ".pb" as allowed extension
  ;  3rd: "All files (*.*) as name, "*.*" as allowed extension, valid for all files
  Pattern$ = "Text (*.txt)|*.txt;*.bat|PureBasic (*.pb)|*.pb|All files (*.*)|*.*"
  Pattern = 0    ; use the first of the three possible patterns as standard
  File$ = OpenFileRequester("Please choose file to load", StandardFile$, Pattern$, Pattern)
  If File$
    MessageRequester("Information", "You have selected following file:" + Chr(10) + File$, 0)
    
    Debug OpenFile(#PB_Any,File$)
    
    
  Else
    MessageRequester("Information", "The requester was canceled.", 0) 
  EndIf
When i select a file on an external volume it does not open! Always returns 0

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: OpenFile Bug on MAC?

Post by collectordave »

Strangely adding the line

Debug ReadFile(#PB_Any, File$)

does open the file you get a nice big number!
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: OpenFile Bug on MAC?

Post by collectordave »

The volume says i can only read.

How do i set it to allow readwrite?
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
User avatar
Mijikai
Addict
Addict
Posts: 1360
Joined: Sun Sep 11, 2016 2:17 pm

Re: OpenFile Bug on MAC?

Post by Mijikai »

Code: Select all

SetFileAttributes(Dateiname$, Attribute)
Wolfram
Enthusiast
Enthusiast
Posts: 567
Joined: Thu May 30, 2013 4:39 pm

Re: OpenFile Bug on MAC?

Post by Wolfram »

Be sure your external drive is not in NTFS format.
macOS Catalina 10.15.7
infratec
Always Here
Always Here
Posts: 6817
Joined: Sun Sep 07, 2008 12:45 pm
Location: Germany

Re: OpenFile Bug on MAC?

Post by infratec »

remount it with rw permission.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: OpenFile Bug on MAC?

Post by collectordave »

One word


NTFS

!**!

Thanks
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
User avatar
mk-soft
Always Here
Always Here
Posts: 5333
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: OpenFile Bug on MAC?

Post by mk-soft »

My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3870
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: OpenFile Bug on MAC?

Post by wilbert »

exFAT works pretty well as a cross platform file system.
Windows (x64)
Raspberry Pi OS (Arm64)
Wolfram
Enthusiast
Enthusiast
Posts: 567
Joined: Thu May 30, 2013 4:39 pm

Re: OpenFile Bug on MAC?

Post by Wolfram »

collectordave wrote:One word


NTFS

!**!

Thanks
If you must work on NTFS, you can use Paragon NTFS. I used many years, in the past, without any problem.
Since my System update to HighSiera I have no experience with it, but it should work es well.
macOS Catalina 10.15.7
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: OpenFile Bug on MAC?

Post by collectordave »

no need to work with NTFS just reformatting 2TB.

Will have fun getting it all back.


Cheers
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
Post Reply