WinAsm Studio, The Assembly IDE - Free Downloads, Source Code
Articles
Programming Quick Start
32-bit Assembler is Easy
Porting Iczelion tutorials
What is FASM
Hard Drive Recovery
Wiring your own LAN
 
Forum
Pages (3) [1] 2 3   ( Go to first unread post )

Additionally store absolute paths in session files, my suggestion is to store the absolute path as a fallback when the relative path cannot be loaded, separated with a pipe char.

Icfu
Quote Post


Very Very Active Member
*****

Group: Members
Posts: 86
Member No.: 4936
Joined: 3-May 07


When you move the session file, relative paths won't work anymore. On the other hand storing relative paths is cool when working with a stick.

So, my suggestion is to store the absolute path as a fallback, when the relative path cannot be loaded, separated with a pipe for example:
CODE
..\..\..\..\..\blabla.txt|c:\absolute\path\blabla.txt


Icfu

Sponsored Links
PM
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2308
Member No.: 1
Joined: 12-May 04


Thanks for the suggestion, I am rather skeptical as I want list files as compatible as possible with other applications. Do you have any, sort of, typical format of list files?
PMEmail PosterUsers Website
Top
blues
Quote Post


Member
******

Group: Members
Posts: 435
Member No.: 20
Joined: 20-May 04


maybe a good compromise is to make the paths relative to the root, or in other words absolute but leaving out the drive letter.

e.g.
CODE
\absolute\path\blabla.txt
\another\path\file.txt


that way the .lst file can be moved around (as long as it is in the same drive) and it will also work on sticks where the drive letter could change.

blues
PMEmail Poster
Top
Icfu
Quote Post


Very Very Active Member
*****

Group: Members
Posts: 86
Member No.: 4936
Joined: 3-May 07


QUOTE
I am rather skeptical as I want list files as compatible as possible with other applications.

There is another way, have a look at what Total Commander does. When starting, TC adds temporary envvars:
%COMMANDER_PATH% points to the application home directory.
%COMMANDER_DRIVE% points to the root.

If you implement %HiEditor_Path% and %HiEditor_Drive%, you can store paths relatively absolute, like that (in fact this is what blues has proposed, but with a real drive letter):
%HiEditor_Drive%\bla\blubb\target.txt

When saving, don't add absolute paths as fallbacks separated with a pipe but on a new line.

The nice side effect is that other applications will be able to use these list files as well, without the need to support relative paths.

Icfu
PM
Top
akyprian
Quote Post


Administrator
******

Group: Admins
Posts: 2308
Member No.: 1
Joined: 12-May 04


Thank you guys,

Icfu, it is not 100% clear to me, can you give me a sample list file demonstrating what you are saying?
PMEmail PosterUsers Website
Top
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

Topic Options Pages (3) [1] 2 3  Reply to this topicStart new topicStart Poll

 

Sponsors
Computer Science

Internet
C/C++
Hardware & PC maintenance

HiEditor

General Discussions
Suggestions/Bug Reports
WinAsm Studio

General Discussions
Suggestions/Bug Reports
WinAsm Studio FAQ
Multilingual User Interface
Add-Ins
Assembly Programming

Main
Newbies
Projects
Custom Controls
Snippets
Announcements & Rules

Announcements

General

Online Degrees - Distance Learning
The Heap
Russian