[Glass] Valid characters in unary message

BrunoBB via Glass glass at lists.gemtalksystems.com
Mon Mar 2 15:12:20 PST 2015


Hi,

I have a meta model of Workflow of Forms and at some point i added the
possibility to apply a query Block to FormInstance (in the workflow to
choose a path) that answer true or false.

The evaluation is like:
[:form | form age > 20 and:[form level = 3]]

FormInstance rewrite #doesNotUnderstand:
doesNotUnderstand: aMessageDescriptor
	^(self hasFieldNamed: aMessageDescriptor selector)
	ifTrue: [(self valueAt: aMessageDescriptor selector asString) value]
	ifFalse: [super doesNotUnderstand: aMessageDescriptor]

Until now everything is OK. But the Form application is a Java Application
and a form name can be "person-age" (not problem with "person_age").

Since "-" is a binary message "form person-age" is not recognized as a
message. I almost sure that is not possible to make character "-" legal in a
unary message. 
Is this correct ?

Of course in the import process i can detect fields name with "-" character
and show an error or warning.
Another solution is to put in the user manual if the field name has "-"
character you have to use perform:
[:form | (form perform: 'person-age') > 20] "this is working"

But may there is a very very smalltalk chance to make "-" a legal character
in unary message ?

Regards,
Bruno



--
View this message in context: http://forum.world.st/Valid-characters-in-unary-message-tp4808998.html
Sent from the GLASS mailing list archive at Nabble.com.


More information about the Glass mailing list