|
Escaping cannot be mixed with values: msg#00044lang.scala
Hello, I am new to Scala and tried some of the XML examples I found on the net. One of the examples I began was the "phonebook3" example changing the phone number. I noticed the example did not work as I expected so I replaced the XML literals to Elem construction style - to get a correct syntax highlighting in JEdit - and this is the part I have a problem with: --------------------- else // was present and changed /* original XML literal style code: <entry> <name>{ Name }</name> <phone where={ Where }>{ ch2 }</phone> </entry> */ Elem(null, "entry", Null, TopScope, /* Elem(null, "name", Null, TopScope, Text(Name)), <- this I could not used together with escaping ch2 */ ch2:_*) ------------------- The original code attempts to replace the <phone ...> entries but instead embeds the changed <phone ..> entries represented by 'ch2' within a 'dummy' <phone...> entry. The solution to the problem would seem to uncomment the line before the last ------------------- /* Elem(null, "name", Null, TopScope, Text(Name)), */ ------------------- but then I recieved an error message saying: ------------------- /phonebook3.scala:59: escaping cannot be mixed with values ch2:_*) ------------------- True, I wanted to place a name entry followed by the sequence of the new phone numbers stored in 'ch2'. Can someone help a beginner how to solve this ? regards, Balazs |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: addJavaBeanMethods: 00044, joel |
|---|---|
| Next by Date: | Re: issue with inherited static members in java interfaces (possible bug?): 00044, Adriaan Moors |
| Previous by Thread: | issue with inherited static members in java interfaces (possible bug?)i: 00044, Jason Kinzer |
| Next by Thread: | Re: Escaping cannot be mixed with values: 00044, Burak Emir |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |