Debugging system services support (Mac OS X)

slava 2006-07-29 23:37:50 +00:00
parent 0b8c907ec5
commit adef6a2f04
3 changed files with 19 additions and 16 deletions

View File

@ -15,7 +15,6 @@
- history: move caret to end
- finish gui stepper
- graphical module manager tool
- make factor a services client
- services do not launch if factor not running
- integrated error documentation
- roundoff is still not quite right with tracks

View File

@ -6,11 +6,11 @@ USING: compiler io parser sequences words ;
"/library/ui/cocoa/init-cocoa.factor"
"/library/ui/cocoa/callback.factor"
"/library/ui/cocoa/application-utils.factor"
"/library/ui/cocoa/pasteboard-utils.factor"
"/library/ui/cocoa/view-utils.factor"
"/library/ui/cocoa/window-utils.factor"
"/library/ui/cocoa/dialogs.factor"
"/library/ui/cocoa/menu-bar.factor"
"/library/ui/cocoa/pasteboard-utils.factor"
"/library/ui/cocoa/services.factor"
"/library/ui/cocoa/ui.factor"
} [

View File

@ -94,11 +94,11 @@ opengl sequences ;
r> add-observer ;
: string-or-nil? ( NSString -- ? )
[ dup CF>string NSStringPboardType = ] [ t ] if* ;
[ CF>string NSStringPboardType = ] [ t ] if* ;
: valid-service? ( gadget send-type return-type -- ? )
over string-or-nil? over string-or-nil? and [
drop [ swap gadget-selection? ] [ 2drop t ] if
drop [ gadget-selection? ] [ drop t ] if
] [
3drop f
] if ;
@ -199,23 +199,27 @@ opengl sequences ;
}
{ "writeSelectionToPasteboard:types:" "bool" { "id" "SEL" "id" "id" }
CF>string-array NSStringPboardType swap member? [
>r drop window-focus gadget-selection dup [
r> set-pasteboard-string t
[
CF>string-array NSStringPboardType swap member? [
>r drop window-focus gadget-selection dup [
r> set-pasteboard-string t
] [
r> 2drop f
] if
] [
r> 2drop f
3drop f
] if
] [
3drop f
] if
]
}
{ "readSelectionFromPasteboard:" "bool" { "id" "SEL" "id" }
pasteboard-string dup [
>r drop window-focus r> swap user-input t
] [
3drop f
] if
[
pasteboard-string dup [
>r drop window-focus r> swap user-input t
] [
3drop f
] if
]
}
{ "updateFactorGadgetSize:" "void" { "id" "SEL" "id" }