can't open file

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

can't open file

Post by tyarmsteadBUSuSfT » Mon Jun 06, 2022 10:06 pm

The picture file that I am trying to open is:
bindle:/var/mobile/Containers/Data/Application/F90CF0F6-XXX-XXX-XXX-XXXXXXXXX/Documents/165.jpg
The real is " Can't open file.
Thank you
Ty

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9669
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: can't open file

Post by dunbarx » Tue Jun 07, 2022 3:02 am

Hi.

Um, er, how did you try to open that file?

Craig

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: can't open file

Post by jmburnod » Tue Jun 07, 2022 12:15 pm

Hi Ty
Is your file is in document folder of your app ?
If that is the case your may use this

Code: Select all

   put specialfolderpath("documents") into tFolDoc
   put tFolDoc & "/" & "165.jpg" into tFile
   set the filename of img "myImage" to tFile  
Best regards
Jean-Marc
https://alternatic.ch

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9669
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: can't open file

Post by dunbarx » Tue Jun 07, 2022 1:43 pm

I was really asking if you, say, used the "open file" command, or something else.

Craig

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: can't open file

Post by tyarmsteadBUSuSfT » Tue Jun 07, 2022 2:21 pm

I'm trying to retrieve a picture using the file path/picture name and place it onto a card. That's when I get the error can't open image.
Thank you for your help.
Ty

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: can't open file

Post by richmond62 » Tue Jun 07, 2022 4:26 pm

How about checking if the image file is not damaged.

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: can't open file

Post by tyarmsteadBUSuSfT » Tue Jun 07, 2022 5:13 pm

The pictures do not appear to be damaged.

stam
Posts: 2686
Joined: Sun Jun 04, 2006 9:39 pm
Location: London, UK

Re: can't open file

Post by stam » Tue Jun 07, 2022 5:31 pm

tyarmsteadBUSuSfT wrote:
Tue Jun 07, 2022 2:21 pm
I'm trying to retrieve a picture using the file path/picture name and place it onto a card. That's when I get the error can't open image.
Thank you for your help.
Ty
I think what others quite rightly asked is to show the code you used. Otherwise it's not possible to know what went wrong...

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9669
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: can't open file

Post by dunbarx » Tue Jun 07, 2022 5:59 pm

What Stam said, as I did. How did you try to retrieve that file? In other words what code did you write?

Craig

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: can't open file

Post by richmond62 » Tue Jun 07, 2022 6:33 pm


jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7237
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: can't open file

Post by jacque » Tue Jun 07, 2022 6:34 pm

tyarmsteadBUSuSfT wrote:
Mon Jun 06, 2022 10:06 pm
The picture file that I am trying to open is:
bindle:/var/mobile/Containers/Data/Application/F90CF0F6-XXX-XXX-XXX-XXXXXXXXX/Documents/165.jpg
The real is " Can't open file.
We do need to see the code, but I see a couple of things wrong.
  • " bindle" should be "binfile".
  • The documents folder should use specialFolderPath("documents")
  • Finally, LC can't just open an image automatically, but you can get the raw imageData or you can put the image into an image control.
The last item is why we need to see the script.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

tyarmsteadBUSuSfT
Posts: 151
Joined: Sat Aug 25, 2012 1:14 am

Re: can't open file

Post by tyarmsteadBUSuSfT » Wed Jul 06, 2022 10:55 pm

Got it, thank you
Ty

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”