Roger Dunn

Member since: Wednesday, 10 June 2015
Last login: 2 months ago
Profile viewed: 271 views

Your Rank: 91
Points: 4

Roger Dunn created a new topic ' System Colors in Styles' in the forum. 2 months ago

I have had a lot of fun providing styled applications to my users, built in XE7 and Berlin. A few of these programs have "hyperlinks" that the user clicks to navigate the application. They are really just TLabels with a few properties set at design-time:
Font.Color := clHotLight; Font.Style := [fsUnderline]; Cursor := crHandPoint; ShowAccelChar := False; Transparent := True;
If I forget to remove [seFont] from StyleElements, the link will paint with the default label color, though it will still be underlined. I discovered that the reason for this is that none of the out-of-the-box styles in Delphi have clHotLlight defined as a SysColor. I have discovered that the hyperlink color is hard to read with some styles because I end up with bright blue on black or bright blue on blue.
How would you solve this in your application, or have you solved it? Do you assign a different font color to hyperlinks in your desktop applications that use styles?
Lastly, if I want clHotLight to be added to SysColors in styles, where would I go to suggest this to Embarcadero?
"Roj"

Read More...

DavidI is friends with Roger Dunn

Roger Dunn created a new topic ' Versions of TLibImp' in the forum. 2 years ago

If I examine a .pas file generated by tlibimp, how can I tell what version of tlibimp it was generated with? Each generated .pas has lots of comments at the top of the unit, but the only distinguishing feature is a line like this:
// $Rev: 52393 $
With XE8 installed, I type tlibimp /? at the command line, and I see this at the top of the help:
Embarcadero TLIBIMP Version 12.16581
Could this have been the tlibimp that created my .pas? Or was it an XE7 version? How can I tell without regenerating the files?

Read More...

Roger Dunn replied to the topic 'uninstalling delphi xe7' in the forum. 2 years ago

I don't know how much help I can be, but you can search your hard drive for folders create on the date you installed XE7. If you open a File Explorer window and have your C: drive open, you type "datecreated:=10/1/2015 kind:=folder" and it will find all directories created on October 1, 2015. This takes a long time, even on indexed drives.
What I've noticed is that Delphi XE7 does not allow you to change the drive of some features: they go on the C: drive regardless. For instance, sample code can go on a D: drive, but other things like package directories and stuff (I think) go on C:.

Read More...

Roger Dunn created a new topic ' Delphi XE7 trying to load XE8 packages' in the forum. 2 years ago

I have a package "A" that is compiled in XE7 with XE7 paths (ones with "15.0" in them). I have a package "B" that depends on "A" and is also compiled in XE7 with XE7 paths.
In a different directory tree I have a copy of package "A"'s code compiled in XE8 with XE8 paths (ones with "16.0" in them). Likewise, I have a copy of package "B"'s code compiled in XE8 with XE8 paths.
Every so often, my XE7 IDE goes crazy and tries to load package "A" with XE8 paths which, of course fails. Sometimes I satisfy the IDE, but then when I open a form that uses components from package "B", it complains about not being able load the components and the form doesn't load properly. When I close those forms, it asks whether or not to remove references to those components, which I have to decline and then not save the form.
To try and solve the issue, I have opened regedit and looked under HKEY_CURRENT_USER\Software\Embarcadero\BDS\15.0. Sometimes I do a search and find 16.0 paths in the 15.0 directory. But even after I've cleaned these up (plus the 220 bpl's with 210 bpl's), it doesn't help the IDE. And sometimes I try and manually re-add the XE7 version of package "A" only to be told that the XE8 version of package "A" already exists, even though it's not in the list! Rebuilding and reinstalling the packages in XE7 doesn't always help either.
What could be going on in my XE7 IDE and more importantly, how do I fix it? I'll answer any questions you ask, as long as it will help me find the solution for this issue. Thank you, Delphi community.
"Roj"

Read More...

Roger Dunn created a new topic ' "CodeGear" menu option' in the forum. 2 years ago

In XE 7 and XE 8 (and probably earlier versions), if you go to the File Browser and right-click something, you'll notice that the top option is "Open with CodeGear RAD Studio". Isn't that text a little bit out of date?
Read More...

Roger Dunn replied to the topic 'Detect changes on a form with one simple call?' in the forum. 2 years ago

I can't speak for Embarcadero, and I understand completely your desire to have one line of code to detect if the user has changed something. For now, what I do, is handle every OnChange event with one event handler, as well as OnClick handlers for checkboxes and radio buttons. The one event handler just sets a boolean to True that something has changed. Then, in a TActionManager, I have a bunch of actions where, in their OnUpdate handler, I check to see if that boolean is True or False, and then Enable/Disable things based on that value. After I have populated the form (either from objects or the database), I set that boolean to False to indicate nothing has changed yet.

Streaming a form may work in some cases, but I can see it wouldn't in others. For instance, if you change the highlighted item in a TListBox, that may represent a change in your "data" or not, but it does register a change to the form since ItemIndex has changed. Also, if you change what page you're on in a TTabSheet, the ActivePageIndex changes, which also would change the streamed version of the form.

Allow me to take this a step further. Let's say that you have a button the form and when the form is created, or shown, or during an OnUpdate event, you disable a button because of the user's permission level. Well, disabling the button also would change the stream, and would register as a change, even though there hasn't been.

Even though Delphi and Pascal support interfaces to objects, for common methodology and properties, the components support VERY few interfaces. It'd be nice to loop through the components, see if they Support an interface, and if they do, check to see if the Changed property is True. But because components aren't based on any such interface, you have to keep testing whether the component descends from this class or that class, and see if the new value equals the old value.

If Embarcadero DID introduce a HasChanged property, I'd be very suspect. I'd continue using my existing methods.

"Roj"
Read More...

Roger Dunn added a reply in discussion Loading DataModule on IDE Delp... 2 years ago

I don't know what to tell you about the DataModule loading slowly in XE7 vs. 7, but I can help understand the delay in loading forms that depend on other forms. The Delphi IDE's Object Inspector is smart. If you load a form with data-bound controls, you'll notice that you can drop down the FieldName component and see a list of available fields. The...