when setting a breakpoint in below code at the indicated line and running it in the debugger (in build 902), a line for variable Num is displayed in the "Variables in the Current Clause" window. However (with "Native View" not checked on) the line cannot be expanded by mouse click. I suppose that is not intended?
I am sorry I was confused when I answered before. An "expand" presentation will be presented as its first argument, and expand as the second term. But an unsigned doesn't expand, so this presentation will not expand.
In your case you should use a fixed presentation with a string and a "child only" component:
interface obj
[presenter]end interface obj
class obj :objend class obj
implement obj
open presenter
clauses
presenter()= mkPresenter_fixed(
fp_string("I am an obj"),
presenter::mkFP_childOnly_term("I am the expansion of an obj", compiler_version)).
end implement obj
%===interface wrapper
[presenter]end interface wrapper
class wrapper :wrapperconstructors
new :(obj).
end class wrapper
implement wrapper
open presenter
facts
obj :obj.
clauses
new(Obj):-
obj :=Obj.
clauses
presenter()= mkExpand("I am a wrapper", obj).
end implement wrapper
%===implement main
clauses
run():-Obj= obj::new(),Wrapper= wrapper::new(Obj),
stdIO::write(Wrapper,", ",Obj). %set a breakpoint hereend implement main
My brain has looked into some forgotten memory slots (or invented a story).
Though this is not what consistent with the documentation, I think this is deliberate. What happens is that a an "expand" presentation, will show/write the first argument, but expand like the native expansion of the second argument.
The reason for using the native expansion of the second argument is exactly the object case, where you want a nice string-presentation, but a straight forward expansion with all the facts, etc.