realbasic-nug
[Top] [All Lists]

Re: How can I determine if my program CD is in the drive ofa Win32 mach

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: How can I determine if my program CD is in the drive ofa Win32 machine?
From: Jon Johnson <jon at mugofcocoa dot com>
Date: Fri, 28 Jun 2002 08:00:57 -0500
Don't use getFolderitem along with volume.child()

volume is a folderitem, and the method .child returns a folderitem.

getFolderitem is for converting string paths into folderitems.

So, just use f=volume(i).child("SFDev409")

-Jon
On Friday, June 28, 2002, at 07:58  AM, Karl Holmes wrote:

George Clark wrote:

On 6/28/02 08:18, Karl Holmes wrote:

I tried

n=volumeCount-1
for i = 0 to n
  s= volume(i).name
  f=getfolderitem(volume(i).name).child("SFDev409") //SFDev409 is a
file on top level of CDROM
  if not(f =nil) then
    if f.exists then
      statictext1.text = "CDROM found"
    end if
  end if
next

but couldn't get this to work even on a Mac, f was always nil.

There are probably Windows routines that can find the CD for you, but in the
meantime, try using volume(i).child("SFDev409").

George

Thanks George but when I replace
 f=getfolderitem(volume(i).name).child("SFDev409")
with
f=getfolderitem(volume(i)).child("SFDev409")

I get a type mismatch error

Have I got the syntax correct?. It is getting late here in Australia and I'm
getting tired.

Karl Holmes


---
Subscribe to the digest:
<mailto:realbasic-nug-digest at lists dot realsoftware dot com>
Unsubscribe:
<mailto:realbasic-nug-off at lists dot realsoftware dot com>




<Prev in Thread] Current Thread [Next in Thread>