Forum Replies Created
-
AuthorPosts
-
tmorrisParticipant
This is the source of the problem. It is related to hints. The other array for which you moved the initialization code:
procedure TsDBNavigator.SetHints(Value: TStrings);
begin
if Value.Text = FDefHints.Text then
FHints.Clear
else
FHints.Assign(Value);
end;
There are situations where a nil pointer is being passed as “Value” at design time. The modification below fixed it for me.
procedure TsDBNavigator.SetHints(Value: TStrings);
begin
if value <> nil then
begin
if Value.Text = FDefHints.Text then
FHints.Clear
else
FHints.Assign(Value);
end;
end;
I am using XE6.
tmorrisParticipant'Support' wrote:Hello!
Try this patched file, please.
Sorry. Does not fix the problem. Did you try the example project I uploaded?
November 3, 2014 at 11:11 pm in reply to: AV When Using sDBNavigator With Custom Buttons, v9.16 #52703tmorrisParticipant'Support' wrote:Thank you for the demo, try this patched file, please.
Yes that works. Thanks.
October 29, 2014 at 9:46 pm in reply to: AV When Using sDBNavigator With Custom Buttons, v9.16 #52690tmorrisParticipantI'm sorry. Spoke too soon. There is still an issue of the buttons array being referenced before being created. Attached is an example of a sDBNavigator not visible but attached to a dataset. It is on the second tabsheet. Pressing insert record triggers the dataset to tell all the attached controls to update. However since the 'hidden' sDBnavigator has not been initialized (buttons/hints?) it throws an AV. The AV is thrown in the TsDBNavigator.EditingChanged procedure.
October 23, 2014 at 10:16 pm in reply to: AV When Using sDBNavigator With Custom Buttons, v9.16 #52674tmorrisParticipantJust confirming. Above issues appear to be resolved in v9.17. Thanks!
October 15, 2014 at 10:19 pm in reply to: AV When Using sDBNavigator With Custom Buttons, v9.16 #52607tmorrisParticipantAlso, just an annoyance with the sDBNavigator unit. Is it necessary to explicitly load the DBCtrls.res resource? I keep getting duplicate resource warnings with this in there:
{$IFDEF DELPHI_XE2}
{$R DBCtrls.res}
{$ENDIF}
I know it was added when the code for using the vanilla button icons was added. I guess there might be cases where they are not loaded and then need to be loaded explicitly?
Thanks.
October 15, 2014 at 10:04 pm in reply to: AV When Using sDBNavigator With Custom Buttons, v9.16 #52606tmorrisParticipant'tmorris' wrote:Also ran into the same issue where the button array of objects are not initialized in the DataChanged procedure. Attached is a demo of where the dataset datachanged event is triggering before the buttons are initialized in the CreateWnd procedure. It throws an AV.
You might want to check all the code in sDBNavigator that references the Buttons array (now that it has been moved out of the navigator object's Create constructor ) and make sure that procedures that might be invoked prior to the CreateWnd procedures are not referencing null objects.
Good luck!
(Sorry, keep forgetting to hit attach.)
October 15, 2014 at 10:03 pm in reply to: AV When Using sDBNavigator With Custom Buttons, v9.16 #52605tmorrisParticipant'Support' wrote:Hello, thank you for the message.
Try attached file, the error is fixed there.
Also ran into the same issue where the button array of objects are not initialized in the DataChanged procedure. Attached is a demo of where the dataset datachanged event is triggering before the buttons are initialized in the CreateWnd procedure. It throws an AV.
You might want to check all the code in sDBNavigator that references the Buttons array (now that it has been moved out of the navigator object's Create constructor ) and make sure that procedures that might be invoked prior to the CreateWnd procedures are not referencing null objects.
Good luck!
October 15, 2014 at 8:25 pm in reply to: AV When Using sDBNavigator With Custom Buttons, v9.16 #52604tmorrisParticipantThanks. That fixed that issue. However it looks like you have the same issue with the InitHints procedure. If any of the button hints are changed from default you get an AV in the InitHints as the buttons array has not yet been initialized.
August 27, 2014 at 11:41 pm in reply to: Possible Corrupted Glyphs in sDBNavigator, XE6 Only. #52367tmorrisParticipant'tmorris' wrote:Spoke too soon. Seeing the same glitch with the next button on a different project. Not able to pinpoint what is different but will investigate some more.
Attached is a demo. It appears that rendering the glyphs when there are active records exposes the problem.
August 27, 2014 at 11:28 pm in reply to: Possible Corrupted Glyphs in sDBNavigator, XE6 Only. #52366tmorrisParticipantSpoke too soon. Seeing the same glitch with the next button on a different project. Not able to pinpoint what is different but will investigate some more.
August 27, 2014 at 10:34 pm in reply to: Possible Corrupted Glyphs in sDBNavigator, XE6 Only. #52365tmorrisParticipantThere is still an issue with the Insert/'+' glyph. It appears to 'wrap-around'. You can still see this behavior in the test project I uploaded earlier.
I modified the sDBRes.res file and increased the width from 13 to 15, re-centered the 'plus'. Not sure this is the best fix but it appears to work.
IPSteven: I tried to test your situation but could not duplicate the issue. It looks fine for me with both those skins.
Using:
9.13, 32-bit, XE6, Win7-64bit.
tmorrisParticipant'tmorris' wrote:Attached is a small demo that shows corrupted glyphs (3) on the sDBNavigator. Happens only in XE6 when connected to an active dataset. XE5 is fine. Also does not matter if the skin manager is present or not. Please verify if you see the same behavior. I have not had a chance to test on a fresh install that only has XE6 installed.
I may have found the issue. I noticed your glyphs in the resource file are 4-bit. However in the TsDBNavigator.InitButtons procedure you set the PixelFormat to 24 bit:
Btn.Glyph.PixelFormat := pf24bit;
Changing it to match the actual glyph format appears to fix the issue:
Btn.Glyph.PixelFormat := pf4bit;
tmorrisParticipantRe-posting attachment.
tmorrisParticipantThat fixed it. Thanks.
tmorrisParticipant'tmorris' wrote:Just got around to testing the posted acLFPainter unit. There is still a small problem. Easily fixed. There is one more missing parameter:
APart: TcxButtonPart = cxbpButton
So the DrawButton declaration should look like this:
procedure DrawButton(ACanvas: TcxCanvas; R: TRect; const ACaption: string; AState: TcxButtonState;
ADrawBorder: Boolean = True; AColor: TColor = clDefault; ATextColor: TColor = clDefault;
AWordWrap: Boolean = False; AIsToolButton: Boolean = False; APart: TcxButtonPart = cxbpButton); override;
This matchs up with what is in the VCL 13.2.2 cxLookAndFeelPainters.pas
Works fine otherwise.
**Update**
My mistake. You have the missing parameter. The problem is with the complier directives. The parameter is being ignored because the
directive: “{$IFNDEF VER12_2_3}”. I think this has to do with the versioning issue I mentioned earlier.
tmorrisParticipantJust got around to testing the posted acLFPainter unit. There is still a small problem. Easily fixed. There is one more missing parameter:
APart: TcxButtonPart = cxbpButton
So the DrawButton declaration should look like this:
procedure DrawButton(ACanvas: TcxCanvas; R: TRect; const ACaption: string; AState: TcxButtonState;
ADrawBorder: Boolean = True; AColor: TColor = clDefault; ATextColor: TColor = clDefault;
AWordWrap: Boolean = False; AIsToolButton: Boolean = False; APart: TcxButtonPart = cxbpButton); override;
This matchs up with what is in the VCL 13.2.2 cxLookAndFeelPainters.pas
Works fine otherwise.
tmorrisParticipantThanks for the quick fix! I just wanted to make sure the fix got into the next build. One note, you might want to double check the version naming in the acLFPainter for the compiler directives. DevExpress VCL is currently at 2013.2.2 not 2012.2.2.
tmorrisParticipantFile Attached.
tmorrisParticipant[attachment=6247:ActionList Issue.zip]
'Support' wrote:Hello!
Can you show a demo with sources, please?
I too have the issue. Attached is an example. Double click on the actionlist to try to bring up the editor in design mode.
-
AuthorPosts