Jump to content











Photo
- - - - -

(Error in Wiki?) Bug in TXTAddLine


  • Please log in to reply
14 replies to this topic

#1 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 15 January 2007 - 02:24 PM

Place

Will place the line after a specified number of lines counting from the top. This value is specified by an additional parameter.

Example:
CODE
TXTAddLine,"c:\test.txt","Hello World!","Place"''',2'''

Nuno, i think this is your construction site. :P
Can you tell me, how the setting of the line number is supposed to work.
The above syntax makes no sense to me or WB052. :P
Tryed a bunch of variation.
Nothing worked. :P

EDITED py psc: Really a bug, see post #7

Edited by psc, 15 January 2007 - 05:24 PM.
Really a bug


#2 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 15 January 2007 - 03:52 PM

Nuno, i think this is your construction site. :P
Can you tell me, how the setting of the line number is supposed to work.
The above syntax makes no sense to me or WB052. :P
Tryed a bunch of variation.
Nothing worked. :P


It works correct:
TXTAddLine,"%ProjectInfo%","NewLine","Place","2"
brings

[Project]ProjectName=nativeEx
NewLine
ISORootName=nativeEX_GUI_EN
RamISORootName=nativeEX_GUI_EN_RAM
BootISO=C:\Dokumente und Einstellungen\Peter\Desktop\WB Archiv\Beta8\ISO\nativeEX_GUI_EN.iso


Peter

#3 smiley

smiley

    Silver Member

  • .script developer
  • 905 posts
  •  
    Greece

Posted 15 January 2007 - 03:59 PM

It works correct:

TXTAddLine,"%ProjectInfo%","NewLine","Place","2"
brings
Peter


I'll fix the wiki

#4 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 15 January 2007 - 04:39 PM

It works correct:

TXTAddLine,"%ProjectInfo%","NewLine","Place","2"
brings
Peter

I already tryed it this way, as it is the most logical one, followed by not using any quotes. Both fail. :P

Your version gives me an 'List index out of bounds(159)' error. (159 is the used line number)

PS: Do i see this right 'Place 2' adds the line as number 2 not after number 2 as the wiki says?

#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 15 January 2007 - 04:48 PM

I already tryed it this way, as it is the most logical one, followed by not using any quotes. Both fail. :P

Your version gives me an 'List index out of bounds(159)' error. (159 is the used line number)

PS: Do i see this right 'Place 2' adds the line as number 2 not after number 2 as the wiki says?

  • ???? Voodoo ??? :P
    Your version?
    C:\Test.txt exists?
  • Wiki seems to be wrong
Peter

#6 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 15 January 2007 - 04:57 PM

  • ???? Voodoo ??? :P
    Your version?
    C:\Test.txt exists?
  • Wiki seems to be wrong
Peter

Yes the file exists. All the previous TXT* commands work fine on it, only the Place ones don't! :P

#7 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 15 January 2007 - 05:20 PM

Yes the file exists. All the previous TXT* commands work fine on it, only the Place ones don't! :P


I caught the bug in a trap :P

If the text file has 2 or more lines, the (sample 2) line is inserted behind line #2. :P

It the text file has one line or is empty, the out of bounds error occurs. :P

Peter

#8 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 15 January 2007 - 06:02 PM

I caught the bug in a trap :P

If the text file has 2 or more lines, the (sample 2) line is inserted behind line #2. :P

It the text file has one line or is empty, the out of bounds error occurs. :P

Peter

And i just found out why, i only have 1 line in a 300+ line file! :P
Any command that you use to change the content of a unicode file, destroys it's contents! :P
While with the iniwrites at least a new file is created. When you use the TXT* commands the file gets so screwed over, it's unbelievable! :P
Wasted a perfectly fine afternoon on this :P

Seems the whole WB can only do ANSI. :P

Would the guy from Portugal please join us in the present! :P

I need to get :P now! :P

#9 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12707 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 15 January 2007 - 06:38 PM

And i just found out why, i only have 1 line in a 300+ line file! :P
Any command that you use to change the content of a unicode file, destroys it's contents! :P


It is well known, see this topic.

Seems the whole WB can only do ANSI.
Would the guy from Portugal please join us in the present!

Please remain technical, no sarcasm, no irony and above all no attack!

WinBuilder is still fighting against the history - coming from BartPE with everything in English.

I hope that with increase of nativEx WinBuilder will become more and more unicode ready.
All of my programs behind nativeEx are already, even the latest WBVerify can read an unicode control file.
(Maybe smiley wants to write some messages into it in greek).

Peter

#10 phox

phox

    Silver Member

  • .script developer
  • 764 posts

Posted 15 January 2007 - 07:06 PM

Any command that you use to change the content of a unicode file, destroys it's contents! :P
While with the iniwrites at least a new file is created. When you use the TXT* commands the file gets so screwed over, it's unbelievable! :P
Wasted a perfectly fine afternoon on this :P

Seems the whole WB can only do ANSI. :P

Would the guy from Portugal please join us in the present! :P

I need to get :P now! :P


Nobody forces you to use what you don’t like!
You are always welcome to do it better.

#11 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 16 January 2007 - 10:42 AM

I don't take it as an offensive remark - medEvil has a good point - delphi 7 was released years ago when there was a big discussion (on delphi whereabouts) regarding the integral support for UNICODE, but standard ANSI was used to keep the compiler compatible with the previous release 6.

I think delphi 8 doesn't complain about unicode, I could have upgraded to delphi 2006, but I prefer to use a simpler compiler to keep .exe's smaller and compatible with previous ms OS's - Up to now I've just been a bit busier with other parts of coding - if unicode support is demanded I will work to make it supported as well, no problem.. :P

#12 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 20 January 2007 - 12:17 PM

My remark was sure sarcastic, but it was never ment as an attack againt Nuno.

It's just that, writing a program, that is supposed to run on a native unicode system, that understands only ANSI, is like writing a programm for Win9x that understands only 8.3 file names.
Kind of crazy from my point of view. :P

And i might even overreacted a bit. :P

About the comptibility with older Win Versions.
I think now, it's kinda pointless.
a.) Why should someone use Win98 on his computer, when he has a WinXP SetuoCD?
b.) WB doesn't work on Win9x systems. Because there are at least some files missing.

#13 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 22 January 2007 - 10:28 AM

...
About the comptibility with older Win Versions.
I think now, it's kinda pointless.
a.) Why should someone use Win98 on his computer, when he has a WinXP SetuoCD?
b.) WB doesn't work on Win9x systems. Because there are at least some files missing.


I was actually thinking on future support for wine/cedega and small builds like winimizer - wb itself is quite portable and requires few dll's to work, if necessary these can also be replaced with open source versions from reactOS.

At this moment it is rather pointless to further support win9x since priority should be given on other things, but I always keep it in mind in order to avoid making it specific to a single platform like XP and above. :P

#14 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 22 January 2007 - 01:40 PM

I was actually thinking on future support for wine/cedega

You have confidence! Havn't met a Linux user yet, who don't even wanna be cought dead with a Windows CD! :P

#15 Brito

Brito

    Platinum Member

  • .script developer
  • 10616 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 22 January 2007 - 03:00 PM

I like linux, but have to use windows.. :P




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users