Author Topic: Problem with code replacement  (Read 8841 times)

Offline oreixa

  • Newcomer
  • *
  • Posts: 15
    • View Profile
    • www.rallyes.net
Problem with code replacement
« on: May 10, 2006, 05:16:49 AM »
I have a text file with the codes, the file is a txt not rtf or other format. Some of the codes works and others don't  :o Whe I type a code that works it gets replaces, but it could happen that another one doesn't get replaced on the same line.

I'm using 4.4.3 under osx 10.4.6


Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21348
    • View Profile
    • Camera Bits, Inc.
Re: Problem with code replacement
« Reply #1 on: May 10, 2006, 06:26:23 AM »
I have a text file with the codes, the file is a txt not rtf or other format. Some of the codes works and others don't  :o Whe I type a code that works it gets replaces, but it could happen that another one doesn't get replaced on the same line.

I'm using 4.4.3 under osx 10.4.6

I'd have to see an example of a code that doesn't work.  So I need three things:

1) Your code replacement file.
2) The exact text you have typed into the IPTC dialogs.
3) Tell me what field you are typing into.

With that I can try to reproduce the problem.

-Kirk

Offline oreixa

  • Newcomer
  • *
  • Posts: 15
    • View Profile
    • www.rallyes.net
Re: Problem with code replacement
« Reply #2 on: May 10, 2006, 06:41:10 AM »
1)

evo   Mitsubishi Evo
imp   Subaru Impreza
cor   Seat Cordoba
ibi Seat Ibiza
foc   Ford Focus
sti   Fiat Stilo
pun   Fiat Punto
206   Peugeot 206
307   Peugeot 307
cli   Renault Clio
c2   Citroen C2
cri   Alex Criville
vin   Joan Vinyes
par   Francisco Pardo
vid   Amador Vidal
sol   Dani Sola
hev   Alberto Hevia
fus   Miguel Fuster
val   Sergio Vallejo
rue   Manuel Rueda
cab   manuel Cabo
bur   Pedro Burgo
fom   Sergio Lopez Fombona

2) If I type \lem\ \evo\ the second one gets converted to Mitsubishi Evo, but the first one remains \lem\ . The first 11 lines (car names) seem to work but the last ones (driver names) don't get converted.

3) I write at the Caption field.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21348
    • View Profile
    • Camera Bits, Inc.
Re: Problem with code replacement
« Reply #3 on: May 10, 2006, 06:47:37 AM »
1)

evo   Mitsubishi Evo
imp   Subaru Impreza
cor   Seat Cordoba
ibi Seat Ibiza
foc   Ford Focus
sti   Fiat Stilo
pun   Fiat Punto
206   Peugeot 206
307   Peugeot 307
cli   Renault Clio
c2   Citroen C2
cri   Alex Criville
vin   Joan Vinyes
par   Francisco Pardo
vid   Amador Vidal
sol   Dani Sola
hev   Alberto Hevia
fus   Miguel Fuster
val   Sergio Vallejo
rue   Manuel Rueda
cab   manuel Cabo
bur   Pedro Burgo
fom   Sergio Lopez Fombona

2) If I type \lem\ \evo\ the second one gets converted to Mitsubishi Evo, but the first one remains \lem\ . The first 11 lines (car names) seem to work but the last ones (driver names) don't get converted.

3) I write at the Caption field.

I don't see "lem" in your list.  Please upload the actual file by using the "Additional Options..." link when you are composing your email.  Then I can look to see if there is something in your text file that is throwing off my parser.

Thanks,

-Kirk

Offline oreixa

  • Newcomer
  • *
  • Posts: 15
    • View Profile
    • www.rallyes.net
Re: Problem with code replacement
« Reply #4 on: May 10, 2006, 06:53:05 AM »
Sorry, deleted a line when copy & paste.

[attachment deleted by admin]

Offline oreixa

  • Newcomer
  • *
  • Posts: 15
    • View Profile
    • www.rallyes.net
Re: Problem with code replacement
« Reply #5 on: May 10, 2006, 06:55:04 AM »
This is a capture of the iptc pad

[attachment deleted by admin]

Offline oreixa

  • Newcomer
  • *
  • Posts: 15
    • View Profile
    • www.rallyes.net
Re: Problem with code replacement
« Reply #6 on: May 10, 2006, 07:00:45 AM »
Found it!

lem line doen't had a tab separation, not sure why, because all the lines were created equal. Also when you modify the .txt file you need to close and reopen PM to let the program know the changes.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 21348
    • View Profile
    • Camera Bits, Inc.
Re: Problem with code replacement
« Reply #7 on: May 10, 2006, 07:04:03 AM »
Found it!

lem line doen't had a tab separation, not sure why, because all the lines were created equal. Also when you modify the .txt file you need to close and reopen PM to let the program know the changes.

Well, actually you only need to get to the Code Replacement file list dialog and click OK.  You don't need to change the list of files at all.  Just click OK and the files will be reloaded.  Photo Mechanic does not continuously consult your actual files.  It parses them and stores the codes and their corresponding replacements in memory.  Looking at the actual files each time would be extremely slow.

I'm glad you solved your problem.

-Kirk

Offline oreixa

  • Newcomer
  • *
  • Posts: 15
    • View Profile
    • www.rallyes.net
Re: Problem with code replacement
« Reply #8 on: May 10, 2006, 07:08:12 AM »
Thanks for your time and help, Kirk.