Closed Smurf-IV closed 4 years ago
The plugin I want to run takes the MetaData (attributes) from the object-blocks and validates its:
Ok... I've added a console window:
Which is accessible via an Addin's Model.Console
property or in the Commander addin (as above) in Model.AppModel.Console
There are Write()
, WriteLine()
, Clear()
, Show()
, Hide()
methods on the console (beyond UI properties for the panel control).
Writing to the console will open it. There's also a toggle menu option on the View menu now as well as buttons on the window to close and clear content.
Thanks for this. Just had an exception when trying to call this during Load: Should this cache the message, or return a useful error, as everything that is being used (i.e. even Console) is not null therefore not testable via plugin code.
Also: (Should this be raised as a separate [Bug] as this is not a released feature yet?)
If you dump a large amount of text on the first API call (i.e.WriteLine
with lot's of lines and carriage return within it!), the Console Window fills the entire app screen.
It does not limit it's size to 10 lines etc.
Also: Each new line written the Console makes the console window size increase (Probably the cause of the previous comment) This is the version i am using:
Setting the MaxHeight to 40 has a weird effect:
Please try 1.20.10. There have been several updates to the console panel.
Without specifics, of what 1.2.10.1 gave; I just tested the window height, after each add. It filled the screen as before:
I don't understand what you're saying. Are you saying the window grows each time you add something when the window is full?
I don't see that here. The console should scroll down with new entries showing the last entry.
I don't understand what you're saying. Are you saying the window grows each time you add something when the window is full?
Yes, It starts small, and then continues to grow up the screen until it occupies the whole of the MM app area as each line is added.
Code snippet below:
public class AddItAll : MarkdownMonster.AddIns.MarkdownMonsterAddin
{
...
public override void OnDocumentUpdated()
{
base.OnDocumentUpdated();
var doc = Model.ActiveDocument;
if ((doc != null)
&& doc.IsActive
)
{
...
Model.Console.WriteLine(text);
...
}
}
...
}
I have just recreated the scroll bar, and now I know Why you may not be seeing the issue.
If I resize the console window after it has been created (By using the mouse) I get a scrollbar and everything is as you describe.
BUT, If I do nothing but just edit away inside the editor without resizing the console after it has displayed, then I get the problem as i have described. HTH.
Why was this closed? It's still an issue!
Because it's fixed with the above fix. Grab 1.20.10.3...
It auto-closed with the commit.
I can confirm that the scrollbar is on by default and works as expected with v1.20.10.3. Thanks
I'm not sure that this is needed.
If you're creating an addin you can create your own window and I would argue that it's better to display any sort of console info in that window rather than on the main window.
What would you want to display there? We do have the status bar for basic messages and notifications.