Hi, you are still alive ?
I have seen in the bindings inspector 2 textfields, "Value Transformer" and "Selector Name".
Is ValueTransformer a class and SelectorName a method ?
It would make me happy if you give me a link of this issue, but no swift code, please.
Uwe
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Activity
Hi,
in the past, before apple killed opengl, I had access to the arrayController via outlet.
Because most samples from the internet use storyboard, me too.
I use a splitViewController with a source- and and a displayViewController.
I moved the notificationCenter and the tableView notification "selectionDidChange" to the sourceViewController.
Bindings are established.
Adding a new row I get my managedObject, but it is empty 😝.
I see the merit of storyboard but I'm ready to turn back to XIB.
Uwe
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
This is not an error or warning, it appears in the console as a configuration error.
it's behind my horizon, maybe someone can tell.
Uwe
Hi,
I have no idea what happened, I got no warnings, no error.
When I used the Sandbox I got a GL_INVALID_VALUE error.
Please have I look at the attachments for illustration.
Hi,
I have different displayLists (dL) to create,
8 lists have a own name, the work fine.
Then I have a dynamic structure of dLs, they are stored in c-arrays.
After i noticed that they are not shown, I made 2 dLs which differ in color and vertices.
drawRect:
glCallLists(2,GL_UNSIGNED_INT, test);
This is my list-array:
if(contentState[0] == 1)
{
glCallLists(contentCount,GL_FLOAT, curveList);
}
contentCount = 8 and the declaration is GLfloat curveList[20]
curveList has 8 display indices.
I hope I made a mistake and you find it :)
Uwe
Hello,
I'm working on a small project to draw Lyapunov-Diagrams.
For this matter I need to show 3 images.
To show that the code is not totally wrong, I attached a NSLog, witch shows text I do not understand.
I hope you can help me.
Mit freundlichen Grüßen
Uwe
NSLog
Hi , I got this quote with 5800 repetitions (5.8 MB / 1k) :
`2023-05-25 01:02:59.021733+0200 LookAt[6404:302136] [general] *** -[NSKeyedUnarchiver validateAllowedClass:forKey:] allowed unarchiving safe plist type ''NSNumber' (0x7ff84cfe02f8) [/System/Library/Frameworks/Foundation.framework]' for key 'NS.objects', even though it was not explicitly included in the client allowed classes set: '{(
"'NSMutableDictionary' (0x7ff84cfb6b48) [/System/Library/Frameworks/CoreFoundation.framework]",
"'NSArray' (0x7ff84cfb68a0) [/System/Library/Frameworks/CoreFoundation.framework]"
)}'. This will be disallowed in the future
`
-(IBAction)readFile:(id)sender
{
NSData * data;
NSError * error = nil;
data = [_vrReadWrite readData:kFileComponentA];
NSSet * set = [_vrReadWrite setOfClasses];
_vrRoot = [NSKeyedUnarchiver unarchivedObjectOfClasses:set
fromData:data error:&error];
}```
I got the expected result, that's fine, but I'm not interested in this future.
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
Hi,
in my first project (learning) i created a class and it works fine.
In the second I set an error, i should code "override class", although there is no parent class.
Please, make me stop crying.
Uwe
Hi, with my new iMac I want to continue learning swift,
I was told that the playground is a good tool and I trust.
I got the Xcode/New/Playground file and wrote some code - see it :
```import Cocoa
var greeting = "Hello, playground"
for i in 1...10{
print (i)
}
The same code runs on Xcode 9.2 (9C40b)
I can't help myself 🥲
Uwe
Edit:
I downloaded Michael Kofler's Swift 5 examples and they even did not run
Hello,
here is the block where arrayController is nil :
{
NSData * data;
NSError * error;
Class klass;
if(_arrayController != nil) // nil !
{
selected = [_arrayController selectedObjects];
arranged = [_arrayController arrangedObjects];
if([selected count] > 0)
{
_currentObject = [selected objectAtIndex:0];
if(_currentObject != nil)
{
data = [_currentObject valueForKey:kVrRoot];
klass = [NSMutableDictionary class];
_vrRoot =
[NSKeyedUnarchiver unarchivedObjectOfClass:klass fromData:data error:&error];
}else
{
_vrRoot = [NSMutableDictionary new];
data = [NSKeyedArchiver archivedDataWithRootObject:_vrRoot requiringSecureCoding:YES error:&error];
}
}
}
}
I use this for years so I don't no what's wrong.