Hi, here a little test sample, I've built it from the logic of my app, but it should be enough.
----------8<---------------- #include "hbclass.ch" class test method New() method Num() endclass method new() class test return self method num() class test return 1 function main() private oT := Test():New() private x := 0 with object oT &( "x := :Num()" ) end ? x return ------------>8---------------- Adding hb_QWith() before :Num() it works, xharbour does not require this and it comes really handy, I'm using this with an interpreter to have a dynamic web page where .prg code is mixed with html and can output code calling a method of an object which abstracts the CGI interface like in :cgiOut( "...." ) or get an envvar with myvar := :Server_Name and so on. Is it possible to have such capability inside harbour macro compiler? Maurilio. Maurilio Longo wrote: > Hi, > > I'm trying to rebuild a project of mine with harbour (it was developed with > xharbour) but I'm facing a problem, it seems that an object I'm accessing with > a "with object xxx" does not work inside macro compiler. > > Example: > > with object MyObject > > &( "{|| x := :MyMethod() }" ) > > end > > It gives a syntax error & > > This is code which has been working for years, so maybe I'm overlooking > something, but before I start digging deeper I'd like to know better about > this issue. > > Maurilio. > > -- __________ | | | |__| Maurilio Longo |_|_|_|____| farmaconsult s.r.l. _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour