Hi,
When I try running the python script below in Rhino for Mac I get an error. The MessageBox function usually works, but EditBox function won’t. When I run the script Rhino freezes and I have to use force quite in the Activity Monitor. Is this a problem specific to Mac, or am I just doing something wrong?
Script:
import rhinoscriptsyntax as rs
text = rs.EditBox(message=“Enter some text”)
rs.MessageBox(text)
Error Message:
Message: Method not found: ‘System.Windows.Forms.Form.set_AcceptButton’.
Traceback:
line 70, in EditBox, "/Users/davidsnaddon/Library/Application Support/McNeel/Rhinoceros/MacPlugIns/IronPython/settings/lib/rhinoscript/userinterface.py"
line 3, in , “/Users/davidsnaddon/Documents/Rhino Design/DBox.py”
Also, forgot to mention. I am running on rhinoceros_wip_20131023, on OS Mavericks downloaded on 2013/10/23, on a 2009 MacBook Pro
Yes, all the “box” user input methods (ListBox, etc.) use WindowsForms code, which do not run on a Mac and most often cause Rhino to crash. It’s on the list to be adapted, but I don’t know when it will be fixed. The only thing you can use reliably for use input are the “Get” methods - such as GetString. Since the Mac doesn’t have a command line by default, this pops up a (Mac)box anyway.
HTH, --Mitch
Oh ok. Thanks very much!
Was quite confused that MessageBox works and not EditBox, because MessageBox is described as a Windows message box in the RhinoPython reference (http://4.rhino3d.com/5/ironpython/index.html), so just thought they would have the same limitations on Mac.
I guess message box is hooked up because it was easy to do…
– Mitch