Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: treat non-existant XML attributes correctly #287

Closed
wants to merge 1 commit into from
Closed

Fix: treat non-existant XML attributes correctly #287

wants to merge 1 commit into from

Conversation

mattbauch
Copy link
Contributor

Xcode omits the optional attribute in its XML model output if
it is set to not-optional, but NSPropertyDescription.optional
defaults to YES.
To be on the safe side I decided to treat all Booleans the same.
Currenlty only optional was affected, because it's the only
attribute which default is YES.

That should fix issue #286

Xcode omits the optional attribute in its XML model output if
it is set to not-optional, but `NSPropertyDescription.optional`
defaults to YES.
To be on the safe side I decided to treat all Booleans the same.
Currenlty only optional was affected, because it's the only
attribute which default is YES.

That should fix issue #286
@BrianBatchelder
Copy link

Your fix also needs two lines changed in machine.swift.motemplate:

-    public var <$Attribute.name$>: NSNumber?
+    public var <$Attribute.name$>: NSNumber<$if Attribute.isOptional$>?<$endif$>
...
-    var <$Attribute.name$>: NSNumber?
+    var <$Attribute.name$>: NSNumber<$if Attribute.isOptional$>?<$endif$>

@justin
Copy link
Collaborator

justin commented Mar 22, 2016

We are declaring pull request and issue 0 now that 1.3 is out. If this is still an issue you'd like to see address with 1.30 and going forward, please open a new issue so we can start a fresh discussion. Thank you!

@justin justin closed this Mar 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants