Digg this topic Add to my del.icio.us Submit to SlashDot  
Reply to this topicStart new topic
> [Syntax] IniWriteTextLine command, Unexpected behaviour
edborg
post Nov 2 2006, 05:56 PM
Post #1


Advanced Member
***

Group: .script developer
Posts: 259
Joined: 14-July 06
Member No.: 4



It took me quite awhile and a lot of trial and error to find out that the IniWriteTextLine command writes lines in almost reverse order, as shown by the enclosed test (in WB 052 beta3). (IMG:../forums/style_emoticons/default/frusty.gif)
Why is this so? (IMG:../forums/style_emoticons/default/blink.gif)
edborg
Attached File(s)
Attached File  SyntaxTest.script ( 1.26k ) Number of downloads: 12
 
Go to the top of the page
 
+Quote Post
pedrole15
post Nov 2 2006, 07:02 PM
Post #2


Advanced Member
***

Group: .script developer
Posts: 224
Joined: 18-August 06
Member No.: 183


France


QUOTE(edborg @ Nov 2 2006, 06:56 PM) *

It took me quite awhile and a lot of trial and error to find out that the IniWriteTextLine command writes lines in almost reverse order, as shown by the enclosed test (in WB 052 beta3). (IMG:../forums/style_emoticons/default/frusty.gif)
Why is this so? (IMG:../forums/style_emoticons/default/blink.gif)
edborg

Yes for my MakeScript i have got the same problem (IMG:../forums/style_emoticons/default/frusty.gif)
"IniWriteTextLine" write always at the first line of the section
"TextAddLine" have the "Append" option for write at the bottom or "Prepend" for write at the top
So it is not easy write code (IMG:../forums/style_emoticons/default/dry.gif)
Go to the top of the page
 
+Quote Post
smiley
post Nov 2 2006, 07:22 PM
Post #3


Advanced Member
***

Group: .script developer
Posts: 1,014
Joined: 11-August 06
Member No.: 149


Greece


QUOTE(pedrole15 @ Nov 2 2006, 09:02 PM) *

Yes for my MakeScript i have got the same problem (IMG:../forums/style_emoticons/default/frusty.gif)
"IniWriteTextLine" write always at the first line of the section
"TextAddLine" have the "Append" option for write at the bottom or "Prepend" for write at the top
So it is not easy write code (IMG:../forums/style_emoticons/default/dry.gif)


Then the IniWriteTextLine command needs also the options "append" or "prepend"
I'll ask Nuno to add this to next Beta (IMG:../forums/style_emoticons/default/cheers.gif)


John
Go to the top of the page
 
+Quote Post
Alexei
post Nov 3 2006, 03:15 AM
Post #4


Advanced Member
***

Group: .script developer
Posts: 532
Joined: 30-August 06
Member No.: 283



QUOTE(smiley @ Nov 2 2006, 11:22 AM) *

Then the IniWriteTextLine command needs also the options "append" or "prepend"
I'll ask Nuno to add this to next Beta (IMG:../forums/style_emoticons/default/cheers.gif)
John

It also needs "navigate" option with following context string to write in the middle (IMG:../forums/style_emoticons/default/smile.gif)
I mean
CODE
IniWriteTextLine,"file","section","textline",Navigate,"searchstring"

(IMG:../forums/style_emoticons/default/cheers.gif)
Alexei
Go to the top of the page
 
+Quote Post
edborg
post Nov 3 2006, 09:50 AM
Post #5


Advanced Member
***

Group: .script developer
Posts: 259
Joined: 14-July 06
Member No.: 4



QUOTE(pedrole15 @ Nov 2 2006, 09:02 PM) *

Yes for my MakeScript i have got the same problem (IMG:../forums/style_emoticons/default/frusty.gif)
"IniWriteTextLine" write always at the first line of the section
"TextAddLine" have the "Append" option for write at the bottom or "Prepend" for write at the top
So it is not easy write code (IMG:../forums/style_emoticons/default/dry.gif)

Happy to see that I'm not the only one to find it difficult to use. (IMG:../forums/style_emoticons/default/sad.gif)
In fact I discovered this when trying to add some lines to your excellent MakeScript (to delete the program folder from Target and CDPrograms before creating a new one). (IMG:../forums/style_emoticons/default/smile.gif)

But to me it seems even worse than what you say:
"IniWrite" write always at the first line of the section, but "IniWriteTextLine" writes the first line at the beginning, but then it writes the last one and the remaning in reverse order. (IMG:../forums/style_emoticons/default/blink.gif) (IMG:../forums/style_emoticons/default/blink.gif) (IMG:../forums/style_emoticons/default/blink.gif)
As a minimum, it should have a consistent behaviour.
The suggested "append", "prepend" and "navigate" options would be a further improvement. (IMG:../forums/style_emoticons/default/wink.gif)
edborg

Go to the top of the page
 
+Quote Post
Alexei
post Nov 3 2006, 10:39 AM
Post #6


Advanced Member
***

Group: .script developer
Posts: 532
Joined: 30-August 06
Member No.: 283



IniWrite also "voluntary" reformats the source file deleting comments (";"-lines), etc. (IMG:../forums/style_emoticons/default/confused1.gif)
I'd like to be able to control it.
As you may noticed, I managed to do some changes in the .inf-file (see my Network.script).
In the future we may need to do more such things, so they shouldn't be too hard (IMG:../forums/style_emoticons/default/smile.gif)
(IMG:../forums/style_emoticons/default/cheers.gif)
Alexei
Go to the top of the page
 
+Quote Post
edborg
post Nov 9 2006, 03:39 PM
Post #7


Advanced Member
***

Group: .script developer
Posts: 259
Joined: 14-July 06
Member No.: 4



Just for the records:
The IniWriteTextLine misbehaviour has been solved as from Winbuilder 052 beta8. (IMG:../forums/style_emoticons/default/thumbup.gif)
The "append/prepend/navigate" features are still an open issue.
edborg
Go to the top of the page
 
+Quote Post
« Next Oldest · Support and Bug reporting · Next Newest »
 

Fast ReplyReply to this topicStart new topic

Collapse

> Similar Topics

  Topic Replies Topic Starter Views Last Action
No New Posts IniWriteTextLine
4 psc 89 Today, 12:14 PM
Last post by: Nuno Brito
No New Posts Command Line Shutdown/Reboot
Need to shutdown/reboot LiveXP from Script
7 robinj 136 11th October 2007 - 03:11 PM
Last post by: robinj
No New Posts Topic has attachmentsIniWriteTextLine possible bug?
List index out of bounds (3)
3 jamykid 351 16th March 2007 - 02:46 PM
Last post by: jamykid


 

Display Mode: Standard · Switch to: Linear+ · Switch to: Outline

Track this topic · Email this topic · Print this topic · Subscribe to this forum

- Lo-Fi Version Time is now: 15th October 2007 - 10:30 PM

MKPortal ©2003-2006 mkportal.it