diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-05 10:28:59 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-05 10:30:13 -0700 |
commit | f1cfd691b4de6c1514ae8263a0783c5211d7f3d1 (patch) | |
tree | fbd034b16b02711a3eccd558613f55163a415111 | |
parent | ae70e5d7f7f3cb723884cdaee6edb440a2603165 (diff) | |
download | mu-f1cfd691b4de6c1514ae8263a0783c5211d7f3d1.tar.gz |
1711 - start adding methods to editor-data objects
The menu bar needs separate recipes to render and respond to events.
-rw-r--r-- | 037recipe.cc | 10 | ||||
-rw-r--r-- | edit.mu | 4 |
2 files changed, 10 insertions, 4 deletions
diff --git a/037recipe.cc b/037recipe.cc index 2331ce9d..5a4acb82 100644 --- a/037recipe.cc +++ b/037recipe.cc @@ -14,8 +14,8 @@ recipe f [ :(scenario call_variable) recipe main [ - 1:recipe-number <- copy f:recipe - 2:number <- call 1:recipe-number, 34:literal + 1:recipe-ordinal <- copy f:recipe + 2:number <- call 1:recipe-ordinal, 34:literal ] recipe f [ 3:number <- next-ingredient @@ -25,9 +25,11 @@ recipe f [ #? ? :(before "End Mu Types Initialization") +// 'recipe' is a literal Type_ordinal["recipe"] = 0; -type_ordinal recipe_ordinal = Type_ordinal["recipe-number"] = Next_type_ordinal++; -Type[recipe_ordinal].name = "recipe-number"; +// 'recipe-ordinal' is the literal that can store recipe literals +type_ordinal recipe_ordinal = Type_ordinal["recipe-ordinal"] = Next_type_ordinal++; +Type[recipe_ordinal].name = "recipe-ordinal"; :(before "End Reagent-parsing Exceptions") if (r.properties.at(0).second.at(0) == "recipe") { diff --git a/edit.mu b/edit.mu index 51788c0b..b67331c5 100644 --- a/edit.mu +++ b/edit.mu @@ -86,6 +86,10 @@ container editor-data [ # helps organize editors in a 'chain'. next-editor:address:editor-data in-focus?:boolean # set for the one editor in this chain currently being edited + + # functions to run + render:recipe-ordinal # how to render this container + respond:recipe-ordinal # how it reacts to events from the console ] # editor:address, screen:address <- new-editor s:address:array:character, screen:address, top:number, left:number, bottom:number |