BlackBox / Component Pascal - Compound Components 
Author Message
 BlackBox / Component Pascal - Compound Components

Hello:

I am new to BB/CP so the terminology I use may be different. I am
interested in knowing how to implement a "compound" component. The most
common example is a Address Component where there is a street, city,
country and zip code. I would like to use this component such that I
can  drop this whole as a "subform" on to the main formview during the
development of a form UI.

The closest I came to was a Panel like component on which the other
controls can be dropped. Unfortunately first of all there is no panel
component and secondly how to do the wiring of the controls within ?

Thanks in advance.

Regards,
Ajit Deo

Sent via Deja.com http://www.*-*-*.com/
Share what you know. Learn what you don't.



Sun, 02 Dec 2001 03:00:00 GMT  
 BlackBox / Component Pascal - Compound Components

Quote:

> Hello:

> I am new to BB/CP so the terminology I use may be different. I am
> interested in knowing how to implement a "compound" component. The most
> common example is a Address Component where there is a street, city,
> country and zip code. I would like to use this component such that I
> can  drop this whole as a "subform" on to the main formview during the
> development of a form UI.

> The closest I came to was a Panel like component on which the other
> controls can be dropped. Unfortunately first of all there is no panel
> component and secondly how to do the wiring of the controls within ?

> Thanks in advance.

> Regards,
> Ajit Deo

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

You can do this by copy and paste.

(1) Create a new blank form,  Controls->NewForm, and click Empty.
    For discussion here, let's call this form 'A'.
(2) Open the form that already exists such as the address form
    you mention (or even Cubes!).  Call this form 'B'.
(3) Pull down the menu item Edit->Select Document while 'B' has the focus.
    (or use F6 to select an object within the document)
(4) Type Ctrl-C (copy).
(5) Click in form 'A' and type Ctrl-V (paste).

You should see the object you selected pasted into your new form with
all of the active links maintained.  If you wish to modify those links
to point to other data fields within a new module 'M' that you create
then select each 'control' of the form by doing a SHIFT-click on the
control and then do a right mouse click and select 'properties'.
You can then edit fields of the control to point to fields within 'M'.

Hope this helps.

-Doug

--
Douglas G. Danforth, Ph.D.
Staff Scientist, X-ray Instrumentation Associates (XIA)
2513 Charleston Rd, Suite 207, Mountain View, CA 94043



Wed, 05 Dec 2001 03:00:00 GMT  
 BlackBox / Component Pascal - Compound Components


Quote:

> You can do this by copy and paste.

> (1) Create a new blank form,  Controls->NewForm, and click Empty.
>     For discussion here, let's call this form 'A'.
> (2) Open the form that already exists such as the address form
>     you mention (or even Cubes!).  Call this form 'B'.
> (3) Pull down the menu item Edit->Select Document while 'B' has the
focus.
>     (or use F6 to select an object within the document)
> (4) Type Ctrl-C (copy).
> (5) Click in form 'A' and type Ctrl-V (paste).

> You should see the object you selected pasted into your new form with
> all of the active links maintained.  If you wish to modify those links
> to point to other data fields within a new module 'M' that you create
> then select each 'control' of the form by doing a SHIFT-click on the
> control and then do a right mouse click and select 'properties'.
> You can then edit fields of the control to point to fields within 'M'.

> Hope this helps.

> -Doug

> --
> Douglas G. Danforth, Ph.D.
> Staff Scientist, X-ray Instrumentation Associates (XIA)
> 2513 Charleston Rd, Suite 207, Mountain View, CA 94043


Hello:

I had tried this before but when you open the main form (form A) in
"Aux" mode (Controls->Open As Aux Dialog) the controls on the subform
are still in design mode. i.e. you can shift them around and set their
properties. Am I missing something here? Thanks in advance.

-- Ajit Deo

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.



Thu, 06 Dec 2001 03:00:00 GMT  
 BlackBox / Component Pascal - Compound Components

Quote:

> Hello:

> I am new to BB/CP so the terminology I use may be different. I am
> interested in knowing how to implement a "compound" component. The most
> common example is a Address Component where there is a street, city,
> country and zip code. I would like to use this component such that I
> can  drop this whole as a "subform" on to the main formview during the
> development of a form UI.

> The closest I came to was a Panel like component on which the other
> controls can be dropped. Unfortunately first of all there is no panel
> component and secondly how to do the wiring of the controls within ?

I too am comming to grips with BCF.  I do not consider myself proficient
yet but I will share what I know.

BCF works around the idea of seperating interface and data processing.

Forms are container views, that is a form is a view that can contain
other views.  The normal views contained in forms are controls.  Views
are a class of stores.  A view is contained in a rectangular screen area
called a frame.  User interactions - keyboard and mouse events, are sent
along the focus path (using the frame tree) until they are intercepted
by a view that wishes to use them.  The handling of these interactions
is the responsibility of the controller, although in this case I doubt
you will need to implement one of these.  The controller sends messages
to its view, so effectively the view must handle the interactions
(except at a higher level).

Using standard controls (such as command buttons) where you want several
copies of your template to be open simultaneously yeilds the following
issues.  Command buttons are linked to global variables.  The global
variable may be a procedure or a procedure variable.  If you wish your
template to be used several times simultaneously, the linked command
will have to then send a message down the focus path to the required
view, or alternatively a wrapper around the command button may set a
global variable to the current view.

Personally, I believe that name and address data should be centralised
into its own subsystem.

I am currently attempting to bring ideas together for standardized
database interaction temmplate to save reprogramming each interface
screen from scratch.

Quote:
> Thanks in advance.

> Regards,
> Ajit Deo

> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.

Best of luck,

Tony



Fri, 07 Dec 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Mac BlackBox/Component Pascal Code?

2. BlackBox Component Builder Release 1.3

3. A propos de BlackBox Component Framework (Oberon/F)

4. get component name and hilite component

5. Component Pascal for VS.NET and Windows Forms apps

6. Gardens-Point Component-Pascal, any experiences?

7. 100+ links about Oberon-2 / Component Pascal

8. How to store in Component Pascal?

9. Component Pascal, pointer to array element?

10. Component Pascal users' group in Ottawa, Ontario

11. Open source Component Pascal compiler for JVM and .NET

12. Garden Point Component Pascal IMPORT

 

 
Powered by phpBB® Forum Software