There's a cocoapods calendar library I'm using that I want to add some functionality/change the behavior for a couple minor things. What's the preferred way to do this?
Can I define a child class that overrides the functionality? I assume that changing the code in the Pod's source is not the way to do it - what is?
This is not really a question for stackoverflow. It should really be posted to https://softwareengineering.stackexchange.com/. I give my answer anyways.
First and foremost, you have to follow the license. Most open source allows you to make changes as long as you commit those changes back to the project. If you think that what you are doing will be valuable to the community, you should start contributing.
Other than modifying the source, you should be able to use it any way you need. Subclass to extend. Add categories to augment. Embed in your own classes to manage.
All you really need to do is follow the license. Usually this means attribution and contributing modifications.
If you are adding completely new functionality to the library and not overriding functionality it provides, I suggest creating a category.
Related
I want to make a small change to how the text on panels is displayed in an Umbraco grid.
I've found I can make the change to nestedcontent.controllers.js in just a few lines, and this works.
However, if/when we upgrade Umbraco this change may be lost.
What are the best practices? Alternative ways of changing Umbraco behavior?
Let try to answer this briefly... if you are talking about the back-end that is.
What are the best practices? Alternative ways of changing Umbraco behavior?
Angular & Plugins
Best way by far is to write plug-ins. Plug-ins can be in the first place property editors. But it could also be used to interfere with the complete backend. But you can go much further.
Almost everything can be extended, custom dashboards, custom sections, custom trees, ... you name it and it probably is possible to extend in the backend.
Everything is powered by angular. Nothing stops you from doing very funky stuff. Packages like Nexu intercept every angular http call and then run their own logic.
From .net Code
A lot of the umbraco logic (like the complete request pipeline) can be replaced by your own implementation. Nothing stops you from run your own UrlProvider.
And what about the events (doing things after somethings happens). E.g. after a save.
Best practices
I think a best practice is to leave umbraco as is. Do not change it if you don't really need to. Use all extension points where you can.
And use the default Umbraco stuff. Don't reinvent the wheel. Use things which already exists in Umbraco. It will give you the possiblity to build better websites for content editors, and faster for the users.
Looks like it's a package specific file (Nested Content)? You could download the package file, unzip it and make the change before re-zipping it and keep the zip file in a safe place? ;-) Or, if it's a change that everyone could benefit from, make a pull request on Github?
I say make the change, and whilst you're at it put in a Pull Request for the project author to change it permanently.
Here's why I wouldn't worry about the Umbraco upgrades overwriting it:
Upgrades in Umbraco aren't automatic, unless you're using the cloud version. So this means you make a choice to upgrade. When doing any sort of development it is always a good idea to have your code checked into a source control of some sort. I like SVN or GitHub personally.
When upgrading an Umbraco site, I always make sure I have checked in all of my files to source control. If you do this, when it comes to doing the upgrade, you can see if the file has changed, and on the line where you made your change, you can revert that line back to what you had it at.
I hope this makes sense.
I want to have a mail composer view in my app but with a few extra fields and stuff. Since the original view controller Apple provides, MFMailComposeViewController doesn't allow any way to customize it.
So after a little bit of researching I came across the Three20 framework for iOS which provides a view controller called TTMessageController suits my needs. But I did some some checking on this framework and the feedback I've been reading doesn't sound too good. I even tried downloading, following the instructions to add it in a project but that ended up throwing errors also.
My question is, are there any other alternatives to the Three20's TTMessageController? I want to have a view controller where I can add some more input fields to customize it.
Thank you.
Three20 is completely outdated and not suitable for use in a modern Xcode project (using ARC and all the new Objective C features from the last 2 years). Three20 has a very large dependency chain, and you will find yourself stuck trying to make sense of its class heirarchy just to accomplish simple things.
Also, as you correctly pointed out, MFMailComposeViewController cannot be customized in any way other than what is documented by Apple.
The only way to achieve what you want is to start from scratch with an empty UIViewController, and add the text fields you need - either programmatically, or using XIBs or using Storyboards.
I realize this answer doesn't provide you any new information but at least this confirms your feeling that using Three20 for this is a bad idea.
I'm searching for the API which propose a tableView partially uncovered, like the one in Facebook app menu. I've seen it in several other apps.
I've heard the Facebook uses the Three20 lib, but this kind of control is not part of their catalog (http://three20.info/). Moreover, three20 seems to be a bit outdated.
If its Three20, which class is it? If no, does it come from an API?
Thanks
Facebook does not use Three20 anymore (besides, I strongly discourage its use since it is quite outdated and adds too much dependencies to a project)
Look at third party libraries, there are plenty to do this on Google.
For example, simply on CocoaControls.com you can find this one or this one among others.
Is there a way in Fogbugz to track cross project cases?
For example, we have a business logic dll that is used in both the winform client as the web client. There was a bug there that needed solving in this dll.
Is there a way to make it so that adding a case to the project of the dll would autoamatically add this to the depending projects?
No there isn't a way to do this. You could either create two cases (one in each project) and link them, or in the upcoming FogBugz 7, you could make a subcase. But the only alternative to do this automatically would be to write something which scanned for these using the API and auto created the linked case.
I think you may get more focussed answers at the Fogbugz Support Forum.
I want to put my master pages in a central library so I can use them in several projects without having the maintanance nightmare.
Everything is refactored in a generic and central way, they are all in a "shared" namespace.
But if put them in a seperate project, I can't reference them
I don't believe you can put that actual .master pages in an external library. You can place your own customer MasterPage-derived class in the library, and have your client apps derive from that, but I don't think that's what your intent is, since you're tagged with asp.net-mvc (implying very narrow views without much logic, and probably no code-behinds).
As far as I'm aware, there isn't a way to reference a master (nor, for that matter, an ASPX or ASCX) from an external library. Wish I had better news for you. (And I actually hope I'm wrong; I hope someone else here has figured out a technique for this, as I'd like to use that kind of thing myself on occasion.)
Just for reference's sake, I'll put Phil's mail here too:
Sorry for the late response. You could try using a VirtualPathProvider, but this would require full trust. Other than that, I don't know of any way to do this.
Phil
so there you go.