tree view widget

classic Classic list List threaded Threaded
16 messages Options
Reply | Threaded
Open this post in threaded view
|

tree view widget

Bernard Devlin-2
I saw that 8.0 was announced, so I downloaded it to have a look.

I see there is a tree widget.  However, looking at an instance of this
object through its property inspector, I see the inspector has a "key"
field and a "value" field.  I would expect these to display/edit the
key/values of the widget. However, when I click on a line of the field
marked "array data", nothing appears in the key field below (even though
line 1 ot the "array data" field has "1" as a key, and "hi" as value.

Through the message box I can get/set the arrayData of this widget as an
array, and the property inspector's "array data" field is updated.

Is it my installation that's broken, or am I misunderstanding the UI?
Or is this a bug?

Regards
Bernard
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Dave Kilroy
Yeah that inspector is buggy.

I think this  'Key:' and 'Value:' properties are only for when you are using the inspector to add or update elements to it - although the inspector still has rough edges...

If you click the "+ Add new element" button at the top of the 'Arraydata' property field, then highlight the new key in the 'Arraydata' field and then click in the 'Value:' field and write something followed by a keying tab or return the value will appear in 'Arraydata'.

But quite a lot of the time the 'Key:' field is of no use (the hilited key in the 'Arraydata' field always seems to over-ride anything in the 'Key:' field. And the inspector seems to be unable to accept data for multi-dimensional arrays.

All a bit horrible, I use script to populate the array's arrayData property.

One other thing that is a bit annoying is that the hilitedElement returns the key with a trailing comma so we have to do something like:

on hiliteChanged
    put the arrayData of me into tDataA
    put the hilitedElement of me into tElement
    put tData into fld "fldData"
end hiliteChanged
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Dave Kilroy
Talk about buggy - my last posting had so many typos I'm doing it again:

------

Yeah that inspector is buggy.

I think the  'Key:' and 'Value:' properties are only for when you are using the inspector to add or update elements to it

If you click the "+ Add new element" button at the top of the 'Arraydata' property field, then highlight the new key in the 'Arraydata' field, then click in the 'Value:' field and write something followed by pressing the tab or return key then the value will appear in 'Arraydata'.

But quite a lot of the time the 'Key:' field is of no use (the hilited key in the 'Arraydata' field always seems to over-ride anything in the 'Key:' field). And the inspector seems to be unable to accept data for multi-dimensional arrays.

Much easier to use script to populate the widget's arrayData property.

One other thing to note is that the hilitedElement returns the key with a trailing comma so in script I have to do something like:

    put the hilitedElement of me into tKey
    if char -1 of tKey is comma then delete char -1 of tKey
"The first 90% of the task takes 90% of the time, and the last 10% takes the other 90% of the time."
Peter M. Brigham
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Ali Lloyd-2
There were several fixes applied to the custom properties editor which is
very similar-it appears we (I) forgot to also apply them to the array
editor. This is very easily rectified. Sorry for any inconvenience.

On Sun, May 15, 2016 at 9:30 PM Dave Kilroy <[hidden email]>
wrote:

> Talk about buggy - my last posting had so many typos I'm doing it again:
>
> ------
>
> Yeah that inspector is buggy.
>
> I think the  'Key:' and 'Value:' properties are only for when you are using
> the inspector to add or update elements to it
>
> If you click the "+ Add new element" button at the top of the 'Arraydata'
> property field, then highlight the new key in the 'Arraydata' field, then
> click in the 'Value:' field and write something followed by pressing the
> tab
> or return key then the value will appear in 'Arraydata'.
>
> But quite a lot of the time the 'Key:' field is of no use (the hilited key
> in the 'Arraydata' field always seems to over-ride anything in the 'Key:'
> field). And the inspector seems to be unable to accept data for
> multi-dimensional arrays.
>
> Much easier to use script to populate the widget's arrayData property.
>
> One other thing to note is that the hilitedElement returns the key with a
> trailing comma so in script I have to do something like:
>
>     put the hilitedElement of me into tKey
>     if char -1 of tKey is comma then delete char -1 of tKey
>
>
>
>
> -----
> "The first 90% of the task takes 90% of the time, and the last 10% takes
> the other 90% of the time."
> Peter M. Brigham
> --
> View this message in context:
> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
> Sent from the Revolution - User mailing list archive at Nabble.com.
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Yves COPPE-2
Hi list,

Let say I have an array  two dimensional created in a script
this array has a name : MyContents


How can i set the arrayData to the tree widget ?

set the arrayData of widget  « X »  to MyContents ??       doesn’t work ...

Thanks

Greetings.

> Le 16 mai 2016 à 17:41, Ali Lloyd <[hidden email]> a écrit :
>
> There were several fixes applied to the custom properties editor which is
> very similar-it appears we (I) forgot to also apply them to the array
> editor. This is very easily rectified. Sorry for any inconvenience.
>
> On Sun, May 15, 2016 at 9:30 PM Dave Kilroy <[hidden email]>
> wrote:
>
>> Talk about buggy - my last posting had so many typos I'm doing it again:
>>
>> ------
>>
>> Yeah that inspector is buggy.
>>
>> I think the  'Key:' and 'Value:' properties are only for when you are using
>> the inspector to add or update elements to it
>>
>> If you click the "+ Add new element" button at the top of the 'Arraydata'
>> property field, then highlight the new key in the 'Arraydata' field, then
>> click in the 'Value:' field and write something followed by pressing the
>> tab
>> or return key then the value will appear in 'Arraydata'.
>>
>> But quite a lot of the time the 'Key:' field is of no use (the hilited key
>> in the 'Arraydata' field always seems to over-ride anything in the 'Key:'
>> field). And the inspector seems to be unable to accept data for
>> multi-dimensional arrays.
>>
>> Much easier to use script to populate the widget's arrayData property.
>>
>> One other thing to note is that the hilitedElement returns the key with a
>> trailing comma so in script I have to do something like:
>>
>>    put the hilitedElement of me into tKey
>>    if char -1 of tKey is comma then delete char -1 of tKey
>>
>>
>>
>>
>> -----
>> "The first 90% of the task takes 90% of the time, and the last 10% takes
>> the other 90% of the time."
>> Peter M. Brigham
>> --
>> View this message in context:
>> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Ali Lloyd-2
That should work, yes! Could you post more than just the one-line snippet?
That way me might be able to see what is going wrong.

On Mon, May 16, 2016 at 9:23 PM Yves COPPE <[hidden email]> wrote:

> Hi list,
>
> Let say I have an array  two dimensional created in a script
> this array has a name : MyContents
>
>
> How can i set the arrayData to the tree widget ?
>
> set the arrayData of widget  « X »  to MyContents ??       doesn’t work ...
>
> Thanks
>
> Greetings.
>
> > Le 16 mai 2016 à 17:41, Ali Lloyd <[hidden email]> a écrit :
> >
> > There were several fixes applied to the custom properties editor which is
> > very similar-it appears we (I) forgot to also apply them to the array
> > editor. This is very easily rectified. Sorry for any inconvenience.
> >
> > On Sun, May 15, 2016 at 9:30 PM Dave Kilroy <[hidden email]
> >
> > wrote:
> >
> >> Talk about buggy - my last posting had so many typos I'm doing it again:
> >>
> >> ------
> >>
> >> Yeah that inspector is buggy.
> >>
> >> I think the  'Key:' and 'Value:' properties are only for when you are
> using
> >> the inspector to add or update elements to it
> >>
> >> If you click the "+ Add new element" button at the top of the
> 'Arraydata'
> >> property field, then highlight the new key in the 'Arraydata' field,
> then
> >> click in the 'Value:' field and write something followed by pressing the
> >> tab
> >> or return key then the value will appear in 'Arraydata'.
> >>
> >> But quite a lot of the time the 'Key:' field is of no use (the hilited
> key
> >> in the 'Arraydata' field always seems to over-ride anything in the
> 'Key:'
> >> field). And the inspector seems to be unable to accept data for
> >> multi-dimensional arrays.
> >>
> >> Much easier to use script to populate the widget's arrayData property.
> >>
> >> One other thing to note is that the hilitedElement returns the key with
> a
> >> trailing comma so in script I have to do something like:
> >>
> >>    put the hilitedElement of me into tKey
> >>    if char -1 of tKey is comma then delete char -1 of tKey
> >>
> >>
> >>
> >>
> >> -----
> >> "The first 90% of the task takes 90% of the time, and the last 10% takes
> >> the other 90% of the time."
> >> Peter M. Brigham
> >> --
> >> View this message in context:
> >>
> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
> >> Sent from the Revolution - User mailing list archive at Nabble.com.
> >>
> >> _______________________________________________
> >> use-livecode mailing list
> >> [hidden email]
> >> Please visit this url to subscribe, unsubscribe and manage your
> >> subscription preferences:
> >> http://lists.runrev.com/mailman/listinfo/use-livecode
> >>
> > _______________________________________________
> > use-livecode mailing list
> > [hidden email]
> > Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Ali Lloyd-2
me, or indeed we.

On Tue, May 17, 2016 at 9:52 AM Ali Lloyd <[hidden email]> wrote:

> That should work, yes! Could you post more than just the one-line snippet?
> That way me might be able to see what is going wrong.
>
>
> On Mon, May 16, 2016 at 9:23 PM Yves COPPE <[hidden email]> wrote:
>
>> Hi list,
>>
>> Let say I have an array  two dimensional created in a script
>> this array has a name : MyContents
>>
>>
>> How can i set the arrayData to the tree widget ?
>>
>> set the arrayData of widget  « X »  to MyContents ??       doesn’t work
>> ...
>>
>> Thanks
>>
>> Greetings.
>>
>> > Le 16 mai 2016 à 17:41, Ali Lloyd <[hidden email]> a écrit :
>> >
>> > There were several fixes applied to the custom properties editor which
>> is
>> > very similar-it appears we (I) forgot to also apply them to the array
>> > editor. This is very easily rectified. Sorry for any inconvenience.
>> >
>> > On Sun, May 15, 2016 at 9:30 PM Dave Kilroy <
>> [hidden email]>
>> > wrote:
>> >
>> >> Talk about buggy - my last posting had so many typos I'm doing it
>> again:
>> >>
>> >> ------
>> >>
>> >> Yeah that inspector is buggy.
>> >>
>> >> I think the  'Key:' and 'Value:' properties are only for when you are
>> using
>> >> the inspector to add or update elements to it
>> >>
>> >> If you click the "+ Add new element" button at the top of the
>> 'Arraydata'
>> >> property field, then highlight the new key in the 'Arraydata' field,
>> then
>> >> click in the 'Value:' field and write something followed by pressing
>> the
>> >> tab
>> >> or return key then the value will appear in 'Arraydata'.
>> >>
>> >> But quite a lot of the time the 'Key:' field is of no use (the hilited
>> key
>> >> in the 'Arraydata' field always seems to over-ride anything in the
>> 'Key:'
>> >> field). And the inspector seems to be unable to accept data for
>> >> multi-dimensional arrays.
>> >>
>> >> Much easier to use script to populate the widget's arrayData property.
>> >>
>> >> One other thing to note is that the hilitedElement returns the key
>> with a
>> >> trailing comma so in script I have to do something like:
>> >>
>> >>    put the hilitedElement of me into tKey
>> >>    if char -1 of tKey is comma then delete char -1 of tKey
>> >>
>> >>
>> >>
>> >>
>> >> -----
>> >> "The first 90% of the task takes 90% of the time, and the last 10%
>> takes
>> >> the other 90% of the time."
>> >> Peter M. Brigham
>> >> --
>> >> View this message in context:
>> >>
>> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
>> >> Sent from the Revolution - User mailing list archive at Nabble.com.
>> >>
>> >> _______________________________________________
>> >> use-livecode mailing list
>> >> [hidden email]
>> >> Please visit this url to subscribe, unsubscribe and manage your
>> >> subscription preferences:
>> >> http://lists.runrev.com/mailman/listinfo/use-livecode
>> >>
>> > _______________________________________________
>> > use-livecode mailing list
>> > [hidden email]
>> > Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> > http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Yves COPPE-2
In reply to this post by Ali Lloyd-2
Hi,

here is a sample of script (doesn’t work)


on mouseUp

put "Dog,Cat,Horse" into temp

repeat with i = 1 to the number of items of temp

put item i of temp into tHobby["John","Animal",i]

end repeat


put "Dog,Tortoise" into temp

repeat with i = 1 to the number of items of temp

put item i of temp into tHobby["Jane","Animal",i]

end repeat


put  « Football Swimming  into temp

repeat with i = 1 to the number of items of temp

put item i of temp into tHobby["Willy","Sport",i]

end repeat

set the arraydata of widget "MyTreeView" to tHobby

end mouseUp

> Le 17 mai 2016 à 10:48, Ali Lloyd <[hidden email]> a écrit :
>
> That should work, yes! Could you post more than just the one-line snippet?
> That way me might be able to see what is going wrong.
>
> On Mon, May 16, 2016 at 9:23 PM Yves COPPE <[hidden email]> wrote:
>
>> Hi list,
>>
>> Let say I have an array  two dimensional created in a script
>> this array has a name : MyContents
>>
>>
>> How can i set the arrayData to the tree widget ?
>>
>> set the arrayData of widget  « X »  to MyContents ??       doesn’t work ...
>>
>> Thanks
>>
>> Greetings.
>>
>>> Le 16 mai 2016 à 17:41, Ali Lloyd <[hidden email]> a écrit :
>>>
>>> There were several fixes applied to the custom properties editor which is
>>> very similar-it appears we (I) forgot to also apply them to the array
>>> editor. This is very easily rectified. Sorry for any inconvenience.
>>>
>>> On Sun, May 15, 2016 at 9:30 PM Dave Kilroy <[hidden email]
>>>
>>> wrote:
>>>
>>>> Talk about buggy - my last posting had so many typos I'm doing it again:
>>>>
>>>> ------
>>>>
>>>> Yeah that inspector is buggy.
>>>>
>>>> I think the  'Key:' and 'Value:' properties are only for when you are
>> using
>>>> the inspector to add or update elements to it
>>>>
>>>> If you click the "+ Add new element" button at the top of the
>> 'Arraydata'
>>>> property field, then highlight the new key in the 'Arraydata' field,
>> then
>>>> click in the 'Value:' field and write something followed by pressing the
>>>> tab
>>>> or return key then the value will appear in 'Arraydata'.
>>>>
>>>> But quite a lot of the time the 'Key:' field is of no use (the hilited
>> key
>>>> in the 'Arraydata' field always seems to over-ride anything in the
>> 'Key:'
>>>> field). And the inspector seems to be unable to accept data for
>>>> multi-dimensional arrays.
>>>>
>>>> Much easier to use script to populate the widget's arrayData property.
>>>>
>>>> One other thing to note is that the hilitedElement returns the key with
>> a
>>>> trailing comma so in script I have to do something like:
>>>>
>>>>   put the hilitedElement of me into tKey
>>>>   if char -1 of tKey is comma then delete char -1 of tKey
>>>>
>>>>
>>>>
>>>>
>>>> -----
>>>> "The first 90% of the task takes 90% of the time, and the last 10% takes
>>>> the other 90% of the time."
>>>> Peter M. Brigham
>>>> --
>>>> View this message in context:
>>>>
>> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
>>>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Tore Nilsen
Apart from the wrong chars for quotes around the last values of temp, and the lack of a closing quote on the same line, I can see nothing wrong with the script. It works here.

Regards
Tore Nilsen


> 17. mai 2016 kl. 21.12 skrev Yves COPPE <[hidden email]>:
>
> Hi,
>
> here is a sample of script (doesn’t work)
>
>
> on mouseUp
>
> put "Dog,Cat,Horse" into temp
>
> repeat with i = 1 to the number of items of temp
>
> put item i of temp into tHobby["John","Animal",i]
>
> end repeat
>
>
> put "Dog,Tortoise" into temp
>
> repeat with i = 1 to the number of items of temp
>
> put item i of temp into tHobby["Jane","Animal",i]
>
> end repeat
>
>
> put  « Football Swimming  into temp
>
> repeat with i = 1 to the number of items of temp
>
> put item i of temp into tHobby["Willy","Sport",i]
>
> end repeat
>
> set the arraydata of widget "MyTreeView" to tHobby
>
> end mouseUp
>
>> Le 17 mai 2016 à 10:48, Ali Lloyd <[hidden email]> a écrit :
>>
>> That should work, yes! Could you post more than just the one-line snippet?
>> That way me might be able to see what is going wrong.
>>
>> On Mon, May 16, 2016 at 9:23 PM Yves COPPE <[hidden email]> wrote:
>>
>>> Hi list,
>>>
>>> Let say I have an array  two dimensional created in a script
>>> this array has a name : MyContents
>>>
>>>
>>> How can i set the arrayData to the tree widget ?
>>>
>>> set the arrayData of widget  « X »  to MyContents ??       doesn’t work ...
>>>
>>> Thanks
>>>
>>> Greetings.
>>>
>>>> Le 16 mai 2016 à 17:41, Ali Lloyd <[hidden email]> a écrit :
>>>>
>>>> There were several fixes applied to the custom properties editor which is
>>>> very similar-it appears we (I) forgot to also apply them to the array
>>>> editor. This is very easily rectified. Sorry for any inconvenience.
>>>>
>>>> On Sun, May 15, 2016 at 9:30 PM Dave Kilroy <[hidden email]
>>>>
>>>> wrote:
>>>>
>>>>> Talk about buggy - my last posting had so many typos I'm doing it again:
>>>>>
>>>>> ------
>>>>>
>>>>> Yeah that inspector is buggy.
>>>>>
>>>>> I think the  'Key:' and 'Value:' properties are only for when you are
>>> using
>>>>> the inspector to add or update elements to it
>>>>>
>>>>> If you click the "+ Add new element" button at the top of the
>>> 'Arraydata'
>>>>> property field, then highlight the new key in the 'Arraydata' field,
>>> then
>>>>> click in the 'Value:' field and write something followed by pressing the
>>>>> tab
>>>>> or return key then the value will appear in 'Arraydata'.
>>>>>
>>>>> But quite a lot of the time the 'Key:' field is of no use (the hilited
>>> key
>>>>> in the 'Arraydata' field always seems to over-ride anything in the
>>> 'Key:'
>>>>> field). And the inspector seems to be unable to accept data for
>>>>> multi-dimensional arrays.
>>>>>
>>>>> Much easier to use script to populate the widget's arrayData property.
>>>>>
>>>>> One other thing to note is that the hilitedElement returns the key with
>>> a
>>>>> trailing comma so in script I have to do something like:
>>>>>
>>>>>  put the hilitedElement of me into tKey
>>>>>  if char -1 of tKey is comma then delete char -1 of tKey
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -----
>>>>> "The first 90% of the task takes 90% of the time, and the last 10% takes
>>>>> the other 90% of the time."
>>>>> Peter M. Brigham
>>>>> --
>>>>> View this message in context:
>>>>>
>>> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
>>>>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> [hidden email]
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Yves COPPE-2
Hi,

Ok for the error, sorry for my copy of the original script
but I get a list of lines with items separated with commas in each line

I hoped to see a tree view….

> Le 17 mai 2016 à 21:22, Tore Nilsen <[hidden email]> a écrit :
>
> Apart from the wrong chars for quotes around the last values of temp, and the lack of a closing quote on the same line, I can see nothing wrong with the script. It works here.
>
> Regards
> Tore Nilsen
>
>
>> 17. mai 2016 kl. 21.12 skrev Yves COPPE <[hidden email]>:
>>
>> Hi,
>>
>> here is a sample of script (doesn’t work)
>>
>>
>> on mouseUp
>>
>> put "Dog,Cat,Horse" into temp
>>
>> repeat with i = 1 to the number of items of temp
>>
>> put item i of temp into tHobby["John","Animal",i]
>>
>> end repeat
>>
>>
>> put "Dog,Tortoise" into temp
>>
>> repeat with i = 1 to the number of items of temp
>>
>> put item i of temp into tHobby["Jane","Animal",i]
>>
>> end repeat
>>
>>
>> put  « Football Swimming  into temp
>>
>> repeat with i = 1 to the number of items of temp
>>
>> put item i of temp into tHobby["Willy","Sport",i]
>>
>> end repeat
>>
>> set the arraydata of widget "MyTreeView" to tHobby
>>
>> end mouseUp
>>
>>> Le 17 mai 2016 à 10:48, Ali Lloyd <[hidden email]> a écrit :
>>>
>>> That should work, yes! Could you post more than just the one-line snippet?
>>> That way me might be able to see what is going wrong.
>>>
>>> On Mon, May 16, 2016 at 9:23 PM Yves COPPE <[hidden email]> wrote:
>>>
>>>> Hi list,
>>>>
>>>> Let say I have an array  two dimensional created in a script
>>>> this array has a name : MyContents
>>>>
>>>>
>>>> How can i set the arrayData to the tree widget ?
>>>>
>>>> set the arrayData of widget  « X »  to MyContents ??       doesn’t work ...
>>>>
>>>> Thanks
>>>>
>>>> Greetings.
>>>>
>>>>> Le 16 mai 2016 à 17:41, Ali Lloyd <[hidden email]> a écrit :
>>>>>
>>>>> There were several fixes applied to the custom properties editor which is
>>>>> very similar-it appears we (I) forgot to also apply them to the array
>>>>> editor. This is very easily rectified. Sorry for any inconvenience.
>>>>>
>>>>> On Sun, May 15, 2016 at 9:30 PM Dave Kilroy <[hidden email]
>>>>>
>>>>> wrote:
>>>>>
>>>>>> Talk about buggy - my last posting had so many typos I'm doing it again:
>>>>>>
>>>>>> ------
>>>>>>
>>>>>> Yeah that inspector is buggy.
>>>>>>
>>>>>> I think the  'Key:' and 'Value:' properties are only for when you are
>>>> using
>>>>>> the inspector to add or update elements to it
>>>>>>
>>>>>> If you click the "+ Add new element" button at the top of the
>>>> 'Arraydata'
>>>>>> property field, then highlight the new key in the 'Arraydata' field,
>>>> then
>>>>>> click in the 'Value:' field and write something followed by pressing the
>>>>>> tab
>>>>>> or return key then the value will appear in 'Arraydata'.
>>>>>>
>>>>>> But quite a lot of the time the 'Key:' field is of no use (the hilited
>>>> key
>>>>>> in the 'Arraydata' field always seems to over-ride anything in the
>>>> 'Key:'
>>>>>> field). And the inspector seems to be unable to accept data for
>>>>>> multi-dimensional arrays.
>>>>>>
>>>>>> Much easier to use script to populate the widget's arrayData property.
>>>>>>
>>>>>> One other thing to note is that the hilitedElement returns the key with
>>>> a
>>>>>> trailing comma so in script I have to do something like:
>>>>>>
>>>>>> put the hilitedElement of me into tKey
>>>>>> if char -1 of tKey is comma then delete char -1 of tKey
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> -----
>>>>>> "The first 90% of the task takes 90% of the time, and the last 10% takes
>>>>>> the other 90% of the time."
>>>>>> Peter M. Brigham
>>>>>> --
>>>>>> View this message in context:
>>>>>>
>>>> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
>>>>>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>>>>>
>>>>>> _______________________________________________
>>>>>> use-livecode mailing list
>>>>>> [hidden email]
>>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>>> subscription preferences:
>>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> [hidden email]
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

J. Landman Gay
In reply to this post by Yves COPPE-2
The array is malformed. The script should be:

on mouseUp
   put "Dog,Cat,Horse" into temp
   repeat with i = 1 to the number of items of temp
     put item i of temp into tHobby["John"]["Animal"][i]
   end repeat
   put "Dog,Tortoise" into temp
   repeat with i = 1 to the number of items of temp
     put item i of temp into tHobby["Jane"]["Animal"][i]
   end repeat
   put  "Football,Swimming" into temp
   repeat with i = 1 to the number of items of temp
     put item i of temp into tHobby["Willy"]["Sport"][i]
   end repeat
   set the arraydata of widget "Tree View" to tHobby
end mouseUp

Note the square brackets around each sublevel.


On 5/17/2016 2:12 PM, Yves COPPE wrote:

> Hi,
>
> here is a sample of script (doesn’t work)
>
>
> on mouseUp
>
> put "Dog,Cat,Horse" into temp
>
> repeat with i = 1 to the number of items of temp
>
> put item i of temp into tHobby["John","Animal",i]
>
> end repeat
>
>
> put "Dog,Tortoise" into temp
>
> repeat with i = 1 to the number of items of temp
>
> put item i of temp into tHobby["Jane","Animal",i]
>
> end repeat
>
>
> put  « Football Swimming  into temp
>
> repeat with i = 1 to the number of items of temp
>
> put item i of temp into tHobby["Willy","Sport",i]
>
> end repeat
>
> set the arraydata of widget "MyTreeView" to tHobby
>
> end mouseUp
>
>> Le 17 mai 2016 à 10:48, Ali Lloyd <[hidden email]> a écrit :
>>
>> That should work, yes! Could you post more than just the one-line snippet?
>> That way me might be able to see what is going wrong.
>>
>> On Mon, May 16, 2016 at 9:23 PM Yves COPPE <[hidden email]> wrote:
>>
>>> Hi list,
>>>
>>> Let say I have an array  two dimensional created in a script
>>> this array has a name : MyContents
>>>
>>>
>>> How can i set the arrayData to the tree widget ?
>>>
>>> set the arrayData of widget  « X »  to MyContents ??       doesn’t work ...
>>>
>>> Thanks
>>>
>>> Greetings.
>>>
>>>> Le 16 mai 2016 à 17:41, Ali Lloyd <[hidden email]> a écrit :
>>>>
>>>> There were several fixes applied to the custom properties editor which is
>>>> very similar-it appears we (I) forgot to also apply them to the array
>>>> editor. This is very easily rectified. Sorry for any inconvenience.
>>>>
>>>> On Sun, May 15, 2016 at 9:30 PM Dave Kilroy <[hidden email]
>>>>
>>>> wrote:
>>>>
>>>>> Talk about buggy - my last posting had so many typos I'm doing it again:
>>>>>
>>>>> ------
>>>>>
>>>>> Yeah that inspector is buggy.
>>>>>
>>>>> I think the  'Key:' and 'Value:' properties are only for when you are
>>> using
>>>>> the inspector to add or update elements to it
>>>>>
>>>>> If you click the "+ Add new element" button at the top of the
>>> 'Arraydata'
>>>>> property field, then highlight the new key in the 'Arraydata' field,
>>> then
>>>>> click in the 'Value:' field and write something followed by pressing the
>>>>> tab
>>>>> or return key then the value will appear in 'Arraydata'.
>>>>>
>>>>> But quite a lot of the time the 'Key:' field is of no use (the hilited
>>> key
>>>>> in the 'Arraydata' field always seems to over-ride anything in the
>>> 'Key:'
>>>>> field). And the inspector seems to be unable to accept data for
>>>>> multi-dimensional arrays.
>>>>>
>>>>> Much easier to use script to populate the widget's arrayData property.
>>>>>
>>>>> One other thing to note is that the hilitedElement returns the key with
>>> a
>>>>> trailing comma so in script I have to do something like:
>>>>>
>>>>>   put the hilitedElement of me into tKey
>>>>>   if char -1 of tKey is comma then delete char -1 of tKey
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> -----
>>>>> "The first 90% of the task takes 90% of the time, and the last 10% takes
>>>>> the other 90% of the time."
>>>>> Peter M. Brigham
>>>>> --
>>>>> View this message in context:
>>>>>
>>> http://runtime-revolution.278305.n4.nabble.com/tree-view-widget-tp4704705p4704712.html
>>>>> Sent from the Revolution - User mailing list archive at Nabble.com.
>>>>>
>>>>> _______________________________________________
>>>>> use-livecode mailing list
>>>>> [hidden email]
>>>>> Please visit this url to subscribe, unsubscribe and manage your
>>>>> subscription preferences:
>>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>>>
>>>> _______________________________________________
>>>> use-livecode mailing list
>>>> [hidden email]
>>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>>>
>>> _______________________________________________
>>> use-livecode mailing list
>>> [hidden email]
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-livecode
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Mike Bonner
In reply to this post by Yves COPPE-2
Each separate key should be in brackets, otherwise ['John","animal",i]
becomes 1 key.

so...
put "Dog,Cat,Horse" into temp
repeat with i = 1 to the number of items in temp
  put item i of temp into tHobby["John"]["Animal"][i] -- creates an entry 3
keys deep
end repeat

set the arraydata of widget "X" to tHobby

>
> >>
> >> on mouseUp
> >>
> >> put "Dog,Cat,Horse" into temp
> >>
> >> repeat with i = 1 to the number of items of temp
> >>
> >> put item i of temp into tHobby["John","Animal",i]
> >>
> >> end repeat
> >>
> >>
> >> put "Dog,Tortoise" into temp
> >>
> >> repeat with i = 1 to the number of items of temp
> >>
> >> put item i of temp into tHobby["Jane","Animal",i]
> >>
> >> end repeat
> >>
> >>
> >> put  « Football Swimming  into temp
> >>
> >> repeat with i = 1 to the number of items of temp
> >>
> >> put item i of temp into tHobby["Willy","Sport",i]
> >>
> >> end repeat
> >>
> >> set the arraydata of widget "MyTreeView" to tHobby
> >>
> >> end mouseUp
> >>
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Yves COPPE-2
Hi,

thanks !!
It works now fine !!!!!


Greetings.


> Le 17 mai 2016 à 21:34, Mike Bonner <[hidden email]> a écrit :
>
> Each separate key should be in brackets, otherwise ['John","animal",i]
> becomes 1 key.
>
> so...
> put "Dog,Cat,Horse" into temp
> repeat with i = 1 to the number of items in temp
>  put item i of temp into tHobby["John"]["Animal"][i] -- creates an entry 3
> keys deep
> end repeat
>
> set the arraydata of widget "X" to tHobby
>
>>
>>>>
>>>> on mouseUp
>>>>
>>>> put "Dog,Cat,Horse" into temp
>>>>
>>>> repeat with i = 1 to the number of items of temp
>>>>
>>>> put item i of temp into tHobby["John","Animal",i]
>>>>
>>>> end repeat
>>>>
>>>>
>>>> put "Dog,Tortoise" into temp
>>>>
>>>> repeat with i = 1 to the number of items of temp
>>>>
>>>> put item i of temp into tHobby["Jane","Animal",i]
>>>>
>>>> end repeat
>>>>
>>>>
>>>> put  « Football Swimming  into temp
>>>>
>>>> repeat with i = 1 to the number of items of temp
>>>>
>>>> put item i of temp into tHobby["Willy","Sport",i]
>>>>
>>>> end repeat
>>>>
>>>> set the arraydata of widget "MyTreeView" to tHobby
>>>>
>>>> end mouseUp
>>>>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Klaus major-k
In reply to this post by J. Landman Gay
Hi all,

> Am 17.05.2016 um 21:32 schrieb J. Landman Gay <[hidden email]>:
>
> The array is malformed. The script should be:
>
> on mouseUp
>  put "Dog,Cat,Horse" into temp
>  repeat with i = 1 to the number of items of temp
>    put item i of temp into tHobby["John"]["Animal"][i]
>  end repeat
>  put "Dog,Tortoise" into temp
>  repeat with i = 1 to the number of items of temp
>    put item i of temp into tHobby["Jane"]["Animal"][i]
>  end repeat
>  put  "Football,Swimming" into temp
>  repeat with i = 1 to the number of items of temp
>    put item i of temp into tHobby["Willy"]["Sport"][i]
>  end repeat
>  set the arraydata of widget "Tree View" to tHobby
> end mouseUp
>
> Note the square brackets around each sublevel.

yep, that worked great, thanks!

Question:
Any chance we will be able to TRANSLATE the
„Add new element“ string?

Yes, not all of our users speak english, although the
mothership seems to presume this... 8-)


Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Ali Lloyd-2
Hi Klaus,
Although we currently have no plans to do that ourselves, it shouldn't be
too hard to turn the string that's used for the tree view into a property
of the widget, since it is almost completely independent of the rest of the
code.

You'd just need to define a new member variable (say mAddText), set up a
property for it and replace

paintText("Add new element", "left", tTextRect, false, false)

with

paintText(mAddText, "left", tTextRect, false, false)



On Wed, May 18, 2016 at 1:02 PM Klaus major-k <[hidden email]> wrote:

> Hi all,
>
> > Am 17.05.2016 um 21:32 schrieb J. Landman Gay <[hidden email]
> >:
> >
> > The array is malformed. The script should be:
> >
> > on mouseUp
> >  put "Dog,Cat,Horse" into temp
> >  repeat with i = 1 to the number of items of temp
> >    put item i of temp into tHobby["John"]["Animal"][i]
> >  end repeat
> >  put "Dog,Tortoise" into temp
> >  repeat with i = 1 to the number of items of temp
> >    put item i of temp into tHobby["Jane"]["Animal"][i]
> >  end repeat
> >  put  "Football,Swimming" into temp
> >  repeat with i = 1 to the number of items of temp
> >    put item i of temp into tHobby["Willy"]["Sport"][i]
> >  end repeat
> >  set the arraydata of widget "Tree View" to tHobby
> > end mouseUp
> >
> > Note the square brackets around each sublevel.
>
> yep, that worked great, thanks!
>
> Question:
> Any chance we will be able to TRANSLATE the
> „Add new element“ string?
>
> Yes, not all of our users speak english, although the
> mothership seems to presume this... 8-)
>
>
> Best
>
> Klaus
> --
> Klaus Major
> http://www.major-k.de
> [hidden email]
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: tree view widget

Klaus major-k
Hi Ali,

> Am 18.05.2016 um 15:51 schrieb Ali Lloyd <[hidden email]>:
>
> Hi Klaus,
> Although we currently have no plans to do that ourselves,it shouldn't be
> too hard to turn the string that's used for the tree view into a property
> of the widget, since it is almost completely independent of the rest of the
> code.
>
> You'd just need to define a new member variable (say mAddText), set up a
> property for it and replace
>
> paintText("Add new element", "left", tTextRect, false, false)
> with
> paintText(mAddText, "left", tTextRect, false, false)

hm, I was really hoping that YOU would do this!? 8-)

Come on, I think that LC should NEVER EVER hardcode any english string, n’est-ce pas?
We already have this problem on mobile with:
...
mobilePick "A" & return & "B" & return & "C", 1, "cancelDone"
...
Where we will have the english buttons „Cancel“ and „Done“ even on localized systems. :-/
I already bug-reported that.

Things like this will make our apps look amateurish, as if we forgot the last bit of translation!

> On Wed, May 18, 2016 at 1:02 PM Klaus major-k <[hidden email]> wrote:
>
>> Hi all,
>>
>>> Am 17.05.2016 um 21:32 schrieb J. Landman Gay <[hidden email]
>>> The array is malformed. The script should be:
>>> on mouseUp
>>> ...
>>> end mouseUp
>>> Note the square brackets around each sublevel.
>>
>> yep, that worked great, thanks!
>>
>> Question:
>> Any chance we will be able to TRANSLATE the
>> „Add new element“ string?
>>
>> Yes, not all of our users speak english, although the
>> mothership seems to presume this... 8-)

Best

Klaus
--
Klaus Major
http://www.major-k.de
[hidden email]


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode