- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Capture logging into new window
I'm trying to capture the logging information into new window. Following code isn't showing anything in new window.
This is a first step towards an integrated GUI where "log" is also a tab and can be checked instantly to view logging instead of going to JMP logging page which is separate window.
logging = New Window("Logging",
xx=Border Box( Left( 10 ), Right( 10 ), Top( 5 ), Bottom( 5 ), Sides( 15 ),
all contents = Get Log();
logging_capture = Text Edit Box();
logging_capture << Set Text(all contents);
)
);
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Capture logging into new window
'GetLog()' returns a list, so you have to parse it into text strings before putting it in the TextBox(). In so far as your application is user controlled, then the 'automated' logging doesn't sound too hard - You just need to ask every button that the user might press to get the new contents of the log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Capture logging into new window
have you looked into projects at all?
Names default to here(1);
p = new project();
p << Run Script(
New Window("Script 1",
Set Window ID("Script"),
<<Script("Names Default to Here( 1 );\!n")
);
);
p << Set Layout(
H Splitter Box(
<<Dockable(),
VSplitterBox(
<<Dockable(),
Tab Page Box(Title( "Window List" ),Window ID( "Window List" )),
Tab Page Box(Title( "Bookmarks" ),Window ID( "Bookmarks" )),
Tab Page Box(Title( "Recent Files" ),Window ID( "Recent Files" ))
),
TabBox(
Tab Page Box( WindowID("Script") ),
Tab Page Box( Title( "Log" ), Window ID( "Log" ) )
)
)
);
All scripts also have an embedded log available if that's something you like better too. If you right click a script window, you should see "Show Embedded Log".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Capture logging into new window
My problem is, I'm trying to have another tap in my integrated gui where realtime logging is seen. So that user can just click that tap and see the og instead of going to another window.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Capture logging into new window
'GetLog()' returns a list, so you have to parse it into text strings before putting it in the TextBox(). In so far as your application is user controlled, then the 'automated' logging doesn't sound too hard - You just need to ask every button that the user might press to get the new contents of the log.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Capture logging into new window
Bang on target! Thanks. Below captures the log in a window.
logging = New Window( "Database Query",
dataB = Border Box( Left( 10 ), Right( 10 ), Top( 10 ), Bottom( 5 ), Sides( 15 ),
V List Box(
Text Box( "logging data", set font size( 10 ) ),
all_contents = Get Log(),
x = N Items( all_contents );
text="";
logging_capture = Text Box(),
For( i = 1, i <= x, i++,
text = text ||all_contents[i] || "\\!n";
);
logging_capture << Set Text( text);
)
)
);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
Re: Capture logging into new window
is there any alternative to Get Log(); which captures print/show/write functions only? I can then get very selected log printed. I will also read in the documentation to find if anything available.