Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [ptp-dev] Need method to post error messages in parallel tab

Dave,

It's working for me.  You may have missed a crucial piece of code that
makes it work...

Take a look at the example in
org.eclipse.ptp.orte.ui.rmLaunchConfiguration.ORTERMLaunchConfigurationDynamicTab.java

Lines 103-111 add a ModifyListener to the text widget where one enters
the number of process.  As one types into the widget this listener's
modifyText(e) method is called.  This method first sets the
numProcsString string, and then calls fireContentsChanged(), which is
defined in AbstractRMLaunchConfigurationDynamicTab.  The
updateLaunchConfigurationDialog() method will be called, which
leads to ORTE...DynamicTab's isValid() method being called.  The
isValid() method checks the validity of the numProcsString, and
sets the error message.

I've left out some intermediate steps.

Are you doing something like this and still not seeing the
error messages?

R^2

On Thu, 2007-05-31 at 11:29 -0400, Dave Wootton wrote:
> I'm working on my implementation of 
> AbstractRMLaunchConfigurationDynamicTab where I need to validate the 
> values for a number of fields, and issue an error message when a field is 
> invalid. I can return a RMLaunchValidation object with error message from 
> canSave() or isValid() but the error message shows up only when these 
> methods are called, and not as the user is interactively filling in the 
> panel, which I suspect is the preferred behavior.
> 
> I don't think I have access to the ParallelTab object, which I think I 
> need to get the message displayed. If I'm missing something, can you 
> explain how I should do this? Otherwise, can some method be provided to 
> display error messages?
> 
> This isn't urgent, since for now while I am developing this code, I can 
> use a println statement, and implementing a method call later should be a 
> 1 line change for me.
> 
> Thanks
> Dave
> _______________________________________________
> ptp-dev mailing list
> ptp-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/ptp-dev



Back to the top