Custom TcpListener can't reach it's dynamic bindings

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

Custom TcpListener can't reach it's dynamic bindings

Sebastian Sastre-2
Hi there,
 
    I'm making a subclass of TcpListener to have a custom policy of socket acceptance for a service I'm porting.
 
    When I start the service (subclass of TcpService) it won't get the value of the #backlogSize wich the code is:
 
backlogSize
 
 ^#'ROSocketListener-backlogSize' binding ifNil: [10]
 
    In the debugger the manually returned value is 10 but in the execution it trhows a walkback as beign nil. Is like the Bindings var is not initialized. If I harcode the value there other binds also fails.
 
    So I'm lost with this dynamic bindings. What I could be missing? there is something I should initialize to enable this to work as supoused? how can I debug it?
 
    thanks in advance,
 

Sebastian Sastre

 



Reply | Threaded
Open this post in threaded view
|

RE: Custom TcpListener can't reach it's dynamic bindings

Sebastian Sastre-2
It's so strange..  in:
 
BindingsAccessor>>bindingFor: anObject ifNotBound: absBlock
 
 ^self pvtBindings at: anObject ifAbsent: absBlock
 
the 'self pvtBindings' valued manually in the debugger returns some DynamicByndings, but in the 'runtime' it's like it is returning a nil because the next message #at:ifAbsent: is received by UndefinedObject instead of the DynamicBindigns.
 
To complete annoyance other services (seaside) based on tcp listener seems to work just fine in the same image. I've made a test of my service using just TcpListener instead of the custom I need and I have the same problem. I think I'missing something in the service but I don't know where to look at, so I'll appreciate any help.
 
    thanks,
 

Sebastian Sastre

 



De: [hidden email] [mailto:[hidden email]] En nombre de Sebastian Sastre
Enviado el: Sábado, 24 de Febrero de 2007 01:23
Para: 'The general-purpose Squeak developers list'
Asunto: Custom TcpListener can't reach it's dynamic bindings

Hi there,
 
    I'm making a subclass of TcpListener to have a custom policy of socket acceptance for a service I'm porting.
 
    When I start the service (subclass of TcpService) it won't get the value of the #backlogSize wich the code is:
 
backlogSize
 
 ^#'ROSocketListener-backlogSize' binding ifNil: [10]
 
    In the debugger the manually returned value is 10 but in the execution it trhows a walkback as beign nil. Is like the Bindings var is not initialized. If I harcode the value there other binds also fails.
 
    So I'm lost with this dynamic bindings. What I could be missing? there is something I should initialize to enable this to work as supoused? how can I debug it?
 
    thanks in advance,
 

Sebastian Sastre