Another Tree View Oddity

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

Another Tree View Oddity

Bob Sneidar via use-livecode
Not a biggie, but try getting the hilitedElement of a tree view widget when nothing is selected. It returns empty. Now try setting the hilitedElement of a tree view widget to empty. Runtime error! You have to set it to 0, and then it still returns and displays empty in the property inspector! Odd huh?

Bob S


_______________________________________________
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: Another Tree View Oddity

Bob Sneidar via use-livecode
That should be pretty easy to change. You can actually pass any invalid string (I.e. non-existing key path) to clear, but empty makes more sense.

Thanks,
Brian
On Sep 5, 2018, 5:21 PM -0500, Bob Sneidar via use-livecode <[hidden email]>, wrote:

> Not a biggie, but try getting the hilitedElement of a tree view widget when nothing is selected. It returns empty. Now try setting the hilitedElement of a tree view widget to empty. Runtime error! You have to set it to 0, and then it still returns and displays empty in the property inspector! Odd huh?
>
> Bob S
>
>
> _______________________________________________
> 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: Another Tree View Oddity

Bob Sneidar via use-livecode
Bug report and PR submitted.

https://quality.livecode.com/show_bug.cgi?id=21567

https://github.com/livecode/livecode/pull/6675

On Wed, Sep 5, 2018 at 7:12 PM Brian Milby <[hidden email]> wrote:

> That should be pretty easy to change. You can actually pass any invalid
> string (I.e. non-existing key path) to clear, but empty makes more sense.
>
> Thanks,
> Brian
> On Sep 5, 2018, 5:21 PM -0500, Bob Sneidar via use-livecode <
> [hidden email]>, wrote:
>
> Not a biggie, but try getting the hilitedElement of a tree view widget
> when nothing is selected. It returns empty. Now try setting the
> hilitedElement of a tree view widget to empty. Runtime error! You have to
> set it to 0, and then it still returns and displays empty in the property
> inspector! Odd huh?
>
> Bob S
>
>
> _______________________________________________
> 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: Another Tree View Oddity

Bob Sneidar via use-livecode
Thanks Brian. I would have done it, but it seemed small potatoes to me. And I never know if there is a good reason it works the way it does.

Bob S


> On Sep 5, 2018, at 21:06 , Brian Milby via use-livecode <[hidden email]> wrote:
>
> Bug report and PR submitted.
>
> https://quality.livecode.com/show_bug.cgi?id=21567
>
> https://github.com/livecode/livecode/pull/6675
>
> On Wed, Sep 5, 2018 at 7:12 PM Brian Milby <[hidden email]> wrote:
>
>> That should be pretty easy to change. You can actually pass any invalid
>> string (I.e. non-existing key path) to clear, but empty makes more sense.
>>
>> Thanks,
>> Brian
>> On Sep 5, 2018, 5:21 PM -0500, Bob Sneidar via use-livecode <
>> [hidden email]>, wrote:
>>
>> Not a biggie, but try getting the hilitedElement of a tree view widget
>> when nothing is selected. It returns empty. Now try setting the
>> hilitedElement of a tree view widget to empty. Runtime error! You have to
>> set it to 0, and then it still returns and displays empty in the property
>> inspector! Odd huh?
>>
>> Bob S
>>
>>
>> _______________________________________________
>> 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: Another Tree View Oddity

Bob Sneidar via use-livecode
I’ve done so much in that widget that it was easy to tackle. From an English like syntax, I think it just makes sense to use the “empty” method of removing the selection.

Thanks,
Brian
On Sep 6, 2018, 9:43 AM -0500, Bob Sneidar via use-livecode <[hidden email]>, wrote:

> Thanks Brian. I would have done it, but it seemed small potatoes to me. And I never know if there is a good reason it works the way it does.
>
> Bob S
>
>
> > On Sep 5, 2018, at 21:06 , Brian Milby via use-livecode <[hidden email]> wrote:
> >
> > Bug report and PR submitted.
> >
> > https://quality.livecode.com/show_bug.cgi?id=21567
> >
> > https://github.com/livecode/livecode/pull/6675
> >
> > On Wed, Sep 5, 2018 at 7:12 PM Brian Milby <[hidden email]> wrote:
> >
> > > That should be pretty easy to change. You can actually pass any invalid
> > > string (I.e. non-existing key path) to clear, but empty makes more sense.
> > >
> > > Thanks,
> > > Brian
> > > On Sep 5, 2018, 5:21 PM -0500, Bob Sneidar via use-livecode <
> > > [hidden email]>, wrote:
> > >
> > > Not a biggie, but try getting the hilitedElement of a tree view widget
> > > when nothing is selected. It returns empty. Now try setting the
> > > hilitedElement of a tree view widget to empty. Runtime error! You have to
> > > set it to 0, and then it still returns and displays empty in the property
> > > inspector! Odd huh?
> > >
> > > Bob S
> > >
> > >
> > > _______________________________________________
> > > 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: Another Tree View Oddity

Bob Sneidar via use-livecode
actionDoubleClick message is not getting sent or else trapped by the widget either. Is that a read/write function only? I have a tree view set to read only.

Bob S


> On Sep 6, 2018, at 09:04 , Brian Milby via use-livecode <[hidden email]> wrote:
>
> I’ve done so much in that widget that it was easy to tackle. From an English like syntax, I think it just makes sense to use the “empty” method of removing the selection.
>
> Thanks,
> Brian

_______________________________________________
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: Another Tree View Oddity

Bob Sneidar via use-livecode
If it is supposed to, I can file the bug report. Not asking anyone to do my work for me. I just need to know if it is supposed to and isn't, and I'll file it.

Bob S


> On Sep 6, 2018, at 10:33 , Bob Sneidar via use-livecode <[hidden email]> wrote:
>
> actionDoubleClick message is not getting sent or else trapped by the widget either. Is that a read/write function only? I have a tree view set to read only.
>
> Bob S


_______________________________________________
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: Another Tree View Oddity

Bob Sneidar via use-livecode
It is working here. You only get the message for leaf nodes. In widget script I have:

on actionDoubleClick pPath
put pPath
end actionDoubleClick

Thanks,
Brian
On Sep 6, 2018, 12:35 PM -0500, Bob Sneidar via use-livecode <[hidden email]>, wrote:

> If it is supposed to, I can file the bug report. Not asking anyone to do my work for me. I just need to know if it is supposed to and isn't, and I'll file it.
>
> Bob S
>
>
> > On Sep 6, 2018, at 10:33 , Bob Sneidar via use-livecode <[hidden email]> wrote:
> >
> > actionDoubleClick message is not getting sent or else trapped by the widget either. Is that a read/write function only? I have a tree view set to read only.
> >
> > Bob S
>
>
> _______________________________________________
> 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: Another Tree View Oddity

Bob Sneidar via use-livecode
Oh I get it! Crap. I am creating a little pallette I am callign QuickNotes, and the idea is that double clicking on an entry will add the thing you double clicked on after the current selection in the topstack. I was hoping I could just doubleclick a node to do this, but I can see I cannot.

I am thinking I should have gone with a datagrid for this.

Bob S


> On Sep 6, 2018, at 10:45 , Brian Milby via use-livecode <[hidden email]> wrote:
>
> It is working here. You only get the message for leaf nodes. In widget script I have:
>
> on actionDoubleClick pPath
> put pPath
> end actionDoubleClick
>
> Thanks,
> Brian


_______________________________________________
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