Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Relative path for filenames in
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 9
OS:
Windows XP SP1
Divers
Thread ID:
01027772
Message ID:
01033445
Vues:
24
Nice! Thanks for the update on this.

>Craig --
>
>It's actually much easier to get relative paths in Code References than either I (or you) thought. All that needed to be modified was the controlsource for the grid column that shows the filename. Changing one line of code is all that's necessary:
>
>in Cresultsallgrid of "Tools\Xsource\Vfpsource\Foxref\Foxref.vcx" ... Cresultsallgrid.Init
>
>OLD:
THIS.colFilename.ControlSource    = [ADDBS(FoxRefCursor.Folder) + RTRIM(FoxRefCursor.Filename)]
>NEW:
THIS.colFilename.ControlSource    = [LOWER(SYS(2014,ADDBS(FoxRefCursor.Folder) + RTRIM(FoxRefCursor.Filename)))]
>
>Jim
>
>
>>As Dragan has said, you are on the mark... make a back-up of the original APP just in case everything goes crazy. <g> I haven't looked into what modifications would need to be made or where, but I think you could probably add a property to the form to hold the root path, then parse it out of the results, then you'd have to add some code in there to combine the property holding your root with the relative path in the background for any of the functions (such as bringing up the source for one of the items listed in your search results by double-clicking) that are expecting the whole path to be there. Then recompile and put it where the FoxRef.APP is now, just like you surmised. Wish I could help you further with some code, but I'll definitely be watching this thread for what you come up with. Cool idea by the way.
>>
>>There may be other better ways to approach this, as I haven't looked at the code... so above is just shooting in the dark and talking out loud on my part.
>>
>>>Craig --
>>>
>>>OK, I can see that the source is there, but I'm not sure what to do with it after I've made any necessary changes.
>>>
>>>I assume I'll
>>>    Unzip the Xsource.ZIP file (does it matter where I do this?)
>>>    Make modifications as I see fit (presumably, only a statement or two, or so I can hope)
>>>    Re-build the APP file
>>>    Move it to HOME()
>>>
>>>
>>>Is this anything close to what I would have to do?
>>>
>>>Thanks again,
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform