From 20c9d4a0ac7dbec62d2a1c2692f3e3155c4b5932 Mon Sep 17 00:00:00 2001 From: Joshua Granick Date: Mon, 13 Nov 2017 13:13:27 -0800 Subject: [PATCH] Try to fix ContextMenuItem/NativeMenuItem for Flash/AIR (close #1108) --- externs/air/flash/display/NativeMenuItem.hx | 8 +------- externs/air/flash/ui/ContextMenuItem.hx | 5 +++-- 2 files changed, 4 insertions(+), 9 deletions(-) diff --git a/externs/air/flash/display/NativeMenuItem.hx b/externs/air/flash/display/NativeMenuItem.hx index 12830e285..59ea93bc7 100644 --- a/externs/air/flash/display/NativeMenuItem.hx +++ b/externs/air/flash/display/NativeMenuItem.hx @@ -1,12 +1,9 @@ package flash.display; @:require(flash10_1) extern class NativeMenuItem extends flash.events.EventDispatcher { - #if air var checked : Bool; var data : Dynamic; - #end var enabled : Bool; - #if air var isSeparator(default,never) : Bool; var keyEquivalent : flash.ui.Keyboard; var keyEquivalentModifiers : Array; @@ -15,10 +12,7 @@ package flash.display; var mnemonicIndex : Int; var name : String; var submenu : NativeMenu; - #end - function new(#if air ?label : String="", ?isSeparator : Bool=false #end) : Void; - #if air + function new(?label : String="", ?isSeparator : Bool=false) : Void; function clone() : NativeMenuItem; override function toString() : String; - #end } diff --git a/externs/air/flash/ui/ContextMenuItem.hx b/externs/air/flash/ui/ContextMenuItem.hx index 0841faf3d..b2aa37a08 100644 --- a/externs/air/flash/ui/ContextMenuItem.hx +++ b/externs/air/flash/ui/ContextMenuItem.hx @@ -1,10 +1,11 @@ package flash.ui; -@:final extern class ContextMenuItem extends flash.display.NativeMenuItem { +@:final extern class ContextMenuItem #if air extends flash.display.NativeMenuItem #end { var caption : String; var separatorBefore : Bool; var visible : Bool; function new(caption : String, separatorBefore : Bool = false, enabled : Bool = true, visible : Bool = true) : Void; + #if !air function clone() : ContextMenuItem; - //override function clone() : flash.display.NativeMenuItem; + #end }