At 5:01 PM -0400 10/24/02, Lars Jensen wrote:
dim f1, f2 as folderItem
f1 = new folder(f2)
then I get a NilObjectException, because f2 is nil. But why is this an
error? Copying a nil object seems OK to me.
Well, then I guess it's because you didn't write the FolderItem
constructor. ;)
No, actually it's deeper than that. The "new" operator can't return
nil; so I don't know exactly what you had in mind for this to do, but
I'm pretty sure it's not possible. The result of 'nil' has to be an
actual, non-nil FolderItem, and if it's to be a copy of f2, then of
course f2 must be non-nil as well.
Cheers,
- Joe
--
,------------------------------------------------------------------.
| Joseph J. Strout REAL Software, Inc. |
| joe at realsoftware dot com http://www.realsoftware.com |
`------------------------------------------------------------------'
---
A searchable archive of this list is available at:
<http://dbserver.realsoftware.com/KBDB/search.php>
Unsubscribe:
<mailto:realbasic-betas-off at lists dot realsoftware dot com>
Subscribe to the digest:
<mailto:realbasic-betas-digest at lists dot realsoftware dot com>
.
|