You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Yishay Weiss <yi...@hotmail.com> on 2019/12/23 15:22:40 UTC

Smart Selectors for Beads

I need to add a bead to all Table objects in our application, but not to Table objects contained within another specific css class. So in our css I’ve defined

j|Table {
  IBeadView: ClassReference("classes.beads.GridLikeTableView");
}

But now I find that tables in a calendar are also affected, which is unintended. So I tried adding before that

.datechooser j|Table {
  IBeadView: ClassReference("org.apache.royale.jewel.beads.views.TableView");
}

But that affects all Table objects whether or not they’re contained in a .datachooser class. Any ideas how to be more surgical about adding beads?

Re: Smart Selectors for Beads

Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Yishay,

I do understand the problem and I do also understand that you wanted to
have global solution, but if this doesn't work following should work:

.datechooser {
  IBeadView:
ClassReference("org.apache.royale.jewel.beads.views.TableView");
}

<j:DateChooser className=" datechooser "/>

Isn't it ?

Thanks,
Piotr

pon., 23 gru 2019 o 18:29 Carlos Rovira <ca...@apache.org>
napisał(a):

> that seems to me like a bug,
>
> I think you'll need to workaround creating a normal css class selector and
> creating an extension class for j|Table that use that css selector for now.
> Although not tested and maybe that bug could reach that way too.
>
> Something that leaves me uneasy is the use of the Jewel Table component
> (that is marked as "still in development") since I think is unfinished and
> with an incorrect API (the method "selectedItemProperty" should evolve to
> normal "selectedItem") and selection in fact was never finished. If someone
> has the time to work on that will be very appreciated.
>
> Thanks
>
>
>
> El lun., 23 dic. 2019 a las 16:37, Alex Harui (<ah...@adobe.com.invalid>)
> escribió:
>
> > If the objects can all subclass a base class then you can use one of our
> > fake type selectors.
> >
> > Alternatively, and I don't think we've tried this, but all interested
> > classes could load a bead that injects an additional classname/typename
> and
> > then the descendant CSS can use that instead of .datechooser.
> >
> > That said, it isn't clear to me why your descendant selector didn't work
> > so there might be a bug there.  I don't know if SimpleCSSValuesImpl
> handles
> > descendant selectors.  Cuz it is 'Simple'
> >
> > -Alex
> >
> > On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
> >
> >     I need to add a bead to all Table objects in our application, but not
> > to Table objects contained within another specific css class. So in our
> css
> > I’ve defined
> >
> >     j|Table {
> >       IBeadView: ClassReference("classes.beads.GridLikeTableView");
> >     }
> >
> >     But now I find that tables in a calendar are also affected, which is
> > unintended. So I tried adding before that
> >
> >     .datechooser j|Table {
> >       IBeadView:
> > ClassReference("org.apache.royale.jewel.beads.views.TableView");
> >     }
> >
> >     But that affects all Table objects whether or not they’re contained
> in
> > a .datachooser class. Any ideas how to be more surgical about adding
> beads?
> >
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>


-- 

Piotr Zarzycki

Patreon: *https://www.patreon.com/piotrzarzycki
<https://www.patreon.com/piotrzarzycki>*

RE: Smart Selectors for Beads

Posted by Yishay Weiss <yi...@hotmail.com>.
Yes, we’ll probably switch to Jewel DataGrid long term.

From: Carlos Rovira<ma...@apache.org>
Sent: Monday, December 23, 2019 7:29 PM
To: dev@royale.apache.org<ma...@royale.apache.org>
Subject: Re: Smart Selectors for Beads
Something that leaves me uneasy is the use of the Jewel Table component



El lun., 23 dic. 2019 a las 16:37, Alex Harui (<ah...@adobe.com.invalid>)
escribió:

> If the objects can all subclass a base class then you can use one of our
> fake type selectors.
>
> Alternatively, and I don't think we've tried this, but all interested
> classes could load a bead that injects an additional classname/typename and
> then the descendant CSS can use that instead of .datechooser.
>
> That said, it isn't clear to me why your descendant selector didn't work
> so there might be a bug there.  I don't know if SimpleCSSValuesImpl handles
> descendant selectors.  Cuz it is 'Simple'
>
> -Alex
>
> On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
>
>     I need to add a bead to all Table objects in our application, but not
> to Table objects contained within another specific css class. So in our css
> I’ve defined
>
>     j|Table {
>       IBeadView: ClassReference("classes.beads.GridLikeTableView");
>     }
>
>     But now I find that tables in a calendar are also affected, which is
> unintended. So I tried adding before that
>
>     .datechooser j|Table {
>       IBeadView:
> ClassReference("org.apache.royale.jewel.beads.views.TableView");
>     }
>
>     But that affects all Table objects whether or not they’re contained in
> a .datachooser class. Any ideas how to be more surgical about adding beads?
>
>
>

--
Carlos Rovira
http://about.me/carlosrovira


Re: Smart Selectors for Beads

Posted by Carlos Rovira <ca...@apache.org>.
that seems to me like a bug,

I think you'll need to workaround creating a normal css class selector and
creating an extension class for j|Table that use that css selector for now.
Although not tested and maybe that bug could reach that way too.

Something that leaves me uneasy is the use of the Jewel Table component
(that is marked as "still in development") since I think is unfinished and
with an incorrect API (the method "selectedItemProperty" should evolve to
normal "selectedItem") and selection in fact was never finished. If someone
has the time to work on that will be very appreciated.

Thanks



El lun., 23 dic. 2019 a las 16:37, Alex Harui (<ah...@adobe.com.invalid>)
escribió:

> If the objects can all subclass a base class then you can use one of our
> fake type selectors.
>
> Alternatively, and I don't think we've tried this, but all interested
> classes could load a bead that injects an additional classname/typename and
> then the descendant CSS can use that instead of .datechooser.
>
> That said, it isn't clear to me why your descendant selector didn't work
> so there might be a bug there.  I don't know if SimpleCSSValuesImpl handles
> descendant selectors.  Cuz it is 'Simple'
>
> -Alex
>
> On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
>
>     I need to add a bead to all Table objects in our application, but not
> to Table objects contained within another specific css class. So in our css
> I’ve defined
>
>     j|Table {
>       IBeadView: ClassReference("classes.beads.GridLikeTableView");
>     }
>
>     But now I find that tables in a calendar are also affected, which is
> unintended. So I tried adding before that
>
>     .datechooser j|Table {
>       IBeadView:
> ClassReference("org.apache.royale.jewel.beads.views.TableView");
>     }
>
>     But that affects all Table objects whether or not they’re contained in
> a .datachooser class. Any ideas how to be more surgical about adding beads?
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: Smart Selectors for Beads

Posted by Carlos Rovira <ca...@apache.org>.
Hi Piotr,
hope others with MXRoyale experience can respond to this. I really don't
know why is not working that strategy on emulation :?
sorry

El dom, 29 nov 2020 a las 19:51, Piotr Zarzycki (<pi...@gmail.com>)
escribió:

> Hi Guys,
>
> Instead creating new subject I decided report here something which does
> apply to the problem. In Prominics's MyAccount [1] which is mostly Jewel
> oriented we are doing a lot of following applies:
>
> .stackedShrinkFormItem {
> IBeadLayout:
> ClassReference("org.apache.royale.jewel.beads.layouts.VerticalLayout");
> }
>
> <j:FormItem className="stackedShrinkFormItem" />
>
> Above working perfectly with Jewel type of application. Unfortunately when
> I do above applies of bead in Emulation oriented application for Spark or
> Mx components class is being applied to item, but everything else is
> ignored. Bead is not being applied ? Could it be compiler issue ?
>
> Thanks,
> Piotr
>
>
> [1] https://prominic.net/MyAccount
>
> śr., 25 gru 2019 o 11:11 Carlos Rovira <ca...@apache.org>
> napisał(a):
>
> > I think working on that extension would be appreciated and used, since
> most
> > of users will use it without doubt
> >
> > El mié., 25 dic. 2019 a las 0:45, Alex Harui (<aharui@adobe.com.invalid
> >)
> > escribió:
> >
> > > I don't see why you couldn't create a CSSValuesImpl that supports
> > > descendant selectors.  Hopefully IValuesImpls are easily replaceable.
> > >
> > > HTH,
> > > -Alex
> > >
> > > On 12/24/19, 6:36 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
> > >
> > >     Taking a look at SimpleCSSValuesImpl, the documentation says it
> > > doesn’t handle descendants. So it looks to me like that rules out all
> > > proposals except Carlos’. I’ll probably just inject the bead in the
> mxml.
> > > Thanks, all.
> > >
> > >     ________________________________
> > >     From: Alex Harui <ah...@adobe.com.INVALID>
> > >     Sent: Monday, December 23, 2019 5:37:26 PM
> > >     To: dev@royale.apache.org <de...@royale.apache.org>
> > >     Subject: Re: Smart Selectors for Beads
> > >
> > >     If the objects can all subclass a base class then you can use one
> of
> > > our fake type selectors.
> > >
> > >     Alternatively, and I don't think we've tried this, but all
> interested
> > > classes could load a bead that injects an additional classname/typename
> > and
> > > then the descendant CSS can use that instead of .datechooser.
> > >
> > >     That said, it isn't clear to me why your descendant selector didn't
> > > work so there might be a bug there.  I don't know if
> SimpleCSSValuesImpl
> > > handles descendant selectors.  Cuz it is 'Simple'
> > >
> > >     -Alex
> > >
> > >     On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com>
> wrote:
> > >
> > >         I need to add a bead to all Table objects in our application,
> but
> > > not to Table objects contained within another specific css class. So in
> > our
> > > css I’ve defined
> > >
> > >         j|Table {
> > >           IBeadView: ClassReference("classes.beads.GridLikeTableView");
> > >         }
> > >
> > >         But now I find that tables in a calendar are also affected,
> which
> > > is unintended. So I tried adding before that
> > >
> > >         .datechooser j|Table {
> > >           IBeadView:
> > > ClassReference("org.apache.royale.jewel.beads.views.TableView");
> > >         }
> > >
> > >         But that affects all Table objects whether or not they’re
> > > contained in a .datachooser class. Any ideas how to be more surgical
> > about
> > > adding beads?
> > >
> > >
> > >
> > >
> > >
> >
> > --
> > Carlos Rovira
> > http://about.me/carlosrovira
> >
>
>
> --
>
> Piotr Zarzycki
>


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

Re: Smart Selectors for Beads

Posted by Piotr Zarzycki <pi...@gmail.com>.
Hi Guys,

Instead creating new subject I decided report here something which does
apply to the problem. In Prominics's MyAccount [1] which is mostly Jewel
oriented we are doing a lot of following applies:

.stackedShrinkFormItem {
IBeadLayout:
ClassReference("org.apache.royale.jewel.beads.layouts.VerticalLayout");
}

<j:FormItem className="stackedShrinkFormItem" />

Above working perfectly with Jewel type of application. Unfortunately when
I do above applies of bead in Emulation oriented application for Spark or
Mx components class is being applied to item, but everything else is
ignored. Bead is not being applied ? Could it be compiler issue ?

Thanks,
Piotr


[1] https://prominic.net/MyAccount

śr., 25 gru 2019 o 11:11 Carlos Rovira <ca...@apache.org> napisał(a):

> I think working on that extension would be appreciated and used, since most
> of users will use it without doubt
>
> El mié., 25 dic. 2019 a las 0:45, Alex Harui (<ah...@adobe.com.invalid>)
> escribió:
>
> > I don't see why you couldn't create a CSSValuesImpl that supports
> > descendant selectors.  Hopefully IValuesImpls are easily replaceable.
> >
> > HTH,
> > -Alex
> >
> > On 12/24/19, 6:36 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
> >
> >     Taking a look at SimpleCSSValuesImpl, the documentation says it
> > doesn’t handle descendants. So it looks to me like that rules out all
> > proposals except Carlos’. I’ll probably just inject the bead in the mxml.
> > Thanks, all.
> >
> >     ________________________________
> >     From: Alex Harui <ah...@adobe.com.INVALID>
> >     Sent: Monday, December 23, 2019 5:37:26 PM
> >     To: dev@royale.apache.org <de...@royale.apache.org>
> >     Subject: Re: Smart Selectors for Beads
> >
> >     If the objects can all subclass a base class then you can use one of
> > our fake type selectors.
> >
> >     Alternatively, and I don't think we've tried this, but all interested
> > classes could load a bead that injects an additional classname/typename
> and
> > then the descendant CSS can use that instead of .datechooser.
> >
> >     That said, it isn't clear to me why your descendant selector didn't
> > work so there might be a bug there.  I don't know if SimpleCSSValuesImpl
> > handles descendant selectors.  Cuz it is 'Simple'
> >
> >     -Alex
> >
> >     On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
> >
> >         I need to add a bead to all Table objects in our application, but
> > not to Table objects contained within another specific css class. So in
> our
> > css I’ve defined
> >
> >         j|Table {
> >           IBeadView: ClassReference("classes.beads.GridLikeTableView");
> >         }
> >
> >         But now I find that tables in a calendar are also affected, which
> > is unintended. So I tried adding before that
> >
> >         .datechooser j|Table {
> >           IBeadView:
> > ClassReference("org.apache.royale.jewel.beads.views.TableView");
> >         }
> >
> >         But that affects all Table objects whether or not they’re
> > contained in a .datachooser class. Any ideas how to be more surgical
> about
> > adding beads?
> >
> >
> >
> >
> >
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>


-- 

Piotr Zarzycki

Re: Smart Selectors for Beads

Posted by Carlos Rovira <ca...@apache.org>.
I think working on that extension would be appreciated and used, since most
of users will use it without doubt

El mié., 25 dic. 2019 a las 0:45, Alex Harui (<ah...@adobe.com.invalid>)
escribió:

> I don't see why you couldn't create a CSSValuesImpl that supports
> descendant selectors.  Hopefully IValuesImpls are easily replaceable.
>
> HTH,
> -Alex
>
> On 12/24/19, 6:36 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
>
>     Taking a look at SimpleCSSValuesImpl, the documentation says it
> doesn’t handle descendants. So it looks to me like that rules out all
> proposals except Carlos’. I’ll probably just inject the bead in the mxml.
> Thanks, all.
>
>     ________________________________
>     From: Alex Harui <ah...@adobe.com.INVALID>
>     Sent: Monday, December 23, 2019 5:37:26 PM
>     To: dev@royale.apache.org <de...@royale.apache.org>
>     Subject: Re: Smart Selectors for Beads
>
>     If the objects can all subclass a base class then you can use one of
> our fake type selectors.
>
>     Alternatively, and I don't think we've tried this, but all interested
> classes could load a bead that injects an additional classname/typename and
> then the descendant CSS can use that instead of .datechooser.
>
>     That said, it isn't clear to me why your descendant selector didn't
> work so there might be a bug there.  I don't know if SimpleCSSValuesImpl
> handles descendant selectors.  Cuz it is 'Simple'
>
>     -Alex
>
>     On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
>
>         I need to add a bead to all Table objects in our application, but
> not to Table objects contained within another specific css class. So in our
> css I’ve defined
>
>         j|Table {
>           IBeadView: ClassReference("classes.beads.GridLikeTableView");
>         }
>
>         But now I find that tables in a calendar are also affected, which
> is unintended. So I tried adding before that
>
>         .datechooser j|Table {
>           IBeadView:
> ClassReference("org.apache.royale.jewel.beads.views.TableView");
>         }
>
>         But that affects all Table objects whether or not they’re
> contained in a .datachooser class. Any ideas how to be more surgical about
> adding beads?
>
>
>
>
>

-- 
Carlos Rovira
http://about.me/carlosrovira

Re: Smart Selectors for Beads

Posted by Alex Harui <ah...@adobe.com.INVALID>.
I don't see why you couldn't create a CSSValuesImpl that supports descendant selectors.  Hopefully IValuesImpls are easily replaceable.

HTH,
-Alex

On 12/24/19, 6:36 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:

    Taking a look at SimpleCSSValuesImpl, the documentation says it doesn’t handle descendants. So it looks to me like that rules out all proposals except Carlos’. I’ll probably just inject the bead in the mxml. Thanks, all.
    
    ________________________________
    From: Alex Harui <ah...@adobe.com.INVALID>
    Sent: Monday, December 23, 2019 5:37:26 PM
    To: dev@royale.apache.org <de...@royale.apache.org>
    Subject: Re: Smart Selectors for Beads
    
    If the objects can all subclass a base class then you can use one of our fake type selectors.
    
    Alternatively, and I don't think we've tried this, but all interested classes could load a bead that injects an additional classname/typename and then the descendant CSS can use that instead of .datechooser.
    
    That said, it isn't clear to me why your descendant selector didn't work so there might be a bug there.  I don't know if SimpleCSSValuesImpl handles descendant selectors.  Cuz it is 'Simple'
    
    -Alex
    
    On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:
    
        I need to add a bead to all Table objects in our application, but not to Table objects contained within another specific css class. So in our css I’ve defined
    
        j|Table {
          IBeadView: ClassReference("classes.beads.GridLikeTableView");
        }
    
        But now I find that tables in a calendar are also affected, which is unintended. So I tried adding before that
    
        .datechooser j|Table {
          IBeadView: ClassReference("org.apache.royale.jewel.beads.views.TableView");
        }
    
        But that affects all Table objects whether or not they’re contained in a .datachooser class. Any ideas how to be more surgical about adding beads?
    
    
    


RE: Smart Selectors for Beads

Posted by Yishay Weiss <yi...@hotmail.com>.
Taking a look at SimpleCSSValuesImpl, the documentation says it doesn’t handle descendants. So it looks to me like that rules out all proposals except Carlos’. I’ll probably just inject the bead in the mxml. Thanks, all.

________________________________
From: Alex Harui <ah...@adobe.com.INVALID>
Sent: Monday, December 23, 2019 5:37:26 PM
To: dev@royale.apache.org <de...@royale.apache.org>
Subject: Re: Smart Selectors for Beads

If the objects can all subclass a base class then you can use one of our fake type selectors.

Alternatively, and I don't think we've tried this, but all interested classes could load a bead that injects an additional classname/typename and then the descendant CSS can use that instead of .datechooser.

That said, it isn't clear to me why your descendant selector didn't work so there might be a bug there.  I don't know if SimpleCSSValuesImpl handles descendant selectors.  Cuz it is 'Simple'

-Alex

On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:

    I need to add a bead to all Table objects in our application, but not to Table objects contained within another specific css class. So in our css I’ve defined

    j|Table {
      IBeadView: ClassReference("classes.beads.GridLikeTableView");
    }

    But now I find that tables in a calendar are also affected, which is unintended. So I tried adding before that

    .datechooser j|Table {
      IBeadView: ClassReference("org.apache.royale.jewel.beads.views.TableView");
    }

    But that affects all Table objects whether or not they’re contained in a .datachooser class. Any ideas how to be more surgical about adding beads?



Re: Smart Selectors for Beads

Posted by Alex Harui <ah...@adobe.com.INVALID>.
If the objects can all subclass a base class then you can use one of our fake type selectors.

Alternatively, and I don't think we've tried this, but all interested classes could load a bead that injects an additional classname/typename and then the descendant CSS can use that instead of .datechooser.

That said, it isn't clear to me why your descendant selector didn't work so there might be a bug there.  I don't know if SimpleCSSValuesImpl handles descendant selectors.  Cuz it is 'Simple'

-Alex

On 12/23/19, 7:22 AM, "Yishay Weiss" <yi...@hotmail.com> wrote:

    I need to add a bead to all Table objects in our application, but not to Table objects contained within another specific css class. So in our css I’ve defined
    
    j|Table {
      IBeadView: ClassReference("classes.beads.GridLikeTableView");
    }
    
    But now I find that tables in a calendar are also affected, which is unintended. So I tried adding before that
    
    .datechooser j|Table {
      IBeadView: ClassReference("org.apache.royale.jewel.beads.views.TableView");
    }
    
    But that affects all Table objects whether or not they’re contained in a .datachooser class. Any ideas how to be more surgical about adding beads?