Referenced images crashing device, not simulator

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
ctflatt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 243
Joined: Sun Dec 06, 2009 12:24 am
Contact:

Referenced images crashing device, not simulator

Post by ctflatt » Mon Jun 11, 2012 5:32 pm

Hello, everyone.

I have posted this on the developer's list, but thought I would field it here, as well.

I am encountering issues with using referenced images in a stack.

I have used this method before (LC 4.6.4?), but am having issues loading referenced images with LC 5.5.

There is a sample stack link below, if anyone can verify.

Many thanks!

:Todd

File available at: https://files.me.com/ctflatt/6a79dt

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Referenced images crashing device, not simulator

Post by Dixie » Mon Jun 11, 2012 5:55 pm

Todd..

this works...

Code: Select all

  set the filename of image "image" to specialFolderPath("engine") & slash & "links" & slash & "images" & slash & "13848-1.jpg"
be well

Dixie

Klaus
Posts: 14183
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Referenced images crashing device, not simulator

Post by Klaus » Mon Jun 11, 2012 6:12 pm

Hi Todd,

yep, as Dixie says :)

And putting "binfile:" into the filename is not the best idea 8)


Best

Klaus

ctflatt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 243
Joined: Sun Dec 06, 2009 12:24 am
Contact:

Re: Referenced images crashing device, not simulator

Post by ctflatt » Mon Jun 11, 2012 6:34 pm

Thanks all!

I love chalking those up to human error!

When should "binfile:" or "file:" be specified?

Klaus
Posts: 14183
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Referenced images crashing device, not simulator

Post by Klaus » Mon Jun 11, 2012 6:38 pm

Hi Todd,
ctflatt wrote:When should "binfile:" or "file:" be specified?
when you are dealing with FILES!
Text files = file
All other (binary) files = binfile

Example:
...
put url("file:test.TXT") into fld 1
...
put url("binfile" & specialfolderpath("desktop") & "/my_image.jpg") into image 2
...

Best

Klaus

ctflatt
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 243
Joined: Sun Dec 06, 2009 12:24 am
Contact:

Re: Referenced images crashing device, not simulator

Post by ctflatt » Mon Jun 11, 2012 6:51 pm

Thanks, Klaus.

I thought I was dealing with files...

Setting the filename of an image to a file seems like dealing with files to me?

I was working with images, and chose the "binfile:" type correctly.

I guess you mean the distinction may be when you're loading the contents of a file for manipulation.

Thanks, again.

I really do appreciate it.

:Todd

ps... it's been awhile since I've posted... I missed everyone :)

Klaus
Posts: 14183
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Referenced images crashing device, not simulator

Post by Klaus » Mon Jun 11, 2012 8:21 pm

Hi Todd,

well, although "the filename" of an image IS of course a file, "the filename" is officially a PROPERTY of an image :)


Best

Klaus

Post Reply