relative pathnames work on mobile?

classic Classic list List threaded Threaded
36 messages Options
12
Reply | Threaded
Open this post in threaded view
|

relative pathnames work on mobile?

Klaus major-k
Hi friends,

short question, do not have a real device here in the moment...

Suppoesed we have a stack in the folder where a folder "images" resides,
we can have filenames of images RELATIVE to the stack:
images/subfolder/image.png

Works fine, now my question, does this also work on the mobile platform
if I add the folder "images" and its subfolders via the "Copy files..." tab in
the standalone builder settings?

Or do I need to loop through all images and set hte filenames to the absolute path:
-> specialfolderpath("engine") & "/images/subfolder/image.png"
Know what I mean?

Thanks a lot in advance!


Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: relative pathnames work on mobile?

Pierre Sahores-2
Hi Freund Klaus,

Here is the way it works consistently, at least for me!, on both the iOS and Android platforms :

> put imagename.[png|jpeg|…] into url ("binfile:" & specialFolderPath("documents") & "/imagename.[png|jpeg|…]"
> put imagename.[png|jpeg|…] into url ("binfile:" & specialFolderPath("cache") & "/imagename.[png|jpeg|…]"

with the iOS option to do/not do :

> if the platform is "iphone"
> then iphoneSetDoNotBackupFile specialFolderPath("documents") & "/imagename.[png|jpeg|…]", true


Bis bald,

Pierre

Le 8 oct. 2013 à 19:24, Klaus major-k a écrit :

> Hi friends,
>
> short question, do not have a real device here in the moment...
>
> Suppoesed we have a stack in the folder where a folder "images" resides,
> we can have filenames of images RELATIVE to the stack:
> images/subfolder/image.png
>
> Works fine, now my question, does this also work on the mobile platform
> if I add the folder "images" and its subfolders via the "Copy files..." tab in
> the standalone builder settings?
>
> Or do I need to loop through all images and set hte filenames to the absolute path:
> -> specialfolderpath("engine") & "/images/subfolder/image.png"
> Know what I mean?
>
> Thanks a lot in advance!
>
>
> Best
>
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

--
Pierre Sahores
mobile : 06 03 95 77 70
www.sahores-conseil.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: relative pathnames work on mobile?

Klaus major-k
Bonsoir mon ami,

Am 08.10.2013 um 20:33 schrieb Pierre Sahores <[hidden email]>:

> Hi Freund Klaus,
>
> Here is the way it works consistently, at least for me!, on both the iOS and Android platforms :
>
>> put imagename.[png|jpeg|…] into url ("binfile:" & specialFolderPath("documents") & "/imagename.[png|jpeg|…]"
>> put imagename.[png|jpeg|…] into url ("binfile:" & specialFolderPath("cache") & "/imagename.[png|jpeg|…]"

??? Sorry, no capisce 8-)

Where is a relative pathname here?
I do not want/need to copy the images to another location!

Please read my question again :-)

> with the iOS option to do/not do :
>
>> if the platform is "iphone"
>> then iphoneSetDoNotBackupFile specialFolderPath("documents") & "/imagename.[png|jpeg|…]", true

Ah, yes, thnaks, will remeber this one, thanks!

> Bis bald,
>
> Pierre
>
> Le 8 oct. 2013 à 19:24, Klaus major-k a écrit :
>
>> Hi friends,
>>
>> short question, do not have a real device here in the moment...
>>
>> Suppoesed we have a stack in the folder where a folder "images" resides,
>> we can have filenames of images RELATIVE to the stack:
>> images/subfolder/image.png
>>
>> Works fine, now my question, does this also work on the mobile platform
>> if I add the folder "images" and its subfolders via the "Copy files..." tab in
>> the standalone builder settings?
>>
>> Or do I need to loop through all images and set hte filenames to the absolute path:
>> -> specialfolderpath("engine") & "/images/subfolder/image.png"
>> Know what I mean?
>>
>> Thanks a lot in advance!

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: relative pathnames work on mobile?

J. Landman Gay
On 10/8/13 1:49 PM, Klaus major-k wrote:

> short question, do not have a real device here in the moment...
>
> Suppoesed we have a stack in the folder where a folder "images" resides,
> we can have filenames of images RELATIVE to the stack:
> images/subfolder/image.png
>
> Works fine, now my question, does this also work on the mobile platform
> if I add the folder "images" and its subfolders via the "Copy files..." tab in
> the standalone builder settings?
>
> Or do I need to loop through all images and set hte filenames to the absolute path:
> -> specialfolderpath("engine") & "/images/subfolder/image.png"
> Know what I mean?

I haven't been working on mobile lately, but the defaultfolder on launch
is the engine folder, so I would think you can use that normally if you
haven't set the defaultfolder to something else.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: relative pathnames work on mobile?

Klaus major-k
Hi Jaqueline,

Am 08.10.2013 um 22:18 schrieb J. Landman Gay <[hidden email]>:

> On 10/8/13 1:49 PM, Klaus major-k wrote:
>
>> short question, do not have a real device here in the moment...
>>
>> Suppoesed we have a stack in the folder where a folder "images" resides,
>> we can have filenames of images RELATIVE to the stack:
>> images/subfolder/image.png
>>
>> Works fine, now my question, does this also work on the mobile platform
>> if I add the folder "images" and its subfolders via the "Copy files..." tab in
>> the standalone builder settings?
>>
>> Or do I need to loop through all images and set hte filenames to the absolute path:
>> -> specialfolderpath("engine") & "/images/subfolder/image.png"
>> Know what I mean?
>
> I haven't been working on mobile lately, but the defaultfolder on launch is the engine folder,
> so I would think you can use that normally if you haven't set the defaultfolder to something else.

yes, makes sense, thanks!

> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com

Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Passive Shell Commands

Ray Horsley-2
I'm sending a shell command which is taking a long time.  I'd like to
send it in a way so scripts continue to run while the shell command runs
in the background.  I believe this is called 'passive mode', not sure.  
Anyway, any ideas?

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Monte Goulding
Use open process for neither

Cheers

Monte

On 09/10/2013, at 8:19 AM, Ray Horsley wrote:

> I'm sending a shell command which is taking a long time.  I'd like to send it in a way so scripts continue to run while the shell command runs in the background.  I believe this is called 'passive mode', not sure.  Anyway, any ideas?

--
M E R Goulding
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Ray Horsley-2
First time using open process for me.  Fascinating!  Thanks Monte. Not
quite sure on the write and read syntax.

My original shell command which works fine is:
    get shell(""&appPath&" "&srcPath&" "&trgPath&"")
where the app is a command line utility which converts a PDF file to
multiple JPEG's

I can't get the app to show up in 'the openProcess' using the 'neither'
option.  When I call 'open process appPath for update' it works fine,
but then how would I send the open process a command to start the
conversion?


On 10/8/2013 6:00 PM, Monte Goulding wrote:

> Use open process for neither
>
> Cheers
>
> Monte
>
> On 09/10/2013, at 8:19 AM, Ray Horsley wrote:
>
>> I'm sending a shell command which is taking a long time.  I'd like to send it in a way so scripts continue to run while the shell command runs in the background.  I believe this is called 'passive mode', not sure.  Anyway, any ideas?
> --
> M E R Goulding
> Software development services
> Bespoke application development for vertical markets
>
> mergExt - There's an external for that!
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Monte Goulding

On 09/10/2013, at 1:45 PM, Ray Horsley wrote:

> First time using open process for me.  Fascinating!  Thanks Monte. Not quite sure on the write and read syntax.
>
> My original shell command which works fine is:
>   get shell(""&appPath&" "&srcPath&" "&trgPath&"")
> where the app is a command line utility which converts a PDF file to multiple JPEG's
>
> I can't get the app to show up in 'the openProcess' using the 'neither' option.  When I call 'open process appPath for update' it works fine, but then how would I send the open process a command to start the conversion?

Ah, I assumed you didn't need to read from the process. If you don't need to read or know when it's done then:
open process appPath&" "&srcPath&" "&trgPath for neither

If you need to know when it's done then something like this should do it (untested hacking in email client)

put appPath&" "&srcPath&" "&trgPath into tProcess
open process tProcess for read
send "ReadProcess tProcess" to me in 0 milliseconds

on ReadProcess pProcess
  local tOut
  repeat
     read from process pProcess in 5 milliseconds
     put it after tOut
     wait 20 milliseconds with messages
     if the result is "eof" then
        close process pProcess
        exit repeat
     end if
  end repeat
  PDFExported tOut
end ReadProcess

on PDFExported pOutput
  -- let the user know
end PDFExported

--
M E R Goulding
Software development services
Bespoke application development for vertical markets

mergExt - There's an external for that!

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Ray Horsley-2
Ahh!  Now it's really working well.

Monte, thanks.  Very helpful.

Ray

On 10/8/2013 10:57 PM, Monte Goulding wrote:

> On 09/10/2013, at 1:45 PM, Ray Horsley wrote:
>
>> First time using open process for me.  Fascinating!  Thanks Monte. Not quite sure on the write and read syntax.
>>
>> My original shell command which works fine is:
>>    get shell(""&appPath&" "&srcPath&" "&trgPath&"")
>> where the app is a command line utility which converts a PDF file to multiple JPEG's
>>
>> I can't get the app to show up in 'the openProcess' using the 'neither' option.  When I call 'open process appPath for update' it works fine, but then how would I send the open process a command to start the conversion?
> Ah, I assumed you didn't need to read from the process. If you don't need to read or know when it's done then:
> open process appPath&" "&srcPath&" "&trgPath for neither
>
> If you need to know when it's done then something like this should do it (untested hacking in email client)
>
> put appPath&" "&srcPath&" "&trgPath into tProcess
> open process tProcess for read
> send "ReadProcess tProcess" to me in 0 milliseconds
>
> on ReadProcess pProcess
>    local tOut
>    repeat
>       read from process pProcess in 5 milliseconds
>       put it after tOut
>       wait 20 milliseconds with messages
>       if the result is "eof" then
>          close process pProcess
>          exit repeat
>       end if
>    end repeat
>    PDFExported tOut
> end ReadProcess
>
> on PDFExported pOutput
>    -- let the user know
> end PDFExported
>
> --
> M E R Goulding
> Software development services
> Bespoke application development for vertical markets
>
> mergExt - There's an external for that!
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Dr. Hawkins
In reply to this post by Monte Goulding
On Tue, Oct 8, 2013 at 7:57 PM, Monte Goulding
<[hidden email]>wrote:

> Ah, I assumed you didn't need to read from the process. If you don't need
> to read or know when it's done then:
> open process appPath&" "&srcPath&" "&trgPath for neither
>

Can a livecode standalone be the slave process?  Could it  around to
periodically check for stdin and answer to stdout?

This could be perfect for handling my lag issues . . .


--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Ray Horsley-2
In reply to this post by Monte Goulding
This has really worked out well for me.  Thanks again Monte!

Dr. Hawkins, I don't think there's any way to address a Livecode
standalone with a command line prompt if that's what you were asking but
I hope you find an answer to the lag issue you have.

Cheers,

Ray

On 10/8/2013 6:00 PM, Monte Goulding wrote:

> Use open process for neither
>
> Cheers
>
> Monte
>
> On 09/10/2013, at 8:19 AM, Ray Horsley wrote:
>
>> I'm sending a shell command which is taking a long time.  I'd like to send it in a way so scripts continue to run while the shell command runs in the background.  I believe this is called 'passive mode', not sure.  Anyway, any ideas?
> --
> M E R Goulding
> Software development services
> Bespoke application development for vertical markets
>
> mergExt - There's an external for that!
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Monte Goulding
In reply to this post by Dr. Hawkins

> Can a livecode standalone be the slave process?  Could it  around to
> periodically check for stdin and answer to stdout?
>
> This could be perfect for handling my lag issues . . .

Yes it can... read from STDIO... write to STDOUT

Or just parse the command line args... $1... $n where n is $#

Cheers

--
Monte Goulding

M E R Goulding - software development services
mergExt - There's an external for that!





_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Dr. Hawkins
On Wed, Oct 9, 2013 at 1:51 PM, Monte Goulding
<[hidden email]>wrote:

> Yes it can... read from STDIO... write to STDOUT
>
> Or just parse the command line args... $1... $n where n is $#
>

Thanks; I need to play with this.

Command line arguments won't work; this would be passing SQL commands &
results back and forth.  It takes time to launch & establish, so it would
need to hang around and stay open, handling requests from the master as
they come up.





--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Dr. Hawkins
I'm trying to launch a second livecode stack, but it isn't working.

I created master.livecode and slave.livecod on the desktop.

I give master a script of

on openstack
   global slApp

   put "/Users/hawk/Desktop/slave/MacOSX/slave.app/Contents/MacOS/slave"
into slApp
   answer "starting"
   breakpoint
    put there is a file  slApp   --<yields true>
   open process slApp for binary update
   put the result  -- yields empty
end openstack

but slave doesn't get opened.

Am I doing something wrong here?\
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Andrew Kluthe-2
I don't think this works with just a stackfile but a standalone.


On Thu, Oct 10, 2013 at 10:08 AM, Dr. Hawkins <[hidden email]> wrote:

> I'm trying to launch a second livecode stack, but it isn't working.
>
> I created master.livecode and slave.livecod on the desktop.
>
> I give master a script of
>
> on openstack
>    global slApp
>
>    put "/Users/hawk/Desktop/slave/MacOSX/slave.app/Contents/MacOS/slave"
> into slApp
>    answer "starting"
>    breakpoint
>     put there is a file  slApp   --<yields true>
>    open process slApp for binary update
>    put the result  -- yields empty
> end openstack
>
> but slave doesn't get opened.
>
> Am I doing something wrong here?\
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



--
Regards,

Andrew Kluthe
[hidden email]
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Klaus major-k
In reply to this post by Dr. Hawkins

Am 10.10.2013 um 17:08 schrieb Dr. Hawkins <[hidden email]>:

> I'm trying to launch a second livecode stack, but it isn't working.
>
> I created master.livecode and slave.livecod on the desktop.
>
> I give master a script of
>
> on openstack
>   global slApp
>
>   put "/Users/hawk/Desktop/slave/MacOSX/slave.app/Contents/MacOS/slave"
> into slApp
>   answer "starting"
>   breakpoint
>    put there is a file  slApp   --<yields true>
>   open process slApp for binary update
>   put the result  -- yields empty
> end openstack
>
> but slave doesn't get opened.
>
> Am I doing something wrong here?\

doesn't a simple:
...
put "/Users/hawk/Desktop/slave/MacOSX/slave.app/Contents/MacOS/slave.livecode" into slApp
go stack slApp
...
do the job? 8-)


Best

Klaus

--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Phil Davis-5
In reply to this post by Dr. Hawkins
If you want to launch the second stack in a separate process (with its
own LC session), it will have to be made into a standalone app. You can
only "launch" an app, which a stackfile is not.

If you just want to open the stack in your current LC session, you can
just open it, or go to it, or toplevel it, or....

Best -
Phil Davis


On 10/10/13 8:08 AM, Dr. Hawkins wrote:

> I'm trying to launch a second livecode stack, but it isn't working.
>
> I created master.livecode and slave.livecod on the desktop.
>
> I give master a script of
>
> on openstack
>     global slApp
>
>     put "/Users/hawk/Desktop/slave/MacOSX/slave.app/Contents/MacOS/slave"
> into slApp
>     answer "starting"
>     breakpoint
>      put there is a file  slApp   --<yields true>
>     open process slApp for binary update
>     put the result  -- yields empty
> end openstack
>
> but slave doesn't get opened.
>
> Am I doing something wrong here?\
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>

--
Phil Davis


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Passive Shell Commands

Monte Goulding
In reply to this post by Dr. Hawkins

On 11/10/2013, at 2:08 AM, "Dr. Hawkins" <[hidden email]> wrote:

> I'm trying to launch a second livecode stack, but it isn't working.
>
> I created master.livecode and slave.livecod on the desktop.
>
> I give master a script of
>
> on openstack
>   global slApp
>
>   put "/Users/hawk/Desktop/slave/MacOSX/slave.app/Contents/MacOS/slave"
> into slApp
>   answer "starting"
>   breakpoint
>    put there is a file  slApp   --<yields true>
>   open process slApp for binary update
>   put the result  -- yields empty
> end openstack
>
> but slave doesn't get opened.
>
> Am I doing something wrong here?

So slApp isn't among the lines of the openProcesses? It should be.

Cheers
--
Monte Goulding

M E R Goulding - software development services
mergExt - There's an external for that!





_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Setting the Location of the Script Editor Window

Ray Horsley-2
In reply to this post by Phil Davis-5
It seems we should be able to set the location of the script editor from
Livecode's Preferences, or, that changing the location of it and closing
it should be remembered so the next time it's opened it returns to the
same location.

Neither works and I almost remember how to do this by delving into the
RevLibrary stack and the Front and Back script but I find myself
stumped.  Has this changed in a recent version of Livecode?

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
12