"Joseph J. Strout" <joe at strout dot net> wrote:

> 
> 
> I replaced all my .shellpath's with .absolutepath's. And sure enough, the
> issue with truncated filenames has been fixed in 2006r1. So , again, thank
> you :)
> 
> That's good -- but still better not to use paths at all. Remember, you can
> store FolderItem objects directly in a listbox using Listbox.CellTag. And if
> there's anyplace you really do need to convert a FolderItem to a string and
> back -- which I doubt, from what you've said about this project -- then you
> should use GetSaveInfo instead of paths.
> 
>       //get the FolderItems
>       f=new folderitem(sourcerootpath)
> 
> Oi! This is what you should never do -- reconstitute a FolderItem from a path.
> But I've beaten this horse to death; I'll try to move on. :)
> 
> f=f.child(nthField(sourcepath,":",countfields(sourcepath,":")))
> 
> Oi oi! Sorry, can't help myself. It looks to me like you're simply trying to
> get the item under source root, which has the same name as your source item.
> Using proper FolderItem technique, this would simply be:
> 
> f = sourceRoot.Child( source.Name )
> 
> g=new folderitem(targetrootPath)
> 
> Oi. :)
> 
> g=g.child(nthField(targetpath,":",countfields(targetpath,":")))
> 
> As above, this could be simply g = targetRoot.Child( target.Name ), if
> targetRoot and target were FolderItems.
> 
> 
>       //copy the file
>       origin=f//this folderitem reports it's absolutepath as ending in "::"
> 
> OK, let's see if we can work this out. f at this point is that path
> abomination above, built from sourceroot and sourcepath:
> 
> sourcerootpath: Firewire 400:Users:jeffrey:New Files:
> sourcepath: Firewire 400:Users:jeffrey:New Files:Sigma Chess 6.0.2 ?:
> 
> Well, countFields for sourcepath would return 7, and the 7th item is the empty
> string. So you've asked for f.Child(""), where f is originally your New Files
> folder (making various unsafe assumptions about the uniqueness of these
> paths). That doesn't make much sense, and I'm not too surprised it returns a
> somewhat nonsensical FolderItem.
> 
> HTH,
> * Joe

LOL. That¹s the best smile I¹ve gotten out of doing something stupid in a
long while. :-D

Ok. To get to specifics...

> Remember, you can store FolderItem objects directly in a listbox using
> Listbox.CellTag.

This is really what I need. How do I do that...? I can¹t find it in the LR,
or online...

All My Best,
Jeffrey


_______________________________________________
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