Hello Duke

Thanks for your reply. I know Curl CSK product but did not take a look at it at all.
I will try getting a copy of CSK and read COM.CURL.CSK.IPC's code.

James
----- Original Message ----- From: "Duke Briscoe" <[EMAIL PROTECTED]>
To: "JamesWang" <[EMAIL PROTECTED]>
Cc: <curlbreaker-l@curl.com>
Sent: Tuesday, February 06, 2007 8:30 AM
Subject: Re: How to get access to controls in subapplet


JamesWang wrote:
Hello
The attachement is an applet I made.

I can use {get-the-applet}.document.document-graphic.graphical-children to access all controls in the applet except the controls in subapplet.

I tried many ways and have no idea to get Applet instance of the subapplet. I guess the subapplet is in the different process from his parent process. I found Curl's Inspector can get everything I want but I have no way to figure out how.

James, you are right about the subapplet being in a different process, which makes this more difficult. There are some ways to do inter-applet communication in Curl, but that might be fairly complicated for you to implement and it also depends on both applets cooperating on the communication protocol. So it would not work for something like testing or exploring arbitrary applets.

Do you think you want to know more about inter-applet communication to work on your problem? There is a package COM.CURL.CSK.IPC which comes with the Curl CSK product (maybe you already have access to that).

-- Duke



------------------------------------------------------------------------

{curl 5.1 applet}

{import * from CURL.ENGINE.BROWSER}
{let bounds:GRect =
    {{get-the-applet}.document.top-level-graphic.layout.get-bounds}
}
{let ag:AppletGraphic = {AppletGraphic
        width = bounds.width,
        height = bounds.height
    }
}

{let ad:AppletData = {AppletData ag, {string-url |"
 {curl 5.1 applet} {link href= {url
 "http://www.google.com"}, Google}{CommandButton}"|}}
}

{CommandButton
    label = "change controls' properties through document",
    {on Action do
        {let box:Box = {get-the-applet}.document.document-graphic}

        {for child in box.graphical-children do
            {set child.color = "red"} }
    }
}

{CommandButton
    label = "how to control the controls in subapplet?",
    {on Action do
        {let box:Box = {get-the-applet}.document.document-graphic}

        {for child in box.graphical-children do
            {set child.color = "red"} }
    }
}

{value ag}





----------------------------------------------------------------------------------------------
Confidentiality Notice: The information contained in this e-mail and any accompanying attachment(s) is intended only for the use of the intended recipient and may be confidential and/or privileged of Neusoft Group Ltd., its subsidiaries and/or its affiliates. If any reader of this communication is not the intended recipient, unauthorized use, forwarding, printing, storing, disclosure or copying is strictly prohibited, and may be unlawful. If you have received this communication in error, please immediately notify the sender by return e-mail, and delete the original message and all copies from your system. Thank you. -----------------------------------------------------------------------------------------------

Reply via email to