Hi Carlos, I was able workaround all of the issue for DataGrid, so in my application it seems to be working fine. There is nothing what I can commit in general, however I run into one more issue. This is unfortunately seems to be real stopper. When DataGrid has height="100%" or no height at all setup in RELEASE build it shows only header, content is not visible. I have committed example of such grid to TourDeJewel.
Thanks, Piotr niedz., 15 mar 2020 o 11:49 Piotr Zarzycki <[email protected]> napisał(a): > Carlos, > > I don't want add anything and do not focus right now on what event are > called or not. Just create locally custom layout [1], apply to DataGrid in > TourDeJewel example: > > .dataGridStyle { > IBeadLayout: ClassReference("classes.beads.CustomDataGridLayout"); > } > > > And debug layout method. - This method is broken. This is what I have in > mind. - I don't care right now about those events personally - I can use > this mockup Layout for now, but basic functionality in DataGrid simply > doesn't work, so whole component to me is broken. > > [1] https://paste.apache.org/g95ae > > Thanks, > Piotr > > niedz., 15 mar 2020 o 11:43 Carlos Rovira <[email protected]> > napisał(a): > >> Hi Piotr, >> >> you mean add in line 73 of DataGridLayout.as (Jewel) the following? >> >> (_strand as IEventDispatcher).addEventListener("widthChanged", >> sizeChangedNeeded); >> (_strand as IEventDispatcher).addEventListener("heightChanged", >> sizeChangedNeeded); >> >> >> I think that's what Alex want to remove. The need to have 3 listeners. >> Maybe I'm wrong and didn't understand right. >> You can try to add those lines and if works commit. But maybe in some days >> that could be removed thanks to Alex changes >> >> >> >> El dom., 15 mar. 2020 a las 11:17, Piotr Zarzycki (< >> [email protected]>) escribió: >> >> > Carlos, >> > >> > No problem. I suggest you to rather not wait but create custom >> > DataGridLayout, listen to height/widthChanged and see what is happen >> with >> > calculating layout - this part is broken. The only think which you are >> > waiting from Alex is size changing event system, but you don't have to >> wait >> > with fixing DataGrid itself. >> > >> > Thanks, >> > Piotr >> > >> > niedz., 15 mar 2020 o 11:12 Carlos Rovira <[email protected]> >> > napisał(a): >> > >> > > Hi Piotr, >> > > >> > > StyledUIBase override UIBase methods just to make use of NaN as a >> valid >> > > value to unset w or h heights. >> > > Events should be the same as in UIBase. So I think we should wait for >> the >> > > change Alex announce that is coming in the next days and work over >> that. >> > In >> > > other case we can create code that will be useless as those changes >> are >> > > merged. >> > > >> > > >> > > El dom., 15 mar. 2020 a las 10:55, Piotr Zarzycki (< >> > > [email protected]>) escribió: >> > > >> > > > I have created custom layout which extends DataGridLayout. I have >> added >> > > > width/heightChanged event to listen but I still have 280px width. It >> > > turns >> > > > out that this line is the reason [1] >> > > > >> > > > [1] >> > > > >> > > > >> > > >> > >> https://github.com/apache/royale-asjs/blob/ca5f6964866fcc5c5333d2444c572a5eff6f70fd/frameworks/projects/Jewel/src/main/royale/org/apache/royale/jewel/beads/layouts/DataGridLayout.as#L197 >> > > > >> > > > Thanks, >> > > > Piotr >> > > > >> > > > niedz., 15 mar 2020 o 10:42 Piotr Zarzycki < >> [email protected]> >> > > > napisał(a): >> > > > >> > > > > It's because when you setup width in StyledUIBase setWidth >> dispatch >> > > > > different event than sizeChanged [1] >> > > > > >> > > > > [1] >> > > > > >> > > > >> > > >> > >> https://github.com/apache/royale-asjs/blob/ca5f6964866fcc5c5333d2444c572a5eff6f70fd/frameworks/projects/Basic/src/main/royale/org/apache/royale/core/StyledUIBase.as#L295 >> > > > > >> > > > > niedz., 15 mar 2020 o 10:36 Piotr Zarzycki < >> > [email protected]> >> > > > > napisał(a): >> > > > > >> > > > >> Hi Carlos, >> > > > >> >> > > > >> I just tried your changes and it doesn't work. Handler of >> > sizeChanged >> > > > >> event has not been called at all. I have added another DataGrid >> to >> > > > >> TourDeJewel to show you described issue. >> > > > >> What is weird to me that the result on the screen is same as in >> my >> > > > >> application, but I have a bit different outcome. I see in >> > TourDeJewel >> > > > >> DataGrid in Chrome console that width has been setup correctly >> [1], >> > > but >> > > > in >> > > > >> my application there is default width not those which I did set >> [2] >> > > > >> >> > > > >> [1] https://ibb.co/QndjWW4 >> > > > >> [2] https://ibb.co/R0kCT7r >> > > > >> >> > > > >> Thanks, >> > > > >> Piotr >> > > > >> >> > > > >> niedz., 15 mar 2020 o 01:01 Carlos Rovira < >> [email protected]> >> > > > >> napisał(a): >> > > > >> >> > > > >>> Hi Piotr, >> > > > >>> just added. I must close for today. Let me know if that works >> for >> > > you, >> > > > >>> tomorrow will see it. >> > > > >>> Thanks >> > > > >>> >> > > > >>> El dom., 15 mar. 2020 a las 0:41, Piotr Zarzycki (< >> > > > >>> [email protected]>) >> > > > >>> escribió: >> > > > >>> >> > > > >>> > That's definitely solution for width="100%" is needed. Go >> ahead >> > and >> > > > add >> > > > >>> > event - I can try as soon as you add it. >> > > > >>> > >> > > > >>> > Thanks, >> > > > >>> > Piotr >> > > > >>> > >> > > > >>> > On Sun, Mar 15, 2020, 12:30 AM Carlos Rovira < >> > > > [email protected]> >> > > > >>> > wrote: >> > > > >>> > >> > > > >>> > > Hi Piotr, >> > > > >>> > > >> > > > >>> > > I think you can workaround temporally but we need a >> solution to >> > > > work >> > > > >>> > easily >> > > > >>> > > with width="100%" at framework level. That's the reason for >> > > Royale >> > > > or >> > > > >>> > for a >> > > > >>> > > framework. >> > > > >>> > > >> > > > >>> > > About the problem you're having is that I need to dispatch >> > > > >>> "sizeChanged" >> > > > >>> > > event. I'll try it to add soon so you can try it. >> > > > >>> > > >> > > > >>> > > Thanks >> > > > >>> > > >> > > > >>> > > >> > > > >>> > > >> > > > >>> > > El sáb., 14 mar. 2020 a las 17:13, Piotr Zarzycki (< >> > > > >>> > > [email protected]>) escribió: >> > > > >>> > > >> > > > >>> > > > Carlos, >> > > > >>> > > > >> > > > >>> > > > If solution to my case is setup width - I may figure out >> > > somehow >> > > > >>> how to >> > > > >>> > > get >> > > > >>> > > > width of the parent container and setup it to the grid - >> > > > >>> workaround for >> > > > >>> > > now >> > > > >>> > > > - However it doesn't actually work in a way that I would >> be >> > > able >> > > > to >> > > > >>> > apply >> > > > >>> > > > that workaround. >> > > > >>> > > > >> > > > >>> > > > In the other words if I have below situation - My grid is >> > > working >> > > > >>> > > properly >> > > > >>> > > > along with columnWidth. >> > > > >>> > > > >> > > > >>> > > > <j:VGroup> >> > > > >>> > > > <j:DataGrid id="listEmails" width="500" >> > dataProvider={dp} >> > > /> >> > > > >>> > > > </j:VGroup> >> > > > >>> > > > >> > > > >>> > > > However if I have following code it doesn't work but it >> > > actually >> > > > >>> > should! >> > > > >>> > > > >> > > > >>> > > > <j:VGroup initComplete="onInit(event)"> >> > > > >>> > > > <j:DataGrid id="listEmails" dataProvider={dp} /> >> > > > >>> > > > </j:VGroup> >> > > > >>> > > > >> > > > >>> > > > private function onInit (event:Event):void >> > > > >>> > > > { >> > > > >>> > > > this.listEmails.width = 500; >> > > > >>> > > > } >> > > > >>> > > > >> > > > >>> > > > Thanks, >> > > > >>> > > > Piotr >> > > > >>> > > > >> > > > >>> > > > >> > > > >>> > > > >> > > > >>> > > > pt., 13 mar 2020 o 15:18 Piotr Zarzycki < >> > > > [email protected] >> > > > >>> > >> > > > >>> > > > napisał(a): >> > > > >>> > > > >> > > > >>> > > > > Hi Carlos, >> > > > >>> > > > > >> > > > >>> > > > > I just checked your improvements and those one with >> > > columnWidth >> > > > >>> > doesn't >> > > > >>> > > > > work as it should in our use case. I just committed >> > > additional >> > > > >>> > example >> > > > >>> > > in >> > > > >>> > > > > TourDeJewel which shows that case. Take a look how >> DataGrid >> > > > look >> > > > >>> like >> > > > >>> > > in >> > > > >>> > > > > that example. >> > > > >>> > > > > >> > > > >>> > > > > Thanks, >> > > > >>> > > > > Piotr >> > > > >>> > > > > >> > > > >>> > > > > pon., 9 mar 2020 o 16:42 Carlos Rovira < >> > > > [email protected]> >> > > > >>> > > > > napisał(a): >> > > > >>> > > > > >> > > > >>> > > > >> Hi Piotr, >> > > > >>> > > > >> >> > > > >>> > > > >> DataGrid now has 3 improvements: >> > > > >>> > > > >> >> > > > >>> > > > >> >> > > > >>> > > > >> - No default width or height >> > > > >>> > > > >> - width and height can be not set or set to pixels >> or >> > % >> > > > >>> values >> > > > >>> > > > >> - columnWidths can be no set at all, set all or just >> > some >> > > > to >> > > > >>> > pixels >> > > > >>> > > > (I >> > > > >>> > > > >> didn't loo >> > > > >>> > > > >> >> > > > >>> > > > >> Notice that, we don't support % in columns since >> there's >> > no >> > > > way >> > > > >>> to >> > > > >>> > set >> > > > >>> > > > >> columns to percentages. We want to support it?. Maybe >> we >> > can >> > > > >>> > introduce >> > > > >>> > > > >> "columnPercentWidth" ? Not sure about this >> > > > >>> > > > >> >> > > > >>> > > > >> I'll take a look at the initializer problem with Lists >> and >> > > > Dgs. >> > > > >>> > > > Regarding >> > > > >>> > > > >> this, what's the use case or why you want to change the >> > > > >>> initializer? >> > > > >>> > > > >> having >> > > > >>> > > > >> some kind of example will help me with this, since >> right >> > now >> > > > >>> don't >> > > > >>> > > know >> > > > >>> > > > so >> > > > >>> > > > >> much about it. >> > > > >>> > > > >> >> > > > >>> > > > >> Thanks >> > > > >>> > > > >> >> > > > >>> > > > >> Carlos >> > > > >>> > > > >> >> > > > >>> > > > >> >> > > > >>> > > > >> >> > > > >>> > > > >> >> > > > >>> > > > >> >> > > > >>> > > > >> El vie., 6 mar. 2020 a las 17:32, Carlos Rovira (< >> > > > >>> > > > [email protected] >> > > > >>> > > > >> >) >> > > > >>> > > > >> escribió: >> > > > >>> > > > >> >> > > > >>> > > > >> > I'm thinking that the last problem need a solution >> like >> > > the >> > > > >>> one in >> > > > >>> > > > >> > ComboBox with passing the IR class to the internal >> List. >> > > > >>> > > > >> > (Although some issue is still in the mapper >> > > infrastructure, >> > > > >>> but I >> > > > >>> > > > think >> > > > >>> > > > >> is >> > > > >>> > > > >> > separated issue). >> > > > >>> > > > >> > >> > > > >>> > > > >> > >> > > > >>> > > > >> > El vie., 6 mar. 2020 a las 17:24, Piotr Zarzycki (< >> > > > >>> > > > >> > [email protected]>) escribió: >> > > > >>> > > > >> > >> > > > >>> > > > >> >> Both issues with width/height and this one block >> > > migration >> > > > >>> for >> > > > >>> > now >> > > > >>> > > in >> > > > >>> > > > >> our >> > > > >>> > > > >> >> application from Table to DataGrid. I would be the >> > first >> > > > one >> > > > >>> who >> > > > >>> > > test >> > > > >>> > > > >> it >> > > > >>> > > > >> >> for sure when you find cause of that issue and fix >> it. >> > > > >>> > > > >> >> >> > > > >>> > > > >> >> Thanks for that update, >> > > > >>> > > > >> >> Piotr >> > > > >>> > > > >> >> >> > > > >>> > > > >> >> pt., 6 mar 2020 o 17:17 Carlos Rovira < >> > > > >>> [email protected]> >> > > > >>> > > > >> >> napisał(a): >> > > > >>> > > > >> >> >> > > > >>> > > > >> >> > Hi Piotr, >> > > > >>> > > > >> >> > >> > > > >>> > > > >> >> > yesterday I saw a strange behaviour with controls >> > that >> > > > >>> compose >> > > > >>> > > list >> > > > >>> > > > >> and >> > > > >>> > > > >> >> > Item renderer changes done recently, but was in >> > > ComboBox >> > > > >>> that >> > > > >>> > can >> > > > >>> > > > >> >> configure >> > > > >>> > > > >> >> > an Item renderer and then pass to the >> ComboBoxPopUp >> > to >> > > > its >> > > > >>> List >> > > > >>> > > > >> internal >> > > > >>> > > > >> >> > component (so we can have custom renderers in >> > > ComboBox). >> > > > In >> > > > >>> > this >> > > > >>> > > > case >> > > > >>> > > > >> >> > rowCount and rowHeight is not working as expected, >> > sin >> > > ce >> > > > >>> there >> > > > >>> > > > >> >> initializer >> > > > >>> > > > >> >> > is not used in ComboBox internal list, while in >> > > > >>> VirtualComboBox >> > > > >>> > > is >> > > > >>> > > > >> >> working >> > > > >>> > > > >> >> > ok. >> > > > >>> > > > >> >> > I trace the problem to Mappers not update right >> when >> > > the >> > > > >>> > > renderers >> > > > >>> > > > >> >> refactor >> > > > >>> > > > >> >> > was done. So while the mapper in Basic adds >> > > initializer, >> > > > in >> > > > >>> > Jewel >> > > > >>> > > > is >> > > > >>> > > > >> not >> > > > >>> > > > >> >> > doing that. I could not invest more time since I >> was >> > in >> > > > the >> > > > >>> > > middle >> > > > >>> > > > of >> > > > >>> > > > >> >> other >> > > > >>> > > > >> >> > fixes, and still had the width/height issues in >> DG, >> > so >> > > > >>> could >> > > > >>> > not >> > > > >>> > > > see >> > > > >>> > > > >> >> > exactly what's the problem. >> > > > >>> > > > >> >> > I want to see if now that this refactor is done is >> > safe >> > > > to >> > > > >>> > remove >> > > > >>> > > > >> jewel >> > > > >>> > > > >> >> > mappers to user basic versions, but a quick test >> > reveal >> > > > >>> that is >> > > > >>> > > not >> > > > >>> > > > >> >> direct. >> > > > >>> > > > >> >> > In resume, about your problem, I think it could be >> > > > >>> something >> > > > >>> > like >> > > > >>> > > > the >> > > > >>> > > > >> >> one >> > > > >>> > > > >> >> > with ComboBox, but need to have the time to reach >> to >> > > that >> > > > >>> > point, >> > > > >>> > > > >> >> hopefully >> > > > >>> > > > >> >> > soon. >> > > > >>> > > > >> >> > Thanks >> > > > >>> > > > >> >> > >> > > > >>> > > > >> >> >> > > > >>> > > > >> >> >> > > > >>> > > > >> >> -- >> > > > >>> > > > >> >> >> > > > >>> > > > >> >> Piotr Zarzycki >> > > > >>> > > > >> >> >> > > > >>> > > > >> >> Patreon: *https://www.patreon.com/piotrzarzycki >> > > > >>> > > > >> >> <https://www.patreon.com/piotrzarzycki>* >> > > > >>> > > > >> >> >> > > > >>> > > > >> > >> > > > >>> > > > >> > >> > > > >>> > > > >> > -- >> > > > >>> > > > >> > Carlos Rovira >> > > > >>> > > > >> > http://about.me/carlosrovira >> > > > >>> > > > >> > >> > > > >>> > > > >> > >> > > > >>> > > > >> >> > > > >>> > > > >> -- >> > > > >>> > > > >> Carlos Rovira >> > > > >>> > > > >> http://about.me/carlosrovira >> > > > >>> > > > >> >> > > > >>> > > > > >> > > > >>> > > > > >> > > > >>> > > > > -- >> > > > >>> > > > > >> > > > >>> > > > > Piotr Zarzycki >> > > > >>> > > > > >> > > > >>> > > > > Patreon: *https://www.patreon.com/piotrzarzycki >> > > > >>> > > > > <https://www.patreon.com/piotrzarzycki>* >> > > > >>> > > > > >> > > > >>> > > > >> > > > >>> > > > >> > > > >>> > > > -- >> > > > >>> > > > >> > > > >>> > > > Piotr Zarzycki >> > > > >>> > > > >> > > > >>> > > > Patreon: *https://www.patreon.com/piotrzarzycki >> > > > >>> > > > <https://www.patreon.com/piotrzarzycki>* >> > > > >>> > > > >> > > > >>> > > >> > > > >>> > > >> > > > >>> > > -- >> > > > >>> > > Carlos Rovira >> > > > >>> > > http://about.me/carlosrovira >> > > > >>> > > >> > > > >>> > >> > > > >>> >> > > > >>> >> > > > >>> -- >> > > > >>> Carlos Rovira >> > > > >>> http://about.me/carlosrovira >> > > > >>> >> > > > >> >> > > > >> >> > > > >> -- >> > > > >> >> > > > >> Piotr Zarzycki >> > > > >> >> > > > >> Patreon: *https://www.patreon.com/piotrzarzycki >> > > > >> <https://www.patreon.com/piotrzarzycki>* >> > > > >> >> > > > > >> > > > > >> > > > > -- >> > > > > >> > > > > Piotr Zarzycki >> > > > > >> > > > > Patreon: *https://www.patreon.com/piotrzarzycki >> > > > > <https://www.patreon.com/piotrzarzycki>* >> > > > > >> > > > >> > > > >> > > > -- >> > > > >> > > > Piotr Zarzycki >> > > > >> > > > Patreon: *https://www.patreon.com/piotrzarzycki >> > > > <https://www.patreon.com/piotrzarzycki>* >> > > > >> > > >> > > >> > > -- >> > > Carlos Rovira >> > > http://about.me/carlosrovira >> > > >> > >> > >> > -- >> > >> > Piotr Zarzycki >> > >> > Patreon: *https://www.patreon.com/piotrzarzycki >> > <https://www.patreon.com/piotrzarzycki>* >> > >> >> >> -- >> Carlos Rovira >> http://about.me/carlosrovira >> > > > -- > > Piotr Zarzycki > > Patreon: *https://www.patreon.com/piotrzarzycki > <https://www.patreon.com/piotrzarzycki>* > -- Piotr Zarzycki Patreon: *https://www.patreon.com/piotrzarzycki <https://www.patreon.com/piotrzarzycki>*
