On Mar 19, 2006, at 12:09 PM, Jeffrey Ellis wrote:


on 3/19/06 8:52 AM, Charles Yeomans <charles at declareSub dot com> wrote

Well, let's see. SourceDictionary.Value returns a Variant. Variant does not have an AbsolutePath property. So this will not compile. Instead you need to
do something like the following.

dim f as FolderItem = SourceDictionary.Value(SourceDictionary.Key(j))
//if the stored value is not a FolderItem, REALbasic will raise an
IllegalCastException
DoSomethingWith f.AbsolutePath

or you could just do

FolderItem(SourceDictionary.Value(SourceDictionary.Key(j)).ObjectValue ).
AbsolutePath

--------------
Charles Yeomans

Wow... Thanks :)

I' still not sure how I would use this to send the folderitem to a function.

For example, previously I use:

SourceList.Cell(SourceList.LastIndex,2)=getPermissions(itemInFolder)

Where getPermissions calls the function and itemInFolder is the folderItem.
When I try:

Dim f as folderitem

f=SourceDictionary.Value(SourceDictionary.Key(j))
TargetList.Cell(TargetList.LastIndex,2)=getPermissions(f)

I get a Type Mismatch at the second line.

The question you should now ask is "why?". TargetList.Cell is a String property. A type mismatch means that getPermissions is probably not returning a String.

--------------
Charles Yeomans

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to