Xojo Conferences
XDCMay2019MiamiUSA

Platforms to show: All Mac Windows Linux Cross-Platform

/MacCocoa/Addressbook/Addressbook Person View
Function:
Required plugins for this example: MBS MacBase Plugin, MBS MacCocoa Plugin, MBS MacControls Plugin, MBS MacFrameworks Plugin, MBS Main Plugin
You find this example project in your Plugins Download as a Xojo project file within the examples folder: /MacCocoa/Addressbook/Addressbook Person View
This example is the version from Mon, 25th Nov 2012.
Project "Addressbook Person View.rbp"
Class App Inherits Application
Const kEditClear = "&Delete"
Const kFileQuit = "&Quit"
Const kFileQuitShortcut = ""
EventHandler Sub Open() if not ABPersonViewMBS.available then MsgBox "Please try with Mac OS X 10.7 Lion" end if End EventHandler
End Class
Class Window1 Inherits Window
Control CocoaControlMBS1 Inherits CocoaControlMBS
ControlInstance CocoaControlMBS1 Inherits CocoaControlMBS
EventHandler Function GetView() As NSViewMBS // create private instance of addressbook dim a as ABAddressBookMBS = ABAddressBookMBS.AddressBook // create view m = new ABPersonViewMBS m.person = a.owner Return m End EventHandler
End Control
Control CheckBox1 Inherits CheckBox
ControlInstance CheckBox1 Inherits CheckBox
EventHandler Sub Action() m.editing = me.value End EventHandler
End Control
EventHandler Sub Open() if not ABPersonViewMBS.Available then MsgBox "This example requires Mac OS X 10.7. Lion" quit end if if TargetCarbon then MsgBox "Warning: This Example works much better in Cocoa target." elseif not TargetCocoa then MsgBox "Cocoa target is recommented for this example." end if End EventHandler
Property m As ABPersonViewMBS
End Class
MenuBar MenuBar1
MenuItem FileMenu = "&File"
MenuItem FileQuit = "#App.kFileQuit"
MenuItem EditMenu = "&Edit"
MenuItem EditUndo = "&Undo"
MenuItem UntitledMenu1 = "-"
MenuItem EditCut = "Cu&t"
MenuItem EditCopy = "&Copy"
MenuItem EditPaste = "&Paste"
MenuItem EditClear = "#App.kEditClear"
MenuItem UntitledMenu0 = "-"
MenuItem EditSelectAll = "Select &All"
End MenuBar
End Project

See also:

Feedback, Comments & Corrections

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




Links
MBS Xojo Chart Plugins