Is it possible to create new instances of a widget from a Dashboard widget?

This is a continuation of this question .
It seems impossible to just save already configured instances of the panel widget. An alternative way would be to recreate previous instances.

Is it possible to create new instances of a dashboard widget from another widget? I could not find anything about this topic.

+5
javascript widget dashcode macos dashboard
source share
6 answers

Maybe, but I don’t know how. The delivery status widget allows you to open a new copy. You can see the + sign in the screenshot in the help image .

+1
source share

I would doubt it ... I assume that implies a security risk.

You will probably enjoy browsing the Apple code best. When you “update” the widget, do you change the identifier or automatically erase the settings? (Forgive my ignorance - I'm far from my Mac, so I can't investigate myself)

Other than that, you'll probably want to find "Dashboard widget settings cleared by the update" either on the "thread" or on the Apple forums. Email lists are especially useful.

0
source share

AFAIK is not possible in any supported form (there is no mention of this in the Apple documentation, Dashboard does not have an AppleScript dictionary).

However, since Widgets can access the file system and execute commands, it can be hacked: change com.apple.dashboard.plist and restart Dashboard with killall Dock (obviously this is not an elegant solution).

0
source share

Impossible, I tried this before also let me know if you get any solutions.

0
source share

I thought you could use widget.system to invoke the open command in the widget set and open a new copy, so I put together a simple widget to test it. Not.

It is interesting, however, if the Objective-C plugin would be more capable or if this is a limitation baked in the Dashboard?

0
source share

Well, that was possible with an earlier version of OS X. In the widgets that I made, I used the following code to create a new instance:

 widget.system('/bin/sh -c "open `pwd`"', null); 

Now, however, this code reinstalls the widget.

0
source share

All Articles