LC8DP4 LCB Guide? Possible to have a default Script
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
LC8DP4 LCB Guide? Possible to have a default Script
LC8DP4 (on Mac OS X 10.6.
The extending LC / LCB guide in Dictionary/API window seems to have been replaced with HTML5 deploy info?
I can't find it, dictionary / API doesn't seem to be working quite as well as the DP2 release. I know LCB is in mid evolution but it would be nice if the documentation was kept up along the way so people can experiment.
I figured out how to update the metadata in my widget to get it to compile OK anyway. I replaced community.livecode.author.mywidget with com.livecode.widget.mywidget (so there is no longer a difference from community made widgets and official LC widgets?) in the widget declaration meta, I added default size meta, and a nice svg icon path meta.
Is there a way to have a widget contain a pre-filled-out LCS script, as a basic usage example, so that the widget is functional as soon as it's placed but can then be edited by the stack author/widget user? Either that or maybe have the ability to include a demo-stack on the extension-store?
The extending LC / LCB guide in Dictionary/API window seems to have been replaced with HTML5 deploy info?
I can't find it, dictionary / API doesn't seem to be working quite as well as the DP2 release. I know LCB is in mid evolution but it would be nice if the documentation was kept up along the way so people can experiment.
I figured out how to update the metadata in my widget to get it to compile OK anyway. I replaced community.livecode.author.mywidget with com.livecode.widget.mywidget (so there is no longer a difference from community made widgets and official LC widgets?) in the widget declaration meta, I added default size meta, and a nice svg icon path meta.
Is there a way to have a widget contain a pre-filled-out LCS script, as a basic usage example, so that the widget is functional as soon as it's placed but can then be edited by the stack author/widget user? Either that or maybe have the ability to include a demo-stack on the extension-store?
-
- Livecode Staff Member
- Posts: 192
- Joined: Thu Apr 18, 2013 2:48 pm
Re: LC8DP4 LCB Guide? Possible to have a default Script
There is an issue with the dictionary's initial size in DP 4, if you resize the stack it should reveal the dropdown with all the other guides.PaulDaMacMan wrote:LC8DP4 (on Mac OS X 10.6.
The extending LC / LCB guide in Dictionary/API window seems to have been replaced with HTML5 deploy info?
I can't find it, dictionary / API doesn't seem to be working quite as well as the DP2 release. I know LCB is in mid evolution but it would be nice if the documentation was kept up along the way so people can experiment.
We are using com.livecode.widget.<widgetName> for our widgets that come with the IDE, but you should still use community.livecode.PaulDaMacMan.mywidget (or whatever author name you are using).PaulDaMacMan wrote: I figured out how to update the metadata in my widget to get it to compile OK anyway. I replaced community.livecode.author.mywidget with com.livecode.widget.mywidget (so there is no longer a difference from community made widgets and official LC widgets?)
That's a good idea actually, the ability to include a demo stack on the store would be pretty useful.PaulDaMacMan wrote: Is there a way to have a widget contain a pre-filled-out LCS script, as a basic usage example, so that the widget is functional as soon as it's placed but can then be edited by the stack author/widget user? Either that or maybe have the ability to include a demo-stack on the extension-store?
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC8DP4 LCB Guide? Possible to have a default Script
>> community.livecode.PaulDaMacMan.mywidget
I don't think it would compile when I used something similar to that, but maybe I used community.livecode.widget.PaulDaMacMan.mywidget or community.livecode.widget.mywidget thinking the type (widget) needed to be included. I'll have to go back and check (and read the docs now that I can find them, thanks). I definitely had a metadata issue because it compiled ok soon after that.
Will SVG-path icons now or in the future be required or are bitmap/png icons still OK to use? It was a quick-fix for me to add the meta icon path this time because my widget is made of SVG paths so I just used one of them.
I don't think it would compile when I used something similar to that, but maybe I used community.livecode.widget.PaulDaMacMan.mywidget or community.livecode.widget.mywidget thinking the type (widget) needed to be included. I'll have to go back and check (and read the docs now that I can find them, thanks). I definitely had a metadata issue because it compiled ok soon after that.
Will SVG-path icons now or in the future be required or are bitmap/png icons still OK to use? It was a quick-fix for me to add the meta icon path this time because my widget is made of SVG paths so I just used one of them.
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC8DP4 LCB Guide? Possible to have a default Script
Just read about the png icons needing to go into a "/support" folder. Probably best to go with SVG paths for different display resolutions anyway.
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC8DP4 LCB Guide? Possible to have a default Script
Ali,
I was very happy to see that defaultscript feature added to the latest build 8.0dp15, unfortunately I can't seem to make it work in my widget. I'm pretty sure I named the stack & the stack file correctly because the script shows up in the extension builder window when I load my project, but after compile and place the widget on a card it does not contain that script. Any ideas what might be wrong? Thanks!
I was very happy to see that defaultscript feature added to the latest build 8.0dp15, unfortunately I can't seem to make it work in my widget. I'm pretty sure I named the stack & the stack file correctly because the script shows up in the extension builder window when I load my project, but after compile and place the widget on a card it does not contain that script. Any ideas what might be wrong? Thanks!
-
- Livecode Staff Member
- Posts: 192
- Joined: Thu Apr 18, 2013 2:48 pm
Re: LC8DP4 LCB Guide? Possible to have a default Script
Hi Paul,
Thanks, I can see why that's not working properly - I will get this fixed for DP 16.
Sorry about that!
Ali
Thanks, I can see why that's not working properly - I will get this fixed for DP 16.
Sorry about that!
Ali
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC8DP4 LCB Guide? Possible to have a default Script
No apologies necessary, that's what developer previews are for right!livecodeali wrote:Hi Paul,
Thanks, I can see why that's not working properly - I will get this fixed for DP 16.
Sorry about that!
Ali
I'm so jazzed that it's there, it will be very useful!
Looking forward to DP16!
Thanks!
Paul
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC8DP4 LCB Guide? Possible to have a default Script
I dont want to be a nag, but I don't think the fix for default scripts in widgets made it into DP16.
I'm getting the same result. The script appears in the extension builder window but after I build and drag an instance of the widget to a card the widgets script is still empty.
I'm getting the same result. The script appears in the extension builder window but after I build and drag an instance of the widget to a card the widgets script is still empty.
Re: LC8DP4 LCB Guide? Possible to have a default Script
It seems to be working for the "default" widgets that we ship with LC8 when I test it -- do the default scripts work for those? Is the problem limited to custom widgets that you're working on using the Extension Builder?PaulDaMacMan wrote:I dont want to be a nag, but I don't think the fix for default scripts in widgets made it into DP16.
I'm getting the same result. The script appears in the extension builder window but after I build and drag an instance of the widget to a card the widgets script is still empty.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC8DP4 LCB Guide? Possible to have a default Script
Yes, Most of the widgets that ship with LC8 now have default scripts when I create instances of them, but I can't seem to get them to work in my own custom widgets (though, as I said, they do show in the extension builder window). There seems to be some GUI related issues going on with widgets as well (disappearing tools palette, having to select edit script twice to get to script editor). Hope to get a chance to spend some quality time with the dev builds as I haven't really gotten to check out DP16 much yet.
Re: LC8DP4 LCB Guide? Possible to have a default Script
Sorry to hear that you're still having problems. Can you package up a widget that's exhibiting the problem and attach the widget's .lce file to a bug report, please?
Have you tried copying one of the built-in widget's directories to your desktop, ripping out our code and putting yours in its place? That might be a good way to check whether there's some non-obvious difference in file layout (or something) that's causing the issue.
Have you tried copying one of the built-in widget's directories to your desktop, ripping out our code and putting yours in its place? That might be a good way to check whether there's some non-obvious difference in file layout (or something) that's causing the issue.
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC8DP4 LCB Guide? Possible to have a default Script
OK I copied the SVG Path folder and replaced scripts/resources with my those of my project and it did indeed work correctly! So there must be something off about my original project folder or defaultscript.livecodescript file. I originally created defaultscript.livecodescript as a script-only stack from LC8DP15, this new one was created with a plain old text editor. Not sure it's worth filing a bug report over yet. I'll try it with another widget project I had the same problem with later today.Have you tried copying one of the built-in widget's directories to your desktop, ripping out our code and putting yours in its place? That might be a good way to check whether there's some non-obvious difference in file layout (or something) that's causing the issue
-
- Posts: 627
- Joined: Wed Apr 24, 2013 4:53 pm
- Contact:
Re: LC8DP4 LCB Guide? Possible to have a default Script
I noticed my default scripts are in new instances of my widget but they're non-functional until I open the script-editor and hit apply. I'm wondering if this is intentional behavior or a bug in the implimentation?
Re: LC8DP4 LCB Guide? Possible to have a default Script
It's intentional -- it's just like the button control, for example; its script is empty until you open the script editor; then a "mouseUp" handler is automatically prepopulated for you, but it's not actually there yet until you "Apply".PaulDaMacMan wrote:I noticed my default scripts are in new instances of my widget but they're non-functional until I open the script-editor and hit apply. I'm wondering if this is intentional behavior or a bug in the implimentation?
LiveCode Open Source Team — @PeterTBBrett — peter.brett@livecode.com
-
- Livecode Staff Member
- Posts: 192
- Joined: Thu Apr 18, 2013 2:48 pm
Re: LC8DP4 LCB Guide? Possible to have a default Script
In my experience this is a classic sign of preference stack 'corruption'. You might want to try deleting it, it should improve things somewhat.PaulDaMacMan wrote:having to select edit script twice to get to script editor