Hi,
the “NSDictionary” in ElementsWiki is currently empty.
I’ve translated this ObjC Code to Oxygene, except the last line.
What’s the currect Nougat Syntax to initialize the NSDictionary with values?
UIFont *font = [UIFont fontWithName:@"Courier" size:kCellFontSize];
// Make a copy of the default paragraph style
NSMutableParagraphStyle *paragraphStyle = [[NSParagraphStyle defaultParagraphStyle] mutableCopy];
// Set line break mode
paragraphStyle.lineBreakMode = NSLineBreakByTruncatingTail;
// Set text alignment
paragraphStyle.alignment = NSTextAlignmentRight;
NSDictionary *attributes = @{ NSFontAttributeName: font,
NSParagraphStyleAttributeName: paragraphStyle };
I wish you a happy new year and many successes in 2014.
i’m afraid we don’t have a syntax for dictionary literals, right now (neither on Cocoa nor on .NET), in Oxygene. it’s on the list, but until then you;ll need to use one of the initializer methods such as dictionaryWithValues:forKeys: or whatever it’s called, manually. or of course create a NSMutableDictionary, and call setObject:forKey, as you did.
we DO have an issue logged to add a syntax for this in the future.
Isn’t a big problem.
We can manage that using InitWith... and setObject() forKey().
Marc,
why has “deksden” an ObjC Oxydizer and whether it is right that this Oxydizer is missing in my Oxygene Beta 7.0.62.1431…? Do I have to install the latest RTM to get the ObjC Oxydizer?
I use Alpha 7.0.62.1431 (from Dec.20) on two PCs.
There is no Oxydizer for Objective-C in both installations.
Neither in solution explorer (Add->Import Objective-C) nor in the context menu (Oxydizer -> Paste ObjC as Oxygene).