Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations Ron247 on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Journal str = GetInputString(s1, s2, input_str) how to distiguish between cancel and nul string

Status
Not open for further replies.

Ehaviv

Computer
Jul 2, 2003
1,012
Hi

One of the user alowed input is nul string So in the following command

str = GetInputString(s1, s2, input_str)

How I can distiguish between a 'cancel' and a 'nul string'

Thanks in advanced

 
Replies continue below

Recommended for you

My journal use the iput_str to display info to the
User and the user can change or delete this info
So I can not use a space

Thank you for the this respont
 
Is a null string a valid response from the user? If so, I don't know of a good way to distinguish between a "cancel" operation or a null input operation. Perhaps a custom input form would solve your issue.

www.nxjournaling.com
 
yes I was suspected that
Do I can insert a custom form inside a loop
My journal is going to repeatedly let the user
select something and the journal will display adequate
info and the user can change or delete this info

Thank you for trying to help
 
a984928 said:
Do I can insert a custom form inside a loop

If you have a block styler license, you should probably use that. If you are working on a Windows machine with no block styler license, you can use a Winform:

I've heard of others creating custom input forms through Java or Python, but I don't have any examples of that.

www.nxjournaling.com
 
If I take the example from

Do I can do this

While SelectNoteorLabel(obj, cursor) = Selection.Response.Ok

'My code here

'display our form
myForm.ShowDialog()

If myForm.Canceled Then
'user pressed cancel, exit journal
Return
Else
'user pressed OK, assign value from form to part attribute
_attributeValue = myForm.AttributeValue
workPart.SetUserAttribute(_attributeTitle, -1, _attributeValue, Update.Option.Later)

End If

'My code here

End While

Thank you again
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor