Etoys and Connectors package programming...

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

Etoys and Connectors package programming...

LawsonEnglish
Hi.

I'm trying to use the Connectors package within EToys to generate a complicated movie.

First step: create a graph of nodes with connections between them (done -or at least, doable).

Second step: manipulate connectors with scripts from within EToys.

and... nothing.

I've located the script "tell all outgoing connectors" associated with a single node. I've created a script with the code

^self hide

and associated it with the "tell all outgoing connectors" and "tell all incoming connectors" scripts and attempted to fire it once.

Nothing happens.

Ok, so I tried a different script:

hide.

^ self.



Nothing happens.

I know how to use Connectors directly within Squeak. I've made youtube tutorials on how to figure out how to do arbitrary stuff with Connectors at teh Squeak level using the debugging tools. I'm stymied at step 2 using EToys.


:-/

Suggestions?


Thanks.


L
_______________________________________________

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Etoys and Connectors package programming...

Steve Thomas
Lawson,

Also with what object did you associate the "self hide" script?

When you "tell all outgoing connectors" to run a script the script that gets run is associated with the connector (not the object connected at the destination of the connector).

Now if you use "tell all succesors" then the script that is run is that of the connectors destination/

So in the example below:
Rectangle:script1 - Will cause Arrow2:script1 to execute, causing the ellipse to change color
Rectangle:script2 - Will cause Ellipse:script1 to execute, causing the ellipse to turn by 5

Inline image 1

Hope this helps,
Stephen


On Fri, Sep 13, 2013 at 10:10 PM, Lawson English <[hidden email]> wrote:
Hi.

I'm trying to use the Connectors package within EToys to generate a complicated movie.

First step: create a graph of nodes with connections between them (done -or at least, doable).

Second step: manipulate connectors with scripts from within EToys.

and... nothing.

I've located the script "tell all outgoing connectors" associated with a single node. I've created a script with the code

^self hide

and associated it with the "tell all outgoing connectors" and "tell all incoming connectors" scripts and attempted to fire it once.

Nothing happens.

Ok, so I tried a different script:

hide.

^ self.



Nothing happens.

I know how to use Connectors directly within Squeak. I've made youtube tutorials on how to figure out how to do arbitrary stuff with Connectors at teh Squeak level using the debugging tools. I'm stymied at step 2 using EToys.


:-/

Suggestions?


Thanks.


L
_______________________________________________

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland




--

To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up.

When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.

- Martin Harverbeke (from Eloquent JavaScript)


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Etoys and Connectors package programming...

Steve Thomas
Looping in Etoys dev list


On Fri, Sep 13, 2013 at 11:43 PM, Steve Thomas <[hidden email]> wrote:
Lawson,

Also with what object did you associate the "self hide" script?

When you "tell all outgoing connectors" to run a script the script that gets run is associated with the connector (not the object connected at the destination of the connector).

Now if you use "tell all succesors" then the script that is run is that of the connectors destination/

So in the example below:
Rectangle:script1 - Will cause Arrow2:script1 to execute, causing the ellipse to change color
Rectangle:script2 - Will cause Ellipse:script1 to execute, causing the ellipse to turn by 5

Inline image 1

Hope this helps,
Stephen


On Fri, Sep 13, 2013 at 10:10 PM, Lawson English <[hidden email]> wrote:
Hi.

I'm trying to use the Connectors package within EToys to generate a complicated movie.

First step: create a graph of nodes with connections between them (done -or at least, doable).

Second step: manipulate connectors with scripts from within EToys.

and... nothing.

I've located the script "tell all outgoing connectors" associated with a single node. I've created a script with the code

^self hide

and associated it with the "tell all outgoing connectors" and "tell all incoming connectors" scripts and attempted to fire it once.

Nothing happens.

Ok, so I tried a different script:

hide.

^ self.



Nothing happens.

I know how to use Connectors directly within Squeak. I've made youtube tutorials on how to figure out how to do arbitrary stuff with Connectors at teh Squeak level using the debugging tools. I'm stymied at step 2 using EToys.


:-/

Suggestions?


Thanks.


L
_______________________________________________

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland




--

To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up.

When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.

- Martin Harverbeke (from Eloquent JavaScript)




--

To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up.

When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.

- Martin Harverbeke (from Eloquent JavaScript)


_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland
Reply | Threaded
Open this post in threaded view
|

Re: Etoys and Connectors package programming...

LawsonEnglish
In reply to this post by Steve Thomas
I'm trying to change (hide initially) the connector itself. That is, the line between node1 and node2 should be hidden initially.


The specific project is to take a fully-connected graph of EEG nodes where color/intensity/thickness represents a specific level of coherence/connectivity ala this image: http://istpp.org/military_science/images/military_figure8.jpg

The goal is to create a movie showing how such connectivity changes over time. I initially want all connections hidden, and then, based on EEG coherence/phase/frequency data, to change the visibility/color/intensity/thickness of the connections as they vary over time.

Apparently, even with experienced EEG researchers, static images don't tell enough of the story to be impressive.

L

On 9/13/13 8:53 PM, Steve Thomas wrote:
Looping in Etoys dev list


On Fri, Sep 13, 2013 at 11:43 PM, Steve Thomas <[hidden email]> wrote:
Lawson,

Also with what object did you associate the "self hide" script?

When you "tell all outgoing connectors" to run a script the script that gets run is associated with the connector (not the object connected at the destination of the connector).

Now if you use "tell all succesors" then the script that is run is that of the connectors destination/

So in the example below:
Rectangle:script1 - Will cause Arrow2:script1 to execute, causing the ellipse to change color
Rectangle:script2 - Will cause Ellipse:script1 to execute, causing the ellipse to turn by 5

Inline image 1

Hope this helps,
Stephen


On Fri, Sep 13, 2013 at 10:10 PM, Lawson English <[hidden email]> wrote:
Hi.

I'm trying to use the Connectors package within EToys to generate a complicated movie.

First step: create a graph of nodes with connections between them (done -or at least, doable).

Second step: manipulate connectors with scripts from within EToys.

and... nothing.

I've located the script "tell all outgoing connectors" associated with a single node. I've created a script with the code

^self hide

and associated it with the "tell all outgoing connectors" and "tell all incoming connectors" scripts and attempted to fire it once.

Nothing happens.

Ok, so I tried a different script:

hide.

^ self.



Nothing happens.

I know how to use Connectors directly within Squeak. I've made youtube tutorials on how to figure out how to do arbitrary stuff with Connectors at teh Squeak level using the debugging tools. I'm stymied at step 2 using EToys.


:-/

Suggestions?


Thanks.


L
_______________________________________________

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland




--

To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up.

When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.

- Martin Harverbeke (from Eloquent JavaScript)




--

To some of us, writing computer programs is a fascinating game. A program is a building of thought. It is costless to build, weightless, growing easily under our typing hands. If we get carried away, its size and complexity will grow out of control, confusing even the one who created it. This is the main problem of programming. It is why so much of today's software tends to crash, fail, screw up.

When a program works, it is beautiful. The art of programming is the skill of controlling complexity. The great program is subdued, made simple in its complexity.

- Martin Harverbeke (from Eloquent JavaScript)



-- 
Squeak from the very start (introduction to Squeak and Pharo Smalltalk for the (almost) complete and compleate beginner).
https://www.youtube.com/playlist?list=PL6601A198DF14788D&feature=view_all 

"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." - Brian Kernighan

_______________________________________________
squeakland mailing list
[hidden email]
http://lists.squeakland.org/mailman/listinfo/squeakland