backwards-compatibility

Array and dictionary compatibility

Hi, In version 1.0 i am using NSMutableArray and inside that i am storing NSNumbers like NSMutableArray *myArray; for(int i= 0 ; i < 10 ; i++) [myArray addObject:[NSNumber numberWithInt:i]]; For storing my gameStatus. In Next version(1.1) I want to update myArray like(by storing dictionary inside it)... NSMutableArray *myArray; for...

How can I open a Visual Studio 2008 project in Visual Studio 2010 and leave it in 2008 format?

Sometimes I do consultancy work for companies that are still using Visual Studio 2008, but I have 2010 installed. I assumed (yes, assumption is the mother, father brother and sister of all f-ups!) that I would be able to open 2008 projects in 2010 without having to upgrade them. However, it appears that this is not the case? Unfortunat...

Adding members to a C-style struct and backwards compatibility

Say I have a struct defined somewhere deep in low-level code used all over the place in the most crazy and unknown ways: struct T { unsigned short name_len; char d_name[LENGTH]; } With accompanying functions that fill d_name with whatever needs to be put there, like struct T* fill( somethingOrOther* X) And I would like to e...

XML schema compatibility strategy

I work with an application that uses a large set of xml interfaces for integration and data import / export. We use JAXB to map from those interfaces to our domain object model. One challenge we frequently face is how to deal with the need to change to the these interfaces during the course of a project in the face of new requirements. ...

Playing movie in iPhone 3.1 and 4.0

In iPhone 3.1 I used the following code to play a movie: moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; moviePlayer.movieControlMode = MPMovieControlModeDefault; moviePlayer.backgroundColor = [UIColor blackColor]; [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(playbackDidFinish:) name:...

Why do some frameworks refuse to drop support for ancient Java versions?

As I'm sitting here modifying PircBot, I've just noticed that the entire backend was written to support Java 1.1. It has a custom queue implementation, uses hash tables, custom producer/consumer implementations based on wait() and notify() signaling, etc. Even Commons-lang lacks any support for things that Java 5 brings to the table like...

Application Data folder in Windows 7

I have Windows 7 64 bit installed on my system. I have a question about "C:\ProgramData\Application Data" folder. It is mentioned here and here that "Application Data" is a Junction point which points to C:\ProgramData. So, i would expect the following command to list the contents of the C:\ProgramData folder (my ProgramData folder has f...

OpenGL lighting working on iPhone 4/iPad, not on iPhone 3G

Hello everyone. I am having trouble with OpenGL 1.1 lighting. My code works on the iPhone 4 but not the iPhone 3G. Everything appears unlit (flat colours). I don't have a 3GS so I can't find out if it works on that one or not. Here is my lighting setup: - (void)setupLighting { const GLfloat lightAmbient[] = {0.2, 0.2, ...

Viewing ACCDB with Access 2010 runtime when Access 2007 is installed

I'm hoping someone can either tell me what I'm doing wrong correct my flawed understanding of how this works and explain why it's not possible. I've been developing a fairly basic database/program for a client in Access. They have Office 2007, I have Office 2010. Initial test of creating a database in 2010 (in "2007" format) and opening...

Dealing with context classes in Python 2.4

I'm trying to use the python-daemon module. It supplies the daemon.DaemonContext class to properly daemonize a script. Although I'm primarily targeting Python 2.6+, I'd like to maintain backwards compatibility to version 2.4. Python 2.5 supports importing contexts from future, but Python 2.4 has no such facility. I figured I could just ...

How to Ignore certain methods and code in a Class? Based on SDK

I was reading over http://android-developers.blogspot.com/2009/04/backward-compatibility-for-android.html But I'm really not grasping how to ignore certain lines of code. I have this Activity (posted below) and it's a simple webview. However, I want to have geolocation enabled(even if it is only for 2.0 and up phones), since these method...

VerifyError, or using overridePendingTransition while maintaining compatibility?

I've got an application that uses overridePendingTransition to do some custom animations upon transitioning from one activity to the other. This was made available in Android 2.0, but I want to make the application work on Android 1.6. I figured if I just checked that android.os.Build.VERSION.SDK_INT > android.os.Build.VERSION_CODES.DONU...

Backwards compatibility in .NET with BinaryFormatter

We use BinaryFormatter in a C# game, to save user game progress, game levels, etc. We are running into the problem of backwards compatibility. The aims: Level designer creates campaign (levels&rules), we change the code, the campaign should still work fine. This can happen everyday during development before release. User saves game, w...

How to make iAds work on a 3.0 + iPhone-iPad app?

I created a universal app for the iPhone-iPad. I'm only working on the iPhone part at the moment. In the header file for the view controller for the iPhone one, I import the adbanner header and create an adbannerview variable with a matching property. I don't make it in the nib file but rather check at run time if the class exists, if it...

Using reflection in android for backwards compatability

I was reading over at the android dev website about using reflections. But I'm really not grasping how to use it. I need this java file to run on a 1.5(SDK3) device but just ignore the new code and work fine on a 2.0(SDK5) and up phone. I have this Activity (posted below) and it's a simple webview. However, I want to have geolocation ena...

Flex 4.1 installed on a Mac: how do I target pre-version 10 flash players

I just installed (or copied) the Flex SDK 4.1 on my Mac to: /Developer/SDKs/Flex/4/1/ For now I'll only be using a plain text-editor to use it. No fancy IDE. However, it only seems to support flashplayers version 10 and 10.1. At least that's what it looks like from the folders: ./frameworks/libs/players/10.0/ ./frameworks/libs/playe...

Trying to make a Adapter class to choose .Java file depending on firmware version

What I did was create two .java files. One that can compile and run on a 1.5 phone (SDK3) and then one that works on 2.0(SDK5) So for this example i'll call the 1.5 file ExampleOld and the new one Example. I was wondering if i just made activity like this if it would work sort of like a "portal" and pick the activity to load depending on...

Backwards compatability between .Net 2.0/3.5 and 4.0

I have an app that I've upgraded from 3.5 to 4.0. But not all my 3rd party assemblies are built on .net 4.0. How is it that I'm still able to reference those assemblies without any problems? For instance, if another assembly references system.dll 2.0, and my upgraded project references system.dll 4.0 how does .net handle this? Obviosly ...

earliest commonly used version of Python

Is there an officially updated recommendation indicating which versions of Python should be supported by released modules? Or perhaps a page giving a survey of production usage of various versions? It's difficult to know how much use to make of newish features like context managers, class decorators, etc. when writing a module. Note t...

When to build a migration?

I am building a visual studio like application: User can create a new project, edit it, save it to disk and load. The project isn't exactly like VS it is domain specific. Like with VS I need a way to migrate project from V1 to V2 as they have a different structure on disk. When should I build such migration tool? option 1: Near the en...