Skip to content

Commit

Permalink
Reverse more errant merge errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ktekinay committed Feb 28, 2014
1 parent 25412ac commit 56d1c94
Show file tree
Hide file tree
Showing 4 changed files with 90 additions and 18 deletions.
66 changes: 65 additions & 1 deletion Examples/NSToolbarWindow.rbfrm
Original file line number Diff line number Diff line change
Expand Up @@ -74,19 +74,23 @@ Begin Window NSToolbarWindow
Begin Cocoa.NSSlider NSSlider1
AcceptFocus = ""
AcceptTabs = ""
AllowsExpansionToolTips= ""
AllowsTickMarkValuesOnly= ""
AltIncrementValue= ""
AutoDeactivate = True
autoresizesSubviews= ""
Backdrop = ""
Bold = false
DoubleBuffer = ""
DoubleValue = ""
Enabled = True
EraseBackground = ""
FloatValue = ""
Height = 32
HelpTag = ""
Index = -2147483648
InitialParent = ""
IntegerValue = ""
IsFlipped = ""
Italic = false
Left = 103
Expand Down Expand Up @@ -117,17 +121,21 @@ Begin Window NSToolbarWindow
Begin Cocoa.NSSearchField NSSearchField1
AcceptFocus = ""
AcceptTabs = ""
AllowsExpansionToolTips= ""
AutoDeactivate = True
autoresizesSubviews= ""
Backdrop = ""
Bold = false
DoubleBuffer = ""
DoubleValue = ""
Enabled = True
EraseBackground = ""
FloatValue = ""
Height = 32
HelpTag = ""
Index = -2147483648
InitialParent = ""
IntegerValue = ""
IsFlipped = ""
Italic = false
Left = 273
Expand Down Expand Up @@ -206,7 +214,6 @@ Begin Window NSToolbarWindow
Selectable = False
TabIndex = 4
TabPanelIndex = 0
TabStop = True
Text = "Enable/Disable item:"
TextAlign = 2
TextColor = 0
Expand Down Expand Up @@ -281,6 +288,27 @@ Begin Window NSToolbarWindow
Visible = True
Width = 196
End
BeginSegmented SegmentedControl SegmentedControl1
Enabled = True
Height = 24
Index = -2147483648
InitialParent = ""
Left = 465
LockBottom = ""
LockedInPosition= False
LockLeft = True
LockRight = ""
LockTop = True
MacControlStyle = 0
Scope = 0
Segments = "\n\nTrue\r\n\nFalse\r\n\nFalse\r\n\nFalse"
SelectionType = 0
TabIndex = 8
TabPanelIndex = 0
Top = -66
Visible = True
Width = 120
End
End
#tag EndWindow

Expand All @@ -304,6 +332,7 @@ End
NSToolbarPrintItemIdentifier, _
NSToolbarSpaceItemIdentifier, _
NSSlider1.name, _
SegmentedControl1.Name, _
NSToolbarCustomizeToolbarItemIdentifier, _
"TemplateToolbarItem",_
"HomeToolbarItem", _
Expand All @@ -322,6 +351,7 @@ End
NSToolbarShowColorsItemIdentifier, _
NSToolbarPrintItemIdentifier, _
NSSlider1.name, _
SegmentedControl1.Name, _
NSToolbarCustomizeToolbarItemIdentifier, _
"TemplateToolbarItem",_
"HomeToolbarItem", _
Expand Down Expand Up @@ -383,6 +413,15 @@ End
tc.minSize = minSize
t.addItem tc

// a custom toolbar item which uses a control subclass
tc = new NSToolbarCustomItem(SegmentedControl1)
tc.ItemLabel = "View"
tc.PaletteLabel = "View"
tc.ToolTip = "View"
tc.MaxSize = Cocoa.NSMakeSize( SegmentedControl1.Width, SegmentedControl1.Height )
tc.MinSize = Cocoa.NSMakeSize( SegmentedControl1.Width, SegmentedControl1.Height + 8 )
t.AddItem tc

// a drop menu item display a menu of choices when clicked
dim td as new NSToolbarDropMenuItem("SelectToolbarItem")
td.image = NSImage.Network
Expand Down Expand Up @@ -523,3 +562,28 @@ End
End Sub
#tag EndEvent
#tag EndEvents
#tag Events SegmentedControl1
#tag Event
Sub Open()
me.SegmentStyle = SegmentedControlExtension.NSSegmentStyle.TexturedRounded

dim Scale as Integer = self.ScalingFactor

me.ImageForSegment(0) = SystemIcons.IconViewTemplate( 0, 10 )
me.ImageForSegment(1) = SystemIcons.ListViewTemplate( 0, 10 )
me.ImageForSegment(2) = SystemIcons.ColumnViewTemplate( 0, 10 )
me.ImageForSegment(3) = SystemIcons.FlowViewTemplate( 0, 10 )

for i as Integer = 0 to 3
me.ImageForSegment(i).Template = true
next
End Sub
#tag EndEvent
#tag Event
Sub Action(itemIndex as integer)

Log "Selected navigation button "+str(itemIndex)
Log EndOfLine
End Sub
#tag EndEvent
#tag EndEvents
28 changes: 14 additions & 14 deletions Examples/SystemExtensionsWindow.rbfrm
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Begin Window SystemExtensionsWindow
Scope = 0
TabIndex = 9
TabPanelIndex = 0
TabStop = True
TextFont = "SmallSystem"
TextSize = 0
TextUnit = 0
Expand Down Expand Up @@ -73,7 +72,6 @@ Begin Window SystemExtensionsWindow
Selectable = False
TabIndex = 0
TabPanelIndex = 0
TabStop = True
Text = "SystemDoubleClickTime"
TextAlign = 0
TextColor = &h000000
Expand Down Expand Up @@ -106,7 +104,6 @@ Begin Window SystemExtensionsWindow
Scope = 0
TabIndex = 8
TabPanelIndex = 0
TabStop = True
TextFont = "SmallSystem"
TextSize = 0
TextUnit = 0
Expand All @@ -119,9 +116,9 @@ Begin Window SystemExtensionsWindow
AutoHideScrollbars= True
Bold = ""
Border = True
ColumnCount = 2
ColumnCount = 3
ColumnsResizable= ""
ColumnWidths = "35%"
ColumnWidths = "54,35%"
DataField = ""
DataSource = ""
DefaultRowHeight= 16
Expand All @@ -137,7 +134,7 @@ Begin Window SystemExtensionsWindow
Hierarchical = ""
Index = -2147483648
InitialParent = "GroupBox2"
InitialValue = "Name Type"
InitialValue = "Default Name Type"
Italic = ""
Left = 20
LockBottom = ""
Expand Down Expand Up @@ -183,7 +180,6 @@ Begin Window SystemExtensionsWindow
Scope = 0
TabIndex = 7
TabPanelIndex = 0
TabStop = True
TextFont = "SmallSystem"
TextSize = 0
TextUnit = 0
Expand Down Expand Up @@ -262,7 +258,6 @@ Begin Window SystemExtensionsWindow
Selectable = False
TabIndex = 1
TabPanelIndex = 0
TabStop = True
Text = "Note that you can use the CustomWorkspaceEvents module to get a notification anytime the user makes changes to the Finder labels (name or color).\r\rYour application can then take the changes into account immediately."
TextAlign = 0
TextColor = &h000000
Expand Down Expand Up @@ -298,7 +293,6 @@ Begin Window SystemExtensionsWindow
Selectable = False
TabIndex = 1
TabPanelIndex = 0
TabStop = True
Text = "SystemExtensions are not invoked with a ""dot notation"" (because Real Studio does not allow extending a module) but they all use System as a prefix. Use the autocompletion feature to access them easily."
TextAlign = 0
TextColor = &h000000
Expand All @@ -320,22 +314,28 @@ End
#tag Events DoubleClickTimeLBL
#tag Event
Sub Open()

me.Text = "• Double-click time interval is " + Str( SystemDoubleClickInterval * 1000 ) + " ms, i.e. ~" + Str( SystemDoubleClickIntervalInTicks ) + " Ticks"
me.Text = "• Double-click time interval is " + Str( SystemDoubleClickInterval * 1000 ) + " ms, or " + Str( 60 * SystemDoubleClickInterval ) + " Ticks"

End Sub
#tag EndEvent
#tag EndEvents
#tag Events Listbox2
#tag Event
Sub Open()

dim names() as string = SystemListPrinterNames
dim types() as string = SystemListPrinterTypes

for i as integer = 0 to ubound( names )
me.AddRow names( i ), types( i )
dim default as String = CorePrinting.DefaultPrinter

for i as integer = 0 to names.Ubound
dim name as String = names(i)
dim col0 as String
if name = default then
col0 = " •"
end
me.AddRow col0, name, types(i)
next

End Sub
#tag EndEvent
#tag EndEvents
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
###About
### About
This is the MacOSLib project for [Xojo](http://www.xojo.com) (formerly Real Studio).

It provides additional OS X specific functionality that Xojo's own framework doesn't offer.

It even has some cross-platform functionality in order to access Mac specific data on Windows and Linux (e.g. plist files).

###How to use
### How to use

If you've downloaded the zip file, double-click the macoslib.rbvcp file to open it in the Xojo IDE. This is a project containing lots of examples, modules and macoslib itself. Run the project and play with the examples (see menu bar) to find out all the things you can do with it.

Now, to use that power in your own apps, you need to copy the macoslib folder in the Navigator (the list on the left hand side of Xojo) - don't copy it from the Finder, it won't work. Next, open your own project and paste the folder in. Now you can access MacOSLib's functionality.

###How to contribute
### How to contribute

If you use the macoslib and have implemented a fix or improvement, the best way to send this change to us is by using github:

Expand Down
8 changes: 8 additions & 0 deletions macoslib/Cocoa/NSBundle.rbbas
Original file line number Diff line number Diff line change
Expand Up @@ -1482,6 +1482,14 @@ Inherits NSObject
#tag EndComputedProperty


#tag Enum, Name = NSBundleExecutableArchitecture, Flags = &h0
NSBundleExecutableArchitectureI386 = &h00000007
NSBundleExecutableArchitecturePPC = &h00000012
NSBundleExecutableArchitectureX86_64 = &h01000007
NSBundleExecutableArchitecturePPC64 = &h01000012
#tag EndEnum


#tag ViewBehavior
#tag ViewProperty
Name="Description"
Expand Down

0 comments on commit 56d1c94

Please sign in to comment.