Forum Replies Created
-
AuthorPosts
-
Hi Rich,
Yes, CodeSite does support dynamically changing the log file. I suspect that you are changing the original TCodeSiteDestination object when you change the FilePath and not the CodeSiteManager’s DefaultDestination property (or an individual logger’s Destination property).
The CodeSiteManager.DefaultDestination property is not a component reference property. It is more like the Items property of a ListBox. You can assign a TStringList to ListBox1.Items to populate the list box. But if you change the contents of the string list, the list box does not get updated. Here is some sample code that should help illustrate the situation:
uses CodeSiteLogging; procedure TForm1.FormCreate(Sender: TObject); var Dest: TCodeSiteDestination; begin Dest := TCodeSiteDestination.Create( Self ); Dest.LogFile.Active := True; Dest.LogFile.FilePath := 'C:\Temp'; Dest.LogFile.FileName := 'Sample.csl'; CodeSiteManager.DefaultDestination := Dest; end; procedure TForm1.btnSampleMessageClick(Sender: TObject); begin CodeSite.Send( 'Sample Message' ); end; procedure TForm1.btnChangeLogFileClick(Sender: TObject); begin CodeSiteManager.DefaultDestination.LogFile.FileName := 'NewLogFile.csl'; end;
The form simply has two TButtons dropped on to it. At the start the DefaultDestination is set to log all messages to the Sample.csl file. Clicking the btnSampleMessage button simply sends a simple CodeSite message. The messages will be logged to the Sample.csl file.
When the btnChangeLogFile button is clicked, the LogFile.FileName property of the CodeSiteManager.DefaultDestination is changed. Now, when the btnSampleMessage button is pressed, the CodeSite message will be sent to the NewLogFile.csl file.
As an alternative, you could create a new CodeSiteDestination object with the updated FilePath and then assign that to the DefaultDestination property.
Ray
Hi,
The TRzButton does not provide that level of customization. By default the appearance of the button is driven by the current Visual Style that is active. If you set the ThemeAware property to False, you can get a little more control of the appearance of the button. However, to modify the appearance of the button while disabled, you would need to create a custom descendant of the button.
Ray
Hi Paul,
I’m not sure which 8 components you are referring to. The KSVC controls only support VCL. Well, I suppose the nonvisual controls in KSVC could also be used in an FMX application.
I’m not sure what plans Embarcadero has for the Signature controls. I do know that there is a big push for High DPI support. I do not know if there are plans for migrating some of the functionality in KSVC to FMX controls.
Ray
It turns out that Embarcadero did not change the version number of the components–Ugh. So the version number is still 6.2.3, but the version that is available in the 10.3 Rio GetIt Package Manager is built for Rio.
Ray
I apologize for the delay in responding. Been rather busy getting new versions of our Raize Software products released.
Back to your question. From the code you provided, it looks like you are using VCL Styles. Is that correct? Then in that case, the technique I provided above will not work. The reason is because the button is designed to pickup the custom style when active. The default behavior of the TRzToolButton is to pickup the background and font colors from the style. I’m not quite sure what appearance you are trying to achieve since you are essentially getting rid of the gradient and hiding the button frame. What style are you using? and what appearance are you trying to achieve?
Ray
That is an excellent question. I am trying to get the answer to that as well.
Ray
You’re welcome. I’m glad you saw the notice on the website.
Ray
Hi,
There is no built-in properties to allow this, but you could write event handlers for the OnMouseEnter and OnMouseLeave events and do something like this:
procedure TForm4.RzToolButton1MouseEnter(Sender: TObject); begin RzToolButton1.Font.Color := clRed; end; procedure TForm4.RzToolButton1MouseLeave(Sender: TObject); begin RzToolButton1.Font.Color := clGreen; end;
Ray
Does the C++ Package include the CodeSiteExpressPkg package in the requires clause?
Ray
Thanks. I’ll fix it. Copy and paste error 🙂
Hi Steve,
I’ll have Jim, who is the architect of DropMaster, respond to your questions.Ray
If the Dispatcher is getting started, then I suspect that you have another CodeSite.Send method being called before you are disabling the logging. To disable logging, be sure to call CodeSiteManager.Enabled := False before sending any CodeSite messages.
Ray
Thanks for the message. The activation is handled by the forum plug-in that we are using for the site. I’ll look into it.
Hi Chris,
You may have noticed that the TRzDBDateTimePicker has a grayed icon in the component palette. That is because it is deprecated. And the reason it is deprecated is precisely for the reason that you are running into. Because the TRzDBDateTimePicker (and TRzDateTimePicker) are descendants of the DateTime Picker Windows control, we are limited in what can be done with the content. The handling of null values is just one instance.
Instead, we recommend using the TRzDBDateTimeEdit component. The component does a much better job of handling null fields and allows for freeform input, making it more flexible. Plus, if you are editing field that contains both Date and Time values, you can drop two TRzDBDateTimeEdit controls onto your form and point them both to the same DB Field–one control edits the Date portion and the other edits the Time.
Ray
-
AuthorPosts