Page 1 of 1

getting the fileName of an image control

Posted: Thu Dec 31, 2015 12:32 am
by quailcreek
Hi,
I need to do a little reverse engineering. This is for an iOs app.

In my preOpenCard I set the filename of the image control.

Code: Select all

 set the filename of image "imageHolder" to tPicPath
What I need to do is get the path to the file after its been set. I tried get the text of image "imageHolder" and get the fileName of image "imageHolder" but no-joy. Is there a way to do this?

It works in the IDE and from the message box.

Regards,
Tom

Re: getting the fileName of an image control

Posted: Thu Dec 31, 2015 3:48 pm
by Martin Koob
Hi

'the filename of image' is the correct property name to use.

If you use 'get' then the filename will be in the 'it' variable so you have to put 'it' into your variable.

Code: Select all

   get the filename of image "imageHolder"
   put it into tPicPath
Or you can put the filename directly into the variable using 'put'.

Code: Select all

put the filename of image "imageHolder" into tPicPath
I tried this in both the IDE and a standalone and they work. (using LC 6.7.3)

Martin Koob

Re: getting the fileName of an image control

Posted: Thu Dec 31, 2015 7:31 pm
by quailcreek
Thanks, Martin.

It might be an iOS 9.1 problem. I checked and this is broken in LC 7.1.1, 6.7.8 and LC 8 dp 8 thru 12. I checked in the sim and a device. I looked on the Quality Control Center and there was a similar bug but it only involved the IDE and desktop. I'll report this as a bug.