diff --git a/vlib/compiler/aparser.v b/vlib/compiler/aparser.v index 85757deb92..ca38bc4506 100644 --- a/vlib/compiler/aparser.v +++ b/vlib/compiler/aparser.v @@ -439,7 +439,7 @@ fn (p mut Parser) parse(pass Pass) { } p.fgen_nl() p.builtin_mod = p.mod == 'builtin' - p.can_chash = p.mod in ['ui', 'darwin', 'clipboard', 'webview'] // TODO tmp remove + p.can_chash = p.mod in ['ui', 'uiold', 'darwin', 'clipboard', 'webview'] // TODO tmp remove // Import pass - the first and the smallest pass that only analyzes imports // if we are a building module get the full module name from v.mod fq_mod := if p.pref.build_mode == .build_module && p.v.mod.ends_with(p.mod) { p.v.mod } @@ -525,7 +525,9 @@ fn (p mut Parser) parse(pass Pass) { p.comp_time() } .key_global { - if !p.pref.translated && !p.pref.is_live && !p.builtin_mod && !p.pref.building_v && p.mod != 'ui' && !os.getwd().contains('/volt') && !p.pref.enable_globals { + if !p.pref.translated && !p.pref.is_live && !p.builtin_mod && !p.pref.building_v && + p.mod != 'ui' && p.mod != 'uiold' && !os.getwd().contains('/volt') && + !p.pref.enable_globals { p.error('use `v --enable-globals ...` to enable globals') // p.error('__global is only allowed in translated code') } diff --git a/vlib/uiold/ui_darwin.v b/vlib/uiold/ui_darwin.v index cc94f10d10..5651f48e66 100644 --- a/vlib/uiold/ui_darwin.v +++ b/vlib/uiold/ui_darwin.v @@ -1,4 +1,4 @@ -module ui +module uiold #flag -framework Carbon #flag -framework Cocoa @@ -24,7 +24,7 @@ pub fn reg_key_vid() { #EventTypeSpec eventType; #eventType.eventClass = kEventClassKeyboard; #eventType.eventKind = kEventHotKeyPressed; - #InstallApplicationEventHandler(&ui__focus_app, 1, &eventType, NULL, NULL); + #InstallApplicationEventHandler(&uiold__focus_app, 1, &eventType, NULL, NULL); #gMyHotKeyID.signature = 'rml1'; #gMyHotKeyID.id = 1; #RegisterEventHotKey(kVK_ANSI_1, cmdKey, gMyHotKeyID,