foundation

Difference between Foundation Framework and Core Foundation Framework?

I try to get the hang of it, but for now both seem the same thing to me. However, Xcode allows to create an Console App with choice of using "Core Foundation" or just "Foundation". Maybe someone can point out the differences. ...

Why does -isMemberOfClass: not work here?

NSMutableArray *arr = [NSMutableArray arrayWithCapacity:3]; if ([arr isMemberOfClass:[NSMutableArray class]]) { NSLog(@"YEP!!"); } else { NSLog(@"NO!!"); } I get always "NO!!" in console. I tried with Array, NSNumber, NSString. All of them don't seem to work. That's strange. As I get it from the docs, this method should return...

Multithreading Puzzles

I'm trying to come up with some programming puzzles focused on multi-threading. Most of the problems I've been able to come up with, so far, have been pretty domain specific. Does anybody have any decent programming puzzles for developers attempting to learn the core concepts of multi-threading applications? ...

memory management guidelines on foundation functions

While memory management for the foundation classes are consistent and documented, i was surprised to find (via the friendly EXC_BAD_ACCESS) that Foundation functions like e.g NSStringFromSelector() seem to return pointers to constant storage - which is at least not mentioned in the documentation for the function. Is that behaviour docum...

Creators of C#?

Who are the creators of C#? Of course it is Microsoft but are there any major players that can be mentioned as architects, thinkers etc. behind the scenes? (Besides Gosling and Stroustrup that is...) ...

Will this format a phone number in Objective-C?

NSString *origString = @"1 888 2313 1231"; // or anything like that, 423-2342 should work too [[[origString componentsSeparatedByCharactersInSet:[[NSCharacterSet decimalDigitCharacterSet] invertedSet]] componentsJoinedByString:@""] length] == 7 ? ([NSString stringWithFormat:@"%@ (%@) %@-%@", [[[origString componentsSeparatedByC...

Finding STS providers for Windows Identity Foundation

Hi all, I've had a very brief look at Windows Identity Foundation (WIF) and it looks to me like I could say that my site is going to accept logins from other sites. e.g. anyone with a gmail or LiveID account will be able to post comments on a thread in my application. When the post comment button is clicked the user is redirected to a pr...

TFS: One big Application, divided by Add-Feature-Projects

We have got exact ONE big Source Safe Tree and ONE big Application. (about 7 years of development) Each of our projects is "only" to add features to that big application. The typical duration of those projects is from 1 week up to 4 months. Today we are using SourceSafe, communicate per EMail, paper and so on. The main problem is issue...

Reloading code-based workflows

We need to run different version of the code-based workflows without closing application. Our workflows are packet in assembly, for example, WorkflowSet.dll. Here we have a workflow Workflow1: public sealed partial class Workflow1: SequentialWorkflowActivity {… } We can create workflow instance: Assembly workflowAssembly = Assembly.L...

How to Get the Title of a HTML Page Displayed in UIWebView?

I need to extract the contents of the title tag from an HTML page displayed in a UIWebView. What is the most robust means of doing so? I know I can do: - (void)webViewDidFinishLoad:(UIWebView *)webView{ NSString *theTitle=[webView stringByEvaluatingJavaScriptFromString:@"document.title"]; } However, that only works if javascript ...

Team Foundation Server How to Edit file without checking it out

i'm working with TFS and i need to edit file localy without checking it out . another case if some one checked in the file and i need to change my locally copy. what should I do ? in Visual source safe we can do that by removing the read only check on the file. thanks, ...

Need some advice before starting coding my next iPhone app...

Hi! I need some advice about how should I start coding something. So here is the context: I've just finished building a CMS that manage a SQLite database. My application will be picking this database and use its content as the application's content. So far it's pretty simple. The application will have a navigation that will browse thr...

Added buttons, webview, added outlets, but can't play with them in the code...

Hi! I made a toolbar with two buttons on it. I then created two outlets in my class controller. Then I hooked the the controller to the buttons and selected the outlets. Finally I rewritten the class files (that added: IBOutlet id next; IBOutlet id previous; to my .h file). So now, everything looks okay. But then I try somewhere in...

Problem installing MS Visual Studio 2008 Team Foundation Server or Windows Server 2003 Service Pack 1

I'm trying to install MS Visual Studio 2008 Team Foundation Server in XP but during the installation the setup request Windows Server 2003 Service Pack 1.I have install TFS 2008 SP1, but nothing have change. I can't install Windows Server 2003 Service Pack 1 because the OS is in XP. Any ideas? ...

Web part error on Team Foundation Server Project Portal Sharepoint site...

Hi all, I recently installed TFS 2010 with the included sharepoint services on a single server. I am getting the following error multiple times on the project dashboard web page on the TFS2010 project protal after creating a brand new project in the default project collection. I am not an expert with WSS, so any guidance will be greatl...

Where are constant NSStrings allocated?

I understand that constant CStrings are allocated statically, rather than on the heap. I also noticed that constant NSStrings have an infinite retain count. Does it hold true that constant NSStrings are also allocated statically, rather than on the heap? ...

Can I change an NSDictionaries key?

I have an NSDictionary object that is populated by NSMutableStrings for its keys and objects. I have been able to change the key by changing the original NSMutableString with the setString: method. They key however remains the same regardless of the contents of the string used to set the key initially. My question is, is the key protect...

Is it possible to invoke NSDictionary's valueForKeyPath: when a key contains periods?

I'm trying to get the value of the repeatInterval key in the com.apple.scheduler plist. I'd like to just use NSDictionary's valueForKeyPath: method like so: CFPropertyListRef value; value = CFPreferencesCopyValue(CFSTR("AbsoluteSchedule"), CFSTR("com.apple.scheduler"), kCFPre...

Objective-C: Getting the True Class of Classes in Class Clusters

Recently while trying to answer a questions here, I ran some test code to see how Xcode/gdb reported the class of instances in class clusters. (see below) In the past, I've expected to see something like: PrivateClusterClass:PublicSuperClass:NSObject Such as this (which still returns as expected): NSPathStore2:NSString:NSObject ......

How do I highlight available days in a Calendar control in WPF?

Hello, I wanted to highlight some range of days in a Calendar in WPF, and make any other day in the calendar unavailable. So the user could select only the highlighted range. The problem is, I havent found anything useful to do so yet. The control itself doesnt support data binding at all (although it has Data Context property :-)), whic...