Page 1 of 1

Suntime Demo problem

PostPosted: June 24th, 2013, 9:24 pm
by phild
This concerns the SunTime component. It does exactly what I need in a certain program
I am working on. I use Delphi 6.

I downloaded the component and installed it - it appears on a tab of its own
called Delphi area - I put the component into its own package ( called delphiarea.dpk)

But when I tried to compile the demo,
I got this message:

"Field MainForm.SunTime does not have a corresponding component.
Remove the declaration? "

I of course say "no".

This message pops up if I try to save the code, too.
If I try to run the program anyway, A message pops up:

"Porject STDemo.exe raised exception class EAccessViolation...
Use Step to continue.."

The line it stops on is the first line of FormCreate..
UseSysTimeZone.Checked := SunTime.UseSysTimeZone;

I tried dropping the Suntime component onto the Main form. same result.
It simply doesn't find it.

Sorry if this is a stupid question - I am not a delphi guru ( though I have been
working in D6 since 2003 - just never on this level..)

Thanks for your help!

Re: Suntime Demo problem

PostPosted: June 25th, 2013, 8:06 pm
by Kambiz
I'm glad that the problem of forum fixed and you could use it. I recently moved the site to new host, which appetantly exprincing a lot down times.

Well, according to your description of the problem it seems the SunTime component is not install properly.

Please once again try the install the pacage and also make sure the component's files are in the search path of your Delphi.

Re: Suntime Demo problem

PostPosted: June 27th, 2013, 2:14 am
by phild
Kambiz,

Thank you for replying..

I reinstalled the package. The component's files are all in C:\Program Files\Borland\Delphi6\lib
which is on the search path. I installed to its own package: delphiarea.dpk

Same result. I open the Demo, and attempt to compile, or save,
and it says there is no corresponding component, and asks
if it can " remove the declaration"..

For my purposes, I really do not need a component. I wanted a
module to take a latitude, longitude and date, and return
the sunrise, sunset and solar noon times, which I will then
use in another program. I guess I am not very savvy in OOP,
or I would know how to use your code to do this....

But given time, I can figure it out ..

Re: Suntime Demo problem

PostPosted: June 27th, 2013, 2:30 pm
by geowink
And you are absolutely sure the path where it is located is in the library path?

George

Re: Suntime Demo problem

PostPosted: June 27th, 2013, 4:41 pm
by Kambiz
Here is a link that describes how to install a component without a package:
http://delphi.about.com/od/vclusing/ss/ ... pasvcl.htm

Re: Suntime Demo problem

PostPosted: June 27th, 2013, 9:18 pm
by phild
George, Yes I am sure the files are in the library path.

But...I got the Unit to work today, by starting a new application,
and dropping it onto the form for that app, adding a few edit boxes
and buttons ( for sunrise, sunset, etc. ).

No idea why the change, but this is exactly what I need, so I'm happy..

Thanks much, Kambiz, for translating this into Delphi from the NOAA
javascript code - I was faced with this myself, and you have saved me
a lot of time!

Phil