Dear Mark,

'illegal use of nesting marker'

This is one of those issue a Mozart user must learn to deal with, and it took me a while too :) The nesting marker $ simply indicates a return value from within some nested construct. You can always avoid using a nesting marker, by using explicit variables instead. Here is an example.

X = {MyObject get($)}

can be written as

{MyObject get(X)}

Sometimes you may need to introduce an additional variable.

Best
Torsten

--
Torsten Anders
Interdisciplinary Centre for Computer Music Research
University of Plymouth
Office: +44-1752-586219
Private: +44-1752-558917
http://strasheela.sourceforge.net
http://www.torsten-anders.de





On 7 Oct 2008, at 12:59, MARK RICHARDSON wrote:

Hi,

I've attempted to design a graphical interface to allow input of a partial sudoku puzzle. I have created handles using the feature:..... method so that I can dynamically name the handle of each number box.

The function below is called 9x9 times (a function calls this one 9 times, then another calls that 9 times)to create 81 entry+list boxes. The handles for each entry and listbox pair are 'E1' 'L1' , 'E2' 'L2' , etc up to, 'E81' 'L81'

fun {NumEnt X}
lr(entry(init:"" feature:{String.toAtom &E|{Int.toString X}} glue:nsew width:3)
      dropdownlistbox(init:[1 2 3 4 5 6 7 8 9]
                      feature:{String.toAtom &L|{Int.toString X}}
                      action:proc {$}
{Desc.{String.toAtom &E| {Int.toString X}} set(Desc.{String.toAtom &L|{Int.toString X}} get ($))}
                             end
                     ))
end

The problem I am having is defining the action parameter for the dropdownlistbox - namely that it should update it's associated entry box. The error I am getting is an 'illegal use of nesting marker' which I've tracked down to the get($) function. Trouble is I can't see any other way to do this.
Any help would be great!

Regards
Markeach entry and listbox pair are 'E1' 'L1' , 'E2' 'L2' , etc up to, 'E81' 'L81'

fun {NumEnt X}
lr(entry(init:"" feature:{String.toAtom &E|{Int.toString X}} glue:nsew width:3)
      dropdownlistbox(init:[1 2 3 4 5 6 7 8 9]
                      feature:{String.toAtom &L|{Int.toString X}}
                      action:proc {$}
{Desc.{String.toAtom &E| {Int.toString X}} set(Desc.{String.toAtom &L|{Int.toString X}} get ($))}
                             end


______________________________________________________________________ ___________ mozart-users mailing list mozart- [EMAIL PROTECTED]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to