Re: Hijack the property inspector?
I didn't remember that the datagrid is actually a group, well kind of. I'll take a look at that. Thanks for the info. Håkan On 15 Apr 2020, 18:31 +0200, Ali Lloyd via use-livecode , wrote: > This is possible - you would need to look at how the datagrid does it: > https://github.com/livecode/livecode-ide/blob/develop/Toolset/resources/supporting_files/property_definitions/com.livecode.interface.classic.DataGrid.tsv > > Each datagrid property uses a custom getter / setter defined in the IDE > library which does the right thing. You would have to tweak either the > 'properties info' stuff in the ide library or perhaps add a frontscript > that intercepts revIDEExtensionPropertiesInfo and returns the array from > the revIDEExtensionLibrary implementation augmented with your custom data. > Alternatively you could use the inspectorData setProp handler of > revInspectorTemplate more directly. > > It will be a little tricky I suspect, but definitely doable. We really > would like to add a way to make 'script widgets' - i.e. aggregate livecode > controls with script behaviors - but there are some technical hurdles to > overcome before that is possible (at least in a way that insulates them in > the same way as a widget is) > > On Wed, 15 Apr 2020 at 15:42, Håkan Liljegren via use-livecode < > use-livecode@lists.runrev.com> wrote: > > > When building widgets we can quite easily “inject" the properties into the > > ordinary property inspector. I often build new controls out of LiveCode > > controls and mainly a group of controls. Currently I have my own system > > with my own tools palette for dragging them to the current card and my own > > “property” stack to handle some of the properties, but does anyone know if > > it is possible to use the standard property inspector instead? > > > > As they are usually ordinary LiveCode groups (with some behavior script) > > it would be nice to be able to use the ordinary property inspector and just > > add some extra properties. Again in the same manner as a widget property > > works. > > > > I found this blog post: > > > > > > https://livecode.com/how-to-create-plugins-and-tools-with-the-livecode-8-0-ide/ > > > > That gives some hint but I can’t find how my controls should respond to > > the property inspector. > > > > :-Håkan > > ___ > > use-livecode mailing list > > use-livecode@lists.runrev.com > > Please visit this url to subscribe, unsubscribe and manage your > > subscription preferences: > > http://lists.runrev.com/mailman/listinfo/use-livecode > > > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your subscription > preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Re: Hijack the property inspector?
This is possible - you would need to look at how the datagrid does it: https://github.com/livecode/livecode-ide/blob/develop/Toolset/resources/supporting_files/property_definitions/com.livecode.interface.classic.DataGrid.tsv Each datagrid property uses a custom getter / setter defined in the IDE library which does the right thing. You would have to tweak either the 'properties info' stuff in the ide library or perhaps add a frontscript that intercepts revIDEExtensionPropertiesInfo and returns the array from the revIDEExtensionLibrary implementation augmented with your custom data. Alternatively you could use the inspectorData setProp handler of revInspectorTemplate more directly. It will be a little tricky I suspect, but definitely doable. We really would like to add a way to make 'script widgets' - i.e. aggregate livecode controls with script behaviors - but there are some technical hurdles to overcome before that is possible (at least in a way that insulates them in the same way as a widget is) On Wed, 15 Apr 2020 at 15:42, Håkan Liljegren via use-livecode < use-livecode@lists.runrev.com> wrote: > When building widgets we can quite easily “inject" the properties into the > ordinary property inspector. I often build new controls out of LiveCode > controls and mainly a group of controls. Currently I have my own system > with my own tools palette for dragging them to the current card and my own > “property” stack to handle some of the properties, but does anyone know if > it is possible to use the standard property inspector instead? > > As they are usually ordinary LiveCode groups (with some behavior script) > it would be nice to be able to use the ordinary property inspector and just > add some extra properties. Again in the same manner as a widget property > works. > > I found this blog post: > > > https://livecode.com/how-to-create-plugins-and-tools-with-the-livecode-8-0-ide/ > > That gives some hint but I can’t find how my controls should respond to > the property inspector. > > :-Håkan > ___ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode
Hijack the property inspector?
When building widgets we can quite easily “inject" the properties into the ordinary property inspector. I often build new controls out of LiveCode controls and mainly a group of controls. Currently I have my own system with my own tools palette for dragging them to the current card and my own “property” stack to handle some of the properties, but does anyone know if it is possible to use the standard property inspector instead? As they are usually ordinary LiveCode groups (with some behavior script) it would be nice to be able to use the ordinary property inspector and just add some extra properties. Again in the same manner as a widget property works. I found this blog post: https://livecode.com/how-to-create-plugins-and-tools-with-the-livecode-8-0-ide/ That gives some hint but I can’t find how my controls should respond to the property inspector. :-Håkan ___ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode