Hot Topic (More than 10 Replies) Image - Initial Value (Read 1425 times)
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Image - Initial Value
Dec 24th, 2005 at 9:39pm
Print Post Print Post  
Hi -

I am trying to create an initial value for an image.  When I add a new record to the database, I want a standard picture to appear.

The image path for this application is C:\Sesame\Data\Pics - Middle Villagers

Initially I tried setting the initial value for the image layout element to read: Need Photo.jpg   (which is the name of the picture I want to appear).

When that didn't work, I tried using the full image path:

c:\Sesame\Data\Pics - Middle Villagers\Need Photo.jpg

Neither works.  

Any suggestions?
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Image - Initial Value
Reply #1 - Dec 24th, 2005 at 10:04pm
Print Post Print Post  
Have you tried using a path and a filename without spaces in either (i.e.: "c:\Sesame\Data\Pics\MiddleVillagers" and "NeedPhoto.jpg")?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Image - Initial Value
Reply #2 - Dec 25th, 2005 at 2:00am
Print Post Print Post  
Mark -

I just tried entering in the initial value:

C:\sesame\data\pics-middlevillagers\needphoto.jpg

and I tried

needphoto.jpg

and neither worked.

By the way, I even saved another copy of the picture and named it: NeedPhoto.jpg  That didn't help.

When I am in the add mode of the database and double click on the photo LE, and then select the photo that I want to appear, I see - in the "Selct An Image" window

C:\sesame\data\Pics - Middle Villagers\Need Photo.jpg

for me to either "Accept" or "Cancel"

So, it seemed to me that that is what I should use in the initial value for the field LE.  

On the other hand, once the image has been "accepted" and I then double-click on the image LE, all I see in the "Select An Image" window is

Need Photo.jpg

Have you been able to select a particlar photo as an initial value in a database?

And, please, don't let me interfere with your "holiday."  I can defnitiely wait until the holiday is over to get a response.

Thanks!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Image - Initial Value
Reply #3 - Dec 25th, 2005 at 4:19am
Print Post Print Post  
When you used a path with no spaces did you make sure that the path (the one with no spaces) actually exists?

I just tried setting the initial value for the image in Gems.db, and it worked like a charm. Setting the initial value to just the image filename was sufficient - it did not require the full path.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Image - Initial Value
Reply #4 - Dec 25th, 2005 at 4:55am
Print Post Print Post  
A path with no spaces does NOT exist and I don't understand why it should make a difference.

It works just fine for all my pictures and all my other programming.

If I have to change the path, it means changing litterally thousands of records and I'm not yet sure of what other impact it might have.

I hope there is another solution.

  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Image - Initial Value
Reply #5 - Dec 25th, 2005 at 5:00am
Print Post Print Post  
Spencer,

Quote:
Have you been able to select a particlar photo as an initial value in a database?

Yes. I have an image LE set to an initial value. It works fine.

I found that spaces in the filename are okay. As long as the Image Path is correct, you should only need the filename, with or without spaces as needed, and never any quotes.

This is an actual Image Path I have set in my Application Property Manager (notice it does have a space):
.\Pics\Church Pics

Then I simply use an initial value of Blank.JPG for the image LE. I did also test it with a filename that had 2 spaces in it, and it worked fine.

It looks like you are doing it right. There must be some detail you are forgetting - like highlighting the image LE before you set the initial value, or forgetting to save the app before previewing?
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Image - Initial Value
Reply #6 - Dec 25th, 2005 at 5:43am
Print Post Print Post  
Carl -

I was almost finished with a lengthy response and my computer rebooted for no apparent reason.  So this reply will be shorter but I hope comprehensive.

The image path must be correct because it works under all other circumstances.  

I notice in your path

.\Pics\Church Pics

the dot at the beginning and the backward slashes

My path is

C:\sesame\data\pics - middle villagers

and, as I said it works just fine for inserting pictures using only the file name, e.g. Need photo.jpg (when I insert it manually)

I am absolutely highlighting the image LE and when I add the initial value in the property editor, I can see that it has been changed in the property viewer.

I am absolutely saving the ap before previewing.  As a matter of fact, when it didn't work the first time, I thought perhaps it was because I was in preview mode (e.g. the way lookups doesn't work in preview mode) so I not only saved the ap, but reconciled the database and tried it in the database itself.

Once again, this is very frustrating because I thought I was doing everything according to "Hoyle" and don't understand why it isn't working.

Any other ideas/suggestions?

And (he says, noticing the time and date) MERRY CHRISTMAS!!!!!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Image - Initial Value
Reply #7 - Dec 25th, 2005 at 5:53am
Print Post Print Post  
Yes, Merry Christmas to you too!

Like I said, it seems that you have it right. All I did was enter the filename as the initial value, and it works.

I noticed that you have written "Need Photo.jpg" and "No Photo.jpg". Are you sure you are using the correct name? Also, are you sure that file is in that directory?

That's all I can think of at this time.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Image - Initial Value
Reply #8 - Dec 25th, 2005 at 5:55am
Print Post Print Post  
Carl -

I am just very tired.  I caught the "No Photo.jpg" and went back and modified it to "Need Photo.jpg"  Yes, the name is correct and I even added (and subsequently took out) NeedPhoto.jpg.

ARRGGGHHH!!!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1351
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Image - Initial Value
Reply #9 - Dec 25th, 2005 at 6:02am
Print Post Print Post  
Quote:
I am just very tired.

Yeah, sometimes you just have to leave it alone and come back to it another time, then suddenly the solution will come to you.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Image - Initial Value
Reply #10 - Dec 25th, 2005 at 7:58am
Print Post Print Post  
hint ..... hint

The solution to this problem would make a GREAT Christmas present!

hint ..... hint


  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Image - Initial Value
Reply #11 - Dec 25th, 2005 at 2:09pm
Print Post Print Post  
Spencer,

The image path may need to be relative to the current working directory. In Carl's tests and mine, we both had paths relative to the CWD.

As it says on page 248 of the User Guide:
Quote:
The image path as defined there is relative to the current working directory. So if, for example, the image path is defined as simply pics, and the current working directory is C:\Sesame, then Sesame will look for image files in the C:\Sesame\Pics directory. This will be the starting point for the directory tree seen in the image browser. You can browse for images in the image path folder and any folders under that folder.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Image - Initial Value
Reply #12 - Dec 25th, 2005 at 2:10pm
Print Post Print Post  
GRRRRR!

This stupid problem had me up just about all night.

Even though I try to sleep as close to 12 noon as possible (to compensate for sleep apnea), I was back at the computer at 8:00 a.m.

I first thought that perhaps there was an "option" about over-writing initial values in the reconcile function - but, "no" that wasn't it.

And, then, in the twinkle of an eye, I discovered the cause of ... and solved ... my problem.

I would (almost) be willing to bet that no-one could possibly figure out what my problem was. 

But - in the spirit of Christmas - I won't give you the solution, just in case someone wants to offer me odds on the bet.

HO HO HOOOOOOO!!!!!
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged
 
SpencerWulwick
Senior Member
Members
*****
Offline



Posts: 677
Location: Wilton Manors, Florida
Joined: Jan 16th, 2005
Re: Image - Initial Value
Reply #13 - Dec 25th, 2005 at 2:27pm
Print Post Print Post  
Mark -

The image path works just fine although I wonder if it is "contrary" to the language you quoted from the User Guide.

My current working directory is defined as C:\data\sesame and the image path is defined as C:\sesame\data\pics - middle villagers ... and it works just fine.

That might answer the point I wondered about where Carl said he had something like .\pics\Church Pics

Given the "relativity" issue you pointed out, perhaps all I need in my image path is pics - middle villagers.   Rather than "wonder," I just tried changing my image path to plain old pics - middle villagers and, yes, both the "relative" path or the full path work just fine.

Now, while it is highly unlikely, I am going to see if I can catch up on a little of my "missed" sleep.
  

- Spencer

    ** Practice random kindness & senseless acts of beauty!
Back to top
IP Logged