Skip to content
This repository has been archived by the owner on May 4, 2022. It is now read-only.

Pass the created event as parameter to the Finished Action Selector #62

Closed
smaugho opened this issue Feb 9, 2017 · 0 comments
Closed
Assignees

Comments

@smaugho
Copy link
Member

smaugho commented Feb 9, 2017

It is useful to pass the event to the Finished Action Selector for the event... Let's see this example:

Creation of a BackPressed event in a Fragment:

void onBackPressed(BackPressed_ event, boolean allowedGoBack) {
    if (canGoBack()) event.setAllowedGoBack(true);
}

Then in the activity

@Action
public void onBackPressed_() {
    $BackPressed();
    if ($BackPressed.Finished) {
        BackPressed_ event = null;
        if (event.isAllowedGoBack()) super.onBackPressed();
    }
}

This is for the common situation, in which the Fragment needs to capture the back event of the activity, making a different action when back is pressed.

@smaugho smaugho self-assigned this Feb 9, 2017
smaugho added a commit that referenced this issue Mar 7, 2017
…notation, Close #79

Change Action $GetModel to $LoadModel, Close #77
Change @Populator to @populate and @recollector to @recollect, Close #76
Change the name of @JsonSerializedModel to @jsonmodel, Close #68
Method Get with Fields should put the passed fields as an from URL encoded, Close #66
Add Failed Action Selector for Events, Close #64
Add the Event fields to the Action Selector for easy access, Close #63
Pass the created event as parameter to the Finished Action Selector, Close #62
Array declarations not working in Actions, Close #61
$GetModel and $PutModel always populate and recollect, Close #59
Crash calling fragment in Actions, Close #58
In the adapters (for AdapterViews and RecyclerView) it is important to check if the position is valid, Close #57
$Notification action doesn't have setStyle method, Close #56
@PutModel and @GetModel returning to Main Thread, Close #54
@JsonSerializedModel improvements, Close #53
@OverrideAction to directly override methods, Close #39
"withResult" for Activity Actions, Close #36
NavigationDrawer Error for latest support libraries, Close #1
@smaugho smaugho closed this as completed Mar 7, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Projects
None yet
Development

No branches or pull requests

1 participant