Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF Parsley » Calling a method on Button Push(Calling a method on Button Push)
Calling a method on Button Push [message #1781565] Thu, 08 February 2018 16:58 Go to next message
Dominik Nickl is currently offline Dominik NicklFriend
Messages: 1
Registered: February 2018
Junior Member
I've bin working with Parsely for quite a bit now and encountert a little probem.

I have a entylist of different literature types and want so search for a specific titel
I added a label and button, but now i'm unsure of how to address th specific entrylist to call my search method

formControlFactory {
control {
Entrylist : search -> {
val c = new Composite(parent, SWT.NONE)
c.layout = new GridLayout(2, false)
val t = createText(c, SWT.BORDER)
val b = new Button(c, SWT.PUSH)
b.^text = "Search Titel"
b.addListener(SWT.MouseDown) [
MessageDialog.openInformation(, "Event",
//I just don't know, how i reference the Entrylist, the button and label are linked to.

return t
} target {
Re: Calling a method on Button Push [message #1782195 is a reply to message #1781565] Tue, 20 February 2018 11:07 Go to previous message
Lorenzo Bettini is currently offline Lorenzo BettiniFriend
Messages: 1742
Registered: July 2009
Location: Firenze, Italy
Senior Member
Dear Dominik

The current EObject can be accessed in the block with the getter getOwner (or simply "owner"). That will have to be casted to Entrylist if you really need the Entrylist properties.
Please keep in mind that in the release 2.0 (scheduled in June together with Photon) we might rename that getter to a more intuitive name. We could also change the semantics of the DSL so that the current EObject (already casted) is automatically made available in the block; if you think that would be a valuable feature, please open a bug.

Please let us know if this fixes your problem.
Previous Topic:EMF Parsley 1.2.2 Released
Goto Forum:

Current Time: Wed Feb 21 19:26:19 GMT 2018

Powered by FUDForum. Page generated in 0.01892 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software