and now I wanted a better standalone API help browser.
Today I found Dash (Docs & Snippets) in Apple's AppStore (free to try, in-app purchase was 60% off today: 6,99 Euro)
So here a small PB IDE tool that starts Dash and displays help for the current word under the PB IDE cursor:
Code: Select all
; Open Dash Help System.pb
;
; PB tool to open Dash help system on Mac OS X
; to display help for current word under cursor
;
; Download "Dash (Docs & Snippets)" in Apple's AppStore
; (free To try, purchase is available within the application)
;
; Dash website: http://kapeli.com/dash
;
;
; compile this code to executable "Open Dash Help System" (without .app extension)
;
; compilation options:
; Executable format: Console
; [X] Create unicode executable
;
; Add a new tool to PB IDE:
; Commandline: path to your executable
; Arguments:
; Working directory:
; Name: Open Dash Help System
; Event to trigger the tool: Menu Or Shortcut
; Shortcut: Alt+F1
;
; [X] Wait until tool quits
; [X] Run Hidden
;
currentWord.s = Trim(GetEnvironmentVariable("PB_TOOL_Word"))
If Right(currentWord,1) = "_"
currentWord = Left(currentWord, Len(currentWord)-1)
EndIf
If OpenWindow(0, 0, 0, 0, 0, "Dash Starter", #PB_Window_Invisible)
WebGadget(0, 0, 0, 0, 0, "dash://"+currentWord)
;Delay(100)
CloseWindow(0)
EndIf
Currently (PB5.20 beta6) the "Shortcut" does not work within the IDE tool settings. You can change
the shortcut in the file /users/name/.purebasic/tools.prefs like this:
Code: Select all
Shortcut = 262522
Code: Select all
Debug #PB_Shortcut_Alt | #PB_Shortcut_F1
Dash looks like this when opened with Alt+F1 over the API command "CGMainDisplayID":
Dash supports many more help catalogs for different languages and topics.
You can download more help systems within Dash itself (Preferences > Downloads).