Hi,

thanks, I was able to check the code now.

First: You should not do that way since is not a good practice and the code
will be tightly coupled. Instead you can throw an event that bubbles and
catch in the main view to react.

Benign said that, this is the way to solve the problem:

1.- Let's add a method in the main view to be called:

public function someMethod():void
{
COMPILE::JS
{
console.log("executing someMethod");
}
}

2.- In the renderer you can do this:

public function clickCloseButton(event:Event):void
{
var view:ListView = this.itemRendererOwnerView as ListView;
var column:DataGridColumnList = view.host as DataGridColumnList;
var mypanel:<YourMainView> = column.datagrid.parent as <YourMainView>;
mypanel.someMethod();
}

I tried this in TDJ's DataGridPlayGround and IconDataGridItemRenderer

I think the problem in your code is there are many lookups to parent code
that probably is not the real parent you expect but also there could be
some bug in the compiler trying to do that kind of consecutive lookups.

HTH

Carlos



El sáb, 19 dic 2020 a las 1:00, ichsan anam (<[email protected]>)
escribió:

> Hi Carlos,
>
> Please check my paste in this link:
>
> https://pastebin.com/UJs7enZ6
>
> Regards,
>
>
>
> On Thu, Dec 17, 2020 at 3:25 PM Carlos Rovira <[email protected]>
> wrote:
>
>> Hi,
>>
>> sorry but the link shows all the script in one line impossible to read
>> can you post there the script part or do a paste [1]?
>>
>> [1] https://paste.apache.org/
>>
>>
>>
>> El mié, 16 dic 2020 a las 18:13, choirul anam (<[email protected]>)
>> escribió:
>>
>>> Hi Carlos, here  i attach piece of code, please check
>>>
>>> ReviewQueue.mxml
>>> <
>>> http://apache-royale-users.20374.n8.nabble.com/file/t62/ReviewQueue.mxml>
>>>
>>> actionRendererReview.mxml
>>> <
>>> http://apache-royale-users.20374.n8.nabble.com/file/t62/actionRendererReview.mxml>
>>>
>>>
>>> Best Regards
>>>
>>>
>>>
>>>
>>> --
>>> Sent from: http://apache-royale-users.20374.n8.nabble.com/
>>>
>>
>>
>> --
>> Carlos Rovira
>> Apache Member & Apache Royale PMC
>> *Apache Software Foundation*
>> http://about.me/carlosrovira
>>
>>

-- 
Carlos Rovira
Apache Member & Apache Royale PMC
*Apache Software Foundation*
http://about.me/carlosrovira

Reply via email to