gyscos / gyscos/cursive

Tutorial for accessing information from Cursive

Open
#292 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
4.8k
Forks
270
Avg merge
5d 19h
Merged PRs (30d)
2

Description

The tutorials are good on how to set up a set of windows and dialogs . They seem weaker on how to make these part of a program.

In particular, it isn't clear how to pass data out of Cursive to the main business logic. My approach so far has been to wrap the business logic object in an Arc> so that that can be included in the on_submit() closures. I've seen nothing on this approach though.

Perhaps though the Cursive object itself can be given a shorter lifetime than the business logic object can it, so that a reference can be used? It would have to be an immutable reference though, wouldn't it?

Is there a standard approach? If so, could it be added to the tutorials, or a link to a project that implements this be given somewhere?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.