[Glass] Valid characters in unary message

James Foster via Glass glass at lists.gemtalksystems.com
Mon Mar 2 15:29:53 PST 2015


I don’t think that anything that could be interpreted as a binary message should be legal as a character in a unary message. 

How would we distinguish the following:

| a b c d |
a := b c-d.	“unary message (#’c-d’) only"
a := b c - d.	“unary message (#’c’) followed by binary message (#’-‘) ”


> On Mar 2, 2015, at 3:12 PM, BrunoBB via Glass <glass at lists.gemtalksystems.com> wrote:
> 
> 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.
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass



More information about the Glass mailing list