PDA

View Full Version : Suggestions and BUGS



NewsArchive
09-09-2006, 07:03 AM
Forgive me if these have been made / discussed previously.

I am using: SB Developer 5.5.1589.0 (2006/09/04)

While I have been writing a script to augment implement some of the features
found in WISE's equivalent to your "Search For File..." command. I have
made a few observations.


a) Please add splitters to your user interface
Friedrich, if you need help writing a splitter in CW, I can help you.

b) Documentation
b.1) When there is a checkbox like: [ ] Yada
Please enhance doc. that says: check this box to Yada
IMO, This is simply a place holder.

b.2) Functions, like ExtractFolder would benefit greatly from an example,
input/output.
either that or rename it to RemoveFolder


c) Please document where #const labels ($yada$) cannot be used, it seems
like they are not usable in nearly as many places as variables (%yada%) can
be used.

d) Debugging
d.1) When trying to debug, I got an error message telling me to set the
debugging mode
however it didn't tell me where to do that, nor did it offer to set
it for me.

d.2) While trying to get the exact text for d.1, I went to
General Information->Generator Settings and set the Debug Mode to off
now when I try to debug, I get a different error message
"Debug file is out of synch with the executable. Please recompile
the project"
IMO, this message could be more useful.

d.3) So I got debugging running, but then I saw no user interface to debug
with...
I found "single step" in the pulldown menus
It would be nice to see a control on the toolbar appear
There are menu picks to work with breakpoints, but they are ALWAY
disabled
Q: What am I missing ?

d.4) Minor Bug:
the STOP button on the toolbar, remains, even when the script
terminates normally.
There is a message:
"The installation being debugged has exited."
pressing stop after the script has termininated results in:
"Unable to stop debugging. Debugger not active."


e) Scripting
e.1) It would be nice to have an OR condition to be used on IF statements

e.2) I was surprised that
ScriptItem->ExtractFolder(%PROGRAMFILESDIR%)
returned C:
I expected to see "\Program Files"

This cost me some time, and could have been avoided by documentation
(which I read)
I eventually found ScriptItem->Remove Drive Letter

e.3) I a search and REPLACE feature would be nice, I wanted to change the
name of one of my variables.

e.4) An Undo would be wonderful, if nothing else, just for DELETEs of entire
line(s)

e.5) A toolbar with some of the more common scripting commands would be
handy
still being a relative newbie, I'd guess that they would be:
/* -- comment uncomment selected lines
! -- add code comment
Set Variable
IF

Ideally the toolbar would be customizable
For instance I'd add OutputDebugString, but I have a feeling few
others would.
(another approach, less useful, but somewhat helpful, would be to
allow us to bold, or colorize some of the script items (in the listbox on
the upper right panel)

e.6) A horizontal splitter in the source would be handy

e.7) the ability to scroll the script while in a window filling out prompts
would be handy.
for instance while setting the value for a variable, it would be nice
to be able to look at other parts of the script.

e.8) It would be nice if the calls to OutputDebugString were a different
color, as they are essentially just a debugging command.

e.9) Q: Is there the equivalent clarion's question mark in column 1 ?

e.10) You can change the font size in prefrences, however the row height
never changes. So 8 pt and 10 pt both show the same number of rows of
source at once.

e.11) BUG: When moving multiple lines up/down and the lines cross at [ * ]
boundry (like [Features]) then the spacing of the marked lines gets
corrupted.
To reproduce, mark several lines, move down past a boundry, and then move
back up.

e.12) The X & Y variable locations in Get List Item are too small to easily
edit variable names.

e.13) Suggestion: (this would have saved me a lot of effort)
*******************************
LOOP %ListItem% IN %List%
*******************************
This would eliminate the need for creating a variable for the ListCount
Then initializing the current list item number to 1 or 0 (you pick)
checking to see if the list item is now too large and breaking out of
the loop
Then incrmentingthe list item number inside of the loop
doing the Set variable to the Get List Item

You have CW's: LOOP n TIMES
But you don't have LOOP Var = X to Y


e.14) Script Structure Validation --> Script Validate performed successfully
Compile -> error GEN1012: Not enough end statements in installation
script
(script saved)

e.15) Suggestion: (low priority) Loop labels, to ease break loop & cycle
loop from within nested loops, without requiring extra logic checks.

e.16) Can we have control over the case of our variables.... all upper case
makes it harder to find the words inside of the word - at least for those of
us who didn't grow up with German ;-)

e.17) BUG: Script not saved...
SERERITY: Major -- as code updates are irrevocably lost.

To reproduce:
make script changes
hit compile
Message: 'The script has changed.||Do you want to save the
chanages'
click yes
compiler errors reflect that the changes were not saved.
going back to the Script Editor it is clear that all changes
were lost, last saved version is shown.

*** I'm told on #cw-talk that this is a known bug ***
*** where is the list of known bugs? ***

PLEASE ADD A CANCEL TOO!!!


f) GPF's SB auto closing
f.1) I have experienced no less than 3 crashes in the 3 days I've been using
SB
sadly I cannot reproduce any of them, so there's not much point in
reporting them.
one was as simple as moving the SB window to my 2nd monitor


g) Print Script
g.1) BUG: ignores printer settings for landscape (and paper size)
- landscape would help quite a bit, as many lines are wrapped.

g.2) doesn't include syntax highlighting

g.3) there is no straight forward way to get the text of the the script,
IOW, when reporting a bug, it would be nice to able to post code
snippets
I tried working with a generic/text printer and print to file....
this works somewhat, however parts of the script are lost (not
merely wrapped)


h) New Setup Project wizard
the default destination folder has my company name in it... which has a
comma
hence it's an illegal filename.


i) When working on Include Scripts
i.1) The left most pane is empty, but still present,
i.2) The Project settings are gone, and debug is turned off


j) File menu pick
Recent projects is incomplete (some projects are missing) (all include
scripts are missing)

k) General Information
set the generator setttings to debug -> full
compiled
debug
complains about debug mode setting
The listbox format shows Debug Mode Full
double clicking on the line, brings up the form
which shows debug mode: off

mark goldberg

NewsArchive
09-09-2006, 07:03 AM
Mark,

Knowing Friedrich a little ..... he has work for another couple of versions
there - you don't feel like giving us your 'comments' on Clarion and Windows
please ?

From this very extensive list ( a passer by would think the complete soft is
bugged and unfinished which is the exact OPPOSITE of what it is !!! ) I just
do not understand one small point you made : capitals and German : sorry but
I really do not see or understand the realtion there ?
Do Americans never use capitals ? I know chineese (and such languages or
Arabic languages) are not 'built' like Latin ones but ..... I'll have again
another cup of cofee ....

JP

--

Thank you

Jean-Pierre GUTSATZ

Best Regards

NewsArchive
09-09-2006, 07:03 AM
Hi Mark,

Thanks so much for your very detailed bug description / suggestion list! I
will have to get back to you on a few points. All bug descriptions are in
review now.

With regard to:

e.1. The OR condition is already available (set option to "Or" in the "If
Statement" dialog)

g.3. Select script items, right click and select "Copy Text to Clipboard".
Then paste it to, say, an email.

h. The comma is not an illegal character in a filename (IMO).

Thanks again,
Friedrich

NewsArchive
09-09-2006, 07:03 AM
Hi Mark,

d.3. Breakpoints are not supported in build 1589. This will be available
in a later build.

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
09-09-2006, 07:03 AM
j. File | Recent Projects should only display the last 15 "projects".
Include scripts are not projects and so are not listed in the Projects list.
I'll see if it is possible to add a Recent File list.

Friedrich

NewsArchive
09-09-2006, 07:06 AM
Hi Friedrich,

e.1) OR - thank you, I see it now.

g.3) "Copy Text to Clipboard" -- test, confirmed, thank you.

h) comma in a filename
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/fileio/fs/naming_a_file.asp
you are correct -- but still and interesting read.
Note: I found the above URL in my CW code to determine if a filename is
valid (let me know if you're interested in taking a peek)

NewsArchive
09-09-2006, 07:10 AM
Hi Mark,

> Note: I found the above URL in my CW code to determine if a filename
> is valid (let me know if you're interested in taking a peek)

That would be great.

The installer already includes a pathname verification (e.g. if your
company name is "Yadasoft, Inc." then the installer changes this to
"Yadasoft, Inc" at runtime.

Thanks,
Friedrich

NewsArchive
09-11-2006, 02:44 AM
Hi Jean-Pierre,

I would only create such a list for a program that I'm spending time on. I
would simply ignore a program that I felt was garbage. At best you'd see
sweeping comments from me after a short evaluation. Feel free to talk to
Clarion/TopSpeed/SV, UltraEdit, Carl Barnes and Randy Rogers all of whom
have received extensive lists from me over the years, but only on products
that I use.

As to language and uppercase., The uppercase part of the comment is that SB
does not allow CamelCaseVariableNames to help the source code reader find
the sub words in the variable name. My intended point with German was that
it is a language that concatentates multiple words together to create a new
word, hence I assume that people who are proficient in German are also
proficient at parsing long words for the sub words. Clearly my attempt at
self deprecating levity was missed, I'll try to be clearer in the future.

Mark

NewsArchive
09-11-2006, 02:44 AM
Hi Friedrich,

It seems to have to do with new projects never making it to the list. I
don't recall at the moment if it has to do with abnormal terminations before
hitting save, or selecting a different project before explicitly hitting
save.

For a while, I had forgotten about the tabs for the .sbi (it's odd what your
eye see's and misses). So I was closing the .sb5 opening the .sbi making a
small change and then going back to the .sb5 which was a pain to start with,
and even more of a pain without a recent file list. Especially since the
..sb5 and .sbi are in very different locations on disk.

-Mark

NewsArchive
09-11-2006, 02:44 AM
Hi Mark,

> It seems to have to do with new projects never making it to the list. I
> don't recall at the moment if it has to do with abnormal terminations
> before hitting save, or selecting a different project before explicitly
> hitting save.

We'll check the source code, thank you.

> For a while, I had forgotten about the tabs for the .sbi (it's odd what
> your eye see's and misses). So I was closing the .sb5 opening the .sbi
> making a small change and then going back to the .sb5 which was a pain
> to start with, and even more of a pain without a recent file list.
> Especially since the ..sb5 and .sbi are in very different locations on
> disk.

Yes, I know what you mean. Had to work on some .sbi files today and noticed
the same. I think a Project Files list would be a good solutions. I'll
give it some thoughts.

Thanks,
Friedrich

NewsArchive
09-11-2006, 02:44 AM
What the heck, I'll just post it here, looking back at the dates, this was
something I wrote (was writing?) just prior to my car crash.

Note: the code uses my version of the debuger class (one g), AssertHook2 is
used to make calls to OutputDebugString, with the filename and line number
prepended. Skip Williams, Russ Eggen and I are about to remerge the three
forks of the class (see recently active thread in Andrews Kitchen) In any
event, here is a MESSY, but recent version
www.monolithcc.com/clarion/debuger_0609_06.zip

Enjoy....
Mark

NewsArchive
09-11-2006, 02:45 AM
-- The following items are fixed/enhanced:

d.3
d.4
e.8
e.10
e.12
e.17 (was already fixed in an internal build)
i

-- We plan to fix/enhance the following items in the upcoming build:

b
c
d.1
d.2
e.2 (documentation)
e.5
e.14 (documentation)

-- Still in review:

e.11

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5

NewsArchive
09-11-2006, 02:45 AM
Woohoo, watch him go. ;-)

I'm a little surprised about e.2 (ExtractFolder) I was sure that this was a
bug.


I expected ExtractFolder(C:\yada\help.chm) To return [\yada] [\yada\] or
maybe [yada]
However if it means to Remove the folder, then I would expect it to return
C:help.chm
Which is an odd thing of dubious value.

The point being that fnsplit shows a (non-UNC) filename is built up of:
Drive Path BaseName Extension
Given the example: C:\yada\help.chm
Drive = C:
Path = \yada\
BaseName = help
Extension = .chm

The word extract has an implication for me of returning just the named item.

Also why do you have RemoveDriveLetter vs. ExtractDriveLetter -- this seems
inconsistent.

-- Mark

I apologize in advance to anyone feels like I'm beating this subject to
death...

NewsArchive
09-11-2006, 02:45 AM
Hi Mark,

>
> Woohoo, watch him go. ;-)
>

;-)

> I'm a little surprised about e.2 (ExtractFolder) I was sure that this was
> a bug.
>
> I expected ExtractFolder(C:\yada\help.chm) To return [\yada] [\yada\]
> or maybe [yada]
>
> However if it means to Remove the folder, then I would expect it to return
> C:help.chm
> Which is an odd thing of dubious value.
>
> The point being that fnsplit shows a (non-UNC) filename is built up of:
> Drive Path BaseName Extension
> Given the example: C:\yada\help.chm
> Drive = C:
> Path = \yada\
> BaseName = help
> Extension = .chm
>
> The word extract has an implication for me of returning just the named
> item.

Yes, I see what you mean. We have renamed "Extract Folder" to "Extract Full
Folder" now. The updated documentation says:

"Extract Full Folder - Returns the folder name from path String as a fully
qualified path with drive letter."

For example: "C:\yada\help.chm" returns "C:\yada"

> Also why do you have RemoveDriveLetter vs. ExtractDriveLetter -- this
> seems inconsistent.

RemoveDriveLetter returns a fully qualified filename without the drive
letter.

For example: "C:\yada\help.chm" returns "yada\help.chm"

ExtractDriveLetter would return C: only. BTW, this function is a good idea
and we have added it.

> I apologize in advance to anyone feels like I'm beating this subject to
> death...

No, you are not beating this subject to death!!!! :) We need this kind of
discussions and feedback, so we can continue to improve the SetupBuilder
product line.

If you still think the above does not make sense or if you have other ideas,
please let me know.

Thanks again for all your time!

Friedrich

NewsArchive
09-12-2006, 07:18 AM
Hi Friedrich,

Ohhhh, so ExtractFolder IS supposed to remove the basename and extension,
that's what I had guessed from the outset. OK, there is a bug, which made
me believe it did something else.

==============
Set Variable %ANSWER% to ScriptItem->Extract Folder(%PROGRAMFILESDIR%)
Send OutputDebugString "Answer[%ANSWER%] = Extract Folder
(%PROGRAMFILESDIR%)"


The above code has the result of:
Answer[C:] = Extract Folder (C:\Program Files)
==============

Clearly there is a problem here. My _guess_ is that ExtractFolder strips off
everything from the end of the string, working backwards until it encounters
a [\] or a [:] or the start of the string.

IMO, the problem has to do with distinguishing between folders names and
basename.extension.

Clearly every drive has a root, so when the input path starts with a drive
letter, the result should be (at a minimum) [<drive letter>:\]

Beyond that, the only way to know if part of the string is intended to be a
folder or a basename.extention would be to look at the drive that the path
points to. So, since [C:\Program Files] is a folder on the drive being
tested, then IMO the result should be [C:\Program Files]

See attached script.

- Mark Goldberg

PS -- I CANNOT get debug to work on this script. It just complains about
the debug mode, which I've set to every value. Hmm, while attaching the
script to this posting, I notice that there is a TestExtractFolder.dbg

NewsArchive
09-12-2006, 07:18 AM
Hi Mark,

Hmm, your script compiled and debugged without any problem here. I tested
it on 2 x XP, 2003 and x64 machines. What happens if you remove
TestExtractFolder.dbg and recompile/debug the script?

"Extract Full Folder" should extract the drive letter and extension from a
fully qualified filename (e.g. drive:\folder\file.extension). "Extract
File" should extract the filename and extension from a fully qualified
filename.

We'll check the "extract" functions again.

BTW, so what you need is a function to extract only the folder (no drive
letter, no filename) from a fully qualified filename? For example:
c:\folder\test\yada.txt should return only folder\test?

Thanks,
Friedrich

NewsArchive
09-12-2006, 07:18 AM
Hi Friedrich,

It always compiled fine, it just wouldn't debug.
Prior to deleting the .dbg, I figured I'd confirm the problem. Since I had
closed the .SB5 prior to attaching it to the NG's I had to open it again.
After that, I hit compile, and debug... of course it worked just fine now.
IOW, I cannot currently reproduce the bug.

The next time I run into this class of problem, I'll try deleting the .dbg
and see if that helps.

What I needed was [remove drive letter], which I found after I got the
surprising results from [extract folder].


Here is the script that I was working on. Be kind, it was first work with
SB, and there are some things I should change

a) I wasn't aware of script configuration variables
b) also I'd rename the output variable, but without a search and replace
it's too much of a pain
c) I'd like to have a conditional include for the Common Definitions.sbi
d) I should add another variable or two, to control which searches are made
INI, Phase I, Phase II
e) Basename is a bit of misnomer as it's basename.extension


Is there any concept of scope or namespaces?
I prepended MGFind to my variables to hope to avoid clashes.


Mark

PS - If anyone finds a bug in my script, or has any improvements, then
please let me know. Otherwise feel free to use it.

NewsArchive
09-12-2006, 07:18 AM
Hello Mark,

Friedrich left for an appointment. Please expect an answer by tomorrow
morning.

Andrea

Sales and Support, Lindersoft
www.lindersoft.com
1.954.252.3910

"point. click. ship" - that's SetupBuilder 5.5

NewsArchive
09-12-2006, 07:18 AM
Hello Mark,

> c) I'd like to have a conditional include for the Common Definitions.sbi

We checked this and in the new (internal) build it's allowed to add the
"Common Definitions.sbi" file more than once. The compiler handles this
automatically. In other words, you can use the #include script "Common
Definitions.sbi" from within your include script.

Andrea

Sales and Support, Lindersoft
www.lindersoft.com
1.954.252.3910

"point. click. ship" - that's SetupBuilder 5.5

NewsArchive
09-12-2006, 07:18 AM
Hi Andrea,

nice to "meet you"

Thanks, that sounds great.
I was (still am) getting duplicate errors when I #include that more than
once.
So assume that those will just go away.

Did you write a special case for "Common Definitions.sbi" or is this some
sort of more generalize solution?

Mark

NewsArchive
09-12-2006, 07:19 AM
Mark,

BTW, with regard to e.5)

We have added a new function to the IDE that lets you create your own
"Custom Script Items" list (see screenshot).

Friedrich

NewsArchive
09-12-2006, 07:19 AM
Sounds great, I can't wait to try it.
I also like the color on OutputDebugString -- thanks.

NewsArchive
09-12-2006, 07:27 AM
Hi Mark,

:)

It's a two line addition in the "Common Definitions.sbi" file (nothing
changed in the compiler). The script detects multiple-instances of itself
and then skips its own compilation. So no more duplicate errors when you
#include that file more than once.

Andrea

Sales and Support, Lindersoft
www.lindersoft.com
1.954.252.3910

"point. click. ship" - that's SetupBuilder 5.5

NewsArchive
09-12-2006, 07:48 AM
Hi Mark,

Very interesting script! Cool stuff...

The debugger process is again in review. Thank you for the info.

BTW, scope or namespaces are not supported.

Friedrich

NewsArchive
09-15-2006, 07:56 AM
Hi Mark,

I think we have fixed the debugger issue(s).

Thank you for your report.

Friedrich

--
Friedrich Linder
CEO, Lindersoft
www.lindersoft.com
+1.954.252.3910

"point. click. ship" - that's SetupBuilder 5