trigger from inside fork block

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

trigger from inside fork block

Costas Menico
I am having trouble figuring out why this is happening.

I have an infinte whileTrue: block that triggers an event when a
collection of files appear.

MyApp>>start
^[
     [true] whileTrue: [
        (Delay forMilliseconds: 250) wait.
        " Get a collection of files"
          aCollection:=self checkFiles.
          aCollection do: [ | aFile |
       
                ... do something here.
                self trigger: #sendNotify with: self.
          ].
     ].
] fork.

The first time the trigger works for each aFile in the collection
correctly. The subsequent times even though it executes the
aCollection do: [] again, the trigger does not fire.

What could I be doing wrong here?

Costas