Hi Duke,
Ok. I have changed the code to below and I am getting 2 rectangles showing up. But I dont see the random number generated anywhere in the displayed applet.
How to display the random number generated?
How do i change the rectangles into bouncing spheres?
I would like the bouncing spheres to bounce for 3 secs before a new random number is generated everytime the user clicks on a button to generate a new number.
{curl 4.0 applet}
{curl-file-attributes character-encoding = "windows-latin-1"}
{import * from CURL.GUI.SHAPES}
{let v:View =
            width = 9cm,
            hei ght = 8cm,
                translation = {Distance2d 0cm, 7cm},
                    {GRect 0cm, 1cm, 1cm, 0cm},
                    color = "#006968",
                    translation = {Distance2d (1.1cm * 1), 0cm}
                    {GRect 0cm, 1cm, 5cm, 0cm},
                    color = "#2462a2",
                    translation = {Distance2d (1.1cm * 6), 0cm}
        let random:RolledRandom = {RolledRandom 1, 1328}

Duke Briscoe <[EMAIL PROTECTED]> wrote:

On Dec 18, 2005, at 10:39 PM, pang tee wrote:

> Thanks Kamal,
> I tried to combine the two codes together, but ended with the errors
> attached in randomgenerator.doc.
> Actually i just to get the screen to appear like in
> randomgenerator.jpg if anyone can help. The shape that is in the code
> here is calling rectangles not spheres.
> Thanks,
> PT

The error is telling you that a View can only have one graphical child,
while you have two, one is the random number and the other is the
Canvas. So you need to choose some other layout.

To unsubscribe from this list, send a mail to:
To contact a human list administra tor, send a mail to:
To recieve a list of other options for this list, send a mail to:

Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Reply via email to