Problems with a loop [message #1817472] |
Fri, 22 November 2019 20:57 |
da ru Messages: 6 Registered: February 2019 |
Junior Member |
|
|
Hi folks , i,m trying to do a loop that collect me objects that meet a property , this looks me several days , and i can,t to find the mistake , maybe somebody can to help me , thanks , this is the code :
tick()
begin
for p in (self.paquetes -> collect( p | p.tiempoRestante = 0)) do
declare ns : Servidor , nt : Transmisor ;
if (self.servidor -> notEmpty()) then
ns := self.servidor -> sortedBy(n | n.paquetes -> size()) -> any(true) ;
self.transmitirS(p , ns) ;
else
nt := self.nodo2 -> sortedBy(n | n.paquetes -> size()) -> any(true) ;
delete (self,p) from Procesando ;
insert (nt,p) into Procesando ;
nt.recibirT(p,self);
end
end
end
At compile time it says to me that p , in self.transmitirS(p,ns) , is a boolean and not an object , it have to be an object of self.paquetes , why is a boolean ??? . thanks
|
|
|
|
Powered by
FUDForum. Page generated in 0.02805 seconds