You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Harbs <ha...@gmail.com> on 2016/05/30 19:20:41 UTC

[FlexJS]HierarchicalData

I’d like to add XML support for Trees. Any preference on whether I should create a new IHierarchicalData class for XML (i.e. XMLHierarchicalData) or put conditional logic in the existing HierarchicalData class?

I’m leaning towards the former.

Harbs

Re: [FlexJS]HierarchicalData

Posted by Alex Harui <ah...@adobe.com>.
The base class UIBase will load IBeadController (the mouse controller) for
you. I don't know if the base class should load IkeyboardController or
maybe just ListBase should do that.

-Alex

On 5/31/16, 3:04 PM, "Harbs" <ha...@gmail.com> wrote:

>Great, but how do I specify both behaviors?
>
>On Jun 1, 2016, at 1:03 AM, Alex Harui <ah...@adobe.com> wrote:
>
>> 
>> 
>> On 5/31/16, 2:52 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> My train of thought is that I want to add keyboard navigation to lists
>>>in
>>> addition to mouse navigation that already exists.
>>> 
>>> It made sense to me that this should be another bead. The mouse
>>> navigation currently is handled by an IBeadController which is specific
>>> to mouse navigation. What’s the best way to add keyboard navigation to
>>> the component?
>> 
>> I would start by creating an IKeyboardController interface.  By
>>building a
>> parallel set of classes to the SingleSelectionMouseControllers you
>>should
>> get it to load and run.
>> 
>> HTH,
>> -Alex
>> 
>


Re: [FlexJS]HierarchicalData

Posted by Harbs <ha...@gmail.com>.
Great, but how do I specify both behaviors?

On Jun 1, 2016, at 1:03 AM, Alex Harui <ah...@adobe.com> wrote:

> 
> 
> On 5/31/16, 2:52 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> My train of thought is that I want to add keyboard navigation to lists in
>> addition to mouse navigation that already exists.
>> 
>> It made sense to me that this should be another bead. The mouse
>> navigation currently is handled by an IBeadController which is specific
>> to mouse navigation. What’s the best way to add keyboard navigation to
>> the component?
> 
> I would start by creating an IKeyboardController interface.  By building a
> parallel set of classes to the SingleSelectionMouseControllers you should
> get it to load and run.
> 
> HTH,
> -Alex
> 


Re: [FlexJS]HierarchicalData

Posted by Alex Harui <ah...@adobe.com>.

On 5/31/16, 2:52 PM, "Harbs" <ha...@gmail.com> wrote:

>My train of thought is that I want to add keyboard navigation to lists in
>addition to mouse navigation that already exists.
>
>It made sense to me that this should be another bead. The mouse
>navigation currently is handled by an IBeadController which is specific
>to mouse navigation. What’s the best way to add keyboard navigation to
>the component?

I would start by creating an IKeyboardController interface.  By building a
parallel set of classes to the SingleSelectionMouseControllers you should
get it to load and run.

HTH,
-Alex


Re: [FlexJS]HierarchicalData

Posted by Harbs <ha...@gmail.com>.
My train of thought is that I want to add keyboard navigation to lists in addition to mouse navigation that already exists.

It made sense to me that this should be another bead. The mouse navigation currently is handled by an IBeadController which is specific to mouse navigation. What’s the best way to add keyboard navigation to the component?

On Jun 1, 2016, at 12:42 AM, Alex Harui <ah...@adobe.com> wrote:

> I'm not sure I understood from this thread as to why you want two of the
> same type of controller.  I don't think we have the notion of
> sub-controllers right now either.  What would it be used for?  It is ok to
> have more than one type of controller on the strand, but they would have
> different interfaces and thus be identified separately in the CSS.
> 
> Think of beads as a mostly-independent set of plugins.  A
> SingleSelectionMouseController is much simpler (and therefore faster and
> smaller) than a MultipleSelectionMouseController, plus there are different
> kinds of MultipleSelection algorithms.  There might even be a different
> implementation for mobile devices, especially ones without mouseOvers and
> ones that want to use gesture-based selection.
> 
> Similarly, a keyboard controller would be simpler for SingleSelection than
> MultipleSelection and again, there are multiple ways of implementing
> MultipleSelection.  And, in some runtime environments like a phone, there
> may not be a need to even load a keyboard controller.   So, if you want to
> take on List selection from a Keyboard, it would be simplest just to
> create an IKeyboardController as Peter suggested.
> 
> Yes, we are using CSS in a rather unconventional way by using it to
> specify code and not just visuals, but at least right now, it makes sense
> to be to leverage things like CSS Media Query to help you configure what
> code gets loaded in certain runtime environments.  We don't have Media
> Query working yet, but eventually you could use Media Query to load
> different controllers based on whether the runtime environment supports
> keyboard selection, multi-touch gestures, rollover/mouseover and other
> things like that.
> 
> HTH,
> -Alex 
> 
> 
> On 5/31/16, 2:18 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> So basically, there’s a wrapper controller which brings in the
>> sub-controllers?
>> 
>> Is there any examples which does this already?
>> 
>> On Jun 1, 2016, at 12:16 AM, Peter Ent <pe...@adobe.com> wrote:
>> 
>>> My official reply is "Hmm, I don't think you can". I think you'd want to
>>> use something like IMouseController and IKeyboardController for the
>>> items
>>> in the style. IBeadController, if present, is automatically detected and
>>> loaded as the controller for the strand (same for the IBeadView and
>>> IBeadModel). But you can write your view to load your own classes.
>>> 
>>> —peter
>>> 
>>> On 5/31/16, 5:09 PM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> So, is it possible to have two IBeadControllers?
>>>> 
>>>> On Jun 1, 2016, at 12:04 AM, Peter Ent <pe...@adobe.com> wrote:
>>>> 
>>>>> The key to the CSS and the beads is the ValuesManager
>>>>> (org.apache.flex.core.ValuesManager) the implementation used
>>>>> (org.apache.flex.core.SimpleCSSValuesImpl). This searches through the
>>>>> CSS
>>>>> for the class and matches the name (eg, IBeadController) and
>>>>> instantiates
>>>>> and instance of the class referenced. This is done in the
>>>>> MXMLDataInterpreter.
>>>>> 
>>>>> —peter
>>>>> 
>>>>> On 5/31/16, 4:24 PM, "Harbs" <ha...@gmail.com> wrote:
>>>>> 
>>>>>> Yeah. If I’m going to jump in, it might as well be with both feet
>>>>>> into
>>>>>> the deep water… ;-)
>>>>>> 
>>>>>> How does the css setting of beads work under the hood? I’d like to
>>>>>> understand the mechanics.
>>>>>> 
>>>>>> I’ll figure out the HierarchicalData as soon as I fix the XML issue
>>>>>> with
>>>>>> the compiler.
>>>>>> 
>>>>>> I’ll look at EditableTextKeyboardController. Thanks. Is there any
>>>>>> trick
>>>>>> necessary for specifying multiple controller beads?
>>>>>> 
>>>>>> I’d also like to figure out how to specify different icons for open
>>>>>> and
>>>>>> closed nodes. Ideally there should be a way to specify look using CSS
>>>>>> class names in HTML. Is there an easy way to do that?
>>>>>> 
>>>>>> On May 31, 2016, at 5:24 PM, Peter Ent <pe...@adobe.com> wrote:
>>>>>> 
>>>>>>> Hi,
>>>>>>> 
>>>>>>> Picked Tree as the first component, huh? The basic idea behind Tree
>>>>>>> in
>>>>>>> FlexJS is that it is a List with itemRenderers that indent.
>>>>>>> 
>>>>>>> The reason CSS is used to set beads, such as model, view,
>>>>>>> controller,
>>>>>>> and
>>>>>>> others, is to make it very easy to swap them out just by giving your
>>>>>>> app a
>>>>>>> different CSS file and they don't have to be hard-coded.
>>>>>>> 
>>>>>>> Since it has been a little while since I looked at Tree, my guess is
>>>>>>> that
>>>>>>> I just forgot to change it once I took HierarchicalData as far as
>>>>>>> was
>>>>>>> needed at the time. I probably worked with HierarchicalData until
>>>>>>> the
>>>>>>> end
>>>>>>> when I created IHierarchicalData and just forgot to go back to Tree
>>>>>>> and
>>>>>>> change it.
>>>>>>> 
>>>>>>> If you want to add keyboard behavior, you'd create another
>>>>>>> controller
>>>>>>> type
>>>>>>> bead. If you look in the HTML project in the
>>>>>>> org.apache.flex.html.beads.controllers package you'll find
>>>>>>> EditableTextKeyboardController. There's not much to it, but its a
>>>>>>> start.
>>>>>>> Some of the mouse controllers have more insight into separating the
>>>>>>> SWF
>>>>>>> and JS event handling if you need to look at specific keyboard keys.
>>>>>>> 
>>>>>>> On 5/30/16, 3:36 PM, "Harbs" <ha...@gmail.com> wrote:
>>>>>>> 
>>>>>>>> On second thoughtŠ
>>>>>>>> 
>>>>>>>> This is the first time I¹m diving into a FlexJS component. I
>>>>>>>> understand
>>>>>>>> strands and beads conceptually, but I have not really looked into
>>>>>>>> the
>>>>>>>> practice until now.
>>>>>>>> 
>>>>>>>> It looks like the behavior of the Tree is handled by the
>>>>>>>> TreeSingleSelectionMouseController which extends
>>>>>>>> ListSingleSelectionMouseController. The controller seems to be set
>>>>>>>> in
>>>>>>>> the
>>>>>>>> css file? That strikes me as a bit odd considering that css usually
>>>>>>>> means
>>>>>>>> visual to me, but I think I get it.
>>>>>>>> 
>>>>>>>> Either way, Tree is expecting HierarchicalData rather than
>>>>>>>> IHierarchicalData. Is there a reason for that?
>>>>>>>> 
>>>>>>>> If I want to add keyboard behavior (i.e. using the arrow keys to
>>>>>>>> navigate
>>>>>>>> and open/close nodes, what would be the best way to do that?
>>>>>>>> 
>>>>>>>> (BTW, I¹m using Tree for a pet project as a way of learning the
>>>>>>>> structure
>>>>>>>> of FlexJS components before I deep dive into using them.)
>>>>>>>> 
>>>>>>>> On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:
>>>>>>>> 
>>>>>>>>> I¹d like to add XML support for Trees. Any preference on whether I
>>>>>>>>> should create a new IHierarchicalData class for XML (i.e.
>>>>>>>>> XMLHierarchicalData) or put conditional logic in the existing
>>>>>>>>> HierarchicalData class?
>>>>>>>>> 
>>>>>>>>> I¹m leaning towards the former.
>>>>>>>>> 
>>>>>>>>> Harbs
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 


Re: [FlexJS]HierarchicalData

Posted by Alex Harui <ah...@adobe.com>.
I'm not sure I understood from this thread as to why you want two of the
same type of controller.  I don't think we have the notion of
sub-controllers right now either.  What would it be used for?  It is ok to
have more than one type of controller on the strand, but they would have
different interfaces and thus be identified separately in the CSS.

Think of beads as a mostly-independent set of plugins.  A
SingleSelectionMouseController is much simpler (and therefore faster and
smaller) than a MultipleSelectionMouseController, plus there are different
kinds of MultipleSelection algorithms.  There might even be a different
implementation for mobile devices, especially ones without mouseOvers and
ones that want to use gesture-based selection.

Similarly, a keyboard controller would be simpler for SingleSelection than
MultipleSelection and again, there are multiple ways of implementing
MultipleSelection.  And, in some runtime environments like a phone, there
may not be a need to even load a keyboard controller.   So, if you want to
take on List selection from a Keyboard, it would be simplest just to
create an IKeyboardController as Peter suggested.

Yes, we are using CSS in a rather unconventional way by using it to
specify code and not just visuals, but at least right now, it makes sense
to be to leverage things like CSS Media Query to help you configure what
code gets loaded in certain runtime environments.  We don't have Media
Query working yet, but eventually you could use Media Query to load
different controllers based on whether the runtime environment supports
keyboard selection, multi-touch gestures, rollover/mouseover and other
things like that.

HTH,
-Alex 


On 5/31/16, 2:18 PM, "Harbs" <ha...@gmail.com> wrote:

>So basically, there’s a wrapper controller which brings in the
>sub-controllers?
>
>Is there any examples which does this already?
>
>On Jun 1, 2016, at 12:16 AM, Peter Ent <pe...@adobe.com> wrote:
>
>> My official reply is "Hmm, I don't think you can". I think you'd want to
>> use something like IMouseController and IKeyboardController for the
>>items
>> in the style. IBeadController, if present, is automatically detected and
>> loaded as the controller for the strand (same for the IBeadView and
>> IBeadModel). But you can write your view to load your own classes.
>> 
>> —peter
>> 
>> On 5/31/16, 5:09 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> So, is it possible to have two IBeadControllers?
>>> 
>>> On Jun 1, 2016, at 12:04 AM, Peter Ent <pe...@adobe.com> wrote:
>>> 
>>>> The key to the CSS and the beads is the ValuesManager
>>>> (org.apache.flex.core.ValuesManager) the implementation used
>>>> (org.apache.flex.core.SimpleCSSValuesImpl). This searches through the
>>>> CSS
>>>> for the class and matches the name (eg, IBeadController) and
>>>> instantiates
>>>> and instance of the class referenced. This is done in the
>>>> MXMLDataInterpreter.
>>>> 
>>>> —peter
>>>> 
>>>> On 5/31/16, 4:24 PM, "Harbs" <ha...@gmail.com> wrote:
>>>> 
>>>>> Yeah. If I’m going to jump in, it might as well be with both feet
>>>>>into
>>>>> the deep water… ;-)
>>>>> 
>>>>> How does the css setting of beads work under the hood? I’d like to
>>>>> understand the mechanics.
>>>>> 
>>>>> I’ll figure out the HierarchicalData as soon as I fix the XML issue
>>>>> with
>>>>> the compiler.
>>>>> 
>>>>> I’ll look at EditableTextKeyboardController. Thanks. Is there any
>>>>>trick
>>>>> necessary for specifying multiple controller beads?
>>>>> 
>>>>> I’d also like to figure out how to specify different icons for open
>>>>>and
>>>>> closed nodes. Ideally there should be a way to specify look using CSS
>>>>> class names in HTML. Is there an easy way to do that?
>>>>> 
>>>>> On May 31, 2016, at 5:24 PM, Peter Ent <pe...@adobe.com> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> Picked Tree as the first component, huh? The basic idea behind Tree
>>>>>>in
>>>>>> FlexJS is that it is a List with itemRenderers that indent.
>>>>>> 
>>>>>> The reason CSS is used to set beads, such as model, view,
>>>>>>controller,
>>>>>> and
>>>>>> others, is to make it very easy to swap them out just by giving your
>>>>>> app a
>>>>>> different CSS file and they don't have to be hard-coded.
>>>>>> 
>>>>>> Since it has been a little while since I looked at Tree, my guess is
>>>>>> that
>>>>>> I just forgot to change it once I took HierarchicalData as far as
>>>>>>was
>>>>>> needed at the time. I probably worked with HierarchicalData until
>>>>>>the
>>>>>> end
>>>>>> when I created IHierarchicalData and just forgot to go back to Tree
>>>>>> and
>>>>>> change it.
>>>>>> 
>>>>>> If you want to add keyboard behavior, you'd create another
>>>>>>controller
>>>>>> type
>>>>>> bead. If you look in the HTML project in the
>>>>>> org.apache.flex.html.beads.controllers package you'll find
>>>>>> EditableTextKeyboardController. There's not much to it, but its a
>>>>>> start.
>>>>>> Some of the mouse controllers have more insight into separating the
>>>>>> SWF
>>>>>> and JS event handling if you need to look at specific keyboard keys.
>>>>>> 
>>>>>> On 5/30/16, 3:36 PM, "Harbs" <ha...@gmail.com> wrote:
>>>>>> 
>>>>>>> On second thoughtŠ
>>>>>>> 
>>>>>>> This is the first time I¹m diving into a FlexJS component. I
>>>>>>> understand
>>>>>>> strands and beads conceptually, but I have not really looked into
>>>>>>>the
>>>>>>> practice until now.
>>>>>>> 
>>>>>>> It looks like the behavior of the Tree is handled by the
>>>>>>> TreeSingleSelectionMouseController which extends
>>>>>>> ListSingleSelectionMouseController. The controller seems to be set
>>>>>>>in
>>>>>>> the
>>>>>>> css file? That strikes me as a bit odd considering that css usually
>>>>>>> means
>>>>>>> visual to me, but I think I get it.
>>>>>>> 
>>>>>>> Either way, Tree is expecting HierarchicalData rather than
>>>>>>> IHierarchicalData. Is there a reason for that?
>>>>>>> 
>>>>>>> If I want to add keyboard behavior (i.e. using the arrow keys to
>>>>>>> navigate
>>>>>>> and open/close nodes, what would be the best way to do that?
>>>>>>> 
>>>>>>> (BTW, I¹m using Tree for a pet project as a way of learning the
>>>>>>> structure
>>>>>>> of FlexJS components before I deep dive into using them.)
>>>>>>> 
>>>>>>> On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:
>>>>>>> 
>>>>>>>> I¹d like to add XML support for Trees. Any preference on whether I
>>>>>>>> should create a new IHierarchicalData class for XML (i.e.
>>>>>>>> XMLHierarchicalData) or put conditional logic in the existing
>>>>>>>> HierarchicalData class?
>>>>>>>> 
>>>>>>>> I¹m leaning towards the former.
>>>>>>>> 
>>>>>>>> Harbs
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
>


Re: [FlexJS]HierarchicalData

Posted by Harbs <ha...@gmail.com>.
So basically, there’s a wrapper controller which brings in the sub-controllers?

Is there any examples which does this already?

On Jun 1, 2016, at 12:16 AM, Peter Ent <pe...@adobe.com> wrote:

> My official reply is "Hmm, I don't think you can". I think you'd want to
> use something like IMouseController and IKeyboardController for the items
> in the style. IBeadController, if present, is automatically detected and
> loaded as the controller for the strand (same for the IBeadView and
> IBeadModel). But you can write your view to load your own classes.
> 
> —peter
> 
> On 5/31/16, 5:09 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> So, is it possible to have two IBeadControllers?
>> 
>> On Jun 1, 2016, at 12:04 AM, Peter Ent <pe...@adobe.com> wrote:
>> 
>>> The key to the CSS and the beads is the ValuesManager
>>> (org.apache.flex.core.ValuesManager) the implementation used
>>> (org.apache.flex.core.SimpleCSSValuesImpl). This searches through the
>>> CSS
>>> for the class and matches the name (eg, IBeadController) and
>>> instantiates
>>> and instance of the class referenced. This is done in the
>>> MXMLDataInterpreter.
>>> 
>>> —peter
>>> 
>>> On 5/31/16, 4:24 PM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> Yeah. If I’m going to jump in, it might as well be with both feet into
>>>> the deep water… ;-)
>>>> 
>>>> How does the css setting of beads work under the hood? I’d like to
>>>> understand the mechanics.
>>>> 
>>>> I’ll figure out the HierarchicalData as soon as I fix the XML issue
>>>> with
>>>> the compiler.
>>>> 
>>>> I’ll look at EditableTextKeyboardController. Thanks. Is there any trick
>>>> necessary for specifying multiple controller beads?
>>>> 
>>>> I’d also like to figure out how to specify different icons for open and
>>>> closed nodes. Ideally there should be a way to specify look using CSS
>>>> class names in HTML. Is there an easy way to do that?
>>>> 
>>>> On May 31, 2016, at 5:24 PM, Peter Ent <pe...@adobe.com> wrote:
>>>> 
>>>>> Hi,
>>>>> 
>>>>> Picked Tree as the first component, huh? The basic idea behind Tree in
>>>>> FlexJS is that it is a List with itemRenderers that indent.
>>>>> 
>>>>> The reason CSS is used to set beads, such as model, view, controller,
>>>>> and
>>>>> others, is to make it very easy to swap them out just by giving your
>>>>> app a
>>>>> different CSS file and they don't have to be hard-coded.
>>>>> 
>>>>> Since it has been a little while since I looked at Tree, my guess is
>>>>> that
>>>>> I just forgot to change it once I took HierarchicalData as far as was
>>>>> needed at the time. I probably worked with HierarchicalData until the
>>>>> end
>>>>> when I created IHierarchicalData and just forgot to go back to Tree
>>>>> and
>>>>> change it.
>>>>> 
>>>>> If you want to add keyboard behavior, you'd create another controller
>>>>> type
>>>>> bead. If you look in the HTML project in the
>>>>> org.apache.flex.html.beads.controllers package you'll find
>>>>> EditableTextKeyboardController. There's not much to it, but its a
>>>>> start.
>>>>> Some of the mouse controllers have more insight into separating the
>>>>> SWF
>>>>> and JS event handling if you need to look at specific keyboard keys.
>>>>> 
>>>>> On 5/30/16, 3:36 PM, "Harbs" <ha...@gmail.com> wrote:
>>>>> 
>>>>>> On second thoughtŠ
>>>>>> 
>>>>>> This is the first time I¹m diving into a FlexJS component. I
>>>>>> understand
>>>>>> strands and beads conceptually, but I have not really looked into the
>>>>>> practice until now.
>>>>>> 
>>>>>> It looks like the behavior of the Tree is handled by the
>>>>>> TreeSingleSelectionMouseController which extends
>>>>>> ListSingleSelectionMouseController. The controller seems to be set in
>>>>>> the
>>>>>> css file? That strikes me as a bit odd considering that css usually
>>>>>> means
>>>>>> visual to me, but I think I get it.
>>>>>> 
>>>>>> Either way, Tree is expecting HierarchicalData rather than
>>>>>> IHierarchicalData. Is there a reason for that?
>>>>>> 
>>>>>> If I want to add keyboard behavior (i.e. using the arrow keys to
>>>>>> navigate
>>>>>> and open/close nodes, what would be the best way to do that?
>>>>>> 
>>>>>> (BTW, I¹m using Tree for a pet project as a way of learning the
>>>>>> structure
>>>>>> of FlexJS components before I deep dive into using them.)
>>>>>> 
>>>>>> On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:
>>>>>> 
>>>>>>> I¹d like to add XML support for Trees. Any preference on whether I
>>>>>>> should create a new IHierarchicalData class for XML (i.e.
>>>>>>> XMLHierarchicalData) or put conditional logic in the existing
>>>>>>> HierarchicalData class?
>>>>>>> 
>>>>>>> I¹m leaning towards the former.
>>>>>>> 
>>>>>>> Harbs
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 


Re: [FlexJS]HierarchicalData

Posted by Peter Ent <pe...@adobe.com>.
My official reply is "Hmm, I don't think you can". I think you'd want to
use something like IMouseController and IKeyboardController for the items
in the style. IBeadController, if present, is automatically detected and
loaded as the controller for the strand (same for the IBeadView and
IBeadModel). But you can write your view to load your own classes.

—peter

On 5/31/16, 5:09 PM, "Harbs" <ha...@gmail.com> wrote:

>So, is it possible to have two IBeadControllers?
>
>On Jun 1, 2016, at 12:04 AM, Peter Ent <pe...@adobe.com> wrote:
>
>> The key to the CSS and the beads is the ValuesManager
>> (org.apache.flex.core.ValuesManager) the implementation used
>> (org.apache.flex.core.SimpleCSSValuesImpl). This searches through the
>>CSS
>> for the class and matches the name (eg, IBeadController) and
>>instantiates
>> and instance of the class referenced. This is done in the
>> MXMLDataInterpreter.
>> 
>> —peter
>> 
>> On 5/31/16, 4:24 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> Yeah. If I’m going to jump in, it might as well be with both feet into
>>> the deep water… ;-)
>>> 
>>> How does the css setting of beads work under the hood? I’d like to
>>> understand the mechanics.
>>> 
>>> I’ll figure out the HierarchicalData as soon as I fix the XML issue
>>>with
>>> the compiler.
>>> 
>>> I’ll look at EditableTextKeyboardController. Thanks. Is there any trick
>>> necessary for specifying multiple controller beads?
>>> 
>>> I’d also like to figure out how to specify different icons for open and
>>> closed nodes. Ideally there should be a way to specify look using CSS
>>> class names in HTML. Is there an easy way to do that?
>>> 
>>> On May 31, 2016, at 5:24 PM, Peter Ent <pe...@adobe.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> Picked Tree as the first component, huh? The basic idea behind Tree in
>>>> FlexJS is that it is a List with itemRenderers that indent.
>>>> 
>>>> The reason CSS is used to set beads, such as model, view, controller,
>>>> and
>>>> others, is to make it very easy to swap them out just by giving your
>>>> app a
>>>> different CSS file and they don't have to be hard-coded.
>>>> 
>>>> Since it has been a little while since I looked at Tree, my guess is
>>>> that
>>>> I just forgot to change it once I took HierarchicalData as far as was
>>>> needed at the time. I probably worked with HierarchicalData until the
>>>> end
>>>> when I created IHierarchicalData and just forgot to go back to Tree
>>>>and
>>>> change it.
>>>> 
>>>> If you want to add keyboard behavior, you'd create another controller
>>>> type
>>>> bead. If you look in the HTML project in the
>>>> org.apache.flex.html.beads.controllers package you'll find
>>>> EditableTextKeyboardController. There's not much to it, but its a
>>>>start.
>>>> Some of the mouse controllers have more insight into separating the
>>>>SWF
>>>> and JS event handling if you need to look at specific keyboard keys.
>>>> 
>>>> On 5/30/16, 3:36 PM, "Harbs" <ha...@gmail.com> wrote:
>>>> 
>>>>> On second thoughtŠ
>>>>> 
>>>>> This is the first time I¹m diving into a FlexJS component. I
>>>>>understand
>>>>> strands and beads conceptually, but I have not really looked into the
>>>>> practice until now.
>>>>> 
>>>>> It looks like the behavior of the Tree is handled by the
>>>>> TreeSingleSelectionMouseController which extends
>>>>> ListSingleSelectionMouseController. The controller seems to be set in
>>>>> the
>>>>> css file? That strikes me as a bit odd considering that css usually
>>>>> means
>>>>> visual to me, but I think I get it.
>>>>> 
>>>>> Either way, Tree is expecting HierarchicalData rather than
>>>>> IHierarchicalData. Is there a reason for that?
>>>>> 
>>>>> If I want to add keyboard behavior (i.e. using the arrow keys to
>>>>> navigate
>>>>> and open/close nodes, what would be the best way to do that?
>>>>> 
>>>>> (BTW, I¹m using Tree for a pet project as a way of learning the
>>>>> structure
>>>>> of FlexJS components before I deep dive into using them.)
>>>>> 
>>>>> On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:
>>>>> 
>>>>>> I¹d like to add XML support for Trees. Any preference on whether I
>>>>>> should create a new IHierarchicalData class for XML (i.e.
>>>>>> XMLHierarchicalData) or put conditional logic in the existing
>>>>>> HierarchicalData class?
>>>>>> 
>>>>>> I¹m leaning towards the former.
>>>>>> 
>>>>>> Harbs
>>>>> 
>>>> 
>>> 
>> 
>


Re: [FlexJS]HierarchicalData

Posted by Harbs <ha...@gmail.com>.
So, is it possible to have two IBeadControllers?

On Jun 1, 2016, at 12:04 AM, Peter Ent <pe...@adobe.com> wrote:

> The key to the CSS and the beads is the ValuesManager
> (org.apache.flex.core.ValuesManager) the implementation used
> (org.apache.flex.core.SimpleCSSValuesImpl). This searches through the CSS
> for the class and matches the name (eg, IBeadController) and instantiates
> and instance of the class referenced. This is done in the
> MXMLDataInterpreter.
> 
> —peter
> 
> On 5/31/16, 4:24 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> Yeah. If I’m going to jump in, it might as well be with both feet into
>> the deep water… ;-)
>> 
>> How does the css setting of beads work under the hood? I’d like to
>> understand the mechanics.
>> 
>> I’ll figure out the HierarchicalData as soon as I fix the XML issue with
>> the compiler.
>> 
>> I’ll look at EditableTextKeyboardController. Thanks. Is there any trick
>> necessary for specifying multiple controller beads?
>> 
>> I’d also like to figure out how to specify different icons for open and
>> closed nodes. Ideally there should be a way to specify look using CSS
>> class names in HTML. Is there an easy way to do that?
>> 
>> On May 31, 2016, at 5:24 PM, Peter Ent <pe...@adobe.com> wrote:
>> 
>>> Hi,
>>> 
>>> Picked Tree as the first component, huh? The basic idea behind Tree in
>>> FlexJS is that it is a List with itemRenderers that indent.
>>> 
>>> The reason CSS is used to set beads, such as model, view, controller,
>>> and
>>> others, is to make it very easy to swap them out just by giving your
>>> app a
>>> different CSS file and they don't have to be hard-coded.
>>> 
>>> Since it has been a little while since I looked at Tree, my guess is
>>> that
>>> I just forgot to change it once I took HierarchicalData as far as was
>>> needed at the time. I probably worked with HierarchicalData until the
>>> end
>>> when I created IHierarchicalData and just forgot to go back to Tree and
>>> change it.
>>> 
>>> If you want to add keyboard behavior, you'd create another controller
>>> type
>>> bead. If you look in the HTML project in the
>>> org.apache.flex.html.beads.controllers package you'll find
>>> EditableTextKeyboardController. There's not much to it, but its a start.
>>> Some of the mouse controllers have more insight into separating the SWF
>>> and JS event handling if you need to look at specific keyboard keys.
>>> 
>>> On 5/30/16, 3:36 PM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> On second thoughtŠ
>>>> 
>>>> This is the first time I¹m diving into a FlexJS component. I understand
>>>> strands and beads conceptually, but I have not really looked into the
>>>> practice until now.
>>>> 
>>>> It looks like the behavior of the Tree is handled by the
>>>> TreeSingleSelectionMouseController which extends
>>>> ListSingleSelectionMouseController. The controller seems to be set in
>>>> the
>>>> css file? That strikes me as a bit odd considering that css usually
>>>> means
>>>> visual to me, but I think I get it.
>>>> 
>>>> Either way, Tree is expecting HierarchicalData rather than
>>>> IHierarchicalData. Is there a reason for that?
>>>> 
>>>> If I want to add keyboard behavior (i.e. using the arrow keys to
>>>> navigate
>>>> and open/close nodes, what would be the best way to do that?
>>>> 
>>>> (BTW, I¹m using Tree for a pet project as a way of learning the
>>>> structure
>>>> of FlexJS components before I deep dive into using them.)
>>>> 
>>>> On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:
>>>> 
>>>>> I¹d like to add XML support for Trees. Any preference on whether I
>>>>> should create a new IHierarchicalData class for XML (i.e.
>>>>> XMLHierarchicalData) or put conditional logic in the existing
>>>>> HierarchicalData class?
>>>>> 
>>>>> I¹m leaning towards the former.
>>>>> 
>>>>> Harbs
>>>> 
>>> 
>> 
> 


Re: [FlexJS]HierarchicalData

Posted by Peter Ent <pe...@adobe.com>.
The key to the CSS and the beads is the ValuesManager
(org.apache.flex.core.ValuesManager) the implementation used
(org.apache.flex.core.SimpleCSSValuesImpl). This searches through the CSS
for the class and matches the name (eg, IBeadController) and instantiates
and instance of the class referenced. This is done in the
MXMLDataInterpreter.

—peter

On 5/31/16, 4:24 PM, "Harbs" <ha...@gmail.com> wrote:

>Yeah. If I’m going to jump in, it might as well be with both feet into
>the deep water… ;-)
>
>How does the css setting of beads work under the hood? I’d like to
>understand the mechanics.
>
>I’ll figure out the HierarchicalData as soon as I fix the XML issue with
>the compiler.
>
>I’ll look at EditableTextKeyboardController. Thanks. Is there any trick
>necessary for specifying multiple controller beads?
>
>I’d also like to figure out how to specify different icons for open and
>closed nodes. Ideally there should be a way to specify look using CSS
>class names in HTML. Is there an easy way to do that?
>
>On May 31, 2016, at 5:24 PM, Peter Ent <pe...@adobe.com> wrote:
>
>> Hi,
>> 
>> Picked Tree as the first component, huh? The basic idea behind Tree in
>> FlexJS is that it is a List with itemRenderers that indent.
>> 
>> The reason CSS is used to set beads, such as model, view, controller,
>>and
>> others, is to make it very easy to swap them out just by giving your
>>app a
>> different CSS file and they don't have to be hard-coded.
>> 
>> Since it has been a little while since I looked at Tree, my guess is
>>that
>> I just forgot to change it once I took HierarchicalData as far as was
>> needed at the time. I probably worked with HierarchicalData until the
>>end
>> when I created IHierarchicalData and just forgot to go back to Tree and
>> change it.
>> 
>> If you want to add keyboard behavior, you'd create another controller
>>type
>> bead. If you look in the HTML project in the
>> org.apache.flex.html.beads.controllers package you'll find
>> EditableTextKeyboardController. There's not much to it, but its a start.
>> Some of the mouse controllers have more insight into separating the SWF
>> and JS event handling if you need to look at specific keyboard keys.
>> 
>> On 5/30/16, 3:36 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> On second thoughtŠ
>>> 
>>> This is the first time I¹m diving into a FlexJS component. I understand
>>> strands and beads conceptually, but I have not really looked into the
>>> practice until now.
>>> 
>>> It looks like the behavior of the Tree is handled by the
>>> TreeSingleSelectionMouseController which extends
>>> ListSingleSelectionMouseController. The controller seems to be set in
>>>the
>>> css file? That strikes me as a bit odd considering that css usually
>>>means
>>> visual to me, but I think I get it.
>>> 
>>> Either way, Tree is expecting HierarchicalData rather than
>>> IHierarchicalData. Is there a reason for that?
>>> 
>>> If I want to add keyboard behavior (i.e. using the arrow keys to
>>>navigate
>>> and open/close nodes, what would be the best way to do that?
>>> 
>>> (BTW, I¹m using Tree for a pet project as a way of learning the
>>>structure
>>> of FlexJS components before I deep dive into using them.)
>>> 
>>> On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:
>>> 
>>>> I¹d like to add XML support for Trees. Any preference on whether I
>>>> should create a new IHierarchicalData class for XML (i.e.
>>>> XMLHierarchicalData) or put conditional logic in the existing
>>>> HierarchicalData class?
>>>> 
>>>> I¹m leaning towards the former.
>>>> 
>>>> Harbs
>>> 
>> 
>


Re: [FlexJS]HierarchicalData

Posted by Harbs <ha...@gmail.com>.
Yeah. If I’m going to jump in, it might as well be with both feet into the deep water… ;-)

How does the css setting of beads work under the hood? I’d like to understand the mechanics.

I’ll figure out the HierarchicalData as soon as I fix the XML issue with the compiler.

I’ll look at EditableTextKeyboardController. Thanks. Is there any trick necessary for specifying multiple controller beads?

I’d also like to figure out how to specify different icons for open and closed nodes. Ideally there should be a way to specify look using CSS class names in HTML. Is there an easy way to do that?

On May 31, 2016, at 5:24 PM, Peter Ent <pe...@adobe.com> wrote:

> Hi,
> 
> Picked Tree as the first component, huh? The basic idea behind Tree in
> FlexJS is that it is a List with itemRenderers that indent.
> 
> The reason CSS is used to set beads, such as model, view, controller, and
> others, is to make it very easy to swap them out just by giving your app a
> different CSS file and they don't have to be hard-coded.
> 
> Since it has been a little while since I looked at Tree, my guess is that
> I just forgot to change it once I took HierarchicalData as far as was
> needed at the time. I probably worked with HierarchicalData until the end
> when I created IHierarchicalData and just forgot to go back to Tree and
> change it.
> 
> If you want to add keyboard behavior, you'd create another controller type
> bead. If you look in the HTML project in the
> org.apache.flex.html.beads.controllers package you'll find
> EditableTextKeyboardController. There's not much to it, but its a start.
> Some of the mouse controllers have more insight into separating the SWF
> and JS event handling if you need to look at specific keyboard keys.
> 
> On 5/30/16, 3:36 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> On second thoughtŠ
>> 
>> This is the first time I¹m diving into a FlexJS component. I understand
>> strands and beads conceptually, but I have not really looked into the
>> practice until now.
>> 
>> It looks like the behavior of the Tree is handled by the
>> TreeSingleSelectionMouseController which extends
>> ListSingleSelectionMouseController. The controller seems to be set in the
>> css file? That strikes me as a bit odd considering that css usually means
>> visual to me, but I think I get it.
>> 
>> Either way, Tree is expecting HierarchicalData rather than
>> IHierarchicalData. Is there a reason for that?
>> 
>> If I want to add keyboard behavior (i.e. using the arrow keys to navigate
>> and open/close nodes, what would be the best way to do that?
>> 
>> (BTW, I¹m using Tree for a pet project as a way of learning the structure
>> of FlexJS components before I deep dive into using them.)
>> 
>> On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:
>> 
>>> I¹d like to add XML support for Trees. Any preference on whether I
>>> should create a new IHierarchicalData class for XML (i.e.
>>> XMLHierarchicalData) or put conditional logic in the existing
>>> HierarchicalData class?
>>> 
>>> I¹m leaning towards the former.
>>> 
>>> Harbs
>> 
> 


Re: [FlexJS]HierarchicalData

Posted by Peter Ent <pe...@adobe.com>.
Hi,

Picked Tree as the first component, huh? The basic idea behind Tree in
FlexJS is that it is a List with itemRenderers that indent.

The reason CSS is used to set beads, such as model, view, controller, and
others, is to make it very easy to swap them out just by giving your app a
different CSS file and they don't have to be hard-coded.

Since it has been a little while since I looked at Tree, my guess is that
I just forgot to change it once I took HierarchicalData as far as was
needed at the time. I probably worked with HierarchicalData until the end
when I created IHierarchicalData and just forgot to go back to Tree and
change it.

If you want to add keyboard behavior, you'd create another controller type
bead. If you look in the HTML project in the
org.apache.flex.html.beads.controllers package you'll find
EditableTextKeyboardController. There's not much to it, but its a start.
Some of the mouse controllers have more insight into separating the SWF
and JS event handling if you need to look at specific keyboard keys.

On 5/30/16, 3:36 PM, "Harbs" <ha...@gmail.com> wrote:

>On second thoughtŠ
>
>This is the first time I¹m diving into a FlexJS component. I understand
>strands and beads conceptually, but I have not really looked into the
>practice until now.
>
>It looks like the behavior of the Tree is handled by the
>TreeSingleSelectionMouseController which extends
>ListSingleSelectionMouseController. The controller seems to be set in the
>css file? That strikes me as a bit odd considering that css usually means
>visual to me, but I think I get it.
>
>Either way, Tree is expecting HierarchicalData rather than
>IHierarchicalData. Is there a reason for that?
>
>If I want to add keyboard behavior (i.e. using the arrow keys to navigate
>and open/close nodes, what would be the best way to do that?
>
>(BTW, I¹m using Tree for a pet project as a way of learning the structure
>of FlexJS components before I deep dive into using them.)
>
>On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:
>
>> I¹d like to add XML support for Trees. Any preference on whether I
>>should create a new IHierarchicalData class for XML (i.e.
>>XMLHierarchicalData) or put conditional logic in the existing
>>HierarchicalData class?
>> 
>> I¹m leaning towards the former.
>> 
>> Harbs
>


Re: [FlexJS]HierarchicalData

Posted by Harbs <ha...@gmail.com>.
On second thought…

This is the first time I’m diving into a FlexJS component. I understand strands and beads conceptually, but I have not really looked into the practice until now.

It looks like the behavior of the Tree is handled by the TreeSingleSelectionMouseController which extends ListSingleSelectionMouseController. The controller seems to be set in the css file? That strikes me as a bit odd considering that css usually means visual to me, but I think I get it.

Either way, Tree is expecting HierarchicalData rather than IHierarchicalData. Is there a reason for that?

If I want to add keyboard behavior (i.e. using the arrow keys to navigate and open/close nodes, what would be the best way to do that?

(BTW, I’m using Tree for a pet project as a way of learning the structure of FlexJS components before I deep dive into using them.)

On May 30, 2016, at 10:20 PM, Harbs <ha...@gmail.com> wrote:

> I’d like to add XML support for Trees. Any preference on whether I should create a new IHierarchicalData class for XML (i.e. XMLHierarchicalData) or put conditional logic in the existing HierarchicalData class?
> 
> I’m leaning towards the former.
> 
> Harbs