I have been busy with enhancing the iStocks dashboard widget. Thanks a lot for your valuable input; most new features were taken from your comments. The new 0.3.0 release has features such as Sorting by performance, Multiple instance support and color themes. It is also possible to rename the symbols and reorder them. And last but not least, the chart fetching has become much more robust by using several fallback data sources.
Check it out at iStocks Widget.
art vandalay said
I love this widget however I have many stocks that I watch but I don’t seem able to use “multiple instances” to create more than one of these widgets. When I try, the options are “replace or quit”. What is the trick to opening more than one?
maba said
Multiple Instances:
art, for another instance of the widget, use the “+” button on the bottom left of your dashboard screen to expose the palette of your widgets; just click on the istocks widget and it will open another widget instance.
See also this
demo on Youtube
art vandalay said
Thanks Maba! This widget is very valuable to me!
door_jam said
I have been hoping the original Stock widget to have these features. Thanks for such a great job.
Just one question, can I export the stock data (e.g. the stock codes with the names I added) so that I can use them on another mac or another user account? This will save me typing all the info again. Thanks again.
maba said
door_jam,
I think the easiest way is to copy the widget preference file to the other Mac.
The file is
Library/Preferences/widget-de.martin-backschat.widget.istocks.plist
door_jam said
maba,
Thanks, it worked perfectly.
Jason said
Martin,
I was wondering if you might be able to provide me with some insight as to how iStocks plots the stock data on the screen. I like how the charts appear in this application and they look very clean and I’d like to test some trading strategies using the plotting algorithm that this application uses.
On my iPhone, the resoultion is 320X480 pixels. When I pull up the iStocks application it looks like about 250X150 pixels are used in the actual graph (I measured the dimensions and came up with a rough estimation). So if you could give me some insight as to how the application determines which pixels to “light” up, I’d appreciate it. Thanks!
Jason
maba said
Jason,
iStocks, like Apple’s Stocks widget, uses HTML and Javascript to render the graph in the widget. The area is specified in the HTML page with the tag “canvas” – which is HTML 5 and understood by Webkit. CSS is used to specify the position and size of the canvas. The Javascript code of the widget uses the page’s DOM and the Canvas Javascript API to render into the canvas. Look into Stocks.js and the entry function for drawing, chart_callback (line 1937 or so).
If you want to draw in your iPhone application, you have at least these options:
– develop a Web application specific for iPhone using Dashcode.
– create a native iPhone application using Cocoa Touch; then instead of using HTML/Javascript and the canvas tag, you use a Cocoa view and in it Quartz, the 2D vector drawing framework in Mac OS X and iPhone OS, directly. (The Canvas drawing features are actually realized using Quartz.)
– create a mixed application: embed the web application part in Cocoa Touch’s WebKit views (by pointing to html and javascript code embedded in your application resources), and use Cocoa Touch for the overall user interface on iPhone/Mac OS X.
Rishi said
Thank you Maba
Great work !!
door_jam said
Hi Maba,
Regarding “multiple instances”, it used to work on my mac. But today, I found that whenever I changed the stocks on “one instance”, it will change all instances to make them all identical after I log out then log in my mac again. Different color themes still worked fine.
Can you point me to the right direction to get this great function back?
By the way, iStocks had been a great widget, thank you.
door_jam
Jorge said
Hi, is there a possibility that we can use this widget online? Meaning embedding it on a HTML or Flash website?
I would like to see this happen.
somethingaboutker said
Hi Martin
Thanks for your iStock widget (helps a lot while working ^^ )
just wonder if I can link your page on my blog for introduce your iStock widget in Chinese, and provide a link to download it for my friend?
yhelmy said
Hi, We’re interested in licensing the code for the iStock Widget, please contact me to discuss.
Thanks
mcshonky said
What is the proper way to upgrade when you have several copies of your stock widget? I have 10 copies of it so I can track 200 stocks. An update that scrolled like iOS 5 would be awesome.
maba said
@mcshonky, concerning the update when you run multiple instances of iStocks, see:
John O said
Martin,
This is an awesome widget and it is exactly what I am looking for. I have a financial services client who needs a widget like yours, but on their website. Is it possible to embed this on a website?
maba said
Hello John. Embedded the widget on a webpage is not so easy, since the Javascript source code makes heavy use of Apple-specific Dashboard-specific Javascript extensions, like e.g. flipping the widget around to the backside. It would take a considerable amount of time to transform it into a pure web widget.
neo said
I too would like to see this widget embedded on a website.
It’s not necessary to have a complete replica of the Mac version.
marzipanj said
Cool widget, but I’ve been having a lot of problems with Dashboard widgets in Mac OS 10.7 Lion–I get an error message “You can’t install *.wdgt because it is not a valid widget.” Any ideas?