Re: Is it possible to cancel a destruction ?



Well compiling the VCL was quite simple but required a little bit of work.

This website simply mentioned to make the compiler point to the sources of
the VCL and then the compiler would simply use the VCL sources to build the
program etc. The delphi 5 example wasn't terribly clear though but I
understood the previous text and also the delphi1 example showed what to
do... so that is what I did ;)

http://www.blong.com/Conferences/DCon99/VCLSourcery/VCLSourcery.htm

Then I got some little problems/errors messages:

The first problem was this file:

[Fatal Error] Themes.pas(19): File not found: 'UxTheme.dcu'

Which seems to be part of the RTL.

Maybe the makefile forgot to make this dcu unit etc.

Or maybe this file belongs in the VCL afterall.

Anyway for now I decided to simply add it to the application project, since
I didn't know what else to do... I can't add a path to the RTL source
code... or maybe I could ? I dont know... but I would like to keep things
seperate for now... otherwise it would get mixed/fucked up.. since it would
mix my SkybuckRTL with the DelphiRTL ;) So that's why I added this UxTheme
unit simply to the project.

Then I press compile/build again, I also followed the handy tip of turning
on the compiler progress.. in the past I had this option on... I dont know
why I had it off... I probably simply forgot to turn on it when upgrading to
delphi 7 etc... or maybe I turned it off because It annoyed me or
something... maybe I just liked to view the source code further while
compiling ;) hehe.

Anyway the second compile attempt gave the following problem:

[Error] File not found: 'Buttons.res'
[Error] File not found: 'ExtDlgs.res'
[Error] File not found: 'Controls.res'

The compiler was unable to find the resource files.

It turns out that Borland has made a mess of things ;)

I think these resource files should have been located in the source file
folders instead of the library folder. Because that's where they are
located... which is very bad... I am one of those persons which would simply
delete such a folder without even thinking about it another further. I would
simply think to myself everything in that lib folder can be deleted because
it can simply be regenerated... Well in this case that's absolutely not
true...

These resource files contain images for buttons etc... so without these
resources files the program won't start etc and everything won't work
:(..... ohhhhhhhhh ;)

So I decided to simply fix the problem and use windows search utility to
find all files ending with *.res and simply copieing them to my own \Res
folder... and including it in the library path in environment options so
that the compiler can find any resource file in the future ;)

A better choice could have been to move each resource file out of the lib
path and back into the vcl folders and other sources folders... oh well.

It turns out my res folder is now one giant big mess since I also copied all
the resources files of the demos and examples etc... tut tut tut ;) hehehe
but at this point I dont care so much as long as everything works and
compiles just fine ;)

First I tried to add the missing *.res files to the project... which was
kinda weird since it only allowed *.rc files to be added ? which are
probably the same kind of files ? or maybe rc is something special ? anyway
I choose *.* and then tried to add the missing *.res files but that got all
fucked up since it seems these *.res are binary files so apperently it's not
possible... at least not via add to project.. or maybe this add to project
method is missing a *.res filter... maybe it would have worked if it was
told that a resource file was being added... or maybe resource files need to
be added via another menu etc.... lovely fucked up isn't it lol :P* =D

Anyway this time I press run and TATA the application appeared and buttons
working etc, etc, etc.... justttt lovely ;)

Another episode in skybuck's life ended happily and successfully lol =D

Bye,
Skybuck

And here is all the other *** in case I ever want to read it all again and
older messages are missing ;) :P

Wieeeeeeeeeeee byeeeeeee to myself in the future wieeeeeeeeeee ;):

"Skybuck Flying" <nospam@xxxxxxxxxxx> wrote in message news:...
> Well I was curious if my SkybuckRTL ;) would work lol so I simply placed
> "temp" in front of this line in the library path:
>
> temp $(DELPHI)\Lib
>
> So that it gets invalidated/not used ;)
>
> and added a path to my SkybuckRTL ;)
>
> The following console program "amazingly" enough compiles/builds and
> executes just fine =D
>
> It's quite simply so apperently the RTL is enough to compile and build
it...
> as soon as this example would start using vcl stuff it would probably not
> compile anymore.
>
> To test this theory I also just created a new application and mixed the
> complete delphi lib folder with my skybuck rtl folder to see what would
> happen.
>
> "Amazingly" enough delphi detects that the vcl was compiled with a
different
> rtl version ? hmm well not really it complains about a different version
of
> safe call exception stuff... a bit weird I dont know why that is... why
> doesnt it say something like: "different rtl version detected" or so :)
>
> [Fatal Error] Project1.dpr(5): Unit Forms was compiled with a different
> version of System.TObject.SafeCallException
>
> So I guess every DCU in the lib path would need to be recompiled to make
> everything work splended together... So this probably means... the VCL
has
> to be re-compiled and god knows what else ;)
>
> Maybe simply the whole source folder of delphi. Hmm however.. the main
> source folder doesn't have a make file... hmmm. The VCL folder also
doesn't
> have a make file... Gje me wonders how te re-compile all this stuff if
> needed at all ;) <- probably needed though. Well I'll google later for now
> here is the funny new source/example hehehehehe:
>
>
> Had to solve a little namespace conflict though, since I wanted a property
> to be able to change if destroy is allowed or not ;)
>
> program Project1;
>
> {$APPTYPE CONSOLE}
>
> uses
> SysUtils;
>
>
> type
> TtestObject = class(Tobject)
> private
> mDestroyAllowed : boolean;
>
> public
> function DestroyAllowed : boolean; override;
>
> property PropertyDestroyAllowed : boolean read mDestroyAllowed write
> mDestroyAllowed;
> end;
>
> function TtestObject.DestroyAllowed : boolean;
> begin
> result := false;
>
> if inherited DestroyAllowed then
> begin
> if mDestroyAllowed then
> begin
> result := true;
> end;
> end;
> end;
>
> var
> vTestObject : TtestObject;
>
> begin
> vTestObject := TtestObject.Create;
>
>
> vTestObject.PropertyDestroyAllowed := false;
>
> if vTestObject.Free then
> begin
> writeln('object was freeed');
> end else
> begin
> writeln('object was not freeed');
> end;
>
> vTestObject.PropertyDestroyAllowed := true;
>
> if vTestObject.Free then
> begin
> writeln('object was freeed');
> end else
> begin
> writeln('object was not freeed');
> end;
>
> readln;
>
> end.
>
>
> Bye,
> Skybuck, woeh ;)
>
> "Skybuck Flying" <nospam@xxxxxxxxxxx> wrote in message news:...
> > Hmm changing system.pas and thereby delphi a little bit is quite
> interesting
> > ;)
> >
> > I googled how to do this and I found some post describing this:
> >
> > "
> > You can compile it from the command line. Copy the entire RTL section
of
> > the source to a separate place and use the makefile to recompile it.
> > "
> >
> > Here are the steps I took to make this happen ;)
> >
> > 1. Copy the RTL section to folder X
> >
> > 2. The make file requires TASM 4.0 so "get" ;) TASM 5.0 install it and
> apply
> > the patch as well just in case ;)
> >
> > 3. Create two extra folders in folder X called "bin" and "lib" these
> folders
> > will be the output folders.
> >
> > 4. Run make, sit back and enjoy the fun show of some hints and warnings
> lol.
> >
> > And voila compiled units located in the lib folder all nice dcu files =D
> ;)
> >
> > Except now I have the same old nagging fucking problem:
> >
> > I would only like to use these special dcu's for special projects etc ;)
> So
> > I would like to be able to set the library path in the project
options...
> > unfortunately enough the project options don't have the library paths
> etc...
> >
> > The environment settings control/have the library paths... which means
> > changing these settings changes all projects etc... which I
> > absoluuuuuuuuuutely dont want ;)
> >
> > The question is now how do I solve this problem...
> >
> > 1. Maybe I can create a special desktop environment ?
> >
> > 2. Maybe I can set the library paths in the project file via some
compiler
> > options ?
> >
> > Shitty ;)
> >
> > Bye,
> > Skybuck =D:P*wieeeeeeeeeee ;)
> >
> >
>
>


.