LibkedList Example?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

LibkedList Example?

gregarican
There is an ActiveX component that I am trying to use. It requires that
I pass certain paramters in as linked lists. There are other Collection
subclasses I have worked with in Dolphin Smalltalk, but not the
LinkedList subclass. Here's what I need to put into the linked list.

agentDN = '555'
agentID = '555'
agentPassword = 'password'

These items would all be put together and passed to the ActiveX method
as an agentClass object that's a linked list.I have tried creating
these items as LinkElement objects, but can't figure out how to assign
them to Link objects and up into the LinkedList object. I see in the
class comments that Link is an abstract class and should be subclassed
in order to use it. How can I best go about this scenario?


Reply | Threaded
Open this post in threaded view
|

Re: LibkedList Example?

Support at Object Arts
"gregarican" <[hidden email]> wrote in message
news:[hidden email]...

> There is an ActiveX component that I am trying to use. It requires that
> I pass certain paramters in as linked lists. There are other Collection
> subclasses I have worked with in Dolphin Smalltalk, but not the
> LinkedList subclass. Here's what I need to put into the linked list.
>
> agentDN = '555'
> agentID = '555'
> agentPassword = 'password'
>
> These items would all be put together and passed to the ActiveX method
> as an agentClass object that's a linked list.I have tried creating
> these items as LinkElement objects, but can't figure out how to assign
> them to Link objects and up into the LinkedList object. I see in the
> class comments that Link is an abstract class and should be subclassed
> in order to use it. How can I best go about this scenario?
>

Avoid using LinkedLists, and rather use an OrderedCollection or Array. The
LinkedList implementation in the "standard" Smalltalk collection hierarchy
is really rather awkward, and mainly present as part of the implementation
of the multi-threading subsystem.

How does the Active-X component require the use of a linked list? Are you
sure it isn't expecting the use of its own linked-list type that is
completely unrelated to the LinkedList in Smalltalk?

Regards

OA


Reply | Threaded
Open this post in threaded view
|

Re: LibkedList Example?

gregarican
Support at Object Arts wrote:
> How does the Active-X component require the use of a linked list? Are you
> sure it isn't expecting the use of its own linked-list type that is
> completely unrelated to the LinkedList in Smalltalk?
>
> Regards
>
> OA

You got it! That's where I was running into a problem. The pure
Smalltalk linked list I created worked fine by itself. I couldn't pass
it to the ActiveX control because it needed its own internal linked
list type of structure created using its own mechanism. I am closer to
getting at what I need. You are right, the LinkedList object is rather
awkward, but at least I taught myself how to create a new instance of
one.

Thanks for the quick reply!