again with this question.

again with this question. I create a shortcut inside a panel with this script, if you see in the video when edit the layout of the panel the shortcut appear without icon, but when going back the icon show again and if I long press the shortcut LL crash. Pierre Hébert What I’m doing wrong?

var d=LL.getCurrentDesktop();

var v=getVariables();

var width=d.getWidth();

var panel = d.addPanel(0,0,width,1);

var title = panel.getContainer().addShortcut(“test”,new Intent(),0,0);

title.setIntent(null);

e=title.getProperties().edit()

e.setBoolean(“s.iconVisibility”,false);

e.getBox(“i.box”).setColor(“c”,”ns”,0x80ffffff);

e.commit();

title.setCell(0,0,5,1,true);

LL.save();

]]>

4 Commentsto again with this question.

  1. Anonymous says:

    < ![CDATA[

    I’ll try to reproduce this and see what’s wrong. Unfortunately I am short in time so don’t expect a fast answer, sorry 🙁

    ]]>

  2. Anonymous says:

    < ![CDATA[

    I understand what the problem is: you set the intent to null, which is not supported. I’ll add a check for null values in the next update.

    ]]>

  3. Anonymous says:

    < ![CDATA[

    I set to null because I don’t want to launch anything.

    ]]>

  4. Anonymous says:

    < ![CDATA[

    So New Intent() is what you need. Or the action “Do nothing”.


    After all a shortcut is created to launch something 😉

    ]]>

Leave a Reply

Your email address will not be published. Required fields are marked *