On Thu, Oct 17, 2013 at 5:13 AM, Art Heimsoth <artst...@artheimsoth.com>wrote:

> I am wanting to setup multiple icon's on the desktop to my application,
> with
> a different startup folder indicated in each icon.  The ooRexx application
> has
> the resources compiled and uses symbolic IDs throughout.  The problem I
> have is these IDs need to be resolved at execution time and I use the
> .application~useGlobalConstDir("O","my.h") in the startup to resolve these
> IDs.  Short of copying the .h file to each folder pointed to by the
> "Startup Folder"
> of the icon, is there another way to handle this?
>

Hi Art,

There is certainly a way to handle it.  But, I'm a little confused as to
how you have things set up.

If you have your Rexx program and your .h file in the same directory, and
your Rexx program is running from the directory it is in, then the above
will work.

In a shortcut you can set the "Start in" field to the directory your Rexx
program is in.

The easiest way to handle this is to have your Rexx program and your .h
file in the same directory and have the shortcut specify start in the
directory your program and .h file are in.



> If there is a way to change
> the directory of where the useGlobalConstDir looks for the .h to be the
> same directory where the ooRexx program is loaded from, I think that would
> solve my problem.
>


The useGlobalConstDir() looks for the .h file where ever you tell it to:

C:\work.ooRexx\wc\ooDialog\trunk\examples>dir *.h
 Volume in drive C is Win7
 Volume Serial Number is D25E-50D5

 Directory of C:\work.ooRexx\wc\ooDialog\trunk\examples

01/03/2013  10:15 AM             3,368 ooDraw.h
               1 File(s)          3,368 bytes
               0 Dir(s)     925,634,560 bytes free

.application~useGlobalConstDir("O",*"C:\work.ooRexx\wc\ooDialog\trunk\examples\ooDraw.h"
*)

The above has no problem reading the symbols from ooDraw.h, no matter which
directory the program is running from.

If you have your Rexx program file and your .h file in the same directory,
but you want the program to run from another directory, then get the
absolute path to your Rexx program and use that path to locate the .h file:

-- Get the full path to this program file.
parse source . . pgmFile

-- Get the directory this program file is located in.
pgmDir = pgmFile~left(pgmFile~lastpos('\') - 1)

.application~useGlobalConstDir("O", pgmDir'\my.h')

If you have your Rexx program file in one directory and your .h file in
some arbitrary other directory, then you will have trouble.  You have to at
least know the relative path to the .h file from the location of your Rexx
program.

--
Mark Miesfeld
------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
_______________________________________________
Oorexx-users mailing list
Oorexx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-users

Reply via email to