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

Generated Descriptions have Cruft #20

Open
seandenigris opened this issue Apr 26, 2018 · 1 comment
Open

Generated Descriptions have Cruft #20

seandenigris opened this issue Apr 26, 2018 · 1 comment

Comments

@seandenigris
Copy link
Owner

seandenigris commented Apr 26, 2018

E.g.:

descriptionFile
	<magritteDescription>
	^ MAToOneRelationDescription new
		reference:
			(MAContainer basicNew
				instVarAt: 1 put: Dictionary new;
				instVarAt: 2 put: MAIdentityAccessor new;
				instVarAt: 3 put: OrderedCollection new;
				yourself);
		classes: Set new;
		yourself

The #reference: and #classes: setup here is unneeded because they were not changed from the default.

Also, there is the related ugly generated argument to #classes: when the collection is not empty:

classes:
	(Set new
		add: RlPDF;
		add: FileReference;
		add: FileLocator;
		yourself)

Which would seem cleaner as: { RlPDF. FileReference. FileLocator }

@seandenigris
Copy link
Owner Author

seandenigris commented Apr 26, 2018

Fix for the first part (i.e. defaults unchanged) is to supply a default that will match that generated:

MARelationDescription>>descriptionReference
	…
		default: MAContainer new;
	…

and

MARelationDescription>>descriptionClasses
	…
		default: Set new;
	…

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

No branches or pull requests

1 participant