Your Rank: 91
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?
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:.
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.
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?
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.
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...
About meI am a Delphi programmer. My job includes programming desktop and web applications that include GIS, databases, document images, and ActiveX.
Address56 N State Street
City / TownOrem