Re: Path separators...final

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek Parnell wrote:
> 
> Al Getz wrote:
> > 
> > Derek Parnell wrote:
> > > 
> > > Here is another possibility ...
> 
> 
> > Hi Derek,
> > 
> > 
> > Would it be possible for you to describe what you are trying to
> > achieve here (and how you're trying to achieve it), 
> 
> The list of paths would begin and end with the delimiter, and the delimiter
> would exist inbetween each path in the list. The delimiter would not be any
> character in any of the paths. The delimiter would be chosen from the list 
> 
>   ;,`'<>|=+ 
> 
> Using this method, you just need to look at the first character to know what
> the delimiter is and then pick out the paths from the list. Adding a new path
> would just reexamine all the paths for one of the allowable delimiters that
> doesn't exist in an of the existing or new path.
> 
> > or should i
> > just run the code and see how it works?
> 
> Yes. Read the code first to understand it.
> 
> -- 
> Derek Parnell
> Melbourne, Australia
> Skype name: derek.j.parnell

Hi Derek,

Ok i ran the code and here's what i got...

  'c:\temp\file.exw'Another file'funny,name'f`u n; y,name'
  c:\temp\file.exw
  Another file
  funny,name
  f`u n; y,name

which looks fine, but there's one more "catch" and that is the
user must be able to type in the path(s) with delimiters so
that they can separate the paths themselves, BEFORE the program
gets to look at the whole line.
Now we could add a function as your example "addpath()" but
im not sure i want to do it that way because i'd have to supply
another edit box for them to type in the path, which gets added
to the list in the first edit box.  This way the program could
keep track of each path and change ALL the delimiters once all the
paths are entered, and even change them again later if another
path is added.  This would work i agree, but i'd rather, at least
for now, keep it down to one edit box (a long, single line for now).
I know another way would be to supply a multiline edit box, so
the user could type one path per line, and then parse that (which as
im sure you know would be very simple) but then i'd have to supply
four multiline edit boxes (for all the paths and args and open commands)
and that gets a little large, unless i put them on a tab control, but
then the user has to switch tabs to enter all the info.
At least for now, i'd like to stick with one edit box and one line.
Maybe later a drop down list?  Then i'll use your AddPath() method
for sure.


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

 From "Black Knight":
"I can live with losing the good fight,
 but i can not live without fighting it".
"Well on second thought, maybe not."

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu