473,419 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,419 software developers and data experts.

A "basic" question - I think!

I have an object called ColumnSection which represents a reinforced concrete
column. This object contains an arraylist called Diagrams which contains
Graph2D objects which are essentially X-Y plots. The Graph2D object has 2
public methods - Draw, which draws the plot on a bitmap in memory and
DisplayGraph which blits the bitmap on to a Panel or PictureBox.

I have a public ReadOnly property in the ColumnSection called
InteractionDiagrams which returns the Diagrams arraylist. I want to be able
to get the arraylist in a form with a PictureBox.

Questions:

1. Should the InteractionDiagrams property return the Diagrams arraylist or
a clone of the Diagrams arraylist? Are there any issues either way?

2. Is there anything wrong in calling either the Draw or DisplayGraph
methods of the Graph2D objects in the Diagrams arraylist from the form with
the PictureBox?

Any thoughts would be greatly appreciated.

Keith.
Nov 21 '05 #1
3 1176
Keith,

Regarding (1): What will your code do with the Diagrams ArrayList?

Regarding (2): Not quite clear what you mean. Can you provide sample code?
--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"Keith Rebello" <kr**@gecinc.com> wrote in message
news:Xv*******************@newsread1.mlpsca01.us.t o.verio.net...
I have an object called ColumnSection which represents a reinforced
concrete
column. This object contains an arraylist called Diagrams which contains
Graph2D objects which are essentially X-Y plots. The Graph2D object has 2
public methods - Draw, which draws the plot on a bitmap in memory and
DisplayGraph which blits the bitmap on to a Panel or PictureBox.

I have a public ReadOnly property in the ColumnSection called
InteractionDiagrams which returns the Diagrams arraylist. I want to be
able
to get the arraylist in a form with a PictureBox.

Questions:

1. Should the InteractionDiagrams property return the Diagrams arraylist
or
a clone of the Diagrams arraylist? Are there any issues either way?

2. Is there anything wrong in calling either the Draw or DisplayGraph
methods of the Graph2D objects in the Diagrams arraylist from the form
with
the PictureBox?

Any thoughts would be greatly appreciated.

Keith.

Nov 21 '05 #2
Mike,

The InteractionDiagrams property will be one of the following:

Get
Return Diagrams
or
Return Diagrams.Clone
End Get

My question is which "Return" should I use.

Once I have the Diagrams arraylist in my calling form (the one with the
PictureBox), I want to be able to do:

Dim Gr2D as Graph2D
Gr2D= Diagrams(i)
Gr2D.DisplayGraph

Is this permissible?

"Mike McIntyre" <mi****@dotnetshowandtell.com> wrote in message
news:eu**************@TK2MSFTNGP10.phx.gbl...
Keith,

Regarding (1): What will your code do with the Diagrams ArrayList?

Regarding (2): Not quite clear what you mean. Can you provide sample code?

--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"Keith Rebello" <kr**@gecinc.com> wrote in message
news:Xv*******************@newsread1.mlpsca01.us.t o.verio.net...
I have an object called ColumnSection which represents a reinforced
concrete
column. This object contains an arraylist called Diagrams which contains Graph2D objects which are essentially X-Y plots. The Graph2D object has 2 public methods - Draw, which draws the plot on a bitmap in memory and
DisplayGraph which blits the bitmap on to a Panel or PictureBox.

I have a public ReadOnly property in the ColumnSection called
InteractionDiagrams which returns the Diagrams arraylist. I want to be
able
to get the arraylist in a form with a PictureBox.

Questions:

1. Should the InteractionDiagrams property return the Diagrams arraylist or
a clone of the Diagrams arraylist? Are there any issues either way?

2. Is there anything wrong in calling either the Draw or DisplayGraph
methods of the Graph2D objects in the Diagrams arraylist from the form
with
the PictureBox?

Any thoughts would be greatly appreciated.

Keith.


Nov 21 '05 #3
Keith,

In this scenario there appears to be no reason to Clone.

Mike
"Keith Rebello" <kr**@gecinc.com> wrote in message
news:HW*******************@newsread1.mlpsca01.us.t o.verio.net...
Mike,

The InteractionDiagrams property will be one of the following:

Get
Return Diagrams
or
Return Diagrams.Clone
End Get

My question is which "Return" should I use.

Once I have the Diagrams arraylist in my calling form (the one with the
PictureBox), I want to be able to do:

Dim Gr2D as Graph2D
Gr2D= Diagrams(i)
Gr2D.DisplayGraph

Is this permissible?

"Mike McIntyre" <mi****@dotnetshowandtell.com> wrote in message
news:eu**************@TK2MSFTNGP10.phx.gbl...
Keith,

Regarding (1): What will your code do with the Diagrams ArrayList?

Regarding (2): Not quite clear what you mean. Can you provide sample

code?


--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"Keith Rebello" <kr**@gecinc.com> wrote in message
news:Xv*******************@newsread1.mlpsca01.us.t o.verio.net...
>I have an object called ColumnSection which represents a reinforced
>concrete
> column. This object contains an arraylist called Diagrams which contains > Graph2D objects which are essentially X-Y plots. The Graph2D object
> has 2 > public methods - Draw, which draws the plot on a bitmap in memory and
> DisplayGraph which blits the bitmap on to a Panel or PictureBox.
>
> I have a public ReadOnly property in the ColumnSection called
> InteractionDiagrams which returns the Diagrams arraylist. I want to be
> able
> to get the arraylist in a form with a PictureBox.
>
> Questions:
>
> 1. Should the InteractionDiagrams property return the Diagrams arraylist > or
> a clone of the Diagrams arraylist? Are there any issues either way?
>
> 2. Is there anything wrong in calling either the Draw or DisplayGraph
> methods of the Graph2D objects in the Diagrams arraylist from the form
> with
> the PictureBox?
>
> Any thoughts would be greatly appreciated.
>
> Keith.
>
>



Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: bidalah | last post by:
Hello, I am looking for basic info on installing and using MSDE. I am trying to install and play with MSDE on my PC (Win2000). I finally managed to work my way through installation, and named...
18
by: steve | last post by:
I'm trying to create a structure of three pointers to doubles. For which I have: typedef struct { double *lst_t, *lst_vc, *lst_ic; } last_values; I then need to allocate space for...
12
by: pmclinn | last post by:
What is the difference between these declarations: Dim strMyData() as string and Dim strMyData as string() -Peter
1
by: Ottavio | last post by:
Hello, I'm having some problems with the authentication during a web service call I know I have to add the "Authorization: Basic xxxxxxxx" in the http header (not soap header) but I can't find a...
43
by: Bill H | last post by:
25 years ago every computer came with some form of Basic interpreter so you could use yoru computer without having to buy more software. Is Javascript (teamed with HTML) set to become the new...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.