[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Sc-devel] Main.versionAtLeast / AtMost



Sciss,

In fact the logic in those methods is wrong. It should be something like this:

*versionAtLeast { |maj, min|
	^if((maj==scVersionMajor) and:{min.notNil}){
		scVersionMinor >= min
	}{
		scVersionMajor >= maj
	};
}

*versionAtMost { |maj, min|
	^if((maj==scVersionMajor) and:{min.notNil}){
		scVersionMinor <= min
	}{
		scVersionMajor <= maj
	};
}

Dan



2008/2/4, Sciss <contact@xxxxxxxx>:
> hi,
>
> are those methods really meant this way? i find it really counter-
> intuitive, i mean
>
> Main.versionAtLeast(1,0)
>
> would mean for me, "true" if SuperCollider is "at least" version 1.0
> (but it returns "false"), and
>
> Main.versionAtLeast(3,3)
>
> should return "true" if SuperCollider is "at least" version 3.3 (but
> it returns "true")...
>
> i think versionAtLeast and versionAtMost should be exchanged...
>
> ciao, -sciss-
>
> _______________________________________________
> Sc-devel mailing list
> Sc-devel@xxxxxxxxxxxxxxx
> http://lists.create.ucsb.edu/mailman/listinfo/sc-devel
>


-- 
http://www.mcld.co.uk