Page Index Toggle Pages: [1] 2  Send Topic Send Topic Print Print
Very Hot Topic (More than 25 Replies) The path to image files (Read 3055 times)
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
The path to image files
Oct 30th, 2007 at 4:14pm
Print Post Print Post  
What kind of image files are referred to in the Path to Image Files setting?  Is it specifically for images that would be used, for example, as labels for an element?  If I want to use @AsynchShell() to launch images with my default image viewer, is this where they should reside?  Would I still need to tell @AsynchShell() the complete path to the image or would it "just look there"?

I'll have some followup questions depending on what I learn from the above.  Thanks in advance.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: The path to image files
Reply #1 - Oct 30th, 2007 at 7:55pm
Print Post Print Post  
Infinity wrote on Oct 30th, 2007 at 4:14pm:
What kind of image files are referred to in the Path to Image Files setting?  Is it specifically for images that would be used, for example, as labels for an element?  If I want to use @AsynchShell() to launch images with my default image viewer, is this where they should reside?  Would I still need to tell @AsynchShell() the complete path to the image or would it "just look there"?

I'll have some followup questions depending on what I learn from the above.  Thanks in advance.


@AsynchShell knows nothing about a Sesame internal value like the image path. For @AsynchShell, you can provide an absolute path to the image or a path relative to the current working directory.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: The path to image files
Reply #2 - Oct 31st, 2007 at 1:51pm
Print Post Print Post  
Thank you.  A couple of followup questions:

* What images are used in the Image Path folder?  (I'll be looking at the Gem database for clues, but I thought I'd ask as well.)

*  If my working folder is F:\Sesame\Miara and I want to use @AsynchShell() with a relative path to elsewhere on the F: drive (say F:\Images, for example), is that possible?  Or is "relative pathing" just tunneling downward?  Currently I have this code working:
Code
Select All
// Launches the image whose filename is stored in Image_1

Var vLaunchImage as Int
Var vFullImagePath as String

IF NOT @MODE() = 2     // Check to make sure you're not in the Retrieve Spec
THEN
{
vFullImagePath = (sImageDir + Image_1)
IF FileExists(vFullImagePath)
THEN
	{
	vLaunchImage = @AsynchShell(vFullImagePath)
	}
ELSE
	{
	@MsgBox("Looking for " + vFullImagePath, "but unable to find this file on disk.", "Is the file name correct?")
	}
}
ELSE
	{
	@MsgBox("This button only works in ADD or UPDATE mode", "", "")
	} 



sImageDir is a global static declared in global programming.  It is currently initialized as "F:\Images\".

I would like to use an #include statement to initialize this static (I asked about initializing in an #include in another thread) and relative mapping to make this variable drive independent.  I'm hoping to make all my code drive independent, but I also have some other hard coding elsewhere in my code, namely @Insert() statements that point another global static, sInsertDir to "F:\Sesame\Miara\Inserts".

Thanks again for your help Erika.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: The path to image files
Reply #3 - Oct 31st, 2007 at 2:10pm
Print Post Print Post  
If working directory is F:\Sesame\Miara

To get to Images folder on the drive root - \Images
To get to Images folder under working directory - Images
To get to Images folder under F:\Sesame - ..\Images
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: The path to image files
Reply #4 - Oct 31st, 2007 at 3:05pm
Print Post Print Post  
Quote:
If working directory is F:\Sesame\Miara

To get to Images folder on the drive root - \Images
To get to Images folder under working directory - Images
To get to Images folder under F:\Sesame - ..\Images

After some testing I've found that I cannot get this to work without pointing to the F: drive directly, because each workstation has a Start In directory of C:\Sesame.  They work fine if Images is placed on the C: drive.

I'm going to try the #Include route of initializing the Images and Inserts directories.  My main objective is to get the my applications to run on both the network and my laptop, so I can work on it at home.  With the initialization in an #Include file I'll just have to change the pointer in one place rather than throughout my code.  Thanks again for your help.
  

**
Captain Infinity
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: The path to image files
Reply #5 - Oct 31st, 2007 at 3:36pm
Print Post Print Post  
Infinity wrote on Oct 31st, 2007 at 3:05pm:
I'm going to try the #Include route of initializing the Images and Inserts directories.  My main objective is to get the my applications to run on both the network and my laptop, so I can work on it at home.  With the initialization in an #Include file I'll just have to change the pointer in one place rather than throughout my code.  Thanks again for your help.

You're welcome. BTW, I've found a GlobalValue useful for specifying base paths also.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: The path to image files
Reply #6 - Nov 1st, 2007 at 4:12am
Print Post Print Post  
You could also make two (or more) paths with the variables. 
One path if on the network, another path if using local. 

You could also write some sync code to copy/send files between server and laptop. 

These would be part of Application program to run when app is opened.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: The path to image files
Reply #7 - Nov 15th, 2007 at 11:49pm
Print Post Print Post  
I have similar issue. I need a way to change the 'default image path' based on which machine is being used. 1 machine is running in client/server mode so the image path is simply G:\photos but the other machine (running remotely) is not on the network so the image path needs to be C:\photos.

It seems like the only place to change the image path is within the Application Property Manager. I dont see a way to change the image path using programming, which is what I would prefer.

Any thoughts? Still running ver 1.5 (upgrading to 2.0 soon)
Steve
ps. it's been a long time since I've used this forum. Thanks to everyone's help here, I haven't needed much assistance over the past year or so.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: The path to image files
Reply #8 - Nov 16th, 2007 at 12:09am
Print Post Print Post  
Steve,

Is this for image fields or static images/labels?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: The path to image files
Reply #9 - Nov 16th, 2007 at 12:32am
Print Post Print Post  
both, but image fields are my main concern.

THanks.
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: The path to image files
Reply #10 - Nov 16th, 2007 at 1:30am
Print Post Print Post  
I'm confused. You have two machines. One is accessing the db as a client. The other is using a second copy of the database as a standalone. Is that right?

Why not just change the image path in the second copy to wherever it need to be?
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Steve_in_Texas
Senior Member
*****
Offline


No personal text

Posts: 893
Location: San Antonio
Joined: Feb 21st, 2004
Re: The path to image files
Reply #11 - Nov 16th, 2007 at 3:21pm
Print Post Print Post  
Quite often I have take a backup copy of sesame home to work as standalone. At work, my photos are on a mapped drive (G:) but at home, my photos are on my only harddrive (C:). So I'd like sesame to change the imagepath depending on if I'm running in client/server mode or in standalone mode.

Making the change in the Application Property Manager everytime I take a copy home (once a week, at least), it too time consuming.

I've found that I can put a backslash in the application proprty manager, then use programming to alter each image name, depending on what user is logged in. This may solve my problem, but it requires me to program every image field to display the image. I figured there would be an easier way.

Does this make sense? :)

Thanks!
  
Back to top
IP Logged
 
Hammer
YaBB Administrator
Lanticans
*****
Offline


Fire bad. Tree pretty.

Posts: 3436
Location: Ohio
Joined: Nov 22nd, 2002
Re: The path to image files
Reply #12 - Nov 16th, 2007 at 3:23pm
Print Post Print Post  
If the images are always on the same drive as your working directory, changing the Image Path to \photos should do it.
  

- Hammer
The plural of anecdote is not data.
Back to top
IP Logged
 
Infinity
Senior Member
Members
*****
Offline


Diagonally parked in a
parallel dimension

Posts: 1290
Location: Massachusetts
Joined: May 27th, 2005
Re: The path to image files
Reply #13 - Nov 16th, 2007 at 3:26pm
Print Post Print Post  
Perhaps if you stored the drive letter in a text file, and then used @Insert in your programming to point to it.  A copy of the text file with the appropriate drive letter could reside on each machine.  You could then port your program files either way, but don't over-write the independent text file.
  

**
Captain Infinity
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: The path to image files
Reply #14 - Nov 16th, 2007 at 3:31pm
Print Post Print Post  
Scott,

In 1.1.5, which is what Steve is running, there is no command to set the Image Path of an Application in code.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Send Topic Send Topic Print Print