[APBeta] Global observations script

Jeff Young jey at adobe.com
Thu Mar 26 10:51:45 PDT 2009


Chris --

I have code in various scripts which checks for "None", "No Eyepiece" and "", so at one point or another I must have beeing seeing all three.  (My observations also go back to 1.x, although I've always run AP on a PC.)

But I ran the script with some debugging and all my bino observations currently have the empty string for eyepiece name -- but I can call ep = EyepieceResource.Get() on them without getting an exception thrown (I assume it returns a nil ep, but I didn't check).

Are you on a Mac now?  Perhaps the Mac version throws an exception on Get("") while the Windows version doesn't....

-- Jeff.


> -----Original Message-----
> From: apbeta-bounces at lists.astroplanner.net [mailto:apbeta-bounces at lists.astroplanner.net] On Behalf Of
> Chris Todd
> Sent: Thursday, March 26, 2009 2:44 PM
> To: AstroPlanner Beta Testers
> Subject: Re: [APBeta] Global observations script
> 
> Well, it's probably something about my setup.  All these observations
> were entered into AP 1.5 and 1.6 back in the day when I ran it on my
> PC, then I got a MacBook and moved things over and ran into a few
> issues doing that, then I ran into conversion issues from 1.6 to 2.
> So I'm virtually certain that it's my data that's messed up.
> 
> So are you saying that, in your binocular observations, "None" is the
> value of the ep field?
> 
> Chris
> 
> On Thu, Mar 26, 2009 at 8:46 AM, Jeff Young <jey at adobe.com> wrote:
> > Chris --
> >
> > Glad you found it useful.  It's loosely based on one Paul wrote several years ago.
> >
> > And thanks for the feedback; I've copied your fixes to my copy of the script.  Odd, though, that my
> binocular observations are different from yours....
> >
> > Cheers,
> > -- Jeff
> >
> >> -----Original Message-----
> >> From: apbeta-bounces at lists.astroplanner.net [mailto:apbeta-bounces at lists.astroplanner.net] On Behalf Of
> >> Christopher Todd
> >> Sent: Thursday, March 26, 2009 3:49 AM
> >> To: AstroPlanner Beta Testers <apbeta at lists.astroplanner.net>
> >> Subject: Re: [APBeta] Global observations script
> >>
> >> Jeff,
> >>
> >> I discovered that my primary problem was that I must have screwed something
> >> up when I ran the V1 to V2 converter, because my telescope resources did not
> >> match up correctly to what was in the Observations database (I think I
> >> manually re-created my telescope, Site, and eyepiece resources in V2).  So
> >> when your script started querying for the properties of the scope and ep
> >> objects in GetMagnification, it choked.
> >>
> >> The other thing I discovered is that for binocular observations (at least in
> >> *my* observations database, YMMV), the ep field is not "None", but rather
> >> it's empty/Nil, so when you query for the EyepieceResource.Get(epName), it
> >> throws an Exception.  So I moved the lines
> >>    ep = EyepieceResource.Get(epName)
> >>    aid = VisualAidResource.Get(aidName)
> >> Inside of the else block, like so:
> >>    if scope.IsBinocular then
> >>         mag = scope.Magnification
> >>    else
> >>         ep = EyepieceResource.Get(epName)
> >>         aid = VisualAidResource.Get(aidName)
> >>         mag = APResource.Magnification(scope, ep, aid)
> >>    end if
> >>
> >> Then it worked just fine.  Cool script!  Thanks for writing it.
> >>
> >> Chris
> >>
> _______________________________________________
> APBeta mailing list
> APBeta at lists.astroplanner.net
> http://lists.astroplanner.net/listinfo.cgi/apbeta-astroplanner.net



More information about the APBeta mailing list