SRL Archive - Bugs

Bugs/small stuff found & suggestions...


Naike

2010-01-10 17:34:02

  • Value needs to represent the value :p
  • Note: If you click "Value" on any of them, you get the current value.. So possibly a misstype?
  • Maybe a possibility to have the functionlist filled with includes functions as well?.
  • Shortcut key for Updating the functionlist.
  • Add Function Round(value: extended): integer;
  • Add all the VarToVar functions.. (IntToStr, StrToInt, BoolToStr ect..)
  • Make the update (form/session thingy) TMemo not editable? OnlyRead := True.
  • Re-arrange the stuff in the updater? looked quite messy :/
  • Something like this? (Note: did the changes in PS :p ) :


Possibly more stuff to come..

Nava2

2010-01-10 18:28:40

From: N1ke!
  • Value needs to represent the value :p
  • Note: If you click "Value" on any of them, you get the current value.. So possibly a misstype? I believe this is being changed? This was mentioned before
  • Maybe a possibility to have the functionlist filled with includes functions as well?.
  • We are currently waiting on nielsie who is writing a better parser etc for us to use.
  • Shortcut key for Updating the functionlist.
  • Agreed.
  • Add Function Round(value: extended): integer;
  • Agreed.
  • Add all the VarToVar functions.. (IntToStr, StrToInt, BoolToStr ect..)
  • Agreed.
    Added:
    { Variable Conversion }
    AddFunction(@IntToStr, 'function IntToStr(value: Integer): String;');
    AddFunction(@FloatToStr, 'function FloatToStr(value: Extended): String;');
    AddFunction(@PointToStr, 'function PointToStr(value: TPoint): String;');
    AddFunction(@BoolToStr, 'function BoolToStr(value: Boolean): String;');
    AddFunction(@Round, 'function Round(e: Extended): Integer;');
    AddFunction(@trunc, 'function Trunc(e: Extended): Integer;');
    AddFunction(@StrToInt, 'function StrToInt(value: String): Integer;');
    AddFunction(@StrToIntDef, 'function StrToIntDef(value: String; default: Integer): Integer;');
    AddFunction(@StrToFloat, 'function StrToFloat(value: String): Extended;');
    AddFunction(@StrToFloatDef, 'function StrToFloatDef(value: String; default: Extended): Extended;');
    AddFunction(@StrToBool, 'function StrToBool(value: String): Boolean;');
    AddFunction(@StrToBoolDef, 'function StrToBoolDef(value: String; default: Boolean): Boolean;');

    Am I missing any?

    E: Not going to add.. :(
  • Make the update (form/session thingy) TMemo not editable? OnlyRead := True.
  • Agreed. Leaving it alone for now.
  • Re-arrange the stuff in the updater? looked quite messy :/
  • I like the old one :(, Wizzup's project though. Something like this? (Note: did the changes in PS :p ) :


Possibly more stuff to come..


Most of these should be in suggestions or in the Bug Tracker, just an FYI. Thanks a lot for contributing though.

Wizzup?

2010-01-10 18:44:15

The settings thing is intended. It made programming the settings MUCH easier. I guess it can always be changed later…

The VarToVar things + Function list are all part of the parser + completion.

Update form. Yeah, whatever suits most of the people I guess. It isn't hard to redesign it.

Shortcut: Hmm… Perhaps! I don't think it would be *that* useful. :p

Round: Yeah.

About - read only: Well, that TMemo is only temporarily. Better leave it at write so Raymond or I will actually change it to something more decent later. :p

Nava2

2010-01-10 19:16:27

Index: Units/MMLAddon/PSInc/psexportedmethods.inc
===================================================================
--- Units/MMLAddon/PSInc/psexportedmethods.inc (revision 394)
+++ Units/MMLAddon/PSInc/psexportedmethods.inc (working copy)
@@ -250,3 +250,18 @@
AddFunction(@SumIntegerArray,'function SumIntegerArray(Ints : TIntegerArray): Integer;');
AddFunction(@AverageTIA,'function AverageTIA(tI: TIntegerArray): Integer;');
AddFunction(@AverageExtended,'function AverageExtended(tE: TExtendedArray): Extended;');
+
+{ Variable Conversion }
+SetCurrentSection('Variable Conversion');
+AddFunction(@IntToStr, 'function IntToStr(value: Integer): String;');
+AddFunction(@FloatToStr, 'function FloatToStr(value: Extended): String;');
+AddFunction(@PointToStr, 'function PointToStr(value: TPoint): String;');
+AddFunction(@BoolToStr, 'function BoolToStr(value: Boolean): String;');
+AddFunction(@Round, 'function Round(e: Extended): Integer;');
+AddFunction(@trunc, 'function Trunc(e: Extended): Integer;');
+AddFunction(@StrToInt, 'function StrToInt(value: String): Integer;');
+AddFunction(@StrToIntDef, 'function StrToIntDef(value: String; default: Integer): Integer;');
+AddFunction(@StrToFloat, 'function StrToFloat(value: String): Extended;');
+AddFunction(@StrToFloatDef, 'function StrToFloatDef(value: String; default: Extended): Extended;');
+AddFunction(@StrToBool, 'function StrToBool(value: String): Boolean;');
+AddFunction(@StrToBoolDef, 'function StrToBoolDef(value: String; default: Boolean): Boolean;');
Index: Units/MMLCore/mufasatypesutil.pas
===================================================================
--- Units/MMLCore/mufasatypesutil.pas (revision 394)
+++ Units/MMLCore/mufasatypesutil.pas (working copy)
@@ -13,7 +13,12 @@

function ConvTPAArr(Arr: array of TPoint): TPointArray; overload;

+function PointToStr(value: TPoint): String;
+function Round(e: Extended): Integer; overload;
+function BoolToStr(value: Boolean): String; overload;

+
+
implementation

function ConvArr(Arr: array of TPoint): TPointArray; overload;
@@ -59,5 +64,20 @@
Move(Arr[Low(Arr)], Result[0], Len*SizeOf(Integer));
end;

+function PointToStr(value: TPoint): String;
+begin // feel free to return it differently.
+ result := format('(%d, %d)', [value.x, value.y]);
+end;
+
+function PointToStrEx(value: TPoint; theFormat: String): String;
+begin // feel free to return it differently.
+ result := format(theFormat, [value.x, value.y]);
+end;
+
+function BoolToStr(value: Boolean): String; overload;
+begin //capitalize or not to capitalize, that is the useless question.
+ result := BoolToStr(value, 'true', 'false');
+end;
+
end.

Index: Units/MMLCore/ocr.pas
===================================================================
--- Units/MMLCore/ocr.pas (revision 394)
+++ Units/MMLCore/ocr.pas (working copy)
@@ -68,6 +68,7 @@
const OCRDebugPath = '/tmp/';
{$ELSE}
const OCRDebugPath = '';
+
{$ENDIF}
{$ENDIF}
implementation
@@ -631,7 +632,7 @@

begin
result:='';
- ww := 400;
+ ww := 600;
hh := 20;

getTextPointsIn(atX, atY, ww, hh, shadow, chars, shadows);
Index: Projects/OCRBench/project1.lpi
===================================================================
--- Projects/OCRBench/project1.lpi (revision 394)
+++ Projects/OCRBench/project1.lpi (working copy)
@@ -7,7 +7,7 @@
<TargetFileExt Value=""/>
<Icon Value="0"/>
<UseXPManifest Value="True"/>
- <ActiveEditorIndexAtStart Value="7"/>
+ <ActiveEditorIndexAtStart Value="6"/>
</General>
<VersionInfo>
<ProjectVersion Value=""/>
@@ -45,7 +45,7 @@
<ResourceBaseClass Value="Form"/>
<UnitName Value="Unit1"/>
<CursorPos X="103" Y="81"/>
- <TopLine Value="67"/>
+ <TopLine Value="31"/>
<EditorIndex Value="0"/>
<UsageCount Value="67"/>
<Loaded Value="True"/>
@@ -82,8 +82,8 @@
<Unit5>
<Filename Value="../../Units/MMLCore/ocr.pas"/>
<UnitName Value="ocr"/>
- <CursorPos X="73" Y="16"/>
- <TopLine Value="1"/>
+ <CursorPos X="10" Y="635"/>
+ <TopLine Value="630"/>
<EditorIndex Value="6"/>
<UsageCount Value="34"/>
<Loaded Value="True"/>
@@ -100,8 +100,8 @@
<Unit7>
<Filename Value="../../Units/MMLCore/ocrutil.pas"/>
<UnitName Value="ocrutil"/>
- <CursorPos X="39" Y="208"/>
- <TopLine Value="1"/>
+ <CursorPos X="25" Y="46"/>
+ <TopLine Value="46"/>
<EditorIndex Value="3"/>
<UsageCount Value="33"/>
<Loaded Value="True"/>
@@ -198,8 +198,8 @@
<Filename Value="../../Units/MMLCore/fontloader.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="fontloader"/>
- <CursorPos X="34" Y="121"/>
- <TopLine Value="89"/>
+ <CursorPos X="31" Y="108"/>
+ <TopLine Value="1"/>
<EditorIndex Value="7"/>
<UsageCount Value="22"/>
<Loaded Value="True"/>
Index: Projects/SAMufasaGUI/project1.lpi
===================================================================
--- Projects/SAMufasaGUI/project1.lpi (revision 394)
+++ Projects/SAMufasaGUI/project1.lpi (working copy)
@@ -36,7 +36,7 @@
<PackageName Value="LCL"/>
</Item2>
</RequiredPackages>
- <Units Count="299">
+ <Units Count="300">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
@@ -137,8 +137,8 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/>
- <CursorPos X="91" Y="1135"/>
- <TopLine Value="1427"/>
+ <CursorPos X="29" Y="1146"/>
+ <TopLine Value="1129"/>
<EditorIndex Value="0"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
@@ -202,9 +202,9 @@
<Filename Value="../../Units/MMLCore/mufasatypes.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="MufasaTypes"/>
- <CursorPos X="58" Y="108"/>
- <TopLine Value="92"/>
- <EditorIndex Value="7"/>
+ <CursorPos X="5" Y="316"/>
+ <TopLine Value="280"/>
+ <EditorIndex Value="5"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
</Unit22>
@@ -258,7 +258,7 @@
<UnitName Value="finder"/>
<CursorPos X="1" Y="1832"/>
<TopLine Value="1819"/>
- <EditorIndex Value="4"/>
+ <EditorIndex Value="1"/>
<UsageCount Value="201"/>
<Loaded Value="True"/>
</Unit29>
@@ -281,8 +281,8 @@
<IsPartOfProject Value="True"/>
<UnitName Value="mmlpsthread"/>
<CursorPos X="52" Y="310"/>
- <TopLine Value="476"/>
- <EditorIndex Value="5"/>
+ <TopLine Value="49"/>
+ <EditorIndex Value="2"/>
<UsageCount Value="202"/>
<Loaded Value="True"/>
</Unit32>
@@ -342,9 +342,11 @@
</Unit40>
<Unit41>
<Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/>
- <CursorPos X="104" Y="36"/>
- <TopLine Value="22"/>
+ <CursorPos X="88" Y="27"/>
+ <TopLine Value="13"/>
+ <EditorIndex Value="7"/>
<UsageCount Value="97"/>
+ <Loaded Value="True"/>
</Unit41>
<Unit42>
<Filename Value="../../../FPC/FPCCheckout/rtl/win/tthread.inc"/>
@@ -794,9 +796,7 @@
<UnitName Value="ocr"/>
<CursorPos X="73" Y="142"/>
<TopLine Value="124"/>
- <EditorIndex Value="1"/>
<UsageCount Value="200"/>
- <Loaded Value="True"/>
</Unit107>
<Unit108>
<Filename Value="../../Units/PascalScript/uPSR_extctrls.pas"/>
@@ -1431,7 +1431,7 @@
<UnitName Value="colourhistory"/>
<CursorPos X="100" Y="72"/>
<TopLine Value="45"/>
- <EditorIndex Value="6"/>
+ <EditorIndex Value="4"/>
<UsageCount Value="200"/>
<Loaded Value="True"/>
</Unit198>
@@ -1706,7 +1706,7 @@
<UnitName Value="debugimageform"/>
<CursorPos X="20" Y="1"/>
<TopLine Value="1"/>
- <UsageCount Value="194"/>
+ <UsageCount Value="195"/>
</Unit238>
<Unit239>
<Filename Value="debugimage.pas"/>
@@ -1716,7 +1716,7 @@
<UnitName Value="debugimage"/>
<CursorPos X="66" Y="17"/>
<TopLine Value="1"/>
- <UsageCount Value="193"/>
+ <UsageCount Value="194"/>
</Unit239>
<Unit240>
<Filename Value="debugimage.lrs"/>
@@ -1838,7 +1838,7 @@
<UnitName Value="framefunctionlist"/>
<CursorPos X="117" Y="5"/>
<TopLine Value="1"/>
- <UsageCount Value="114"/>
+ <UsageCount Value="115"/>
</Unit257>
<Unit258>
<Filename Value="../../../usr/local/share/lazarus/lcl/comctrls.pp"/>
@@ -1870,9 +1870,11 @@
<Unit262>
<Filename Value="../../Units/MMLCore/mufasatypesutil.pas"/>
<UnitName Value="mufasatypesutil"/>
- <CursorPos X="69" Y="43"/>
- <TopLine Value="23"/>
- <UsageCount Value="6"/>
+ <CursorPos X="61" Y="62"/>
+ <TopLine Value="47"/>
+ <EditorIndex Value="6"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
</Unit262>
<Unit263>
<Filename Value="../../Units/MMLCore/ocrold.pas"/>
@@ -1893,7 +1895,7 @@
<UnitName Value="simpleanalyzer"/>
<CursorPos X="52" Y="104"/>
<TopLine Value="193"/>
- <UsageCount Value="101"/>
+ <UsageCount Value="102"/>
</Unit265>
<Unit266>
<Filename Value="../../Units/Misc/mPasLex.pas"/>
@@ -1951,9 +1953,11 @@
</Unit273>
<Unit274>
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
- <CursorPos X="90" Y="34"/>
- <TopLine Value="18"/>
+ <CursorPos X="62" Y="255"/>
+ <TopLine Value="227"/>
+ <EditorIndex Value="3"/>
<UsageCount Value="19"/>
+ <Loaded Value="True"/>
</Unit274>
<Unit275>
<Filename Value="../../Units/Synapse/synautil.pas"/>
@@ -1968,7 +1972,7 @@
<UnitName Value="updater"/>
<CursorPos X="112" Y="106"/>
<TopLine Value="68"/>
- <UsageCount Value="74"/>
+ <UsageCount Value="75"/>
</Unit276>
<Unit277>
<Filename Value="updateform.pas"/>
@@ -1976,10 +1980,10 @@
<ComponentName Value="SimbaUpdateForm"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="updateform"/>
- <CursorPos X="84" Y="153"/>
- <TopLine Value="162"/>
+ <CursorPos X="28" Y="24"/>
+ <TopLine Value="1"/>
<EditorIndex Value="8"/>
- <UsageCount Value="69"/>
+ <UsageCount Value="70"/>
<Loaded Value="True"/>
</Unit277>
<Unit278>
@@ -2101,18 +2105,14 @@
<UnitName Value="simbasettings"/>
<CursorPos X="26" Y="9"/>
<TopLine Value="1"/>
- <EditorIndex Value="2"/>
- <UsageCount Value="32"/>
- <Loaded Value="True"/>
+ <UsageCount Value="33"/>
</Unit295>
<Unit296>
<Filename Value="../../Units/MMLAddon/settings.pas"/>
<UnitName Value="settings"/>
<CursorPos X="56" Y="97"/>
<TopLine Value="69"/>
- <EditorIndex Value="3"/>
<UsageCount Value="15"/>
- <Loaded Value="True"/>
</Unit296>
<Unit297>
<Filename Value="../../../fpc/packages/unixutil/src/unixutils.pp"/>
@@ -2128,8 +2128,17 @@
<TopLine Value="1317"/>
<UsageCount Value="9"/>
</Unit298>
+ <Unit299>
+ <Filename Value="updateform.lfm"/>
+ <CursorPos X="1" Y="1"/>
+ <TopLine Value="1"/>
+ <EditorIndex Value="9"/>
+ <UsageCount Value="10"/>
+ <Loaded Value="True"/>
+ <SyntaxHighlighter Value="LFM"/>
+ </Unit299>
</Units>
- <JumpHistory Count="30" HistoryIndex="29">
+ <JumpHistory Count="22" HistoryIndex="21">
<Position1>
<Filename Value="testunit.pas"/>
<Caret Line="279" Column="21" TopLine="261"/>
@@ -2155,101 +2164,69 @@
<Caret Line="459" Column="65" TopLine="441"/>
</Position6>
<Position7>
- <Filename Value="../../Units/MMLAddon/settings.pas"/>
- <Caret Line="52" Column="37" TopLine="35"/>
+ <Filename Value="testunit.pas"/>
+ <Caret Line="406" Column="54" TopLine="379"/>
</Position7>
<Position8>
- <Filename Value="../../Units/MMLAddon/settings.pas"/>
- <Caret Line="67" Column="79" TopLine="35"/>
+ <Filename Value="testunit.pas"/>
+ <Caret Line="440" Column="31" TopLine="422"/>
</Position8>
<Position9>
<Filename Value="testunit.pas"/>
- <Caret Line="406" Column="54" TopLine="379"/>
+ <Caret Line="441" Column="24" TopLine="422"/>
</Position9>
<Position10>
<Filename Value="testunit.pas"/>
- <Caret Line="440" Column="31" TopLine="422"/>
+ <Caret Line="442" Column="36" TopLine="422"/>
</Position10>
<Position11>
<Filename Value="testunit.pas"/>
- <Caret Line="441" Column="24" TopLine="422"/>
+ <Caret Line="454" Column="44" TopLine="422"/>
</Position11>
<Position12>
<Filename Value="testunit.pas"/>
- <Caret Line="442" Column="36" TopLine="422"/>
+ <Caret Line="455" Column="30" TopLine="422"/>
</Position12>
<Position13>
<Filename Value="testunit.pas"/>
- <Caret Line="454" Column="44" TopLine="422"/>
+ <Caret Line="456" Column="40" TopLine="422"/>
</Position13>
<Position14>
- <Filename Value="testunit.pas"/>
- <Caret Line="455" Column="30" TopLine="422"/>
+ <Filename Value="updateform.pas"/>
+ <Caret Line="160" Column="87" TopLine="133"/>
</Position14>
<Position15>
<Filename Value="testunit.pas"/>
- <Caret Line="456" Column="40" TopLine="422"/>
+ <Caret Line="17" Column="94" TopLine="1"/>
</Position15>
<Position16>
- <Filename Value="updateform.pas"/>
- <Caret Line="160" Column="87" TopLine="133"/>
+ <Filename Value="testunit.pas"/>
+ <Caret Line="23" Column="48" TopLine="17"/>
</Position16>
<Position17>
<Filename Value="testunit.pas"/>
- <Caret Line="17" Column="94" TopLine="1"/>
+ <Caret Line="42" Column="30" TopLine="19"/>
</Position17>
<Position18>
- <Filename Value="../../Units/MMLAddon/settings.pas"/>
- <Caret Line="97" Column="56" TopLine="63"/>
+ <Filename Value="testunit.pas"/>
+ <Caret Line="39" Column="16" TopLine="19"/>
</Position18>
<Position19>
<Filename Value="testunit.pas"/>
- <Caret Line="23" Column="48" TopLine="17"/>
+ <Caret Line="298" Column="14" TopLine="280"/>
</Position19>
<Position20>
<Filename Value="testunit.pas"/>
- <Caret Line="42" Column="30" TopLine="19"/>
+ <Caret Line="557" Column="15" TopLine="531"/>
</Position20>
<Position21>
- <Filename Value="simbasettings.pas"/>
- <Caret Line="9" Column="26" TopLine="1"/>
+ <Filename Value="testunit.pas"/>
+ <Caret Line="298" Column="17" TopLine="280"/>
</Position21>
<Position22>
<Filename Value="testunit.pas"/>
- <Caret Line="39" Column="16" TopLine="19"/>
- </Position22>
- <Position23>
- <Filename Value="testunit.pas"/>
- <Caret Line="298" Column="14" TopLine="280"/>
- </Position23>
- <Position24>
- <Filename Value="testunit.pas"/>
- <Caret Line="557" Column="15" TopLine="531"/>
- </Position24>
- <Position25>
- <Filename Value="testunit.pas"/>
- <Caret Line="298" Column="17" TopLine="280"/>
- </Position25>
- <Position26>
- <Filename Value="../../Units/MMLCore/ocr.pas"/>
- <Caret Line="40" Column="31" TopLine="19"/>
- </Position26>
- <Position27>
- <Filename Value="testunit.pas"/>
<Caret Line="544" Column="14" TopLine="528"/>
- </Position27>
- <Position28>
- <Filename Value="../../Units/MMLAddon/settings.pas"/>
- <Caret Line="97" Column="56" TopLine="65"/>
- </Position28>
- <Position29>
- <Filename Value="../../Units/MMLAddon/settings.pas"/>
- <Caret Line="410" Column="22" TopLine="389"/>
- </Position29>
- <Position30>
- <Filename Value="../../Units/MMLAddon/settings.pas"/>
- <Caret Line="91" Column="37" TopLine="73"/>
- </Position30>
+ </Position22>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>

Wizzup?

2010-01-11 11:54:37

Fixed settings: http://mufasa.villavu.com/mantis/view.php?id=39
Will upload new binary later today, so you can see if it works for you too.

mastaraymond

2010-01-12 11:07:44

Yes, we need the functionlist update-shortcut.. Maybe even a timer, so it automatically updates. Suggestions for a shortcut key?

@Nava, Delphi's BoolToStr differs from the one we are used to.

Widget

2010-01-12 19:48:03

How about
program new;
function Str(x: variant): String;
begin
result := x;
end;

begin
Writeln(Str(5));
Writeln(Str(2+8));
Writeln(Str(False xor True));
end.
?

Nava2

2010-01-12 21:21:29

From: mastaraymond
Yes, we need the functionlist update-shortcut.. Maybe even a timer, so it automatically updates. Suggestions for a shortcut key?

@Nava, Delphi's BoolToStr differs from the one we are used to.


Hence why I had it set up to overload and be placed into PS.. buuut that didn't work.