Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old September 28th, 2003, 05:24 AM
williamcrawley williamcrawley is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: uk
Posts: 91 williamcrawley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Design Patern Required

Hi All,

I think I need a design pattern for a link list to an indeterminate level.

Here's the problem.

A structure may comprise of products and Structures.

So Structure 'A' has

Product x
product y
structure Z
Structure Z has
Product a
Structure B
Structure B has
Product D

Structures may also have more than 1 structure. I need to process all products and Structures for the parent structure.

I'm having great difficulty in VB6 trying to design a function that can call itself in this way.

I started off with a product class and a structure class where a structure class can comprise of itself and product class, but bringing it all together seems almost impossible.

Thanks for your help.

Reply With Quote
  #2  
Old September 29th, 2003, 12:09 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
williamcrawley !
I readed your problem..I try to do it with nether struct:

Module1:
Option Explicit
'product A
Type productA
y As Integer
End Type

'struct A:consist of x and prduct A
Type structA
x As Integer
pr As productA
End Type

'structsA::consist of structA and product A
Type structsA
stA As structA
proA As productA
End If

Reply With Quote
  #3  
Old September 29th, 2003, 02:01 AM
williamcrawley williamcrawley is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: uk
Posts: 91 williamcrawley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Hi Cleverpig,

This is not quite what i require. My example isn't literal. There are 16000 structures in all and I cannot declare the all ike that.

Thaks fo trying

Reply With Quote
  #4  
Old October 8th, 2003, 12:50 AM
cleverpig cleverpig is offline
Contributing User
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jul 2003
Posts: 1,152 cleverpig User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via MSN to cleverpig
OK! I guess U will make one or some universal structure to show the 16000 structure??..Or U will make one or some variable structure to show the 16000 structure??...

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreVisual Basic Programming > Design Patern Required


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT