Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/Notifications/NSDistributedNotificationCenterMBS sender


Required plugins for this example: MBS Main Plugin, MBS MacBase Plugin

You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/Notifications/NSDistributedNotificationCenterMBS sender

This example is the version from Sun, 17th Mar 2012.

Project "NSDistributedNotificationCenterMBS sender.xojo_binary_project"
Class App Inherits Application
Const kEditClear = "&Löschen"
Const kFileQuit = "Beenden"
Const kFileQuitShortcut = ""
End Class
Class Window1 Inherits Window
Control iName Inherits TextField
ControlInstance iName Inherits TextField
End Control
Control PushButton1 Inherits PushButton
ControlInstance PushButton1 Inherits PushButton
EventHandler Sub Action() dim dic as new Dictionary dim t as string = idic.Text dim lines(-1) as string = split(t, EndOfLine) for each line as string in lines dim key as string = NthField(line,"=",1) dim val as string = NthField(line,"=",2) dic.Value(key)=val next center.postNotificationName(iname.Text, iObject.Text, dic, true) End EventHandler
End Control
Control StaticText1 Inherits Label
ControlInstance StaticText1 Inherits Label
End Control
Control StaticText2 Inherits Label
ControlInstance StaticText2 Inherits Label
End Control
Control iObject Inherits TextField
ControlInstance iObject Inherits TextField
End Control
Control iDic Inherits TextField
ControlInstance iDic Inherits TextField
End Control
Control StaticText3 Inherits Label
ControlInstance StaticText3 Inherits Label
End Control
Control PushButton2 Inherits PushButton
ControlInstance PushButton2 Inherits PushButton
EventHandler Sub Action() center.postNotificationName(iname.Text, iObject.Text, nil, true) End EventHandler
End Control
Control StaticText4 Inherits Label
ControlInstance StaticText4 Inherits Label
End Control
EventHandler Sub Open() center = NSDistributedNotificationCenterMBS.defaultCenter End EventHandler
Property Center As NSDistributedNotificationCenterMBS
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 MacCocoa Plugin.


The biggest plugin in space...