[APBeta] Script error

Paul Rodman paul at ilanga.com
Mon Aug 31 10:44:54 PDT 2009


On Aug 31, 2009, at 10:01 AM, Jeff Young wrote:

> Hmmm... your comment leads me to believe I misunderstood.  I thought  
> SiteResource.All(true) would return only active ones, and  
> SiteResource.All(false) would return both active and inactive.  Was  
> SiteResource.All(false) supposed to return only inactive?  (I don't  
> think that would be terribly useful.)

My thinking was (and it was a toss-up):

If you have a list of active resources and a list of inactive  
resources, it's easy enough to concatenate them.

OTOH, if you have a list of active and a list of active+inactive, then  
to tell them apart you have to look at the Active property.

However, for the reasons you wanted this in the first place, I'm  
guessing that Plan B is slightly less hassle (i.e. no concatenating or  
searching two separate lists).

There is a third option I contemplated, and will probably use, and  
that's to have an integer rather than boolean parameter: active_only,  
inactive_only, or active_and_inactive

Paul R.

>> -----Original Message-----
>> From: apbeta-bounces at lists.astroplanner.net [mailto:apbeta-bounces at lists.astroplanner.net 
>> ] On Behalf Of
>> Paul Rodman
>> Sent: Monday, August 31, 2009 5:55 PM
>> To: AstroPlanner Beta Testers
>> Subject: Re: [APBeta] Script error
>>
>> At least here, SiteResource.All is returning an empty array,
>> SiteResource.All(false) is returning all site resources (rather than
>> just the inactive ones).




More information about the APBeta mailing list