I am building an iOS app using Rubymotion. I am constructing the UI with the help of Interfaceb Builder. In the screen that I am working on I got the following elements:
Navbar
Label
TableView
I am populating the tableview via an API call. All works fine but I am not sure I am doing things like I am supposed to do. From what I can understand IB is only used to "draw" the UI instead of coding it, nothing more?
This is my controller code. Again, it works fine but I think I am not following "best practice".
http://pastie.org/5368976
There are many different ways of figuring out how you want to build your views.
If you are not doing a crazy amount of custom designed UI, then I don't see why I would not use something like #colinta's Teacup.
I would avoid using storyboards to build a UI. Please see the thread here.
On that note, don't hesitate to check out the discussions on the Ruby Motion Google Group if you can't find the answers on SO. The group seems very active.
Also, IRC: irc.freenode.net, #rubymotion
Related
When I try to print my Ember.js page application, templates aren't displayed on the sheet (it only displays a big empty white section). Any explanations or solutions?
Thank you
You will need to use traditional media queries to implement the ability to print from your Ember app. As far as I am aware there, no one has created an ember addon to support print functionality at this time. (See here where it doesn't look like anyone has a good suggestion for a similar question.) I can imagine it would be difficult to support generic functionality for printing that looks decent across apps, which may explain why no one has attempted to create an add on at this time.
I have a project using Qt 4.7. I need to display the contents of a webpage produced by performing a search on a website. The site has a box to type text into and an "ok" push button. When the ok button is pushed, it searches the site and goes to another page with the results. It's worth noting that these are NOT webpages made through Qt - they're just normal pages on a website. My Qt code so far is a simple UI with a QLineEdit and QPushButton. When the button is pushed, it needs to run the search on the site as if the user had typed the QLineEdit text into the search bar and clicked the ok button.
I know we're generally supposed to show sample code of what we've tried, but I honestly don't even know where to start with this, or if it's even possible. I've worked extensively with C++ but only a few months with Qt, and I've never had to write something like this. I've written code to write/parse HTML, but never to interact with a webpage that already exists. Can anyone please help? I'm really lost here. Thanks.
Edit: While looking for answers elsewhere online and seeing some of the similar-sounding questions people ask, I feel I should clarify: I absolutely am NOT in any way planning the use this for any sort of malware. It seems like a lot of similar questions get shot down over that, and I can assure everyone this project has no malicious intent whatsoever.
Try this:
void on_nameOfPushButton_pressed()
{
nameOfWebView->load(QUrl(QString("http://<website-url>.com/<search-url>?q="+
QUrl::toPercentEncoding(nameOfLineEdit->text()));
}
I am pretty new to cocos2d-x. Surfing internet did not help much.
My Question:
We have requirement to develop an application which has more controls like calender, table, options along with few animation stuff. I really impressed with cocos2d-x. But i do not find any use cases like calender, table , that can be used in cocos2d-x, unless we write on our own. [ i may be wrong also here ].
So, Kindly suggest, if going with cocos2d-x , can i achieve the said above?.
There are some extensions inside cocos2d-x distibution (see ./extensions folder), and some UIKit classes reimplementations on github. Animations usually implemented with CCAction subclasses (like CCMoveBy, CCMoveTo, etc).
Yes. You can use native controls using a bridge between Cocos2d-x and Objective C
Here is an example of how to achieve it.
However these native UI will run only for iOS. You wont be able to get the benefit of cocos2d-x being multiplatform.
I have recently implemented some data visualisation using d3.js, I'm now trying to get this to work for Internet Explorer browser versions 7 and above. The common suggestion to get this to work, is to combine d3.js with raphael.js, which is a cross browser graphics library.
There already seem to be some implementations of such libraries such as
r2d3.js :
d34raphael.js :
I'm trying to understand if these existing implementation already have d3's capability of data binding and the physics implementation of the force layout to implement something as simple as this d3 example : http://bl.ocks.org/1095795
I have been looking into this too and a number of options came up.
Chrome Frame - A browser plug-in that actually uses chrome underneath, meaning SVG just works. This is great if you're able to deploy plugins to the browser, for a real commercial environment however this may not be possible.
SVG Web - The aim is it bring SVG to all browsers. It looks like a fairly large project, one that's had Google's input. This doesn't however work out of the box with D3 though I don't know much about the issues.
D34Raphael - You've mentioned this one, I found again it doesn't work out of the box. Check the project out on GitHub, there hasn't been any commit activity in months and there's some pull requests "first pass on trying to get support for .on() required for event binding". If it doesn't support events, is that an issue to you? I'd generally keep away from this one.
R2D3 - Again another one you mentioned. I took the Sankey example from the D3 website and had to make a few changes to get it working. The main things I couldn't get working (Drag Events, Groups - though can use an alternative). It took about a day of effort to get the example working in IE8 and I believe is in a useable state. The project on GitHub is also much more active, the developer is committing, pulling work in and is very active on discussions etc. This gets my vote.
I have a django app and I would like to display some graphical data visualization to my users. I am looking for an easy-to-use package that would allow me to add graphs and widgets.
The kind of widget I want to build is a kind of speedometer dial that is red at one end and green at the other. As a user completes their job over the day, the graphic/widget adjusts itself. The dial moves from red to green.
I also want an S-curve graphic that shows the cumulative amount of work accomplished against planned. That is kind of an x/y line plot.
My question are: How easy is this to implement? Are there any add-ins libraries or packages that do this already? I am trying to keep my entire application open-source. I've seen a couple subscription services that do this type of thing, but I can't stomach the cost.
I don't mind using ajax or jquery to implement such a thing, but I would like the most elegant and maintainable solution.
Any advice or examples on how to tackle this project?
There are lots of good javascript libraries these days, but all require some effort to learn how to use. I have not found one that really is easy to use, I guess because everyone wants something different. My general experience has been the more effort you put into learning them, the more you get out.
Google has gauges: http://code.google.com/apis/chart/interactive/docs/gallery/gauge.html
Also
http://www.flotcharts.org/
http://philogb.github.com/jit/
http://www.highcharts.com/
http://www.jqplot.com/
Or really take control:
http://mbostock.github.com/protovis/
As first, see the following grid (https://www.djangopackages.com/grids/g/dashboard-applications/) on djangopackages.
Not sure if that's exactly what's asked for, but you might take a look at django-dash (https://pypi.python.org/pypi/django-dash).
It allows each user to make his own dashboard (from plugins available). Those dashboards can be made public.
Some screenshots (http://pythonhosted.org/django-dash/#screenshots).
It's modular and plugin based, so you need to make a plugin and widgets for every specific feature (in this particular case - the speedometer plugin and widgets for it). Each plugin/widget can include own JS/CSS when being rendered.
See the following chart usage examples:
D3.js integration examples (https://github.com/barseghyanartur/django-dash/tree/master/example/example/d3_samples).
Polychart2.js integration example (https://github.com/barseghyanartur/django-dash/blob/master/example/example/bar/).
protovis is no longer under active development, but they started a new poject: http://d3js.org/
You may choose from these packages:
https://www.djangopackages.com/search/?q=dash