Grasshopper

algorithmic modeling for Rhino

[Oversight] GH_RuntimeMessageLevel.Remark does not add string message to the pop up balloon

Just as it says.  Perhaps I am not implementing this correctly, but I just want to add a remark in certain places (not necessarily a warning).  If I do this, the component turns Galapagos Magenta, and a little silver bubble pops up, but the message I am trying to pass through does not show up in the bubble.  Is this an oversight?  For example:

AddRuntimeMessage(GH_RuntimeMessageLevel.Remark, "Converting the brep to a mesh.  If you want to control this, convert the brep to a mesh before using this component.");

The same works if I use GH_RuntimeMessageLevel.Warning or Error.

Thx.

Views: 827

Replies to This Discussion

Yeah at the moment only Warnings and Errors are supported on the canvas. The GH_RuntimeMessageLevel.Remark value is only used at present when sending messages to the Grasshopper main window status bar.

I'll see if I can add support for remarks on the canvas as well.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

I see, but I guess these are replaced pretty immediately if Autosave options are set to trigger often? 

If possible, it would be nice to be able to throw a remark in certain cases where a warning or an error are not desired...no need to turn the component magenta though!

All messages are erased whenever the object expires. Then whenever you call AddRuntimeMessage() it gets stored in a list until the next time the object expires.

Messages are not (de)serialized so I don't see what AutoSave has to do with it.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

You said

The GH_RuntimeMessageLevel.Remark value is only used at present when sending messages to the Grasshopper main window status bar.

I assumed this means it displays the message in the bottom status bar where Autosave messages usually appear?  If so, the message would be wiped out by an Autosave message? 

Where does the remark message actually get displayed?  Is it automatic?

Ah, the statusbar shows all sorts of information. When you save the file is gets shown there. When a solution takes a long time to complete it will show this time. Anyone can choose to send a message to the statusbar using Instances.DocumentEditor.SetStatusBarEvent()

These messages use the same enumeration for Remark/Warning/Error indication, but they have otherwise nothing to do with Runtime messages on components.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Remarks now work. I also made it so that the same message is never recorded more than once. A left click on the message balloon now shows all messages.

I'm confused about the pink palette though. Are you doing this on a GH_Component?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

This is what I get when I use a Remark instead of Warning or Error...Yes, this is a GH_Component derived component...

It could be I already changed that in the past six months then. Adding remarks now just keeps the component looking regular.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service