This commit is contained in:
Dave Thomas 2017-07-20 20:33:37 +01:00
Родитель ca63903599
Коммит 58bfe799ff
2 изменённых файлов: 9 добавлений и 11 удалений

Просмотреть файл

@ -30,13 +30,14 @@ module Mac =
| true, v -> Some v
| false, _ -> None
let outletMapping tryLookup outlet = maybe {
let! prop = outlet |> tryGetAttribute "property"
let! dest = outlet |> tryGetAttribute "destination"
let! (destElement : XElement) = tryLookup dest.Value
let elementName = destElement.Name.LocalName
return {Property=prop.Value; ElementName=elementName } }
let outletMapping (tryLookup: string -> XElement option) outlet =
maybe {
let! prop = outlet |> tryGetAttribute "property"
let! dest = outlet |> tryGetAttribute "destination"
let! destElement = tryLookup dest.Value
let elementName = destElement.Name.LocalName
return {Property=prop.Value; ElementName=elementName } }
let actionMapping tryLookup action = maybe {
let! selector = action |> tryGetAttribute "selector"
//<button> <connections> <action/> </connections> </button>

Просмотреть файл

@ -43,7 +43,6 @@ module ProvidedTypes =
let field = ProvidedField( fieldName, typ)
field.SetFieldAttributes FieldAttributes.Private
let property = ProvidedProperty(propertyName, typ, defaultArg parameters [])
property.GetterCode <- fun args -> Expr.FieldGet(args.[0], field)
@ -69,9 +68,7 @@ module ProvidedTypes =
module String =
let private test_null =
function
| null -> raise (ArgumentNullException "arg")
| _ -> ()
function null -> raise (ArgumentNullException "arg") | _ -> ()
let capitalize (s : string) =
test_null s