Hi Stef, URL is a helper, so it really creates a gluon.html.XML object.
What you want in this case is the string: URL("call", "run", "Set_Page", args="77").xml() Denes On Oct 18, 7:52 pm, Stef Mientki <stef.mien...@gmail.com> wrote: > hello, > > I'm trying to call a service from menu buttons, > and I read somewhere in the manual, you should always use URL() > > Now this works: > LSB_Menu.append ( [ 'Stef3',"call/run/Set_Page/77" ]) > > But the following don't (while printing the URL result, looks ok), why ?? > #LSB_Menu.append ( [ 'Stef4',URL("call", "run", "Set_Page", args="77" ) ]) > #LSB_Menu.append ( [ 'Stef5',URL("call", "run", "Set_Page", vars="77" ) ]) > #LSB_Menu.append ( [ 'Stef5',URL("call", "run", "Set_Page", "77" )]) > > # this is the service > from gluon.tools import Service > service = Service(globals()) > def call(): > return service() > @service.run > def Set_Page(Nr): > return dict ( m='aap',b=99,c=Nr) > > thanks, > Stef Mientki