Hi, I used this notification in objective-c with success :
{
NSNotificationCenter * center = [NSNotificationCenter defaultCenter];
[center addObserver:self selector:@selector(rowSelectionDidChange:)
name:NSTableViewSelectionDidChangeNotification object:nil];
// ...
}
With Swift I got 5 errors:
selector: #selector: ( NSTableView.rowSelectionDidChange(_:)),
name:"NSTableViewSelectionDidChangeNotification",
object: nil)
I hope you can teach me. Uwe
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
the problem is not dangerous to life,
I don't want see the yellow button on top of the editor.
'Autoresizing Mask' is set to about 50 items, that works, except tableView, 10 warnings.
The tableView has 10 columns of 20 pixels width, min 10 and max 100000.
The ' Add new constraints' options are all grayed, so what ?
In an other project a warning was set for arrayController, I don't like Auto Layout,
the blue help lines are enough.
My question is : How do i can suppress this warnings ?
Kindly,
Uwe
Hello, Metal is a hard biscuit.
the first part of my project is to draw wired platonic solids, I replaced the triangle with a cube which I want to rotate with two sliders.
But I don't no how, the MTKView is the view of the viewController, the sliders will rotate too, or not ?
Would you developers use the XIP ?
I tried to archive a NSDictionary with a NSColor :
data = [NSKeyedArchiver archivedDataWithRootObject: <vrRoot> requiringSecureCoding:YES error:&error];
and I get this error :
Printing description of error:
Error Domain=NSCocoaErrorDomain Code=4864 "value for key 'NS.objects' was of unexpected class 'NSColor' (0x7ff8465d0d88) [/System/Library/Frameworks/AppKit.framework].
Allowed classes are:
{(
"'NSMutableDictionary' (0x7ff8465f9b48) [/System/Library/Frameworks/CoreFoundation.framework]"
)}" UserInfo={NSDebugDescription=value for key 'NS.objects' was of unexpected class 'NSColor' (0x7ff8465d0d88) [/System/Library/Frameworks/AppKit.framework].
Allowed classes are:
{(
"'NSMutableDictionary' (0x7ff8465f9b48) [/System/Library/Frameworks/CoreFoundation.framework]"
)}}
Then I transferred NSColor to NSArray - but the error was the same.
I want data save in Core Data, please help me ♡.
I rewrite an old project since OpenGL is deprecated and the downgrade to
High Sierra goes with the lost of the old project.
Here is the drawRect:
- (void)drawRect:(NSRect)dirtyRect
{
[super drawRect:dirtyRect];
if(backgroundColor == 1) glClearColor(0.95f, 1.0, 1.0f, 1.0);
else glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glLoadIdentity();
glTranslatef(0.0 ,0.0, -10.0);
// After mistake
I wrote PushMatrix()
glTranslatef(-0.01 ,-0.01, -10.0); // Screen Shot 0
// glTranslatef(-0.25 ,-0.25, -10.0); Screen Shot 1
glLineWidth(1.0);
glRotated(rotationX, 1, 0, 0);
glRotated(rotationY, 0, 1, 0);
glCallList(axes);
// After mistake
I wrote PopMatrix()
// Axes Vertices of xx,y,z are 1.0
// With vertices +/-0.99 nothing is drawn
[self glError];
[self.openGLContext flushBuffer];
}
I hope you Accept my Text and hope you can help me !
Mit freundlichen Grüßen
Uwe
Screen Shot 0
Screen Shot 1
Hi,
with the default values the rotation take place but changing the value not.
I bind a button to a slider action:
-(IBAction)rotateXAction:(id)sender
{
NSLog(@"%@ \n",sender);
BOOL yn = YES;
_rotationX = [_sliderX intValue];
if(yn) printf("rotationX %d \n",_rotationX); // value o.k
[self setNeedsDisplay:YES];
}
The drawRect: will not be called.
What is wrong with my code, please tell me.
Uwe