--- Bruce wrote:

> Is this a PowerPro error?  Can you duplicate it without using the
> script, it with some sequence of inputtext, inputtitle etc keywords?
> I had a quick look at the code and I don't see an obvious bug.

I'll attempt to duplicate this erroring tomorrow by writing a new
script, but this problem also occurred with Ravi and swzoh's scripts,
according to reports in older posts.

For what it's worth, I've gone over my script with a fine-toothed comb
and I can't see anything questionable that relates to this error.

> BTW, have you considered using a map to store aliases in your
> script,to possibly simplify the newline stuff?  Or possibly two
> vectors, one with the alias and one with the command. (A fancy
> approach with vectors is to use binary search on the names and
> doublesort to keep both vectors sorted the same)

I have not considered this because this would involve loading each
alias' script commands into the map, which would seemingly be a waste
of memory since the alias definitions exist in the script. Also, if
the user were to modify the script, these changes would not be
reflected until the user also rebuilt the map, and because more is
being read into memory and less lines are skipped, this would be much
slower.

This approach would definitely be advantageous however, if aliases
were guaranteed to be only one line in length, similar to Luciano's
script. The Add and Remove aliases would not be able to exist if this
approach were used though.

--- David wrote:

> Using the default arb.powerpro, delete the "Thes" entry. Gives a
> vector error, but deletes the item.

There's a very good chance that this happened because the Thes alias
did not exist in the auto-completion vector; is it possible that you
did not -rebuild- the alias cache between upgrading the script and
testing it, through .ARB("Rebuild") or the Rebuild alias?

This may have been due to what appears to be a bug with the Vec plugin
though.

> How about for all the arb commands, have them as arb_Add arb_Remove
> etc. Then once you know you want an arb command...just start typing
> that, and then you can down-arrow to the arb command you wanted.

Sounds acceptable to me�� if everyone else can handle me changing the
alias names around again! :-)

> I'm thinking that the arb is using a variable "AutoComplete" that is
> statically mapped, and inside powerpro you are using the variable
> "Autocomplete" for the different autocomplete options available with
> Input text etc. Maybe if arb wasn't using the variable with the name
> "Autocomplete" we wouldn't be having this clashing problem...as I
> think arb cleans up after itself, and clears the variable out from
> under powerpro.

The AutoComplete variable holds the handle to the AutoComplete vector,
which is what the InputDefault command uses. If two different names
were used, InputDefault would not know what entries to use for auto-
completion.

> Any of these variables clash with things internal to powerpro?
> Static ScriptPath = ...

ScriptPath is defined as a PowerPro expression but I don't see this
causing any trouble, since what PowerPro defines as ScriptPath is of
no use to the ARB script.

The other variable names do not clash.

--- Mockey wrote:

> I think the vector that is used for autocompletion by PowerPro
> should be a global one. Now AutoComplete is declared static at the
> start of the ARB-script and won't be found be the InputDefault then.

Once a variable is statically declared in a script, it will be defined
for any future calls to that script, including the @Add alias.

No static declaration exists for AutoComplete in the @Add alias
because it is guaranteed that the main script will have been executed
before any alias.

> Also you should better check for vectors with
> if (vec.exists(vectorname))
> not only
> if (vectorname)

I considered this and this is how I originally checked for the
existance of the auto-completion vector. However, if VectorName is not
equal to zero, then the vector must exist since the variable is only
touched on creation of the vector, and so my method should prove
slightly faster as it does not require a call to the Vec plugin for
what will only be the same result.

> Also:
> Vec.Grow(AutoComplete, 1) 
> is not necessary when you have 
> Vec.CreateFromLines(Aliases ++ History, 1)
> already.

This was added because PowerPro seemed to be ignoring the 1 in the
Vec.CreateFromLines() statement. However, future testing concludes
that PowerPro also seems to ignore Vec.Grow() for vectors created from
lines, and as such the last element of the vector was being
overwritten instead of a new one being created.

Cheers,
Alex

ICQ# 37414292



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Yahoo! Domains - Claim yours for only $14.70
http://us.click.yahoo.com/Z1wmxD/DREIAA/yQLSAA/JV_rlB/TM
---------------------------------------------------------------------~->

****  EDIT YOUR POSTINGS !!!! ****
Please remove as much as possible from original messages before replying to them.
________________________________________________ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
     http://groups.yahoo.com/group/power-pro/

<*> To unsubscribe from this group, send an email to:
     [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
     http://docs.yahoo.com/info/terms/
 

Reply via email to