Multiple errors when using TsSkinSelector.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38130
    JM-DG
    Participant

    o/ I'm using Delphi 7.

    I've had many weird behaviors/errors with the component TsSkinSelector.

    Sometimes, I can still use the control after the errors.

    Other time, the control becomes frozen & can't be used unless I relaunch the whole application.

    >>>It seems like this problem occurs because the Form has a formstyle of fsStayOnTop.<<< I tried to track down the bugs. So far, this is what I got: An error occurs in AnimShowPopup(). When we try to access 'if FormHandlers[GetFormIndex(aForm)].PopupCtrl <> nil then'

    GetFormIndex(aForm) returns us -1. Then we get an ERangeError.

    An easy fix would be to check if the value >= 0 before accessing the array.

    Code:
    HandlerIndex:= GetFormIndex(aForm);
    if(HandlerIndex >= 0) then
    if FormHandlers[HandlerIndex].PopupCtrl <> nil then

    Then we get another error with the shadows in procedure ShowForm().

    When we try to access 'if not TacShadowForm(FormHandlers[HandlerIndex].ShadowForm).FDestroyed then'

    FormHandlers[HandlerIndex].ShadowForm returns us nil.

    An easy fix would be to check if (HandlerIndex >= 0) before accessing the array and if FormHandlers[HandlerIndex].ShadowForm <> nil.

    Code:
    if HandlerIndex >= 0 then
    if FormHandlers[HandlerIndex].ShadowForm <> nil then
    if not TacShadowForm(FormHandlers[HandlerIndex].ShadowForm).FDestroyed then

    After doing these fix, the component is usable (doesn't crash every time I try to open it).

    However, from time to time, the component still freezes after changing the skin selection.

    I have attached a demo with the problem present.

    Thank you for your time.

    #58985
    Support
    Keymaster

    Thank you for the demo. Try the v14.14, this error is fixed there.

    #58997
    JM-DG
    Participant
    'Support' wrote:

    Thank you for the demo. Try the v14.14, this error is fixed there.

    Works like a charm. 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.