New topic: 

Type mismatch error with sysversion

<http://forums.realsoftware.com/viewtopic.php?t=24878>

       Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic         Author  
Message       brianheibert.com           Post subject: Type mismatch error with 
sysversionPosted: Mon Oct 20, 2008 1:05 pm                               
Joined: Thu Jan 25, 2007 7:38 pm
Posts: 348
Location: Loveland, OH USA              Hi,

Code:
dim sysversion as integer
sysversion =system.gestalt("sysv",sysversion)
If TargetMacOS and sysversion >1040 then
  dim copyshell as shell
  copyshell = new Shell
  copyshell.execute "cp "+original+" "+copy
else
  MSGBOX "CopyMate requires MacOS X (v10.4.x or higher)."
  quit
end if



I am trying to use the above code to check for the system version then do other 
things.
My problem is REALbasic says Type mismatch error
Code, CPMModule.FileOperations.Copy, line 8, Type mismatch error.  Expected 
Int32, but got Boolean., sysversion =system.gestalt("sysv",sysversion)
I tried Boolean and Int32 but got similar errors

  dim sysversion as integer
  sysversion =system.gestalt("sysv",sysversion)

All I want to do is check for the  system version before running a OS X shell 
command.     
_________________
Brian Heibert
http://www.brianheibert.net
[EMAIL PROTECTED]  
                            Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]     

-- 
Over 900 classes with 18000 functions in one REALbasic plug-in. 
The Monkeybread Software Realbasic Plugin v8.1. 

&lt;http://www.monkeybreadsoftware.de/realbasic/plugins.shtml&gt;

[email protected]

Reply via email to