Quantcast

How to dispose a finite state machine?

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

How to dispose a finite state machine?

voger
I am using qx.util.fsm.FiniteStateMachine to describe the behaviour of
the "miniapps" that compose the app I am developing. So far I have used
it in one and it works great. The problem is I don't know how to dispose
it. When I close the the "miniapp" in the destructor of that class I have

    this._fsm.dispose();

but I get exception

"Uncaught TypeError: Cannot read property 'length' of null"

So how can I dispose the fsm?

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

John Spackman
My guess would be that qx.data.Array is being disposed twice, but without a stack trace it’s impossible to know - please can you put together a playground example?

Regards
John




On 06/03/2016, 22:23, "voger" <[hidden email]> wrote:

>I am using qx.util.fsm.FiniteStateMachine to describe the behaviour of
>the "miniapps" that compose the app I am developing. So far I have used
>it in one and it works great. The problem is I don't know how to dispose
>it. When I close the the "miniapp" in the destructor of that class I have
>
>    this._fsm.dispose();
>
>but I get exception
>
>"Uncaught TypeError: Cannot read property 'length' of null"
>
>So how can I dispose the fsm?
>
>------------------------------------------------------------------------------
>_______________________________________________
>qooxdoo-devel mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

Derrell Lipman
In reply to this post by voger
The finite state machine doesn't use any DOM element nor anything else that shouldn't be very normally garbage collected. It (at least theoretically) shouldn't require any manual disposing. In very old browsers, I think it needed some help, but I don't think it's required in today's browsers. Be sure you don't create any closures that prevent it from being garbage collected. Just set the object reference to null and all should be good.

Derrell


On Sun, Mar 6, 2016 at 5:38 PM voger <[hidden email]> wrote:
I am using qx.util.fsm.FiniteStateMachine to describe the behaviour of
the "miniapps" that compose the app I am developing. So far I have used
it in one and it works great. The problem is I don't know how to dispose
it. When I close the the "miniapp" in the destructor of that class I have

    this._fsm.dispose();

but I get exception

"Uncaught TypeError: Cannot read property 'length' of null"

So how can I dispose the fsm?

------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

voger
In reply to this post by voger
I did a simple example of the problem. http://tinyurl.com/zg8nse2

After some investigation with the debugger it seems that the problem is
the fact that I am trying to dispose the fsm object using it's own event
handler.

A walk through to explain better what I mean:

1. In the final state I click the "Terminate" button.
2. The fsm object picks the "execute" event and starts processing it
3. One of the handlers decides to fsm.dispose()
4. The fsm isn't done yet with the "execute" event but the fsm it's gone now
5. Exception


An idea how to terminate and dispose the fsm is to use some other event
not observed by fsm. Something like this example
http://tinyurl.com/jj7kfxt .







------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

Derrell Lipman
Right. My suggestion is that you shouldn't need to call fsm.dispose(). Instead, just set
   fsm = null; 
so it will be garbage collected. I don't believe there is anything here that needs "help" with disposing.

Here's the modified example: http://tinyurl.com/zxmbrcj

Cheers,

Derrell


On Tue, Mar 8, 2016 at 11:20 AM voger <[hidden email]> wrote:
I did a simple example of the problem. http://tinyurl.com/zg8nse2

After some investigation with the debugger it seems that the problem is
the fact that I am trying to dispose the fsm object using it's own event
handler.

A walk through to explain better what I mean:

1. In the final state I click the "Terminate" button.
2. The fsm object picks the "execute" event and starts processing it
3. One of the handlers decides to fsm.dispose()
4. The fsm isn't done yet with the "execute" event but the fsm it's gone now
5. Exception


An idea how to terminate and dispose the fsm is to use some other event
not observed by fsm. Something like this example
http://tinyurl.com/jj7kfxt .







------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

voger
Thanks Derrell. It is great to hear from the author itself.

It's just that I saw in the qx.util.fsm.FiniteStateMachine#destruct()
code that it does some clean up functionality and wanted to be in the
safe side.

Plus if I wouldn't understand why it didn't work how I thought it
should, I would literally loose sleep over it. I don't exaggerate. I
wasted hours to understand the problem even after you suggested that
there was no need to dispose the fsm.





On 08/03/2016 07:03 μμ, Derrell Lipman wrote:

> Right. My suggestion is that you shouldn't need to call fsm.dispose().
> Instead, just set
>     fsm = null;
> so it will be garbage collected. I don't believe there is anything here
> that needs "help" with disposing.
>
> Here's the modified example: http://tinyurl.com/zxmbrcj
>
> Cheers,
>
> Derrell
>
>
> On Tue, Mar 8, 2016 at 11:20 AM voger <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I did a simple example of the problem. http://tinyurl.com/zg8nse2
>
>     After some investigation with the debugger it seems that the problem is
>     the fact that I am trying to dispose the fsm object using it's own event
>     handler.
>
>     A walk through to explain better what I mean:
>
>     1. In the final state I click the "Terminate" button.
>     2. The fsm object picks the "execute" event and starts processing it
>     3. One of the handlers decides to fsm.dispose()
>     4. The fsm isn't done yet with the "execute" event but the fsm it's
>     gone now
>     5. Exception
>
>
>     An idea how to terminate and dispose the fsm is to use some other event
>     not observed by fsm. Something like this example
>     http://tinyurl.com/jj7kfxt .
>
>
>
>
>
>
>
>     ------------------------------------------------------------------------------
>     Transform Data into Opportunity.
>     Accelerate data analysis in your applications with
>     Intel Data Analytics Acceleration Library.
>     Click to learn more.
>     http://makebettercode.com/inteldaal-eval
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

Derrell Lipman
So I've been thinking about this. Although what I told you is correct -- modern browsers, and even old ones, should have no problem automatically garbage collecting an FSM because it has no references to DOM objects and no circular references -- qooxdoo debug display logic could still be applied to disposal. I'm thinking about what needs to change to support that feature.

Would you please try something for me...

At qx/util/fsm/FiniteStateMachine.js:1236, change
  this.fireDataEvent("terminated", thisState)
to
  this.scheduleEvent("terminated", this, thisState);

Then run your original playground test with your call to fsm.dispose(). I'm interested in whether you still see the crash. I don't think you will, since the fsm processing stack will have unwound at the point that the event fires so it should be safe to dispose.

(BTW, after calling fsm.dispose(), you should probably still be setting your fsm variable to null, so that the garbage collector can do its job on the FSM object itself.)

Derrell


On Tue, Mar 8, 2016 at 3:33 PM voger <[hidden email]> wrote:
Thanks Derrell. It is great to hear from the author itself.

It's just that I saw in the qx.util.fsm.FiniteStateMachine#destruct()
code that it does some clean up functionality and wanted to be in the
safe side.

Plus if I wouldn't understand why it didn't work how I thought it
should, I would literally loose sleep over it. I don't exaggerate. I
wasted hours to understand the problem even after you suggested that
there was no need to dispose the fsm.





On 08/03/2016 07:03 μμ, Derrell Lipman wrote:
> Right. My suggestion is that you shouldn't need to call fsm.dispose().
> Instead, just set
>     fsm = null;
> so it will be garbage collected. I don't believe there is anything here
> that needs "help" with disposing.
>
> Here's the modified example: http://tinyurl.com/zxmbrcj
>
> Cheers,
>
> Derrell
>
>
> On Tue, Mar 8, 2016 at 11:20 AM voger <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I did a simple example of the problem. http://tinyurl.com/zg8nse2
>
>     After some investigation with the debugger it seems that the problem is
>     the fact that I am trying to dispose the fsm object using it's own event
>     handler.
>
>     A walk through to explain better what I mean:
>
>     1. In the final state I click the "Terminate" button.
>     2. The fsm object picks the "execute" event and starts processing it
>     3. One of the handlers decides to fsm.dispose()
>     4. The fsm isn't done yet with the "execute" event but the fsm it's
>     gone now
>     5. Exception
>
>
>     An idea how to terminate and dispose the fsm is to use some other event
>     not observed by fsm. Something like this example
>     http://tinyurl.com/jj7kfxt .
>
>
>
>
>
>
>
>     ------------------------------------------------------------------------------
>     Transform Data into Opportunity.
>     Accelerate data analysis in your applications with
>     Intel Data Analytics Acceleration Library.
>     Click to learn more.
>     http://makebettercode.com/inteldaal-eval
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://makebettercode.com/inteldaal-eval
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

voger
I did this and the result is that the "terminated" event is not even
handled. I get this debug line:

005436 qx.util.fsm.FiniteStateMachine[52-0]: Fsm_1: Cannot listen to
event 'terminated', because the finite state machine is not running.



On 08/03/2016 11:42 μμ, Derrell Lipman wrote:

> So I've been thinking about this. Although what I told you is correct --
> modern browsers, and even old ones, should have no problem automatically
> garbage collecting an FSM because it has no references to DOM objects
> and no circular references -- qooxdoo debug display logic could still be
> applied to disposal. I'm thinking about what needs to change to support
> that feature.
>
> Would you please try something for me...
>
> At qx/util/fsm/FiniteStateMachine.js:1236, change
>    this.fireDataEvent("terminated", thisState)
> to
>    this.scheduleEvent("terminated", this, thisState);
>
> Then run your original playground test with your call to fsm.dispose().
> I'm interested in whether you still see the crash. I don't think you
> will, since the fsm processing stack will have unwound at the point that
> the event fires so it should be safe to dispose.
>
> (BTW, after calling fsm.dispose(), you should probably /still/ be
> setting your fsm variable to null, so that the garbage collector can do
> its job on the FSM object itself.)
>
> Derrell
>
>
> On Tue, Mar 8, 2016 at 3:33 PM voger <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thanks Derrell. It is great to hear from the author itself.
>
>     It's just that I saw in the qx.util.fsm.FiniteStateMachine#destruct()
>     code that it does some clean up functionality and wanted to be in the
>     safe side.
>
>     Plus if I wouldn't understand why it didn't work how I thought it
>     should, I would literally loose sleep over it. I don't exaggerate. I
>     wasted hours to understand the problem even after you suggested that
>     there was no need to dispose the fsm.
>
>
>
>
>
>     On 08/03/2016 07:03 μμ, Derrell Lipman wrote:
>      > Right. My suggestion is that you shouldn't need to call
>     fsm.dispose().
>      > Instead, just set
>      >     fsm = null;
>      > so it will be garbage collected. I don't believe there is
>     anything here
>      > that needs "help" with disposing.
>      >
>      > Here's the modified example: http://tinyurl.com/zxmbrcj
>      >
>      > Cheers,
>      >
>      > Derrell
>      >
>      >
>      > On Tue, Mar 8, 2016 at 11:20 AM voger <[hidden email]
>     <mailto:[hidden email]>
>      > <mailto:[hidden email]
>     <mailto:[hidden email]>>> wrote:
>      >
>      >     I did a simple example of the problem. http://tinyurl.com/zg8nse2
>      >
>      >     After some investigation with the debugger it seems that the
>     problem is
>      >     the fact that I am trying to dispose the fsm object using
>     it's own event
>      >     handler.
>      >
>      >     A walk through to explain better what I mean:
>      >
>      >     1. In the final state I click the "Terminate" button.
>      >     2. The fsm object picks the "execute" event and starts
>     processing it
>      >     3. One of the handlers decides to fsm.dispose()
>      >     4. The fsm isn't done yet with the "execute" event but the
>     fsm it's
>      >     gone now
>      >     5. Exception
>      >
>      >
>      >     An idea how to terminate and dispose the fsm is to use some
>     other event
>      >     not observed by fsm. Something like this example
>      > http://tinyurl.com/jj7kfxt .
>      >
>      >
>      >
>      >
>      >
>      >
>      >
>      >
>       ------------------------------------------------------------------------------
>      >     Transform Data into Opportunity.
>      >     Accelerate data analysis in your applications with
>      >     Intel Data Analytics Acceleration Library.
>      >     Click to learn more.
>      > http://makebettercode.com/inteldaal-eval
>      >     _______________________________________________
>      >     qooxdoo-devel mailing list
>      > [hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------------
>      > Transform Data into Opportunity.
>      > Accelerate data analysis in your applications with
>      > Intel Data Analytics Acceleration Library.
>      > Click to learn more.
>      > http://makebettercode.com/inteldaal-eval
>      >
>      >
>      >
>      > _______________________________________________
>      > qooxdoo-devel mailing list
>      > [hidden email]
>     <mailto:[hidden email]>
>      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>      >
>
>
>     ------------------------------------------------------------------------------
>     Transform Data into Opportunity.
>     Accelerate data analysis in your applications with
>     Intel Data Analytics Acceleration Library.
>     Click to learn more.
>     http://makebettercode.com/inteldaal-eval
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

Derrell Lipman
Yeah, I see. That makes sense.

For now, just set your fsm variable to null. This doesn't help you if you're trying to use the dispose debugging, but at least should ensure that the memory does actually get garbage collected. At some point, I may try to work out how to allow the dispose debugging to work with this, but it's a pretty obscure case and is becoming less and less necessary as browsers mature anyway.

Cheers,

Derrell


On Wed, Mar 9, 2016 at 1:00 PM voger <[hidden email]> wrote:
I did this and the result is that the "terminated" event is not even
handled. I get this debug line:

005436 qx.util.fsm.FiniteStateMachine[52-0]: Fsm_1: Cannot listen to
event 'terminated', because the finite state machine is not running.



On 08/03/2016 11:42 μμ, Derrell Lipman wrote:
> So I've been thinking about this. Although what I told you is correct --
> modern browsers, and even old ones, should have no problem automatically
> garbage collecting an FSM because it has no references to DOM objects
> and no circular references -- qooxdoo debug display logic could still be
> applied to disposal. I'm thinking about what needs to change to support
> that feature.
>
> Would you please try something for me...
>
> At qx/util/fsm/FiniteStateMachine.js:1236, change
>    this.fireDataEvent("terminated", thisState)
> to
>    this.scheduleEvent("terminated", this, thisState);
>
> Then run your original playground test with your call to fsm.dispose().
> I'm interested in whether you still see the crash. I don't think you
> will, since the fsm processing stack will have unwound at the point that
> the event fires so it should be safe to dispose.
>
> (BTW, after calling fsm.dispose(), you should probably /still/ be
> setting your fsm variable to null, so that the garbage collector can do
> its job on the FSM object itself.)
>
> Derrell
>
>
> On Tue, Mar 8, 2016 at 3:33 PM voger <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Thanks Derrell. It is great to hear from the author itself.
>
>     It's just that I saw in the qx.util.fsm.FiniteStateMachine#destruct()
>     code that it does some clean up functionality and wanted to be in the
>     safe side.
>
>     Plus if I wouldn't understand why it didn't work how I thought it
>     should, I would literally loose sleep over it. I don't exaggerate. I
>     wasted hours to understand the problem even after you suggested that
>     there was no need to dispose the fsm.
>
>
>
>
>
>     On 08/03/2016 07:03 μμ, Derrell Lipman wrote:
>      > Right. My suggestion is that you shouldn't need to call
>     fsm.dispose().
>      > Instead, just set
>      >     fsm = null;
>      > so it will be garbage collected. I don't believe there is
>     anything here
>      > that needs "help" with disposing.
>      >
>      > Here's the modified example: http://tinyurl.com/zxmbrcj
>      >
>      > Cheers,
>      >
>      > Derrell
>      >
>      >
>      > On Tue, Mar 8, 2016 at 11:20 AM voger <[hidden email]
>     <mailto:[hidden email]>
>      > <mailto:[hidden email]
>     <mailto:[hidden email]>>> wrote:
>      >
>      >     I did a simple example of the problem. http://tinyurl.com/zg8nse2
>      >
>      >     After some investigation with the debugger it seems that the
>     problem is
>      >     the fact that I am trying to dispose the fsm object using
>     it's own event
>      >     handler.
>      >
>      >     A walk through to explain better what I mean:
>      >
>      >     1. In the final state I click the "Terminate" button.
>      >     2. The fsm object picks the "execute" event and starts
>     processing it
>      >     3. One of the handlers decides to fsm.dispose()
>      >     4. The fsm isn't done yet with the "execute" event but the
>     fsm it's
>      >     gone now
>      >     5. Exception
>      >
>      >
>      >     An idea how to terminate and dispose the fsm is to use some
>     other event
>      >     not observed by fsm. Something like this example
>      > http://tinyurl.com/jj7kfxt .
>      >
>      >
>      >
>      >
>      >
>      >
>      >
>      >
>       ------------------------------------------------------------------------------
>      >     Transform Data into Opportunity.
>      >     Accelerate data analysis in your applications with
>      >     Intel Data Analytics Acceleration Library.
>      >     Click to learn more.
>      > http://makebettercode.com/inteldaal-eval
>      >     _______________________________________________
>      >     qooxdoo-devel mailing list
>      > [hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------------
>      > Transform Data into Opportunity.
>      > Accelerate data analysis in your applications with
>      > Intel Data Analytics Acceleration Library.
>      > Click to learn more.
>      > http://makebettercode.com/inteldaal-eval
>      >
>      >
>      >
>      > _______________________________________________
>      > qooxdoo-devel mailing list
>      > [hidden email]
>     <mailto:[hidden email]>
>      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>      >
>
>
>     ------------------------------------------------------------------------------
>     Transform Data into Opportunity.
>     Accelerate data analysis in your applications with
>     Intel Data Analytics Acceleration Library.
>     Click to learn more.
>     http://makebettercode.com/inteldaal-eval
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://makebettercode.com/inteldaal-eval
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

voger
Thank you. I will just set it null and let GC do it's magic.
Just in case it is of any help I created a simple project with the test
case from the playground example. I posted it in github
https://github.com/voger/fsmtest

The problem is this line in qx.util.fsm.FiniteStateMachine

this.__savedStates = this.__states = null;

When the fsm tries to continue processing the event these arrays are
already set to null.

BTW I forgot to say thank you for the whole FSM mechanism. It is indeed
a great tool that I recently discovered and it will help me to do things
I considered very difficult. Thank you. :D


On 09/03/2016 09:20 μμ, Derrell Lipman wrote:

> Yeah, I see. That makes sense.
>
> For now, just set your fsm variable to null. This doesn't help you if
> you're trying to use the dispose debugging, but at least should ensure
> that the memory does actually get garbage collected. At some point, I
> may try to work out how to allow the dispose debugging to work with
> this, but it's a pretty obscure case and is becoming less and less
> necessary as browsers mature anyway.
>
> Cheers,
>
> Derrell
>
>
> On Wed, Mar 9, 2016 at 1:00 PM voger <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     I did this and the result is that the "terminated" event is not even
>     handled. I get this debug line:
>
>     005436 qx.util.fsm.FiniteStateMachine[52-0]: Fsm_1: Cannot listen to
>     event 'terminated', because the finite state machine is not running.
>
>
>
>     On 08/03/2016 11:42 μμ, Derrell Lipman wrote:
>      > So I've been thinking about this. Although what I told you is
>     correct --
>      > modern browsers, and even old ones, should have no problem
>     automatically
>      > garbage collecting an FSM because it has no references to DOM objects
>      > and no circular references -- qooxdoo debug display logic could
>     still be
>      > applied to disposal. I'm thinking about what needs to change to
>     support
>      > that feature.
>      >
>      > Would you please try something for me...
>      >
>      > At qx/util/fsm/FiniteStateMachine.js:1236, change
>      >    this.fireDataEvent("terminated", thisState)
>      > to
>      >    this.scheduleEvent("terminated", this, thisState);
>      >
>      > Then run your original playground test with your call to
>     fsm.dispose().
>      > I'm interested in whether you still see the crash. I don't think you
>      > will, since the fsm processing stack will have unwound at the
>     point that
>      > the event fires so it should be safe to dispose.
>      >
>      > (BTW, after calling fsm.dispose(), you should probably /still/ be
>      > setting your fsm variable to null, so that the garbage collector
>     can do
>      > its job on the FSM object itself.)
>      >
>      > Derrell
>      >
>      >
>      > On Tue, Mar 8, 2016 at 3:33 PM voger <[hidden email]
>     <mailto:[hidden email]>
>      > <mailto:[hidden email]
>     <mailto:[hidden email]>>> wrote:
>      >
>      >     Thanks Derrell. It is great to hear from the author itself.
>      >
>      >     It's just that I saw in the
>     qx.util.fsm.FiniteStateMachine#destruct()
>      >     code that it does some clean up functionality and wanted to
>     be in the
>      >     safe side.
>      >
>      >     Plus if I wouldn't understand why it didn't work how I thought it
>      >     should, I would literally loose sleep over it. I don't
>     exaggerate. I
>      >     wasted hours to understand the problem even after you
>     suggested that
>      >     there was no need to dispose the fsm.
>      >
>      >
>      >
>      >
>      >
>      >     On 08/03/2016 07:03 μμ, Derrell Lipman wrote:
>      >      > Right. My suggestion is that you shouldn't need to call
>      >     fsm.dispose().
>      >      > Instead, just set
>      >      >     fsm = null;
>      >      > so it will be garbage collected. I don't believe there is
>      >     anything here
>      >      > that needs "help" with disposing.
>      >      >
>      >      > Here's the modified example: http://tinyurl.com/zxmbrcj
>      >      >
>      >      > Cheers,
>      >      >
>      >      > Derrell
>      >      >
>      >      >
>      >      > On Tue, Mar 8, 2016 at 11:20 AM voger
>     <[hidden email] <mailto:[hidden email]>
>      >     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>      >      > <mailto:[hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email]
>     <mailto:[hidden email]>>>> wrote:
>      >      >
>      >      >     I did a simple example of the problem.
>     http://tinyurl.com/zg8nse2
>      >      >
>      >      >     After some investigation with the debugger it seems
>     that the
>      >     problem is
>      >      >     the fact that I am trying to dispose the fsm object using
>      >     it's own event
>      >      >     handler.
>      >      >
>      >      >     A walk through to explain better what I mean:
>      >      >
>      >      >     1. In the final state I click the "Terminate" button.
>      >      >     2. The fsm object picks the "execute" event and starts
>      >     processing it
>      >      >     3. One of the handlers decides to fsm.dispose()
>      >      >     4. The fsm isn't done yet with the "execute" event but the
>      >     fsm it's
>      >      >     gone now
>      >      >     5. Exception
>      >      >
>      >      >
>      >      >     An idea how to terminate and dispose the fsm is to use
>     some
>      >     other event
>      >      >     not observed by fsm. Something like this example
>      >      > http://tinyurl.com/jj7kfxt .
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >      >
>      >
>       ------------------------------------------------------------------------------
>      >      >     Transform Data into Opportunity.
>      >      >     Accelerate data analysis in your applications with
>      >      >     Intel Data Analytics Acceleration Library.
>      >      >     Click to learn more.
>      >      > http://makebettercode.com/inteldaal-eval
>      >      >     _______________________________________________
>      >      >     qooxdoo-devel mailing list
>      >      > [hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>      >      >     <mailto:[hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email]
>     <mailto:[hidden email]>>>
>      >      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>      >      >
>      >      >
>      >      >
>      >      >
>      >
>       ------------------------------------------------------------------------------
>      >      > Transform Data into Opportunity.
>      >      > Accelerate data analysis in your applications with
>      >      > Intel Data Analytics Acceleration Library.
>      >      > Click to learn more.
>      >      > http://makebettercode.com/inteldaal-eval
>      >      >
>      >      >
>      >      >
>      >      > _______________________________________________
>      >      > qooxdoo-devel mailing list
>      >      > [hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>      >      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>      >      >
>      >
>      >
>      >
>       ------------------------------------------------------------------------------
>      >     Transform Data into Opportunity.
>      >     Accelerate data analysis in your applications with
>      >     Intel Data Analytics Acceleration Library.
>      >     Click to learn more.
>      > http://makebettercode.com/inteldaal-eval
>      >     _______________________________________________
>      >     qooxdoo-devel mailing list
>      > [hidden email]
>     <mailto:[hidden email]>
>      >     <mailto:[hidden email]
>     <mailto:[hidden email]>>
>      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------------
>      > Transform Data into Opportunity.
>      > Accelerate data analysis in your applications with
>      > Intel Data Analytics Acceleration Library.
>      > Click to learn more.
>      > http://makebettercode.com/inteldaal-eval
>      >
>      >
>      >
>      > _______________________________________________
>      > qooxdoo-devel mailing list
>      > [hidden email]
>     <mailto:[hidden email]>
>      > https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>      >
>
>
>     ------------------------------------------------------------------------------
>     Transform Data into Opportunity.
>     Accelerate data analysis in your applications with
>     Intel Data Analytics Acceleration Library.
>     Click to learn more.
>     http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
>     _______________________________________________
>     qooxdoo-devel mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
>
>
>
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

Dietrich Streifert
Hi Voger,

wouldn't decoupling the disposal from the event do the magic?

In
https://github.com/voger/fsmtest/blob/master/source/class/fsmtest/Application.js#L157

Instead of doing

     fsm.dispose()
     console.log("fsm.isDisposed(): "+ fsm.isDisposed());

I'd do

     qx.event.Timer.once(function() {
         fsm.dispose();
         console.log("fsm.isDisposed(): "+ fsm.isDisposed());
         fsm = null;
     }, this, 0);

I mean besides all discussion if dispose is needed at all.

Dietrich

Am 09.03.2016 um 21:58 schrieb voger:

> Thank you. I will just set it null and let GC do it's magic.
> Just in case it is of any help I created a simple project with the test
> case from the playground example. I posted it in github
> https://github.com/voger/fsmtest
>
> The problem is this line in qx.util.fsm.FiniteStateMachine
>
> this.__savedStates = this.__states = null;
>
> When the fsm tries to continue processing the event these arrays are
> already set to null.
>
> BTW I forgot to say thank you for the whole FSM mechanism. It is indeed
> a great tool that I recently discovered and it will help me to do things
> I considered very difficult. Thank you. :D
>
>


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: How to dispose a finite state machine?

voger
Thanks. I tried it and it works. This a really nice trick. I haven't
thought about using the timer like this.

On 10/03/2016 09:03 πμ, Dietrich Streifert wrote:

> Hi Voger,
>
> wouldn't decoupling the disposal from the event do the magic?
>
> In
> https://github.com/voger/fsmtest/blob/master/source/class/fsmtest/Application.js#L157
>
> Instead of doing
>
>       fsm.dispose()
>       console.log("fsm.isDisposed(): "+ fsm.isDisposed());
>
> I'd do
>
>       qx.event.Timer.once(function() {
>           fsm.dispose();
>           console.log("fsm.isDisposed(): "+ fsm.isDisposed());
>           fsm = null;
>       }, this, 0);
>
> I mean besides all discussion if dispose is needed at all.
>
> Dietrich
>
> Am 09.03.2016 um 21:58 schrieb voger:
>> Thank you. I will just set it null and let GC do it's magic.
>> Just in case it is of any help I created a simple project with the test
>> case from the playground example. I posted it in github
>> https://github.com/voger/fsmtest
>>
>> The problem is this line in qx.util.fsm.FiniteStateMachine
>>
>> this.__savedStates = this.__states = null;
>>
>> When the fsm tries to continue processing the event these arrays are
>> already set to null.
>>
>> BTW I forgot to say thank you for the whole FSM mechanism. It is indeed
>> a great tool that I recently discovered and it will help me to do things
>> I considered very difficult. Thank you. :D
>>
>>
>
>
> ------------------------------------------------------------------------------
> Transform Data into Opportunity.
> Accelerate data analysis in your applications with
> Intel Data Analytics Acceleration Library.
> Click to learn more.
> http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
> _______________________________________________
> qooxdoo-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Bug tree scroll ?

Johan
Hi !

I need your help for fix this bug.

I have a list and i push this list in the tree.
I select a machine in my tree but sometimes, when a tree add a scroll,
the broswer crach...
For the example, i resize a broswer after machine selection and browser
crach !

Sorry for this link but doesn't work in tinyurl :

http://demo.qooxdoo.org/devel/playground/#%7B%22code%22%3A%22%252F%252F%2520Document%2520is%2520the%2520application%2520root%250D%250Avar%2520doc%2520%253D%2520this.getRoot()%253B%250D%250A%250D%250Avar%2520path_icon%2520%253D%2520%2522icon%252F22%252Fapps%252Finternet-web-browser.png%2522%253B%250D%250A%250D%250Aconstruct_interface(doc)%253B%250D%250ACreationTree(doc.Composite)%253B%250D%250A%250D%250Avar%2520message%253D%2520%257B%2522cmd%2522%253A%2522getinfo%2522%252C%2522data%2522%253A%257B%2522err%2522%253A0%252C%2522Societe%2522%253A%257B%2522iId%2522%253A1%252C%2522strNom%2522%253A%2522Socixtx%2520xxxx%2520%2522%252C%250D%250A%2522Groupe%2522%253A%255B%250D%250A%257B%2522iId%2522%253A36%252C%2522strNom%2522%253A%2522test1%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Site%2522%253A%255B%257B%2522iId%2522%253A41%252C%2522strNom%2522%253A%2522site%2520nord%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A57%252C%2522strNom%2522%253A%2522Machine%25201%2522%252C%2522iEtat%2522%253A16%257D%252C%250D%250A%257B%2522iId%2522%253A2%252C%2522strNom%2522%253A%2522ST1600%2520-%2520102%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A43%252C%2522strNom%2522%253A%2522machine%2520a%2520jour%2520version%2520dev%2520012345678901234567890123456789%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Site%2522%253A%255B%257B%2522iId%2522%253A59%252C%2522strNom%2522%253A%2522site%2520soft%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A30%252C%2522strNom%2522%253A%2522Machine%2520116%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A2%252C%2522strNom%2522%253A%2522ST1600%2520-%2520102%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A90%252C%2522strNom%2522%253A%2522st1600%2520-%2520105%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A1%252C%2522strNom%2522%253A%2522ST1600%2520-%2520167%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A60%252C%2522strNom%2522%253A%2522site%2520lionel%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A1%252C%2522strNom%2522%253A%2522ST1600%2520-%2520167%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A61%252C%2522strNom%2522%253A%2522site%2520pascal%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A123%252C%2522strNom%2522%253A%2522Machine%25201%2522%252C%2522iEtat%2522%253A16%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A66%252C%2522strNom%2522%253A%2522site%2520test%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A90%252C%2522strNom%2522%253A%2522st1600%2520-%2520105%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A4%252C%2522strNom%2522%253A%2522site%2520sav%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Site%2522%253A%255B%257B%2522iId%2522%253A100%252C%2522strNom%2522%253A%2522BUREAU%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A182%252C%2522strNom%2522%253A%2522Machine%2520176167%2522%252C%2522iEtat%2522%253A17%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A102%252C%2522strNom%2522%253A%2522bureau%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A184%252C%2522strNom%2522%253A%2522Machine%2520176167%2522%252C%2522iEtat%2522%253A17%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A104%252C%2522strNom%2522%253A%2522bureau%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A186%252C%2522strNom%2522%253A%2522Machine%2520176167%2522%252C%2522iEtat%2522%253A16%257D%255D%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A2%252C%2522strNom%2522%253A%2522soft%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Site%2522%253A%255B%257B%2522iId%2522%253A6%252C%2522strNom%2522%253A%2522bureau%2520lionel%2520haut%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A179%252C%2522strNom%2522%253A%2522176163%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A49%252C%2522strNom%2522%253A%2522machine%2520dam%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A1%252C%2522strNom%2522%253A%2522ST1600%2520-%2520167%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A110%252C%2522strNom%2522%253A%2522test%2520double%2520167%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A7%252C%2522strNom%2522%253A%2522bureau%2520pascal%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A318%252C%2522strNom%2522%253A%2522225%2520salle%2520de%2520formation%2522%252C%2522iEtat%2522%253A16%257D%252C%250D%250A%257B%2522iId%2522%253A100%252C%2522strNom%2522%253A%2522st1400E-16%2520106%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A2%252C%2522strNom%2522%253A%2522ST1600%2520-%2520102%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A90%252C%2522strNom%2522%253A%2522st1600%2520-%2520105%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A114%252C%2522strNom%2522%253A%2522test%2520d'exploit%2520'%2522%252C%2522iEtat%2522%253A1%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A9%252C%2522strNom%2522%253A%2522bureau%2520johan%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A360%252C%2522strNom%2522%253A%25221400%2520-%2520132%2522%252C%2522iEtat%2522%253A16%257D%252C%250D%250A%257B%2522iId%2522%253A364%252C%2522strNom%2522%253A%25221400%2520-%252023%2522%252C%2522iEtat%2522%253A16%257D%252C%250D%250A%257B%2522iId%2522%253A363%252C%2522strNom%2522%253A%25221400%2520-%252051%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A368%252C%2522strNom%2522%253A%25221600%2520-%2520133%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A361%252C%2522strNom%2522%253A%25221600%2520-%2520137%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A362%252C%2522strNom%2522%253A%25221600%2520-%252050%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A21%252C%2522strNom%2522%253A%2522WX102%2520-%2520130%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A24%252C%2522strNom%2522%253A%2522bureau%2520jf%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A30%252C%2522strNom%2522%253A%2522Machine%2520116%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A59%252C%2522strNom%2522%253A%2522site%2520soft%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A30%252C%2522strNom%2522%253A%2522Machine%2520116%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A2%252C%2522strNom%2522%253A%2522ST1600%2520-%2520102%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A90%252C%2522strNom%2522%253A%2522st1600%2520-%2520105%2522%252C%2522iEtat%2522%253A3%257D%252C%250D%250A%257B%2522iId%2522%253A1%252C%2522strNom%2522%253A%2522ST1600%2520-%2520167%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A85%252C%2522strNom%2522%253A%2522Site%2520saint%2520pierre%2520test%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A357%252C%2522strNom%2522%253A%2522200%2520st%2520pierre%2522%252C%2522iEtat%2522%253A16%257D%252C%250D%250A%257B%2522iId%2522%253A163%252C%2522strNom%2522%253A%2522saint%2520pierre%2520test%2522%252C%2522iEtat%2522%253A16%257D%255D%257D%252C%250D%250A%257B%2522iId%2522%253A110%252C%2522strNom%2522%253A%2522bureau%2520dam%2522%252C%2522iEtat%2522%253A3%252C%250D%250A%2522Machine%2522%253A%255B%257B%2522iId%2522%253A49%252C%2522strNom%2522%253A%2522machine%2520dam%2522%252C%2522iEtat%2522%253A3%257D%255D%257D%255D%257D%255D%257D%257D%252C%250D%250A%2520%2522ou%2522%253A%2522listeMachines%2522%252C%2522iIdConnexion%2522%253A0%257D%253B%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520%2520%250D%250AMAJListe(doc.Composite%252Cmessage)%253B%250D%250A%250D%250Afunction%2520construct_interface(root)%257B%250D%250A%2509%250D%250A%2509var%2520grid_gauche%2520%253D%2520new%2520qx.ui.layout.Grid()%253B%250D%250A%2520%2520%2520%2520grid_gauche.setColumnFlex(0%252C%25201)%253B%250D%250A%2520%2520%2520%2520root.root_container_affichage_bouton_gauche%2520%253D%2520new%2520qx.ui.container.Composite(grid_gauche)%253B%2520%250D%250A%2520%2520%2520%2520var%2520scrollContainer%2520%253D%2520new%2520qx.ui.container.Scroll(root.root_container_affichage_bouton_gauche)%253B%250D%250A%2509scrollContainer.setWidth(213)%253B%2520%252F%252Ftaille%2520fixe%250D%250A%2509root.add(scrollContainer%252C%257Btop%253A66%252Cleft%253A0%252Cheight%253A%252280%2525%2522%257D)%253B%250D%250A%2520%2520%2520%2520%250D%250A%2509root.bouton_retour%2520%253D%2520new%2520qx.ui.form.Button(%2522Acceuil%2522%252C%2520null).set(%257Bdecorator%253A%2520null%257D)%253B%250D%250A%2509root.root_container_affichage_bouton_gauche.add(root.bouton_retour%252C%257Brow%253A0%252Ccolumn%253A0%257D)%253B%250D%250A%2509%250D%250A%2520%2520%2520%2520%252F%252FBouton%2520Ajouter%2520Machine%250D%250A%2520%2520%2520%2520var%2520font_bt%2520%253D%2520new%2520qx.bom.Font(16%252C%2520%255B%2522Arial%2522%255D)%253B%250D%250A%2520%2520%2520%2520root.bt_ajout_machine%2520%253D%2520%2520new%2520qx.ui.form.Button(%2522Liste%2520machines%2522%252C%2520path_icon)%253B%250D%250A%2520%2520%2520%2520root.bt_ajout_machine.setGap(10)%253B%250D%250A%2520%2520%2520%2520root.bt_ajout_machine.setSelectable(false)%253B%250D%250A%2520%2520%2520%2520root.bt_ajout_machine.setHeight(32)%253B%250D%250A%2520%2520%2520%2520root.bt_ajout_machine.setBackgroundColor(%2522%2523333333%2522)%253B%250D%250A%2520%2520%2520%2520root.bt_ajout_machine.setTextColor(%2522%2523FFFFFF%2522)%253B%250D%250A%2520%2520%2520%2520root.bt_ajout_machine.setFont(font_bt)%253B%250D%250A%2520%2520%2520%2520root.root_container_affichage_bouton_gauche.add(root.bt_ajout_machine%252C%257Brow%253A5000%252Ccolumn%253A0%257D)%253B%250D%250A%2520%2520%2520%2520root.Composite%2520%253D%2520new%2520qx.ui.container.Composite()%253B%250D%250A%2520%2520%2520%2520root.Composite.parent%2520%253D%2520root%253B%250D%250A%2520%2520%2520%2520root.root_container_affichage_bouton_gauche.add(root.Composite%252C%257Brow%253A5001%252Ccolumn%253A0%257D)%253B%250D%250A%2520%2520%2520%2520construct_listMachine(root.Composite)%250D%250A%257D%250D%250Afunction%2520construct_listMachine(root)%257B%250D%250A%2520%2520qx.Class.include(qx.ui.treevirtual.TreeVirtual%252Cqx.ui.treevirtual.MNode%252Cqx.ui.table.headerrenderer)%253B%250D%250A%2509%250D%250A%2520%2520var%2520layout%2520%253D%2520new%2520qx.ui.layout.Canvas()%253B%250D%250A%2520%2520root.setLayout(layout)%253B%250D%250A%2520%2520var%2520VBox_gauche%2520%253D%2520new%2520qx.ui.layout.VBox()%253B%250D%250A%2520%2520root.container_affichage_bouton_gauche%2520%253D%2520new%2520qx.ui.container.Composite(VBox_gauche)%253B%2520%250D%250A%2520%2520%250D%250A%2520%2520root.treeSociete%2520%253D%2520undefined%253B%250D%250A%2520%2520%252F%252Fajout%2520du%2520champs%2520recherche%250D%250A%2520%2520root.container_search%2520%253D%2520new%2520qx.ui.container.Composite(new%2520qx.ui.layout.Canvas())%253B%250D%250A%2520%2520root.container_search.setHeight(40)%253B%250D%250A%2520%2520root.search%2520%253D%2520new%2520qx.ui.form.TextField()%253B%250D%250A%2520%2520root.search.setPlaceholder(%2522Recherche...%2522)%253B%250D%250A%2520%2520root.search.setHeight(30)%253B%250D%250A%2520%2520root.container_search.add(root.search%252C%257Bleft%253A%252210%2525%2522%252Ctop%253A%252216%2525%2522%252Cwidth%253A%252280%2525%2522%257D)%253B%250D%250A%2520%2520root.container_affichage_bouton_gauche.add(root.container_search)%253B%250D%250A%2520%2520root.add(root.container_affichage_bouton_gauche%252C%257Bwidth%253A%2522100%2525%2522%252Cheight%253A%2522100%2525%2522%257D)%253B%250D%250A%257D%250D%250A%250D%250Afunction%2520construct_machine(root%252CiIdConnexion)%250D%250A%257B%250D%250A%2520%2520%2520%2520root.bt_cameras%2520%253D%2520%255B%255D%253B%2509%2509%2509%2509%252F%252F%2520Cameras%2520%250D%250A%2520%2520%2520%2520root.bt_commandes%2520%253D%2520%255B%255D%253B%2509%2509%2509%2509%252F%252F%2520Commandes%250D%250A%2520%2520%2520%2520root.bt_entrees%2520%253D%2520%255B%255D%253B%2509%2509%2509%2509%252F%252F%2520Entrees%250D%250A%2520%2520%2520%2520root.bt_infos%2520%253D%2520%255B%255D%253B%2509%2509%2509%2509%2509%252F%252F%2520Infos%250D%250A%2520%2520%2520%2520root.bt_telecommandes%2520%253D%2520%255B%255D%253B%2509%2509%2509%252F%252F%2520Telecommandes%250D%250A%2520%2520%2520%2520%250D%250A%2520%2520%2520%2520%252F%252Fcreation%2520de%2520la%2520grille%2520pour%2520l'affichage%2520des%2520boutons%250D%250A%2520%2520%2520%2520var%2520font_bt%2520%253D%2520new%2520qx.bom.Font(16%252C%2520%255B%2522Arial%2522%255D)%253B%250D%250A%2520%2520%2520%2520var%2520layout%2520%253D%2520new%2520qx.ui.layout.Canvas()%253B%250D%250A%2520%2520%2520%2520root.setLayout(layout)%253B%250D%250A%2520%2520%2520%2520var%2520grid_gauche%2520%253D%2520new%2520qx.ui.layout.Grid()%253B%250D%250A%2520%2520%2520%2520grid_gauche.setColumnFlex(0%252C%25201)%253B%250D%250A%2520%2520%2520%2520root.container_affichage_bouton_gauche%2520%253D%2520new%2520qx.ui.container.Composite(grid_gauche)%253B%2520%250D%250A%2520%2520%2520%2520%252F%252FBouton%2520Live%250D%250A%2520%2520%2520%2520root.bt_live%2520%253D%2520%2520new%2520qx.ui.form.Button(%2522Live%2522%252C%2520path_icon)%253B%250D%250A%2520%2520%2520%2520root.bt_live.setGap(10)%253B%250D%250A%2509root.bt_live.setSelectable(false)%253B%250D%250A%2509root.bt_live.setHeight(32)%253B%250D%250A%2509root.bt_live.setBackgroundColor(%2522%25232494F2%2522)%253B%250D%250A%2509root.bt_live.setTextColor(%2522%2523FFFFFF%2522)%253B%250D%250A%2509root.bt_live.setFont(font_bt)%253B%250D%250A%2509root.container_affichage_bouton_gauche.add(root.bt_live%252C%257Brow%253A0%252Ccolumn%253A0%257D)%253B%250D%250A%2509%252F%252F%2520ajout%2520des%2520boutons%2520du%2520live%250D%250A%2509root.bt_camera%2520%253D%2520Create_Bouton_machine(%2522bouton%2520section%2522%252C%2522Cameras%2522%252C%2520null%252C%25200%252C0%252C0%252C%2520root.container_affichage_bouton_gauche%252C1%252C0)%253B%2509%252F%252Froot.bt_camera.addListener(%2522execute%2522%252Cfunction%2520(e)%257Broot.changeEtatCameras()%253B%257D%252Croot)%253B%250D%250A%2509root.bt_commande%2520%253D%2520Create_Bouton_machine(%2522bouton%2520section%2522%252C%2522Commandes%2522%252C%2520null%252C%25200%252C0%252C0%252C%2520root.container_affichage_bouton_gauche%252C100%252C0)%253B%250D%250A%2509root.bt_entree%2520%253D%2520Create_Bouton_machine(%2522bouton%2520section%2522%252C%2522Entrees%2522%252C%2520null%252C%25200%252C0%252C0%252C%2520root.container_affichage_bouton_gauche%252C200%252C0)%253B%2509%252F%252Froot.bt_entree.addListener(%2522execute%2522%252Cfunction%2520(e)%257Broot.changeEtatEntrees()%253B%257D%252Croot)%253B%250D%250A%2509root.bt_info%2520%253D%2520Create_Bouton_machine(%2522bouton%2520section%2522%252C%2522Infos%2522%252C%2520null%252C%25200%252C0%252C0%252C%2520root.container_affichage_bouton_gauche%252C500%252C0)%253B%250D%250A%2509root.bt_telecommande%2520%253D%2520Create_Bouton_machine(%2522bouton%2520section%2522%252C%2522Telecommandes%2522%252C%2520null%252C%25200%252C0%252C0%252C%2520root.container_affichage_bouton_gauche%252C700%252C0)%253B%250D%250A%2509root.add(root.container_affichage_bouton_gauche%252C%257Bwidth%253A%2522100%2525%2522%257D)%253B%250D%250A%257D%250D%250A%250D%250Afunction%2520new_machine_interface(root)%250D%250A%257B%250D%250A%2509doc.info(%2522new_machine_interface%2520%2522%252C%2520root.Machines)%253B%250D%250A%2509if(root.Machines%2520%253D%253D%253D%2520undefined)%250D%250A%2509%257B%250D%250A%2520%2520%2520%2520%2509root.Machines%2520%253D%2520new%2520qx.ui.container.Composite()%253B%250D%250A%2520%2520%2520%2520%2509root.Machines.parent%2520%253D%2520root%253B%250D%250A%2520%2520%2520%2520%2509construct_machine(root.Machines%252C1)%253B%250D%250A%2520%2520%2520%2520%2509root.root_container_affichage_bouton_gauche.add(root.Machines%252C%257Brow%253A1%252Ccolumn%253A0%257D)%253B%250D%250A%2509%257D%250D%250A%257D%250D%250Afunction%2520Create_Bouton_machine(type%252C%2520texte%252C%2520icon%252C%2520posx%252C%2520posy%252C%2520padding%252C%2520container%252Cligne%252Ccolonne)%250D%250A%257B%250D%250A%2520%2520%2520%2520if%2520(type%2520%253D%253D%2520%2522bouton%2520section%2522)%250D%250A%2520%2520%2520%2520%257B%250D%250A%2520%2520%2520%2520%2509var%2520font_bt%2520%253D%2520new%2520qx.bom.Font(14%252C%2520%255B%2522Arial%2522%255D)%253B%250D%250A%2520%2520%2520%2520%2509var%2520bouton%2520%253D%2520new%2520qx.ui.form.Button(texte%252C%2520null)%253B%250D%250A%2520%2520%2520%2520%2509bouton.setSelectable(false)%253B%250D%250A%2520%2520%2520%2520%2509bouton.setHeight(28)%253B%250D%250A%2520%2520%2520%2520%2509bouton.setBackgroundColor(%2522%2523FFFFFF%2522)%253B%250D%250A%2520%2520%2520%2520%2509bouton.setTextColor(%2522%25232494F2%2522)%253B%250D%250A%2520%2520%2520%2520%2509bouton.setFont(font_bt)%253B%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520if%2520(container%2520!%253D%2520undefined)%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520%257B%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520%2509if(ligne%2520%253D%253D%253D%2520null%2520%257C%257C%2520colonne%2520%253D%253D%253D%2520null)%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520%2509%2509container.add(bouton%252C%2520%257Bleft%253A%2520posx%252C%2520top%253A%2520posy%257D)%253B%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520%2509else%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520%2509%2509container.add(bouton%252C%2520%257Brow%253A%2520ligne%252C%2520column%253A%2520colonne%257D)%253B%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520%257D%250D%250A%2520%2520%2520%2520%2520%2520%2520%2520return%2520bouton%253B%250D%250A%2520%2520%2520%2520%257D%250D%250A%257D%250D%250Afunction%2520CreationTree(root)%250D%250A%257B%250D%250A%2509var%2520that%253Droot%253B%250D%250A%2509root.timerCelltap%253Dundefined%253B%250D%250A%2509root.treeSociete%2520%253D%2520new%2520qx.ui.treevirtual.TreeVirtual(%255B%2522%2522%255D)%253B%250D%250A%2509root.treeSociete.setRowHeight(22)%253B%250D%250A%2509root.treeSociete.setKeepFirstVisibleRowComplete(false)%253B%250D%250A%2509root.treeSociete.setOpenCloseClickSelectsRow(true)%253B%250D%250A%2509root.treeSociete.setRowFocusChangeModifiesSelection(true)%253B%250D%250A%2509root.treeSociete.setStatusBarVisible(false)%253B%250D%250A%2509root.treeSociete.setHeaderCellsVisible(false)%253B%250D%250A%2509%250D%250A%2509%252F%252F%2520Obtain%2520the%2520resize%2520behavior%2520object%2520to%2520manipulate%250D%250A%2509var%2520resizeBehavior%2520%253D%2520root.treeSociete.getTableColumnModel().getBehavior()%253B%2509%250D%250A%2509%252F%252F%2520force%2520une%2520grosse%2520taille%2520pour%2520avoir%2520toujours%2520le%2520scrollbar%2520horizontal%2520sionon%2520il%2520y%2520a%2520des%2520problemes%2520sur%2520les%2520appels%2520machines%2520%250D%250A%2509%252F%252FresizeBehavior.set(0%252C%2520%257BminWidth%253A300%252CmaxWidth%253A400%257D)%253B%2520%252F%252F%2520version%2520ok%250D%250A%2509resizeBehavior.set(0%252C%2520%257BminWidth%253A180%252CmaxWidth%253A180%257D)%253B%2520%252F%252F%2520version%2520bug%250D%250A%2509%250D%250A%2509root.treeSociete.addListener(%2522treeClose%2522%252Cfunction(e)%2520%257B%250D%250A%2509%2509%2509%2509%252F%252F%2520root%2520%253D%253E%2520treeSociete%250D%250A%2509%2509%2509%2509var%2520nodeClosing%2520%253D%2520e.getData()%253B%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509if%2520(nodeClosing!%253Dundefined%2520%2526%2526%2520nodeClosing!%253Dnull)%2520%257B%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509%2509var%2520dataModel%2520%253D%2520this.getDataModel()%253B%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509%2509var%2520arrayData%253DdataModel.getData()%253B%250D%250A%2509%2509%2509%2509%2509%252F%252F%2520ferme%2520tous%2520les%2520enfants%250D%250A%2509%2509%2509%2509%2509for(var%2520i%2520in%2520arrayData%255BnodeClosing.nodeId%255D.children)%2520%257B%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509%2509%2509var%2520node%253DarrayData%2520%255BarrayData%255BnodeClosing.nodeId%255D.children%255Bi%255D%255D%253B%250D%250A%2509%2509%2509%2509%2509%2509if%2520(node!%253Dundefined)%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509%2509if%2520(nodeClosing.nodeId!%253Dnode.nodeId)%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509%2509%2509this.nodeSetOpened(node%252Cfalse)%253B%250D%250A%2509%2509%2509%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%2509dataModel.setData()%253B%250D%250A%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%257D%250D%250A%2509%2509)%253B%250D%250A%2509%250D%250A%2509root.treeSociete.addListener(%2522treeOpenWithContent%2522%252Cfunction(e)%2520%257B%250D%250A%2509%2509%2509%2509%252F%252F%2520root%2520%253D%253E%2520treeSociete%250D%250A%2509%2509%2509%2509var%2520tree%253Dthis%253B%250D%250A%2509%2509%2509%2509var%2520tabNode%253D%255B%255D%253B%250D%250A%2509%2509%2509%2509var%2520nodeOpening%2520%253D%2520e.getData()%253B%2509%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509var%2520dataModel%2520%253D%2520this.getDataModel()%253B%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509var%2520arrayData%253DdataModel.getData()%253B%2509%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509if%2520(nodeOpening!%253Dundefined%2520%2526%2526%2520nodeOpening!%253Dnull)%2520%257B%250D%250A%2509%2509%2509%2509%2509if%2520(nodeOpening.parentNodeId!%253Dundefined%2520%2526%2526%2520nodeOpening.parentNodeId!%253Dnull)%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509%252F%252F%2520ferme%2520les%2520nodes%2520freres%250D%250A%2509%2509%2509%2509%2509%2509for(var%2520i%2520in%2520arrayData%255BnodeOpening.parentNodeId%255D.children)%2520%257B%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509%2509%2509%2509var%2520node%253DarrayData%2520%255BarrayData%255BnodeOpening.parentNodeId%255D.children%255Bi%255D%255D%253B%250D%250A%2509%2509%2509%2509%2509%2509%2509if%2520(node!%253Dundefined)%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509%2509%2509if%2520(nodeOpening.nodeId!%253Dnode.nodeId%2520%2526%2526%2520node.bOpened)%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509%2509%2509%2509tabNode.push(node)%253B%2509%2509%2509%2509%2509%2509%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%2509%2509%2509%257Delse%250D%250A%2509%2509%2509%2509%2509%2509%2509%2509node%253Dundefined%253B%2509%2509%2509%250D%250A%2509%2509%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%2509%2509dataModel.setData()%253B%250D%250A%2509%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509for%2520(var%2520keyNode%2520in%2520tabNode)%2520%257B%2509%2509%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509%2509setTimeout%2520(function%2520(node)%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509tree.nodeSetOpened(node%252Cfalse)%253B%250D%250A%2509%2509%2509%2509%2509%257D%252C1%252CtabNode%255BkeyNode%255D)%253B%250D%250A%2509%2509%2509%2509%257D%2509%2509%2509%2509%250D%250A%2509%2509%2509%257D%250D%250A%2509%2509)%253B%250D%250A%2509%2509%250D%250A%2509root.treeSociete.addListener(%2522cellDbltap%2522%252Cfunction(e)%2520%257B%2509%250D%250A%2509%2509if%2520(that.timerCelltap!%253Dundefined)%2520%257B%250D%250A%2509%2509%2509clearTimeout(that.timerCelltap)%253B%250D%250A%2509%2509%2509that.timerCelltap%253Dundefined%253B%250D%250A%2509%2509%257D%250D%250A%2509%2509doc.info(root.strClass%252C%2522(%2522%252Croot.iClass%252C%2522)%253A%2520treeSociete%252C%2520cellDbltap()%252C%2520e%253D%2522%252Ce)%253B%250D%250A%2509%2509var%2520nodeSelected%253Droot.treeSociete.getSelectedNodes()%253B%250D%250A%2509%2509doc.info(root.strClass%252C%2522(%2522%252Croot.iClass%252C%2522)%253A%2520treeSociete%252C%2520cellDbltap()%252C%2520e%253D%2522%252Ce%252CnodeSelected%255B0%255D.columnData.iIdMachine)%253B%250D%250A%2509%2509if(nodeSelected%255B0%255D.columnData.iIdMachine%2520!%253D%253D%2520undefined)%2520%252F%252F%2520on%2520est%2520sur%2520une%2520machine%250D%250A%2509%2509%257B%250D%250A%2509%2509%2509new_machine_interface(root.parent)%253B%250D%250A%2509%2509%257D%2509%2509%2509%2509%250D%250A%2509%257D%252Croot)%253B%250D%250A%250D%250A%2509root.treeSociete.addListener(%2522click%2522%252Cfunction(e)%2520%257B%2509%250D%250A%2509%2509function%2520execClick(e)%2520%257B%250D%250A%2509%2509%2509doc.info(that.strClass%252C%2522(%2522%252Cthat.iClass%252C%2522)%253A%2520treeSociete%252C%2520execClick()%252C%2520e%253D%2522%252Ce)%253B%250D%250A%2509%2509%2509%250D%250A%2509%2509%2509that.timerCelltap%253Dundefined%253B%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509var%2520bContinue%253Dtrue%253B%250D%250A%2509%2509%2509var%2520dataModel%2520%253D%2520that.treeSociete.getDataModel()%253B%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509var%2520arrayData%253DdataModel.getData()%253B%250D%250A%2509%2509%2509if%2520(bContinue)%2520%257B%2509%2509%2509%2509%2509%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509var%2520nSelected%253Dthat.treeSociete.getSelectedNodes()%253B%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509if%2520(nSelected!%253Dundefined%2520%2526%2526%2520nSelected%255B0%255D!%253Dundefined)%2520%257B%250D%250A%2509%2509%2509%2509%2509if%2520(nSelected%255B0%255D.bOpened%253D%253Dfalse)%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509that.treeSociete.nodeSetOpened(nSelected%255B0%255D%252Ctrue)%253B%250D%250A%2509%2509%2509%2509%2509%257Delse%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509that.treeSociete.nodeSetOpened(nSelected%255B0%255D%252Cfalse)%253B%250D%250A%2509%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%257Delse%2520%257B%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509for(var%2520i%2520in%2520arrayData)%2520%257B%250D%250A%2509%2509%2509%2509%2509if%2520(arrayData%2520%255Bi%255D!%253Dundefined%2520%2526%2526%2520arrayData%2520%255Bi%255D.bOpened%253D%253Dtrue)%250D%250A%2509%2509%2509%2509%2509%2509that.treeSociete.nodeSetOpened(arrayData%2520%255Bi%255D%252Cfalse)%253B%2509%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%257D%250D%250A%2509%2509%257D%250D%250A%2509%2509if%2520(that.timerCelltap%253D%253Dundefined)%2520%257B%250D%250A%2509%2509%2509%252F%252F%252F%2520recherche%2520le%2520nom%2520de%2520la%2520class%2520parent%2520pour%2520eliminer%2520lis%2520click%2520sur%2520les%2520scrollbar%250D%250A%2509%2509%2509var%2520Target%253D%2520e._originalTarget%253B%250D%250A%2509%2509%2509var%2520className%2520%253D%2520undefined%253B%250D%250A%2509%2509%2509while%2520(Target)%250D%250A%2509%2509%2509%257B%250D%250A%2509%2509%2509%2509if%2520(Target.className)%2520%257B%250D%250A%2509%2509%2509%2509%2509className%2520%253D%2520Target.className%253B%250D%250A%2509%2509%2509%2509%2509%252F%252Fdoc.info(root.strClass%252C%2522(%2522%252Croot.iClass%252C%2522)%253A%2520timerCelltap%2520%252C%2520className%253D%2522%252CclassName)%253B%250D%250A%2509%2509%2509%2509%2509if%2520(className.indexOf(%2522scrollbar%2522)%2520%253E%253D%25200%2520%257C%257C%2520%252F%252F%2520on%2520est%2520sur%2520le%2520qx-scrollbar-**%250D%250A%2509%2509%2509%2509%2509%2509className.indexOf(%2522cadre_liste%2522)%2520%253E%253D%25200)%2520%252F%252F%2520on%2520est%2520sur%2520le%2520qooxdoo-table-cell.qx-cadre_liste%250D%250A%2509%2509%2509%2509%2509%2509break%253B%250D%250A%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509Target%2520%253D%2520Target.parentElement%253B%250D%250A%2509%2509%2509%257D%250D%250A%2509%2509%2509if%2520(%2520className%2520%253D%253D%253D%2520undefined%2520%257C%257C%2520className.indexOf(%2522scrollbar%2522)%2520%253D%253D%253D%2520-1)%2520%257B%250D%250A%2509%2509%2509%2509that.timerCelltap%253DsetTimeout%2520(execClick%252C300%252Ce)%253B%250D%250A%2509%2509%2509%2509doc.info%2520(%2522that.timerCelltap%2522%252Cthat.timerCelltap)%250D%250A%2509%2509%2509%257D%250D%250A%2509%2509%257D%250D%250A%2509%257D%252Croot)%253B%250D%250A%250D%250A%2509root.container_affichage_bouton_gauche.add(root.treeSociete%252C%257Bheight%253A%252280%2525%2522%257D)%253B%250D%250A%250D%250A%2509var%2520dataModel%2520%253D%2520root.treeSociete.getDataModel()%253B%250D%250A%2509if%2520(dataModel!%253Dundefined)%2520%257B%2509%2509%250D%250A%2509%2509%252F%252F%2520Set%2520the%2520filter%250D%250A%2509%2509%252F%252FAREVOIR%2509%2509%2520%2520%250D%250A%2509%2509var%2520filter%2520%253D%2520qx.lang.Function.bind(function(node)%2520%257B%2509%2509%2509%250D%250A%2509%2509%2509%2509return%2520true%253B%250D%250A%2509%2509%2509%257D%252Croot)%253B%250D%250A%2509%2509dataModel.setFilter(filter)%253B%2509%250D%250A%2509%257D%250D%250A%257D%250D%250A%250D%250Afunction%2520MAJListe(root%252Cmessage)%250D%250A%257B%250D%250A%2509doc.info(root.strClass%252C%2522(%2522%252Croot.iClass%252C%2522)%253A%2520MAJListe()%252C%2520message%253D%2522%252Cmessage)%253B%250D%250A%2509if(message.data.err%2520!%253D%253D%25200)%2520return%253B%250D%250A%2509%250D%250A%2509var%2520dataModel%2520%253D%2520root.treeSociete.getDataModel()%253B%250D%250A%2509var%2520arrayData%253DdataModel.getData()%253B%2509%2509%2509%2509%2509%250D%250A%2509var%2520listSocietes%253Dmessage.data.Societe%253B%250D%250A%2509if%2520(listSocietes.Groupe!%253Dundefined%2520%2526%2526%2520typeof%2520listSocietes.Groupe%253D%253D%253D'object')%2520%257B%250D%250A%2509%2509doc.info(%2522MAJListe%253A%2520listSocietes.Groupe%253D%2522%252ClistSocietes.Groupe)%253B%250D%250A%2509%2509for(var%2520j%2520in%2520listSocietes.Groupe)%2520%257B%250D%250A%2509%2509%2509var%2520jsonGroupeSite%253DlistSocietes.Groupe%255Bj%255D%253B%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509var%2520nodeGrpSites%253Dundefined%253B%2509%2509%2509%2509%2509%2509%2509%2509%250D%250A%2509%2509%2509var%2520ObjetNodeGrpSites%253DGetNodeFromType(arrayData%252Cundefined%252C%2522iIdGroupeMachine%2522%252CjsonGroupeSite.iId)%253B%250D%250A%2509%2509%2509if%2520(ObjetNodeGrpSites%253D%253Dundefined)%2520%257B%250D%250A%2509%2509%2509%2509%252F%252F%2520on%2520cree%2520le%2520groupe%250D%250A%2509%2509%2509%2509nodeGrpSites%253DdataModel.addBranch(null%252CjsonGroupeSite.strNom%252C%2520false%252Cfalse%252Cpath_icon)%253B%250D%250A%2509%2509%2509%2509dataModel.setColumnData%2520(nodeGrpSites%252C%2522strType%2522%252C%2522GroupeMachine%2522)%253B%250D%250A%2509%2509%2509%2509dataModel.setColumnData%2520(nodeGrpSites%252C%2522iIdGroupeMachine%2522%252CjsonGroupeSite.iId)%253B%250D%250A%2509%2509%2509%2509dataModel.setColumnData%2520(nodeGrpSites%252C%2522bFilter%2522%252Ctrue)%253B%250D%250A%2509%2509%2509%257D%250D%250A%2509%2509%2509%252F%252F%2520on%2520cree%2520les%2520sites%250D%250A%2509%2509%2509for(var%2520k%2520in%2520jsonGroupeSite.Site)%2520%257B%250D%250A%2509%2509%2509%2509var%2520jsonSite%253DjsonGroupeSite.Site%255Bk%255D%253B%250D%250A%2509%2509%2509%2509%250D%250A%2509%2509%2509%2509var%2520nodeSite%253Dundefined%253B%250D%250A%2509%2509%2509%2509var%2520ObjetNodeSite%253DGetNodeFromType(arrayData%252CnodeGrpSites%252C%2522iIdSite%2522%252CjsonSite.iId)%253B%250D%250A%2509%2509%2509%2509if%2520(ObjetNodeSite%253D%253Dundefined)%2520%257B%250D%250A%2509%2509%2509%2509%2509nodeSite%253DdataModel.addBranch(nodeGrpSites%252CjsonSite.strNom%252C%2520false%252Cfalse%252Cpath_icon)%253B%250D%250A%2509%2509%2509%2509%2509dataModel.setColumnData%2520(nodeSite%252C%2522strType%2522%252C%2522Site%2522)%253B%250D%250A%2509%2509%2509%2509%2509dataModel.setColumnData%2520(nodeSite%252C%2522iIdSite%2522%252CjsonSite.iId)%253B%250D%250A%2509%2509%2509%2509%2509dataModel.setColumnData%2520(nodeSite%252C%2522bFilter%2522%252Ctrue)%250D%250A%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%252F%252F%2520on%2520cree%2520les%2520machines%250D%250A%2509%2509%2509%2509for(var%2520l%2520in%2520jsonSite.Machine)%2520%257B%250D%250A%2509%2509%2509%2509%2509var%2520jsonMachine%253DjsonSite.Machine%255Bl%255D%253B%250D%250A%2509%2509%2509%2509%2509var%2520nodeMachine%253Dundefined%253B%250D%250A%2509%2509%2509%2509%2509var%2520ObjetNodeMachine%253DGetNodeFromType(arrayData%252CnodeSite%252C%2522iIdMachine%2522%252CjsonMachine.iId)%253B%250D%250A%2509%2509%2509%2509%2509if%2520(ObjetNodeMachine%253D%253Dundefined)%2520%257B%250D%250A%2509%2509%2509%2509%2509%2509%252F%252Fdoc.info(%2522machine%2522%252CjsonMachine.iId%252CjsonMachine.strNom%252CjsonMachine.iEtat)%253B%250D%250A%2509%2509%2509%2509%2509%2509nodeMachine%253DdataModel.addLeaf%2520(nodeSite%252CjsonMachine.strNom%252C%2520true)%253B%250D%250A%2509%2509%2509%2509%2509%2509dataModel.setColumnData%2520(nodeMachine%252C%2522strType%2522%252C%2522Machine%2522)%253B%250D%250A%2509%2509%2509%2509%2509%2509dataModel.setColumnData%2520(nodeMachine%252C%2522iIdMachine%2522%252CjsonMachine.iId)%253B%250D%250A%2509%2509%2509%2509%2509%2509dataModel.setColumnData%2520(nodeMachine%252C%2522bFilter%2522%252Ctrue)%253B%250D%250A%2509%2509%2509%2509%2509%2509root.treeSociete.nodeSetIcon(nodeMachine%252Cpath_icon)%253B%250D%250A%2509%2509%2509%2509%2509%2509root.treeSociete.nodeSetSelectedIcon(nodeMachine%252Cpath_icon)%253B%250D%250A%2509%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%2509%257D%250D%250A%2509%2509%2509%257D%250D%250A%2509%2509%257D%250D%250A%2509%257D%250D%250A%2509dataModel.setData()%253B%250D%250A%257D%250D%250Afunction%2520GetNodeFromType(arrayData%252CnodeParent%252CstrType%252CiId)%2520%257B%250D%250A%2509var%2520node%253Dundefined%253B%250D%250A%2509if%2520(nodeParent%253D%253Dundefined)%250D%250A%2509%2509nodeParent%253D0%253B%2509%2509%2509%250D%250A%2509for(var%2520i%2520in%2520arrayData%255BnodeParent%255D.children)%2520%257B%2509%2509%2509%2509%250D%250A%2509%2509node%253DarrayData%2520%255BarrayData%255BnodeParent%255D.children%255Bi%255D%255D%253B%2509%250D%250A%2509%2509if%2520(node!%253Dundefined)%2520%257B%250D%250A%2509%2509%2509var%2520iIdTmp%253Dnode.columnData%2520%255BstrType%255D%253B%250D%250A%2509%2509%2509if%2520(iIdTmp%253D%253DiId)%250D%250A%2509%2509%2509%2509break%253B%250D%250A%2509%2509%2509else%250D%250A%2509%2509%2509%2509node%253Dundefined%253B%250D%250A%2509%2509%257Delse%250D%250A%2509%2509%2509node%253Dundefined%253B%2509%2509%2509%250D%250A%2509%257D%250D%250A%2509return%2520node%253B%250D%250A%257D%22%2C%20%22mode%22%3A%22ria%22%7D

Regards,

Johan


------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785111&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Loading...