Hi,
It turns out that in order to do this one has to bind the NSSlider's Value to IKImageBrowserView's zoomValue.
My question is why it only works in this way? It seems more natural (to me) to bind IKImageBrowserView's zoomValue to NSSlider.intValue
Thanks!
...
Hi,
I have to create an sample code that connect to a socket server, and then be able to send multiple NSString through the socket.
In the begging i start using NSStream objects, but i had a problem to reuse the socket (maybe i'll post another question if the nsstream solution is the best), and when i google socket for iPhone programmi...
I thought an variable in objective-c is just a reference to an object somewhere in memory. So for my understanding, the result must have been "one", because at the end i assign the object's memory address of str1 to str2, and previously I had assignend the memory adress of str2 to test.
NSString *str1 = [NSString stringWithCString:"one"...
I am writing an Objective-C class but is uses an API written in C. This is mostly fine as mixing C calls with Objective-C calls causes few problems.
However one of the API call requires a call back method (example):
success = CFHostSetClient(host, MyCFHostClientCallBack, &context);
Where MyCFHostClientCallBack is a C function defined...
Hello,
I'm trying to use the NSStream objects to open and then write and read on a socket but i have a problem.
I don't know how to write on the socket, after i have opened it.
Here is how i have done
1) first openning the socket :
NSURL *website = [NSURL URLWithString:urlStr];
if (!website) {
NSLog(@"%@ is no...
I have a problem that I am getting EX_BAD_ACCESS when calling release on an NSStream object in my dealloc on the iPhone.
The following code
- (void)dealloc {
DLog(@"dealloc started for: %@",self);
@synchronized(self) {
lookupCount--;
if (lookupCount==0) {
UIApplication* app = [UIApplication sharedApplication];
app.ne...
Is there anyway to test CoreLocation on the iPhone Simulator?
All I require is to be able to set the location myself and have CoreLocation return it.
...
I'd like to print what's behind an &myVariable. I tried NSLog(&myIntVar); but it won't work.
...
As I understand that (or think I understand), a variable that is a pointer stores just a memory address in it's value.
lets say:
int x = 5;
NSString *str1 = [NSString stringWithCString:"one"];
then the value of x is 5. That's what I see in the Debugger when I put a breakpoint there.
but:
the value of str1 is NOT "one". It's a memo...
Hi all,
I'm curious for those of you who are building iPhone apps based on REST/SOAP/XML-RPC or simply pulling down a dynamic XML feed, what does it mean exactly to you when a user says 'refresh' the feed?
The straight forward way is to populate some collection, say an NSMutableArray, with whatever you bring down from the feed. If a wi...
After I thought that I've understood how they work, I tried this:
NSString *str1 = [NSString stringWithCString:"one"];
NSString *str2 = [NSString stringWithCString:"two"];
NSLog(@"str1: %x, %@", &str1, str1); //bfffd3cc, one
NSLog(@"str2: %x, %@", &str2, str2); //bfffd3c8, two
str1 = str2;
NSLog(@"str1: %x, %@", &str1, str1); //bfffd3c...
Hi,
I think I'm going to have to use the Crypto libraries in my iPhone application. I wanted to ask you about the implications regarding the crypto export policy applied by Apple. Do I need to do something extra (such as filling forms etc.)
1) If I use hashing with MD5.
2) If I use symmetric encryption.
Thanks,
...
For trying out some pointer stuff, I made an instance variable in an existing project. It's just declared like this:
@interface PointerFun : NSObject {
NSString* test;
}
I have no @property compiler directive, no @synthesize, so no getter and no setter. Just for testing.
Then I have a method, where I try around some things with p...
I've been a Java developer for 10+ years now, and have come to love the power that modern IDEs provide for things like refactoring, finding dead code, finding "usages of", etc. I'm starting to do some iPhone dev on the side, and am utterly frustrated by the lack of such features in XCode. There is no "find usages of this method/class" ...
Although I think that I've got that now (the light bulb is pretty bright now but still flickering a little bit), I'd like to read more stuff about pointers, variables, references, memory addresses, etc. Just the whole thing, i.e. what I have to understand when hearing thre term "reference" (think it's just a pointer, not sure).
So let u...
Title says it all I guess.
Is there anything wrong with doing something like
NSString * string = [ [ NSString alloc ] init ];
...
[ string release ];
or is there any value (other than best practice) in also adding
string = nil;
?
...
Is there a way to HTML encode a string (NSString) in objective-c, something along the lines of Server.HtmlEncode in .NET?
Thanks!
...
Actually I would say: yes, the Getter is the owner. So anyone who calls the Getter is not responsible for freeing the memory. Or more precisely, the object itself is the owner, but the Getter acts as a delivery mechanism of the instance variable to others. Is that right, or did I get that wrong?
...
I'm getting this error
Undefined symbols:
".objc_class_name_MyClass", referenced from:
literal-pointer@__OBJC@__cls_refs@MyClass in infoViewController.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
When referencing the static method below:
[MyClass ClickComment:self.navigationController];
MyClass is defined in a st...
Below is a block of code that runs in a separate thread from my app's main thread. How do I get the UI to update after each button gets its thumbnail? Right now it doesn't update until the whole method finishes. The buttons are already added to a UIScrollView.
(LotsGridButton is just a UIButton with some extra properties.)
- (void)fetc...