PDA

View Full Version : Is this a bug?



NewsArchive
08-02-2010, 01:51 PM
Hi

I have reported this to Friedrich but he is away and perhaps Andrea can deal
with this. A screenshot is attached.

I just had a strange issue and Andrea pointed out the error of my ways. It
was a stupid thing but was it?

In my script I had wrapped an If/End statement round a group of files.
Install if bla bla bla. This code has existed for some time and I had
forgotten about it.

Anyway today I went to add another file to the list of files and one of them
did not install. What Andrea pointed out was that the file I had added had
included itself in the IF/End statement.

Of course this should not have happened and wondered if this could be
considered a bug?

You see, if there are several conditional statements in the script
surrounding the files (which I believe would be expected as being reasonable
to control the conditional installation of files), then adding new files at
any time using the Visualizer could cause them to drop unintentionally into
the If/End statements.

Personally I think that when adding files to an existing list, they should
be added to the end of the file list in the script to avoid this.

Anyone had this happen to them before.

Just curious as I only found this out by pure accident.

John Fligg

NewsArchive
08-17-2010, 03:19 AM
When new items are added via the "Visualizers", then the IDE tries to reuse
"freed script space" (items/lines that were removed from) in the script.
This method goes back to the initial IDE v5 design from April 2002 (and is
"suboptimal").

We have added a new option (which is enabled by default) so the IDE always
adds new items to the end of a specific script section now (and does not
reuse freed script space any longer).

There is a new "Reuse freed SetupScript space" checkbox in the global IDE
Options if you would like to continue to use the "old" method.

Friedrich

NewsArchive
08-17-2010, 03:19 AM
Thanks! I was just about to inquire about this. I'll check my settings.

If you ever want another scenario to test, here is a great way of making this
happen:

1) Add a lot of files via the visualizer.
2) Switch to script view and add some code, for example, testing if a new variable
is true or false and set another variable to some value based on the results.
3) Return to the visualizer and in the files section, select all added in #1
above. Set the location to a local variable from whatever it is now. The files
are now "removed" from the visualizer.
4) Switch back to script and you see the files are still there, but the install to
variable is changed according to the actions in #3.
5) Add a new folder to the always install section. Copy a quite a few files into
it (suggest one type of file so it stands out better - like jpg).
6) Switch to script and you will find that a few lines from #5 are not placed with
the rest. May have to use the search feature to find them.

--
Russell B. Eggen
www.radfusion.com
Clarion developers: www.radfusion.com/devs.htm

NewsArchive
08-17-2010, 03:20 AM
Hi Russ,

> Thanks! I was just about to inquire about this. I'll check my settings.
>
> If you ever want another scenario to test, here is a great way of making
> this happen:
>
> 1) Add a lot of files via the visualizer.
> 2) Switch to script view and add some code, for example, testing if a new
> variable is true or false and set another variable to some value based on
> the results.
> 3) Return to the visualizer and in the files section, select all added in
> #1 above. Set the location to a local variable from whatever it is now.
> The files are now "removed" from the visualizer.
> 4) Switch back to script and you see the files are still there, but the
> install to variable is changed according to the actions in #3.
> 5) Add a new folder to the always install section. Copy a quite a few
> files into it (suggest one type of file so it stands out better - like
> jpg).
> 6) Switch to script and you will find that a few lines from #5 are not
> placed with the rest. May have to use the search feature to find them.

Yes, that's because the current method "reuses" the freed script space. If
no more "freed" space is available, it adds the files (or shortcuts,
registry entries, etc.) to the end of the section. For example, you delete
10 files and you add 15 files. The first 10 files "reuse" the freed script
space and the remaining 5 files are added to the end of the files script
section.

By default, the IDE does not "reuse" freed script space any longer in the
upcoming maintenance build (so all 15 files from the example above are added
to the end of the files section). But this new method can be disabled to
turn-back to the original method (some users need the old method).

Friedrich

NewsArchive
08-17-2010, 03:20 AM
Thanks Friedrich

That gives me peace of mind now.

John