Platforms to show: All Mac Windows Linux Cross-Platform

/MacControls/HTMLViewer Mac/Mac Cookies
Function:
Required plugins for this example: MBS Main Plugin, MBS MacControls Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacControls/HTMLViewer Mac/Mac Cookies
Project "Mac Cookies.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() dim storage as NSHTTPCookieStorageMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage dim cookies() as NSHTTPCookieMBS = storage.cookies fill cookies End EventHandler
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() dim storage as NSHTTPCookieStorageMBS = NSHTTPCookieStorageMBS.sharedHTTPCookieStorage dim cookies() as NSHTTPCookieMBS = storage.cookiesForURL(TextField1.Text) fill cookies End EventHandler
End Control
Control TextField1 Inherits TextField
ControlInstance TextField1 Inherits TextField
End Control
Control List Inherits Listbox
ControlInstance List Inherits Listbox
End Control
Sub FIll(cookies() as NSHTTPCookieMBS) List.deleteAllRows for each c as NSHTTPCookieMBS in cookies dim d as string dim e as date = c.expiresDate if e<>Nil then d = e.ShortDate end if List.AddRow c.domain, c.name, c.value, c.path, d, c.comment next End Sub
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&Ablage"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Bearbeiten"
MenuItem EditUndo = "&Rückgängig"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "&Ausschneiden"
MenuItem EditCopy = "&Kopieren"
MenuItem EditPaste = "&Einfügen"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "&Alles auswählen"
End MenuBar
End Project

See also:

The items on this page are in the following plugins: MBS MacControls Plugin.

Feedback: Report problem or ask question.

The biggest plugin in space...