Le 11 mai 07 à 05:35 Matin, Eric Richards a écrit:
>> Not really if you are using the non-alias name "image4.jpg" as a
>> folderitem.name to address a folderitem whose actual name is
>> "image4.jpg alias". How it gets into the popupmenu without the alias
>> is what's important.
>>
>> Arnaud attempted to understand why the image returned nil at first
>> but I think that the question you have is not related to the image
>> but the use of the folderitem class as he later mentioned.
>>
>>
>>
> Humm.... true.
>
> To load the popup menu I have this
>
>
> f = getfolderItem("images")
>
> - Check for nil and such -
>
> for LN =1 to f.Count
> if f.item(ln).visible and f.item(ln).name <> "." then
> Me.addRow f.Item(ln).name
> end if
> next
>
> No idea why the alias text is missing when listed.
>
> Something is going on, I'm just not sure what.
If I were you, I'd keep a reference to the original item.
Something like that:
dim i As integer 'This will be the count of rows, so that it is not
calculated every time with "ListCount"
for LN =1 to f.Count
if f.item(ln).visible and f.item(ln).name <> "." then
Me.addRow f.Item(ln).name
Me.RowTag(i)=f.TrueItem(ln)
i=i+1
end if
next
Then you access the file directly with f=Me.RowTag(me.ListIndex).
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>