>At one point in my app I need to compare the vale of qtversion() with a
>string containing a version number. I thought this would be straightforward
>enough, but it seems not.
>
>If my string contains "5.0.2" and I compare it to qtversion, I don't get
>sensible results, even though qtversion seems to be returning 5.0.2, or at
>least something that looks like it. It's looking like there's a type
>conversion problem or something. What am I doing wrong?
>
>Marcus

I use the following handler for QuickTime version checking in my stacks:

on checkForQuickTime
   constant cQTversionNeeded = "4.1"
   put qtVersion() into theQTvers
   set itemdelimiter to "."
   if item 1 to 2 of theQTvers < cQTversionNeeded then
     answer warning "This program needs QuickTime " & cQTversionNeeded & \
         " or later show video clips." & return & return & \
         "Quit this program or Continue for now without video clips?" \
         with "Quit" or "Continue (no videos)" titled "Unable to Show 
Video Clips"
     if it is "Quit" then
       quit
     end if
   end if
end checkForQuickTime

I tend to check major.minor version numbers only since the third 
version level (the "2" in "5.0.2") is rarely necessary.

Cheers

Peter
-- 
Peter Reid
Reid-IT Limited, Loughborough, Leics., UK
Tel: +44 (0)1509 268843 Fax: +44 (0)870 052 7576
E-mail: [EMAIL PROTECTED]
Web: http://www.reidit.co.uk
_______________________________________________
use-revolution mailing list
[EMAIL PROTECTED]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to