Re: Spectrum UI components

2022-02-28 Thread Roman Isitua
So that I am clear about what you said. By cherry pick you mean take what
you just did on the royale spectrum source and apply it locally (on my pc)
on the spectrum 0.9.8 source ?

In other words what do you mean by cherry pick ?

On Mon, 28 Feb 2022, 10:14 Harbs,  wrote:

> Spectrum Menus are a bit non-standard when it comes to data. It expects an
> IMenuItem. If it’s a plain object, the text is set to the label or text
> property of the object and the rest of the menu properties are inferred as
> well. The original object is *replaced* with a MenuItem if the original is
> not an IMenuItem.
>
> We are using spectrum based on royale 0.9.8 with this commit id "024b730"
>
> In other words we are not on version 0.9.9-snapshot?
>
>
> You can cherry-pick the change.
>
> On Feb 28, 2022, at 10:44 AM, Roman Isitua  wrote:
>
> Is there a label property ? That allows us to specify the field in our
> data object to be used ?
>
>
> Also, How can we access this latest change ?
>
> We are using spectrum based on royale 0.9.8 with this commit id "024b730"
>
> In other words we are not on version 0.9.9-snapshot?
>
>
>
>
>
> On Mon, 28 Feb 2022, 09:38 Harbs,  wrote:
>
>> How can I use an arrayList of data objects instead ?
>>>
>>
>> >> dataProvider=“{myArrayListProvider}"/>
>>>
>>
>> The spectrum combobox also doesn't have a change attribute. How do you
>> execute an event on selecting from the list.
>>
>>
>> It looks like we forgot to add Event metadata for that.
>> Fixed.
>> https://github.com/unhurdle/spectrum-royale/commit/a53c16b59cc2b352adffbb570067e9fddcb9ec46
>>
>> On Feb 27, 2022, at 2:48 AM, Timothy Tokmang Wang 
>> wrote:
>>
>> The spectrum combobox also doesn't have a change attribute. How do you
>> execute an event on selecting from the list.
>>
>> On Sun, Feb 27, 2022 at 12:28 AM Roman Isitua 
>> wrote:
>>
>>> How can I populate a spectrum combo box dynamically ? I intend to use an
>>> array list of data objects ?
>>>
>>> For spectrum List (sp:List) the following can be used
>>>
>>> >> labelField="description"
>>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>>
>>>
>>>
>>>
>>> 
>>>   
>>>
>>>
>>> From the royale spectrum show case the code snippet was used.
>>>
>>> 
>>>   
>>>   
>>> 
>>> 
>>> 
>>> 
>>> 
>>>   
>>>   
>>> 
>>>
>>>
>>> In the above example a static fx array was used. How can I use an
>>> arrayList of data objects instead ?
>>>
>>>
>>>
>>> On Wed, Jan 12, 2022 at 5:21 PM Roman Isitua 
>>> wrote:
>>>
 Understood. Thanks.

 On Wed, Jan 12, 2022 at 5:14 PM Harbs  wrote:

>
>
> On Jan 12, 2022, at 6:08 PM, Roman Isitua 
> wrote:
>
> What is the purpose of   ?  since it
> was no longer necessary
>
>
> It’s necessary in Royale Basic to use ArrayLists.
>
> In Spectrum, there’s a default ListModel which correctly handles both
> both Array and ArrayList data.
>
>
> Also, another question
> which will you recommend one uses ? why should one choose Array over
> ArrayList or ArrayList over Array.
>
>
> Array is simpler. There’s less overhead. If you have data which
> doesn’t change, use Array.
> If you need the list to update when data changes, use ArrayList.
>

>>
>


Re: Spectrum UI components

2022-02-28 Thread Harbs
Spectrum Menus are a bit non-standard when it comes to data. It expects an 
IMenuItem. If it’s a plain object, the text is set to the label or text 
property of the object and the rest of the menu properties are inferred as 
well. The original object is *replaced* with a MenuItem if the original is not 
an IMenuItem.

> We are using spectrum based on royale 0.9.8 with this commit id "024b730"
> 
> In other words we are not on version 0.9.9-snapshot?

You can cherry-pick the change.

> On Feb 28, 2022, at 10:44 AM, Roman Isitua  wrote:
> 
> Is there a label property ? That allows us to specify the field in our data 
> object to be used ?
> 
> 
> Also, How can we access this latest change ?
> 
> We are using spectrum based on royale 0.9.8 with this commit id "024b730"
> 
> In other words we are not on version 0.9.9-snapshot?
> 
> 
> 
> 
> 
> On Mon, 28 Feb 2022, 09:38 Harbs,  > wrote:
>> How can I use an arrayList of data objects instead ?
> 
>  dataProvider=“{myArrayListProvider}"/>
> 
>> The spectrum combobox also doesn't have a change attribute. How do you 
>> execute an event on selecting from the list.
> 
> It looks like we forgot to add Event metadata for that.
> Fixed. 
> https://github.com/unhurdle/spectrum-royale/commit/a53c16b59cc2b352adffbb570067e9fddcb9ec46
>  
> 
>> On Feb 27, 2022, at 2:48 AM, Timothy Tokmang Wang > > wrote:
>> 
>> The spectrum combobox also doesn't have a change attribute. How do you 
>> execute an event on selecting from the list.
>> 
>> On Sun, Feb 27, 2022 at 12:28 AM Roman Isitua > > wrote:
>> How can I populate a spectrum combo box dynamically ? I intend to use an 
>> array list of data objects ? 
>> 
>> For spectrum List (sp:List) the following can be used
>> 
>> >   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>> 
>>
>> 
>>
>> 
>>   
>> 
>> 
>> From the royale spectrum show case the code snippet was used.
>> 
>> 
>>   
>>   
>> 
>> 
>> 
>> 
>> 
>>   
>>   
>> 
>> 
>> 
>> In the above example a static fx array was used. How can I use an arrayList 
>> of data objects instead ?
>> 
>> 
>> 
>> On Wed, Jan 12, 2022 at 5:21 PM Roman Isitua > > wrote:
>> Understood. Thanks.
>> 
>> On Wed, Jan 12, 2022 at 5:14 PM Harbs > > wrote:
>> 
>> 
>>> On Jan 12, 2022, at 6:08 PM, Roman Isitua >> > wrote:
>>> 
>>> What is the purpose of ?  since it was no 
>>> longer necessary 
>> 
>> It’s necessary in Royale Basic to use ArrayLists.
>> 
>> In Spectrum, there’s a default ListModel which correctly handles both both 
>> Array and ArrayList data.
>> 
>>> 
>>> Also, another question
>>> which will you recommend one uses ? why should one choose Array over 
>>> ArrayList or ArrayList over Array.
>> 
>> Array is simpler. There’s less overhead. If you have data which doesn’t 
>> change, use Array.
>> If you need the list to update when data changes, use ArrayList.
> 



Re: Spectrum UI components

2022-02-28 Thread Roman Isitua
Is there a label property ? That allows us to specify the field in our data
object to be used ?


Also, How can we access this latest change ?

We are using spectrum based on royale 0.9.8 with this commit id "024b730"

In other words we are not on version 0.9.9-snapshot?





On Mon, 28 Feb 2022, 09:38 Harbs,  wrote:

> How can I use an arrayList of data objects instead ?
>>
>
> > dataProvider=“{myArrayListProvider}"/>
>>
>
> The spectrum combobox also doesn't have a change attribute. How do you
> execute an event on selecting from the list.
>
>
> It looks like we forgot to add Event metadata for that.
> Fixed.
> https://github.com/unhurdle/spectrum-royale/commit/a53c16b59cc2b352adffbb570067e9fddcb9ec46
>
> On Feb 27, 2022, at 2:48 AM, Timothy Tokmang Wang 
> wrote:
>
> The spectrum combobox also doesn't have a change attribute. How do you
> execute an event on selecting from the list.
>
> On Sun, Feb 27, 2022 at 12:28 AM Roman Isitua 
> wrote:
>
>> How can I populate a spectrum combo box dynamically ? I intend to use an
>> array list of data objects ?
>>
>> For spectrum List (sp:List) the following can be used
>>
>> >   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>
>>
>>
>>
>> 
>>   
>>
>>
>> From the royale spectrum show case the code snippet was used.
>>
>> 
>>   
>>   
>> 
>> 
>> 
>> 
>> 
>>   
>>   
>> 
>>
>>
>> In the above example a static fx array was used. How can I use an
>> arrayList of data objects instead ?
>>
>>
>>
>> On Wed, Jan 12, 2022 at 5:21 PM Roman Isitua 
>> wrote:
>>
>>> Understood. Thanks.
>>>
>>> On Wed, Jan 12, 2022 at 5:14 PM Harbs  wrote:
>>>


 On Jan 12, 2022, at 6:08 PM, Roman Isitua 
 wrote:

 What is the purpose of   ?  since it was
 no longer necessary


 It’s necessary in Royale Basic to use ArrayLists.

 In Spectrum, there’s a default ListModel which correctly handles both
 both Array and ArrayList data.


 Also, another question
 which will you recommend one uses ? why should one choose Array over
 ArrayList or ArrayList over Array.


 Array is simpler. There’s less overhead. If you have data which doesn’t
 change, use Array.
 If you need the list to update when data changes, use ArrayList.

>>>
>


Re: Spectrum UI components

2022-02-28 Thread Harbs
> How can I use an arrayList of data objects instead ?



> The spectrum combobox also doesn't have a change attribute. How do you 
> execute an event on selecting from the list.

It looks like we forgot to add Event metadata for that.
Fixed. 
https://github.com/unhurdle/spectrum-royale/commit/a53c16b59cc2b352adffbb570067e9fddcb9ec46

> On Feb 27, 2022, at 2:48 AM, Timothy Tokmang Wang  
> wrote:
> 
> The spectrum combobox also doesn't have a change attribute. How do you 
> execute an event on selecting from the list.
> 
> On Sun, Feb 27, 2022 at 12:28 AM Roman Isitua  > wrote:
> How can I populate a spectrum combo box dynamically ? I intend to use an 
> array list of data objects ? 
> 
> For spectrum List (sp:List) the following can be used
> 
>dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
> 
>
> 
>
> 
>   
> 
> 
> From the royale spectrum show case the code snippet was used.
> 
> 
>   
>   
> 
> 
> 
> 
> 
>   
>   
> 
> 
> 
> In the above example a static fx array was used. How can I use an arrayList 
> of data objects instead ?
> 
> 
> 
> On Wed, Jan 12, 2022 at 5:21 PM Roman Isitua  > wrote:
> Understood. Thanks.
> 
> On Wed, Jan 12, 2022 at 5:14 PM Harbs  > wrote:
> 
> 
>> On Jan 12, 2022, at 6:08 PM, Roman Isitua > > wrote:
>> 
>> What is the purpose of ?  since it was no 
>> longer necessary 
> 
> It’s necessary in Royale Basic to use ArrayLists.
> 
> In Spectrum, there’s a default ListModel which correctly handles both both 
> Array and ArrayList data.
> 
>> 
>> Also, another question
>> which will you recommend one uses ? why should one choose Array over 
>> ArrayList or ArrayList over Array.
> 
> Array is simpler. There’s less overhead. If you have data which doesn’t 
> change, use Array.
> If you need the list to update when data changes, use ArrayList.