[Pharo-project] Problem in OBCmdCreateCategory (and probably Rename...)

Friedrich Dominicus frido at q-software-solutions.de
Fri May 13 16:14:29 CEST 2011


I'M not sure how to send patches and so we go.

the execute implementation of the above class give an error
while  calling self categories sorted

Set does not understand ordered is the message.

Well  I hacked it like this:
execute
	| categories category before |
	categories := self categories asOrderedCollection sorted.
                                  ^^^^^^^^^^^^^^^^^^^
	category := OBCompletionRequest new
		assisted: true;
		collection: categories;
		prompt: 'Add Category';
		signal.
	category isNil ifTrue: [ ^ self ].
	before := requestor children
		at: requestor selection + 1
		ifAbsent: [ nil ].
	target organization
		addCategory: category
		before: (before isNil
			ifFalse: [ before name ]).
	self 
		select: (target categoryNodeNamed: category)
		with: requestor announcer

Probably bad as hell but "it works"

Regards
Friedrich



More information about the Pharo-project mailing list