[Glass] Strange source import behaviour ..

via Glass glass at lists.gemtalksystems.com
Sat Dec 19 12:45:23 PST 2015


[Re-send, to include list]

On 19.12.2015, at 18:43, Tobias Pape <Das.Linux at gmx.de> wrote:

> Hi Marten
> On 19.12.2015, at 17:16, Marten Feldtmann via Glass <glass at lists.gemtalksystems.com> wrote:
> 
>> This following code is a small part of the source code I generate 
>> for my model. The source code is embedded in a shell script and 
>> the source code is imported via topaz.
>> 
>> Please look at the line 
>> 
>> (Date fromString: value usingFormat: #(3 2 1 $-  1 1 ))
> 
> Are you starting something from a shell script? $- is a special variable,
> that can get expanded to things like hB. My shell, for example has '569XZgilms'
> and when I run
> 
> 	sh -c 'echo $-'
> 
> it looks awfully similar to yours:
> 
> 	hBc
> 
> You may either want to quote the $ (as in \$-) or 
> file in from a file itself.
> 
> Best regards
> 	-Tobias
> 
>> 
>> ALL occurences of this source code is converted to:
>> 
>> 
>> (Date fromString: value usingFormat: #(3 2 1 hB  1 1 ))
>> 
>> 
>> in the database .... ?????????
>> 
>> 
>> Marten Feldtmann
>> 
>> %
>> category: 'model-json-support'
>> set compile_env: 0
>> classmethod: ES3APIElection
>> pumSimpleSwaggerModelNeoJsonMapping: mapping
>> 
>>    " Generator: 'Topaz/Gemstone (REST Server Smalltalk)' Version: '08.06.02-02.05.17' LastRun: '2015_12_19_10_24_04' "
>>    " Model-Version: '1.1.115'  "
>> 
>>    mapping
>>        mapProperty: #electionDate
>>        getter: [ :object | | value | ((value := object getElectionDate) ~= UndefinedObject and:[ value isNil not ]) ifTrue: [ value asStringUsingFormat: #(3 2 1 $-  1 1 ) ] ifFalse:[ nil ]]
>>        setter: [ :object :value | value ifNotNil:[ object setElectionDate: (Date fromString: value usingFormat: #(3 2 1 $-  1 1 )) ]].
>> 
>> _______________________________________________
>> Glass mailing list
>> Glass at lists.gemtalksystems.com
>> http://lists.gemtalksystems.com/mailman/listinfo/glass
> 



More information about the Glass mailing list