Welcome, Guest
Username: Password: Remember me
Components and Libraries for Graphics Development, discussions, problems and suggestions.

TOPIC:

A number of patches 11 years 8 months ago #3412

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
New pl_ORCA 3.1

All publish properties are "string" type now
Internally all strings are "widestring"

Widestrings don't works on linux and FreeBSD

This is "win-win" scenario for Windows and Unix
We test 60% of ORCA 2D and 3D visual object to Win32/64, Lin32/64 and FreeBSD32/64

...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

A number of patches 11 years 8 months ago #3413

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor

sternas wrote: New pl_ORCA 3.1

All publish properties are "string" type now
Internally all strings are "widestring"

Widestrings don't works on linux and FreeBSD

This is "win-win" scenario for Windows and Unix
We test 60% of ORCA 2D and 3D visual object to Win32/64, Lin32/64 and FreeBSD32/64

...


Have you tried this:
www.freepascal.org/docs-html/rtl/cwstring/index.html

It supposedly should cure the widestring problems on Unix systems.

Because, you see, if the TD2Memo components does not contain widestring lines, internally all kind of things go wrong. TD2Memo is used internally in a number of places.

I'll have a look at your package coming monday.

Please Log in or Create an account to join the conversation.

A number of patches 11 years 8 months ago #3414

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor

RockyLuck wrote:
I could not really find the exact spot where it goes wrong. It's in destructor TD2Object.Destroy, where the index for FNotifyList runs out of bounds.

I think I found the cause of this problem.

It's quite subtle. At the end of the for loop in TD2Object.Destroy a notification is sent to "Self". That may remove "Self" from FNotifyList, making the index "i" outside the List Boundaries.

Enclosed the changed file.

Please Log in or Create an account to join the conversation.

Last edit: by RockyLuck.

A number of patches 11 years 8 months ago #3415

  • Silvestre
  • Silvestre's Avatar
  • Offline
  • New Member
  • New Member
  • Posts: 2
  • Thank you received: 1
Hi Sternas, RockLuck,

Your work is very helpful. :)

RockyLuck wrote:

RockyLuck wrote:
I could not really find the exact spot where it goes wrong. It's in destructor TD2Object.Destroy, where the index for FNotifyList runs out of bounds.

I think I found the cause of this problem.

It's quite subtle. At the end of the for loop in TD2Object.Destroy a notification is sent to "Self". That may remove "Self" from FNotifyList, making the index "i" outside the List Boundaries.

Enclosed the changed file.

The following user(s) said Thank You: RockyLuck

Please Log in or Create an account to join the conversation.

Last edit: by Silvestre.

A number of patches 11 years 8 months ago #3430

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor

sternas wrote: New pl_ORCA 3.1

All publish properties are "string" type now
Internally all strings are "widestring"

Widestrings don't works on linux and FreeBSD
...

I'm afraid using UTF-8 encoding for results to the caller (like in TD2TextControl.GetText) is not a good idea :S . UTF-8 strings are only usable in web pages, but cannot be used in programming, because one cannot index them to get at a certain position (UTF-8 uses a variable number of bytes to represent one character). So a program cannot determine the number of characters in a UTF-8 encoded string, without going through elaborate conversion.

Please, going back to the all widestring version of pl_ORCA, can you test my suggestion of including cwstring as the first module in the uses statement of scene2d.pas, scene3d.pas, orca_api_mesa.pas and orca_api_pangocairo.pas within the $IFDEF UNIX part:

For instance in scene2d.pas:
interface

uses
  {$IFDEF UNIX}
  cwstring,                                             // *** DB ***
  cairo, cairoXlib, xlib, x,xutil, gtk2def, gtk2proc, gtk2, gdk2, gdk2x, gdk2pixbuf, glib2,
  pango, orca_api_pangocairo,
  {$ENDIF}


In orca_scene2d.pas, you did not apply my change for the name of TCanvas in TOnPaintEvent from Canvas to ACanvas. It does generate a duplicate name error, as soon as you generate an OnPaint event, if that change is not applied. The same is true for the TD3PaintEvent in orca_scene3d.pas.

Cheers ;-}
Dick

Please Log in or Create an account to join the conversation.

A number of patches 11 years 8 months ago #3431

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
My friend
Yes, we test cwstring unit suggestion but the Unix problem remain.

Lazarus uses UTF-8, not ANSI and not WideString (UTF-16/UCS-2).

Now new ORCA:
Internally use WideString (Property TextW:WideString read GetTextW write SetTextW)
Externally for Lazarus IDE use UTF-8 (Property Text:String read GetText write SetText)

For the conversions we use UTF8Encode and UTF8Decode LCL functions

With this ORCA works on Windows, Linux, FreeBSD etc

We will add your fixes to next rolling release.
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

A number of patches 11 years 8 months ago #3432

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor

sternas wrote: My friend
Yes, we test cwstring unit suggestion but the Unix problem remain.


Can you describe the Unix problem, you're having? I searched the web and could not find any WideString problem in relation to Unix where cwstring did not help.

sternas wrote: Lazarus uses UTF-8, not ANSI and not WideString (UTF-16/UCS-2).

I never knew that. It generates quite some compatibility problems then. To show you why, look at the attached very simple program. Runs without a problem in Delphi showing for each character in Edit1.Text the decimal value. In Lazarus all sort of things go wrong.

sternas wrote: Now new ORCA:
Internally use WideString (Property TextW:WideString read GetTextW write SetTextW)
Externally use UTF-8 (Property Text:String read GetText write SetText)

Given the use of UTF8 in Lazarus, this is the best choice indeed. :cheer:

However, there are a lot more properties to change then. For instance TD2CustomTextBox.SelText. And I'm sure there are many others, if you look closely for widestring properties in orca_scene2d.pas and orca_scene3d.pas


sternas wrote: For the conversions we use UTF8Encode and UTF8Decode LCL functions

This is just a guess B) : if there are locale dependent elements in the strings to be converted, you probably still need to include cwstring for the Unix implementations.

Finally, one of the new modules contains a typo:

procedure TD2Label.SetText(const Value: String); // 7777
 var ss:WideString;
begin
  ss:=UTF8Decode(Value);

//if Value <> ss then                 // *** DB ***
  if FText <> ss then                 // *** DB ***
  begin
    inherited;
    if FAutoSize then
      ApplyStyle;
  end
  else
    inherited;
end;


Have a nice day!!
Dick
Attachments:

Please Log in or Create an account to join the conversation.

A number of patches 11 years 8 months ago #3433

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
And some screens of ORCA 3.2.1 CodeOcean samples
from current CT 4.10

-Debian32 6.06 GNOME 2
-OpenSuse64 12.2 KDE

the beauty of CodeTyphon Development Studio...
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Last edit: by Sternas Stefanos.

pl_Orca package needs two requirements 11 years 8 months ago #3435

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor

RockyLuck wrote: Package pl_Orca, when compiled in a Windows environment, needs two extra package requirements, in order to compile:

pl_Win_DirectX and pl_Win_DirectX11


This is still the case in your latest installment. Please add these, just like you have added pl_opengl as a requirement

Please Log in or Create an account to join the conversation.

Proposed improvements / bug fixes 11 years 8 months ago #3436

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor
Friends,

Here are a couple of fixes.

Module orca_scene2d_popups.inc goes wrong in TD2PopupBox.SetText, because the inherited method requires a String, not a WideString (also a little optimization added):

procedure TD2PopupBox.SetText(const Value: String); // 7777
 var ss:WideString;
begin
//ss:=UTF8Decode(Value);                 // *** DB ***

  if FItems.Count > 0 then
  begin
    ss:=UTF8Decode(Value);               // *** DB ***
    FItemIndex := Items.IndexOf(ss);
    if FItemIndex >= 0 then
//    inherited SetText(ss)  // wrong type! *** DB ***     
      inherited SetText(Value)           // *** DB ***
    else
      inherited SetText('')
  end
  else
  begin
    FItemIndex := -1;
    inherited SetText('')
  end;
end;

This brings me to a possible huge performance improvement.
Suppose SetText of TD2TextControl would be overloaded as follows:

    procedure SetText(const Value: String); virtual; overload;
    procedure SetText(const Value: WideString); virtual; overload;

then many functions could suffice with inheriting SetText with the WideString parameter.

Which brings me to the function TD2TextControl.SetText itself:

procedure TD2TextControl.SetText(const Value: String); // 7777
var
  T: TD2Object;
  var ss:WideString;
begin
  ss:=UTF8Decode(Value);

  if FText <> ss then
  begin
    FText := ss;
    T := FindResource('text');
    if (T <> nil) and (T is TD2Text) then
    begin
//    TD2Text(T).Text := FText; // Wrong type *** DB ***  
      TD2Text(T).Text := Value;            // *** DB ***
      TD2Text(T).UpdateEffects;
    end
    else
      if (FResourceLink <> nil) and (FResourceLink is TD2Text) then
//      TD2Text(FResourceLink).Text := FText // Wrong type *** DB ***
        TD2Text(FResourceLink).Text := Value            // *** DB ***
      else
        Repaint;

    UpdateEffects;
  end;
end;

Another typo, this time in orca_scene2d_obj_memo.inc:

procedure TD2Memo.SetText(const Value: String); // 7777
 var ss:WideString;
begin
  ss:=UTF8Decode(Value);

  if not ValidText(ss) then Exit;

  if ss <> FText then
  begin
    if (ss <> '') and (CharCase <> d2ecNormal) then
      case CharCase of
        d2ecUpperCase: FText := WideUpperCase(ss);
//      d2ecLowerCase: FText := WideUpperCase(ss);              // *** DB ***
        d2ecLowerCase: FText := WideLowerCase(ss);              // *** DB ***

      end
    else
      FText := ss;

    if FInternalMustUpdateLines then
    begin
      UpdateLines;
      if not FUpdating then Realign;
    end;

    if not (csLoading in ComponentState) and Assigned(OnChangeTracking) then
      OnChangeTracking(Self);
    FNeedChange := true;
  end;
end;

Every time there is an assignment to a Text property or a reference of a Text property, you should be careful:

procedure TD2LangDesigner.RebuildOriginalList;
var
  i: integer;
  Str: TD2WideStrings;
  Item: TD2ListboxItem;
begin
  OriginalList.Clear;
  if FLang.Original.Count = 0 then
  begin
    // create original from Collection
    CollectLangStart;
    UpdateLang;
    FLang.Original.Assign(CollectLangStrings);
    CollectLangFinish;
  end;
  Str := FLang.Original;
  for i := 0 to Str.Count - 1 do
  begin
    Item := TD2ListboxItem.Create(Self);
    Item.AutoTranslate := false;
    Item.Resource := 'langitem';
//  Item.Text := Str[i];                     // *** DB ***
    Item.Text := UTF8Encode(Str[i]);         // *** DB ***
    Item.TextAlign := d2TextAlignCenter;
    Item.Height := 22;
    Item.Parent := OriginalList;
    if (FLang.Resources.Count > 0) and (langList.ItemIndex >= 0) then
    begin
//    if FLang.LangStr[langList.Text] <> nil then              // *** DB ***
      if FLang.LangStr[UTF8Decode(langList.Text)] <> nil then  // *** DB ***
      begin
//      Item.Binding['translate'] := FLang.LangStr[langList.Text].Values[Str[i]];             // *** DB ***
        Item.Binding['translate'] := FLang.LangStr[UTF8Decode(langList.Text)].Values[Str[i]]; // *** DB ***
        Item.Binding['translate'] := EventToVariant(DoTranslateChanged);
      end;
    end
    else
      Item.FindBinding('translate').Visual.Visible := false;
  end;
end;

I'm sure you can find numerous other places that need some similar work. ;)

Good luck with it! B)

Greetings,

Dick

Please Log in or Create an account to join the conversation.

Last edit: by RockyLuck.

WideString and UTF8 fixes 11 years 8 months ago #3553

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor
I have identified a number of other places where the UTF8 vs. WideString problem surfaces.

In module orca_scene2d_obj_images.inc, because TD2DragObject.Files[0] is a WideString:

procedure TD2ImageControl.DragOver(const Data: TD2DragObject;
  const Point: TD2Point; var Accept: Boolean);
begin
  inherited;
  // accept correct image file or TD2Image
  Accept :=
      ((Length(Data.Files) > 0) and 
//    FileExists(Data.Files[0]) and                  // *** DB ***
      FileExistsUTF8(UTF8Encode(Data.Files[0])) and  // *** DB ***
      (Pos(ExtractFileExt(Data.Files[0]), GvarD2DefaultFilterClass.GetFileTypes) > 0))
    or
      (Data.Source is TD2Image);
end;

In module orca_scene2d_obj_listboxes.inc:

procedure TD2ImageListBox.AddFolder(const Folder: string);
var
  Dir: string;
  SR: TSearchRec;
begin
  { add folder }
  { add SelectDialog }
  Dir := Folder;
  {$IFDEF UNIX}
  if (Length(Dir) > 0) and (Dir[Length(Dir)] <> '/') then Dir := Dir + '/';
  {$ELSE}
  if (Length(Dir) > 0) and (Dir[Length(Dir)] <> '\') then Dir := Dir + '\';
  {$ENDIF}
  BeginUpdate;
//if FindFirst(Dir + '*.*', $FFFF, SR) = 0 then      // *** DB ***
  if FindFirstUTF8(Dir + '*.*', $FFFF, SR) = 0 then  // *** DB ***
  begin
    repeat
      if SR.Name = '.' then Continue;
      if SR.Name = '..' then Continue;
      if SR.Attr and faDirectory = faDirectory then Continue;
      AddFile(Dir + SR.Name);
//  until FindNext(SR) <> 0;                     // *** DB ***
//  FindClose(SR);                               // *** DB ***
    until FindNextUTF8(SR) <> 0;                 // *** DB ***
    FindCloseUTF8(SR);                           // *** DB ***
  end;
  EndUpdate;
  if Count > 0 then
    ItemIndex := 0;
end;

In orca_scene2d.pas, the use clause contains ShellAPI and Commctrl. These modules are not used.

Furthermore in orca_scene2d_fn_lang.inc:

procedure LoadLangFromFile(AFileName: string);
begin
//if not FileExists(AFileName) then Exit;      // *** DB ***
  if not FileExistsUTF8(AFileName) then Exit;  // *** DB ***
  ResetLang;
  if varD2Lang = nil then
  begin
    varD2Lang := TD2WideStringList.Create;
    varD2Lang.Sorted := true;
    TD2WideStringList(varD2Lang).CaseSensitive := true;
  end;
  varD2Lang.LoadFromFile(AFileName);
  UpdateLang;
end;

In orca_scene2d_bitmaps.inc:

procedure TD2Bitmap.LoadFromFile(const AFileName: string; const Rotate: single = 0);
var
  Filter: TD2Filter;
begin
//if not FileExists(AFileName) then Exit;         // *** DB ***
  if not FileExistsUTF8(AFileName) then Exit;     // *** DB ***
  Filter := GvarD2DefaultFilterClass.Create;
  if Filter.LoadFromFile(AFileName, Rotate, Self) then
    if Assigned(FOnChange) then FOnChange(Self);
  Filter.Free;
end;

In orca_scene2d_resources.inc:

procedure TD2Resources.Loaded;
begin
  inherited ;
  if FFileName = '' then Exit;
//if FileExists(ExtractFilePath(ParamStr(0)) + FFileName) then      // *** DB ***
  if FileExistsUTF8(ExtractFilePath(ParamStr(0)) + FFileName) then  // *** DB ***
    FResource.LoadFromFile(ExtractFilePath(ParamStr(0)) + FFileName)
  else
//  if FileExists(FFileName) then                                   // *** DB ***
    if FileExistsUTF8(FFileName) then                               // *** DB ***
      FResource.LoadFromFile(FFileName);
end;

.
.
.

procedure TD2Resources.SetFileName(const Value: string);
begin
  if FFileName <> Value then
  begin
    FFileName := Value;
    if not (csLoading in ComponentState) then
    begin
//    if FileExists(ExtractFilePath(ParamStr(0)) + FFileName) then        // *** DB ***
      if FileExistsUTF8(ExtractFilePath(ParamStr(0)) + FFileName) then    // *** DB ***
        FResource.LoadFromFile(ExtractFilePath(ParamStr(0)) + FFileName)
      else
//      if FileExists(FFileName) then                                     // *** DB ***
        if FileExistsUTF8(FFileName) then                                 // *** DB ***
          FResource.LoadFromFile(FFileName);
    end;
  end;
end;

In orca_scene2d_bitmaps.inc:

procedure TD2Bitmap.LoadFromFile(const AFileName: string; const Rotate: single = 0);
var
  Filter: TD2Filter;
begin
//if not FileExists(AFileName) then Exit;         // *** DB ***
  if not FileExistsUTF8(AFileName) then Exit;     // *** DB ***
  Filter := GvarD2DefaultFilterClass.Create;
  if Filter.LoadFromFile(AFileName, Rotate, Self) then
    if Assigned(FOnChange) then FOnChange(Self);
  Filter.Free;
end;

In orca_scene2d_lang.inc:

procedure TD2Lang.Loaded;
var
  L: string;
begin
  inherited;
//if (FFileName <> '') and (FileExists(ExtractFileName(ParamStr(0)) + FFileName)) then     // *** DB ***
  if (FFileName <> '') and (FileExistsUTF8(ExtractFileName(ParamStr(0)) + FFileName)) then // *** DB ***
    LoadFromFile(ExtractFileName(ParamStr(0)) + FFileName);
  if FAutoSelect then
    GetLanguageIDs(L, FLang);
  if FLang <> '' then
    LoadLangFromStrings(LangStr[FLang]);
end;

.
.
.

procedure TD2Lang.LoadFromFile(AFileName: string);
var
  S: TFileStream;
begin
//if FileExists(AFileName) then         // *** DB ***
  if FileExistsUTF8(AFileName) then     // *** DB ***
  begin
    S := TFileStream.Create(AFileName, fmOpenRead);
    ReadResources(S);
    S.Free;
  end;
end;

In orca_scene2d_popups.inc there's a strange looking condition (which maybe right, but still it's obscure):

procedure TD2PopupForm.WMDeactivate(var Msg: TLMActivate);
var
  C: TWinControl;
begin
  inherited ;
//if (not Msg.Active=0) and (FPopup <> nil) and (not FPopup.StaysOpen) then  // *** DB ***
  if (Msg.Active <> 0) and (FPopup <> nil) and (not FPopup.StaysOpen) then   // *** DB ***
  begin
    C := FindControl(Msg.ActiveWindow);
.
.
.

Thanks guys ;-}

Dick

Please Log in or Create an account to join the conversation.

Preventing a SIGSEGV exception in pl_ORCA 11 years 8 months ago #3556

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor
In topic 3414 I tried to fix a bug. But that fix was not sufficient. There is another place where things can go wrong. It is a matter of timing in module orca_scene2d_scene.inc, where "FStyle.RemoveSceneUpdater(Self);" is called in the TD2CustomScene.Destroy destructor, which may be too late, because TD2CustomScene does not own the TD2Resources that the style property refers to. So, in this piece of code:

destructor TD2CustomScene.Destroy;
begin
  if FHovered <> nil then
  begin
    TD2VisualObject(FHovered).RemoveFreeNotify(Self);
    FHovered := nil;
  end;
  if FFocused <> nil then
  begin
    TD2VisualObject(FFocused).RemoveFreeNotify(Self);
    FFocused := nil;
  end;
//if FStyle <> nil then                   // *** DB ***
//  FStyle.RemoveSceneUpdater(Self);      // *** DB ***
  if GvarD2SceneCount = 0 then
  begin
    if GvarD2aniThread <> nil then

the offending statements are removed and placed here:

procedure TD2CustomScene.DestroyWnd;
begin
                   // *** DB *** On other places we may be too late.
                   //            TD2CustomScene.Destroy tried to
                   //            do this, but TD2Resources placed
                   //            on the same form as TD2Scene may
                   //            already be destroyed without being
                   //            nilled.
  if FStyle <> nil then begin         // *** DB ***
     FStyle.RemoveSceneUpdater(Self); // *** DB ***
     FStyle := nil;                   // *** DB ***
  end{if};                            // *** DB ***

  {$ifdef windows}
  if Canvas <> nil then
    Canvas.Handle := 0;
  {$endif}
  {$IFNDEF UCL}
  {$IFdef WINDOWS}
  if HandleAllocated then
    RevokeDragDrop(Handle);
  if PtrInt(SetWindowLongPtrW(Self.Handle, GWL_WNDPROC, PtrInt(@WndCallback))) = PtrInt(@WndCallback) then
    SetWindowLongPtrW(Self.Handle, GWL_WNDPROC, PtrInt(@PrevWndProc));
  {$ENDIF}
  {$ENDIF}
  inherited ;
end;

In order for this to work on all platforms, this little change is needed as well in orca_scene2d.pas in the properties of TD2CustomScene:

protected
    FUpdateRects: array of TD2Rect;
    procedure CreateHandle; override;
    {$IFDEF WINDOWS}
    procedure CreateWnd; override;
//  procedure DestroyWnd; override;              // *** DB ***
    {$ENDIF}
    procedure DestroyWnd; override;              // *** DB *** (is a method from TWinControl, so present in all platforms)
    procedure InitiateAction; override;
    procedure Loaded; override;
    procedure Resize; override;

Have a nice day!

Dick

Please Log in or Create an account to join the conversation.

TD2StringListBox is crazy 11 years 7 months ago #3572

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor
TD2StringlistBox does not behave as expected when you Assign a TStringList to its Items:

D2StringListBox.Items.Assign(StringList);

The strings will be assigned in totally random order!!!

See the example. Click the Open button to load a non trivial Ascii file. The program adds line numbers to show the horrible result :ohmy:

Please Log in or Create an account to join the conversation.

TD2StringGrid will abort on skin changing 11 years 7 months ago #3611

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor
The accompanying project shows a very serious bug in Orca's grids. The example uses a TD2StringGrid, but I think all grids have this problem: you cannot switch styles for a scene if a grid is placed on it :huh: . It will throw a SIGSEGV violation.

Try it with the test project: checking the check box labeled "Vista" will switch the style from Extreme to Vista and produce the access violation immediately.

The problem is in module orca_scene2d_obj_grids.inc in procedure TD2CustomGrid.UpdateSelection in the line 691:

    TD2VisualObject(FSelections[i]).Visible := Vis;

Apparently the FSelections[ i ] element does not point to a complete TD2VisualObject (only the first part seems to be there).
Attachments:

Please Log in or Create an account to join the conversation.

No response since a month 11 years 7 months ago #3612

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor
I didn't get any response on my bug lists in over a month. Do you appreciate my testing or should I stop?

Please Log in or Create an account to join the conversation.

No response since a month 11 years 7 months ago #3613

  • Sternas Stefanos
  • Sternas Stefanos's Avatar
  • Away
  • Moderator
  • Moderator
  • Ex Pilot, M.Sc, Ph.D
  • Posts: 4535
  • Thank you received: 1114
No no Sir
We test all your fixes.
We have to many work with upcoming CT ver 4.20 :ohmy:
PilotLogic Architect and Core Programmer

Please Log in or Create an account to join the conversation.

Bugs found in pl_Orca 11 years 7 months ago #3614

  • Dibo
  • Dibo's Avatar
  • Offline
  • Junior Member
  • Junior Member
  • Posts: 37
  • Thank you received: 1
About orca issues. Don't know if someone reported this but on GTK 64 bit text edits don't work, cursor is changing position but there is no text

Please Log in or Create an account to join the conversation.

No response since a month 11 years 7 months ago #3615

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor

sternas wrote: No no Sir
We test all your fixes.
We have to many work with upcoming CT ver 4.20 :ohmy:


Fair enough, Sternas. Keep up the good work :cheer:

Please Log in or Create an account to join the conversation.

Bugs found in pl_Orca 11 years 7 months ago #3616

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor

dibo wrote: About orca issues. Don't know if someone reported this but on GTK 64 bit text edits don't work, cursor is changing position but there is no text


The text color may be the same as the background. Did you adjust the "fill" property of the TD2Text element? You can do this by right clicking the component and choosing "Edit Default Style". Then in the TD2Text element edit the Fill property.

Please Log in or Create an account to join the conversation.

List index out of bounds in GradientAnimation 11 years 7 months ago #3675

  • RockyLuck
  • RockyLuck's Avatar Topic Author
  • Visitor
  • Visitor
A bug in orca_scene2d_obj_animations.inc in TD2GradientAnimation.ProcessAnimation may cause an list index out of bounds.

This is the correction:

//        if (i < FStopGradient.Points.Count) or (i < FStartGradient.Points.Count) then       *** DB ***
          if (i < FStopGradient.Points.Count) and (i < FStartGradient.Points.Count) then      *** DB ***
            Points[i].Color := d2ColorToStr(d2InterpolateColor(d2StrToColor(FStartGradient.Points[i].Color),
              d2StrToColor(FStopGradient.Points[i].Color), NormalizedTime));

As you can see, if the number of points in FStartGradient is unequal to the number of points in FStopGradient, the index in the points array for the one or the other will go out of bounds.

Bye ;)

Please Log in or Create an account to join the conversation.