Office Assistant component for BC++ Builder 6 (need help)

Please post bug reports, feature requests, or any question regarding the DELPHI AREA products here.

Office Assistant component for BC++ Builder 6 (need help)

Postby ChrisV » June 9th, 2005, 5:48 pm

Hi gentlemen and ladies,

Does anyone have an office assistant component which can be used in BCB version 6? There is a delphi one here for download, however that does not work for. I cant install delphi packages in c++ builder.

Can anyone please help me?


Thanks,


Chris V.
ChrisV
Member
Member
 
Posts: 3
Joined: June 9th, 2005, 5:45 pm

Postby Radagast » June 9th, 2005, 9:30 pm

I'm suprised. All components for C++Builder are written in Pascal (I think). So it should work. Could you tell what happens when you try to install it?
Try searching some pages with components - I think there should be some links on this page, mayby try Torry's Delphi Page or something like that. If it doesn't help I'll look for some links into books I have.
Radagast
Active Member
Active Member
 
Posts: 24
Joined: May 1st, 2005, 9:32 pm
Location: Poland

Postby ChrisV » June 9th, 2005, 10:39 pm

i guess it comes down more to the fact i have no idea what i am doing. i did manage to install office97button component by accident while trying to install assistant.

i select option "component" -> "install component". Browse the assistant.pas file on top, on bottom i browse for assistant.dpk (which i renamed to .bpk for borland c++ builder). that works except i get an office 97 button at the end not an assistant.
ChrisV
Member
Member
 
Posts: 3
Joined: June 9th, 2005, 5:45 pm

Postby Radagast » June 9th, 2005, 10:50 pm

Shouldn'y you use 'Install package'? I think that bottom field is for entering name of package you want to add component to. You don't need to change anything there. What was first extension of the file? If .bpl or .dpc it's almost sure you shoul install it as a package. And try if you could install it whitout changing extension.
Radagast
Active Member
Active Member
 
Posts: 24
Joined: May 1st, 2005, 9:32 pm
Location: Poland

Postby ChrisV » June 13th, 2005, 3:17 pm

i cant use install package its a .DPK file which is for delphi.
ChrisV
Member
Member
 
Posts: 3
Joined: June 9th, 2005, 5:45 pm

Postby Kambiz » June 14th, 2005, 12:08 am

I know you can get C++Builder binaries from Delphi .dpk's but because I don't have C++Builder I can't check it out. Please try the following procedure and let us know about the result.

  1. make a text file with the following content all on a single line:

    Code: Select all
    -+oaAbout.obj -+oaActor.obj -+oaBaloon.obj -+oaBitmap.obj -+oaConst.obj -+oaDirect.obj -+oaEngine.obj -+oaLZRWKH.obj -+oaSelect.obj -+oaStage.obj -+oaTopics.obj -+oaTypes.obj -+OffBtn.obj

    and, save the file as Assist60.lst in the Assistant directory.
  2. Make a batch file with the following content:

    Code: Select all
    dcc32.exe -JP -B -DDELPHI6_UP Assist60.dpk -$D-Y-
    tlib.exe Assist60.lib @Assist60.lst

    and, save the bath file in the Asistant folder.
  3. Run the batch file.


As the result you should have object file of all the delphi units plus Assist60.bpl, Assist60.bpi, and Assist60.lib files.

By the way, I supposed dcc32.exe and tlib.exe are in the search path. They should be in your C++Builder bin folder.

Cheers
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Office Assistant component for BC++ Builder 6 (need help)

Postby MarkW » July 24th, 2005, 7:31 am

Hello,

Has anyone been able to compile office assistant in Builder 6? I tried the instructions in the previous post and got the following.

C:\wutil\Assistant>dcc32.exe -JP -B -DDELPHI6_UP Assist60.dpk -$D-Y-
Borland Delphi Version 14.0
Copyright (c) 1983,2002 Borland Software Corporation
Assist60.dpk(33) Fatal: Required package 'vclsmp' not found

in the Assist60.dpk

requires
vcl,
vclsmp,
designide,

The compiler is looking for a vcl.dcp, vclsmp.dcp and designide.dcp files. The VCL.dcp and the designide.dcp were fine and were found in the $(builder)lib\obj folder. But te Vclsmp.dcp
was not to be found. I checked the cd and did lots of searches. I finally got a Delphi 7 VclSmp.dcp file and inserted it in the project directory and got it to compile. (I don't think this is a real fix, I just did this for testing.)

Their were no errors and it produced a Assist60..lib and Assist60..bpi file but no Assist60.bpl file.

If anyone can help I would be very grateful,


Thanks,


MarkW
MarkW
Member
Member
 
Posts: 1
Joined: July 24th, 2005, 7:16 am
Location: Ventura, Ca.

Postby Kambiz » July 24th, 2005, 6:55 pm

Actually vclsmp was used by older versions of the Assistant Package, and you can remove it from the required package list.

It's not my only mistak. :oops: In my previous post, the option -DDELPHI6_UP should be removed.

I hope these changes solve the problem.

Cheers
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Postby Kambiz » July 25th, 2005, 6:26 pm

I wrote a batch file to compile the Office Assistant package for BCB.

The batch file checks the compiler version and chooses the right dpk file automatically. The output directory of lib, bpi, obj, and dcu files are the current directory, however dcp and bpl files will place in the bpl folder of the compiler.
Attachments
oaBCB.zip
Batch file to compile the Office Assistant package for BCB.
(637 Bytes) Downloaded 363 times
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Postby Fishhead36 » October 1st, 2005, 7:44 pm

Hi Kambiz! :D

i tried your batch file but i can't use it then under BCB6 (pro). the batch file works good without problem i think. i can add the package then to the package list of BCB6 without any error (on adding).

But: i seen the batch file content output seems ok for the *.obj files and so. but it returns only one header called "Assist60.hpp" all other header (*.hpp) files they are required, e.g. oaSelect.hpp, oaStage.hpp, oaProps.hpp, and all others are missing. Do you know why only the header Assist60.hpp is outputing? I love this component so much 8) hope i can use it with BCB.
Fishhead36
Active Member
Active Member
 
Posts: 6
Joined: September 12th, 2005, 12:02 pm

Postby Kambiz » October 4th, 2005, 1:20 pm

I think BCB doesn't generate header files for design-time packages. Try to build the package as run-time.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Postby Fishhead36 » October 4th, 2005, 4:20 pm

i tried now to install the component with the oaReg.pas
i only get 1 error (4x the same) on Editing := False;

the compiler says me "Nothing can be assigned to the left side". but i don't understand why. Editing := False; seems like ok. do you have any idea? if i comment Editing := False; out (4x) then the component is compile able and link able and works fine in runtime. its only the problem with Editing := False; :roll:
Fishhead36
Active Member
Active Member
 
Posts: 6
Joined: September 12th, 2005, 12:02 pm

Postby Kambiz » October 4th, 2005, 6:32 pm

I hope the attached oaProps.pas can fix the problem.
Attachments
oaProps.pas
Updated for BCB
(4.68 KiB) Downloaded 262 times
Last edited by Kambiz on October 5th, 2005, 10:30 am, edited 1 time in total.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm

Postby Fishhead36 » October 4th, 2005, 8:26 pm

thanks for your time spending.
now the problem is only 2 times (before 4 times) its on this now:

Code: Select all
procedure TAssistantComponentEditor.ExecuteVerb(Index: Integer);
const
  Editing: Boolean = False;
var
  Filename: String;
begin
  if (Index = 0) and not Editing then
  begin
    Editing := True;
    try
     if Component is TAssistant then
     begin
       Filename := TAssistant(Component).ActorLibrary;
       if SelectActor(Component.GetNamePath + '.ActorLibrary', Filename) then
       begin
         TAssistant(Component).ActorLibrary := Filename;
         Designer.Modified;
       end;
     end;
    finally
      Editing := False;
    end;
  end;
end;


unfortunately i dont understand alot of Delphi so i can't figure it out what you have changed :D but i think that you have declared now Edit as an private variable, or? but here is it still a const variable? hm :)

this seems like needed:

Code: Select all
  TAssistantComponentEditor = class(TComponentEditor)
  private
    Editing: Boolean;
  public
    procedure ExecuteVerb(Index: Integer); override;
    function GetVerb(Index: Integer): string; override;
    function GetVerbCount: Integer; override;
  end;


and to remove the const var in TAssistantComponentEditor.ExecuteVerb. Right? Hope so hehe :)
Fishhead36
Active Member
Active Member
 
Posts: 6
Joined: September 12th, 2005, 12:02 pm

Postby Kambiz » October 5th, 2005, 10:26 am

I missed to modify the other class. :oops:

Yes, I removed the constant and added a private field.

Cheers
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2408
Joined: March 7th, 2003, 7:10 pm


Return to DELPHI AREA Products

Who is online

Users browsing this forum: No registered users and 2 guests