|
I do not know Objective-C or Swift, but your description sounds like you have copied the object references instead of the actual content.
|
|
|
|
|
help me how can i correct this...
|
|
|
|
|
As I stated in my previous message, "I do not know Objective-C or Swift". So you need to look at what your code is actually doing and why it is not doing deep copy operations. Hint: you could always try the documentation for whichever language you are using.
|
|
|
|
|
You need to clone the contents of the source array. [copy] method of NSMutableArray makes a reference copy with new array variable hence your content in backup array gets updated when you update source array. Use
NSMutableArray initWithArray to create a clone of source array but with new reference pointer to it. Hope it helps.
|
|
|
|
|
I don't think this message was meant for me.
|
|
|
|
|
hi all,
please guide me to how to access connected webcam in my machine and capture the image from camera.
thanks in advance.
|
|
|
|
|
What machine are you trying to access the web camera from? What language are you using?
This space for rent
|
|
|
|
|
i have mac mini and use objective c for this.
|
|
|
|
|
Check the documentation of your camera. The manufacturer might also provide an SDK with example code.
If that does not help search the web using the keywords Mac and/or Objective-C and your camera model.
|
|
|
|
|
thank u
i found a sample
[^]
but here not explain how to i use it in my nswindowcontroller class.
please help
|
|
|
|
|
I'm sorry but I have not programmed for the Mac so far.
How about using the comment section at your link?
|
|
|
|
|
Hi all,
i want to add textfield and checkbox in a box.
i use size to fit option for fox after adding control, its resize the box but change the location of box upward .
i don't want to change the location of box,
i want when i add control box increase height at downward.
please help me for this.
|
|
|
|
|
|
Member 13195612 wrote: Need help You certainly do.
|
|
|
|
|
hi all,
when i trying to print or preview multiple pages from my application
i got this
exception
Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.'
i really don't understand
what can i do here.
in printing i pass an image creating from rendering of my customise view.
please help me for this.
if there is a one page its working fine
but when i create different image at time of printing its crash
crash log:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread: 7
Application Specific Information:
abort() called
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Printing failed because PMSessionEndDocumentNoDialog() returned -30871.'
Thread 7 Crashed:
0 libSystem.B.dylib 0x00007fff837d59ce __semwait_signal_nocancel + 10
1 libSystem.B.dylib 0x00007fff837d58d0 nanosleep$NOCANCEL + 129
2 libSystem.B.dylib 0x00007fff838323ce usleep$NOCANCEL + 57
3 libSystem.B.dylib 0x00007fff83851a00 abort + 93
4 libstdc++.6.dylib 0x00007fff8791f5d2 __tcf_0 + 0
5 libobjc.A.dylib 0x00007fff8116cb39 _objc_terminate + 100
6 libstdc++.6.dylib 0x00007fff8791dae1 __cxxabiv1::__terminate(void (*)()) + 11
7 libstdc++.6.dylib 0x00007fff8791db16 __cxxabiv1::__unexpected(void (*)()) + 0
8 libstdc++.6.dylib 0x00007fff8791dbfc __gxx_exception_cleanup(_Unwind_Reason_Code, _Unwind_Exception*) + 0
9 libobjc.A.dylib 0x00007fff81168fa2 object_getIvar + 0
10 com.apple.CoreFoundation 0x00007fff800b45d7 +[NSException raise:format:arguments:] + 103
11 com.apple.CoreFoundation 0x00007fff800b4564 +[NSException raise:format:] + 148
12 com.apple.AppKit 0x00007fff8556086e -[NSPrintSpoolingGraphicsContext dealloc] + 37
13 com.apple.CoreFoundation 0x00007fff80030fc3 __CFArrayReleaseValues + 435
14 com.apple.CoreFoundation 0x00007fff8000eaa3 _CFRelease + 179
15 com.apple.AppKit 0x00007fff8500b53d __NSAppKitFinalizeThreadData + 260
16 libSystem.B.dylib 0x00007fff8379c751 _pthread_tsd_cleanup + 187
17 libSystem.B.dylib 0x00007fff8379c39c _pthread_exit + 147
18 com.apple.Foundation 0x00007fff83bd227f __NSFinalizeThreadData + 0
19 com.apple.Foundation 0x00007fff83bd2217 __NSThread__main__ + 1448
20 libSystem.B.dylib 0x00007fff8379bfd6 _pthread_start + 331
21 libSystem.B.dylib 0x00007fff8379be89 thread_start + 13
..
please help
modified 5-Apr-17 8:11am.
|
|
|
|
|
Before the task finish r u sending another image to print. The error seems to be like this. In case of multiple images all images should be in a queue , First come first serve. Till one job is not done . another image should wait.
|
|
|
|
|
i send image to printing one by one ,this happens when page is change to second page
on single page it print multiple images without any problem.
|
|
|
|
|
I want to get the magnetic induction intensity, light intensity, the object distance phone
|
|
|
|
|
|
hi all,
i have an image with god quality even when i view it in preview and zoom its gud and not pixelate.
i have create an custom view class derived from NSView, to draw text above and below the image. and resize the image
inside the custom view class in -drawRect method, i draw the text and image.
with help of NSMutableAttributedString drawinRect and NSImage drawInRect methods.
than get final image like this.
<pre lang="objc">
OffscreenView *view = [[OffscreenView alloc] initWithImage:myimage];
NSRect rect = [view bounds];
NSData *data = [view dataWithPDFInsideRect:rect];
NSImage *image_bar = [[NSImage alloc] initWithData:data];
buts this image quality is very badges compare to original image i pass to view.
please help me to get god quality image here.
modified 17-Jan-17 1:09am.
|
|
|
|
|
does it compressing the image volume as well .
|
|
|
|
|
|
Dear Members,
Is it possible for two apps to simultaneously access microphone under iPhone. We want to develop a Skype recorder for iPhone but need to determine the possibility.
In Android we were getting problem in shared access of microphone but on Windows 7 desktop shared mode for microphone worked.
Thanks,
|
|
|
|
|
Hello!
I am new to this forum, and new to programming, although I have already reached chapter 18
of Programming in C textbook.
Please, take a look at the program I typed in from the book, and warning messages I receive.
I would be grateful for explanation on what I am doing wrong. I work on Mac OS 10.7.5, Xcode 4.6.3,
Terminal 2.2.3.
1) I created a file with the command:
touch prog18-2.m// Program ot work with fractions - Objective-C version
2) Program
#import <stdio.h>
#import <objc object.h="">
//------ @interface section ---------
@interface Fraction: Object
{
int numerator;
int denominator;
}
-(void) set_numerator: (int) n;
-(void) set_denominator: (int) d;
-(void) print;
@end
// ----- @implementation section -------
@implementation Fraction;
// getters
-(int) numerator
{
return numerator;
}
-(int) denominator
{
return denominator;
}
//setters
-(void) set_numerator: (int) num
{
numerator = num;
}
-(void) set_denominator: (int) denom
{
denominator = denom;
}
//other
-(void) print
{
printf("The value of the fraction is %i/%i\n", numerator, denominator);
}
@end
//-------- program section -----------
int main(void)
{
Fraction* my_fract;
my_fract = [Fraction new];
[my_fract set_numerator: 1];
[my_fract set_denominator: 3];
printf("The numerator is %i, and teh denominator is %i\n", [my_fract numerator], [my_fract denominator]);
[my_fract print];
[my_fract free]; //frees the memory that was used by Fraction object
return 0;
}
3) I compiled it with:
gcc -framework Foundation prog18-2.m -o prog18-2
4) Terminal generated the following:
prog18-2.m: In function ‘main’:
prog18-2.m:58: warning: ‘Fraction’ may not respond to ‘+new’
prog18-2.m:58: warning: (Messages without a matching method signature
prog18-2.m:58: warning: will be assumed to return ‘id’ and accept
prog18-2.m:58: warning: ‘...’ as arguments.)
prog18-2.m:71: warning: ‘Fraction’ may not respond to ‘-free’
Thank you!
|
|
|
|
|
'Fraction' class is subclass of 'Object'. But 'new' method is available in 'NSObject' class. That is the reason why it its showing warnings for you.
|
|
|
|