deprecated

Best practice to mark deprecated code in Ruby?

I'd like to mark a method as deprecated, so the people using it can easily check their code and catch up. In Java you set @Deprecated and everybody knows what this means. So is there a preferred way (or even tools) to mark and check for deprecations in Ruby? ...

How to hack boot.rb to stop annoying warning? Gem::SourceIndex#search support for String patterns is deprecated

Everytime I run rake or most rails commands, I get an annoying warning. I'm still a beginner with Ruby/Rails, and I would like advice on how to hack boot.rb to stop the annoying warning. I'm using Rails 1.2.6 and RubyGems 1.3.1. (I haven't upgraded Rails to 2.x because I'm still learning Rails from a book that uses 1.2.x.) I'm gratef...

What do you do with your deprecated books?

I have at least 10 books that are now ‘deprecated’, for example Pro Spring covering Spring 1.2. Is there something better to do than to throw them away? What do you do with your ‘deprecated’ books? From now on I try not to buy books about a given version of a given product so I hope the books I buy will not be deprecated too soon… ...

QDFlushPortBuffer no longer works?

I know that it's deprecated, and has been for a long time. However, I have a C++ browser plugin that still uses QuickDraw, and it isn't updating correctly. When I push a button, or scroll, it often won't do anything until some other event forces the screen to re-draw. I've traced through, and I'm drawing at the right time, and doing a QD...

getch is deprecated

Hi there, Somewhere back in time i did some C and C++ in college, but I didn't get to many attention to C++. Now I wish to pay some attention to C++ but when I'm using getch() function, i get the warning from below. Warning C4996: 'getch': The POSIX name for this item is deprecated. Instead, use the ISO C++ conformant name: _getch. Se...

Handling Deprecated Includes With Autoconf

I have been using ext::hash_map in a C++ project and notice that in g++ 4.3 it is deprecated in favor of unordered_map. I need to maintain compatibility with old systems that do not have unordered_map available. It occurs to me that this is just the sort of thing that could be handled by autoconf, which I am already using. I have been...

"Deprecated" notation for Sun's C++ compiler?

Does the Sun compiler have a notation to mark functions as deprecated, like GCC's __attribute__ ((deprecated)) or MSVC's __declspec(deprecated)? ...

Why can't I use strerror?

I'm porting some code to Windows, and the Microsoft compiler (Visual C++ 8) is telling me that strerror() is unsafe. Putting aside the annoyance factor in all the safe string stuff from Microsoft, I can actually see that some of the deprecated functions are dangerous. But I can't understand what could be wrong with strerror(). It takes ...

Why can't I use fopen?

In the mold of a previous question I asked about the so-called safe library deprecations, I find myself similarly bemused as to why fopen() should be deprecated. The function takes two C strings, and returns a FILE* ptr, or NULL on failure. Where are the thread-safety problems / string overrun problems? Or is it something else? Thanks ...

How to mark a global as deprecated in Python?

I've seen decorators that let you mark a function a deprecated so that a warning is given whenever that function is used. I'd like to do the same thing but for a global variable, but I can't think of a way to detect global variable accesses. I know about the globals() function, and I could check its contents, but that would just tell me ...

Java: De-deprecated-ing Tools

Once a method is marked as deprecated, are there any tools which replace these methods with non-deprecated workarounds ? ...

alternative to deprecated UITableViewCell setText?

Code in the book Beginning iPhone Development (by Dave Mark & Jeff LaMarche) assigns to the UITableViewCell text property: UITableViewCell *cell = ... ... cell.text = ... This assignment brings up a "'setText' is deprecated..." warning. What should I use as an alternative? Also, how do I open the long URL in the warning (in Xcode) w...

Tools to highlight deprecated functions in PHP4 sources?

Is there any magic tools i can use to scan source code that was written for PHP4 to highlight deprecated functions in PHP5? I'm currently running the latest version of PHP on a server and need to port this code. Is there anything out there that can give me a hand? ...

What is the replacement for a blinking text in a web page?

Hi, I have heard that using blinking text in a page to get user's attention is not a good practice. What is the alternative for that? ...

Java: How to avoid deprecated warning in derived interfaces which override deprecated members?

Consider the following simplified interface inheritence hierarchy: // Starting point: public interface Base { void Foo(); } public interface Derived extends Base { } It is intended to move the Foo method from the Base interface to the Derived interface: // Desired end-point: public interface Base { } public interface Derived ex...

What to use in place of a deprecated UIImagePickerControllerDelegate method?

I followed a great tutorial (http://iphone.zcentric.com/2008/08/28/using-a-uiimagepickercontroller/) on using a UIImagePickerController to get images from the Photo Album or Camera on the iPhone. The problem is, the tutorial is a bit dated and documentation cites a method used by the delegate as being depreciated since 3.0. The problem i...

Twitter Application - OAuth or Classic Login?

I am building a twitter application that is currently using the classic login instead of OAuth. Does Twitter have any plans of deprecating this? I chose not to do OAuth because it is still being piloted as a beta. ...

Why is mime_content_type() deprecated in PHP?

I'm just curious to know why mime_content_type() is now considered deprecated. This method for determining the mime type is much easier than the replacement Fileinfo functionality. ...

What are benefits of using the @Deprecated notation on the interface only?

For Java programming, what are some benefits of using the @Deprecated notation on and interface method but not on the class that implements it? public interface Joe { @Deprecated public void doSomething(); ... } public final class Joseph implements Joe { public void doSomething() { ... } ... } ...

Constant kCGColors deprecated on iPhone?

I'm having some trouble getting CGColorGetConstantColor() to work on the iPhone. Apple's documentation claims you can pass any of the "Constant Colors" without linking to what the Constant Colors actually are, so I assumed you can simply use those documented for OS X: CGColorRef blackColor = CGColorGetConstantColor(kCGColorBlack); Thi...