Platforms to show: All Mac Windows Linux Cross-Platform

Back to NSMutableIndexSetMBS class.

NSMutableIndexSetMBS.addIndexes(indexes as NSIndexSetMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds the indexes in an index set to the receiver.
Example
dim n as new NSMutableIndexSetMBS(5,6) // 5, 6, 7, 8, 9, 10
dim x as new NSIndexSetMBS(12,5)
n.addIndexes x
MsgBox str(n.count)

NSMutableIndexSetMBS.addIndexesInRange(StartIndex as Integer, Length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Adds the indexes in an index range to the receiver.
Example
dim n as new NSMutableIndexSetMBS(5,6) // 5, 6, 7, 8, 9, 10
n.addIndexesInRange 12,5
MsgBox str(n.count)

Index range to add. Must include only indexes representable as unsigned integers.

This method raises an NSRangeException when indexRange would add an index that exceeds the maximum allowed value for unsigned integers.

NSMutableIndexSetMBS.Constructor

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes an allocated NSMutableIndexSet object.
Example
dim x as new NSMutableIndexSetMBS

See also:

NSMutableIndexSetMBS.Constructor(index as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes an allocated NSMutableIndexSet object with an index.
Example
dim n as new NSMutableIndexSetMBS(5)
MsgBox str(n.firstIndex)+" "+str(n.lastIndex)

See also:

NSMutableIndexSetMBS.Constructor(indexes as NSIndexSetMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes an allocated NSIndexSet object with an index set.
Example
dim n as new NSMutableIndexSetMBS(5)
dim x as new NSMutableIndexSetMBS(n)
MsgBox str(x.firstIndex)

See also:

NSMutableIndexSetMBS.Constructor(StartIndex as Integer, Length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Initializes an allocated NSIndexSet object with an index range.
Example
dim n as new NSMutableIndexSetMBS(5,6) // 5, 6, 7, 8, 9, 10

This method raises an NSRangeException when indexRange would add an index that exceeds the maximum allowed value for unsigned integers.

See also:

NSMutableIndexSetMBS.removeAllIndexes

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes the receiver's indexes.
Example
dim n as new NSMutableIndexSetMBS(5,6) // 5, 6, 7, 8, 9, 10
n.removeAllIndexes
MsgBox str(n.count)

NSMutableIndexSetMBS.removeIndexes(indexes as NSIndexSetMBS)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes the indexes in an index set from the receiver.
Example
dim n as new NSMutableIndexSetMBS(5,6) // 5, 6, 7, 8, 9, 10
dim x as new NSIndexSetMBS(5,2)
n.removeIndexes x
MsgBox str(n.firstIndex)+" "+str(n.lastIndex)

NSMutableIndexSetMBS.removeIndexesInRange(StartIndex as Integer, Length as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Removes the indexes in an index range from the receiver.
Example
dim n as new NSMutableIndexSetMBS(5,6) // 5, 6, 7, 8, 9, 10
n.removeIndexesInRange 5,2
MsgBox str(n.firstIndex)+" "+str(n.lastIndex)

NSMutableIndexSetMBS.shiftIndexes(StartingAtIndex as Integer, delta as Integer)

Type Topic Plugin Version macOS Windows Linux iOS Targets
method Cocoa MBS MacBase Plugin 9.1 ✅ Yes ❌ No ❌ No ✅ Yes All
Shifts a group of indexes to the left or the right within the receiver.
Example
dim n as new NSMutableIndexSetMBS(5,6) // 5, 6, 7, 8, 9, 10
n.shiftIndexes 7,3
MsgBox str(n.firstIndex)+" "+str(n.lastIndex)

startIndex: Head of the group of indexes to shift.
delta: Amount and direction of the shift. Positive integers shift the indexes to the right. Negative integers shift the indexes to the left.

The group of indexes shifted is made up by startIndex and the indexes that follow it in the receiver.

A left shift deletes the indexes in the range (startIndex-delta,delta) from the receiver.

A right shift inserts empty space in the range (indexStart,delta) in the receiver.

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


The biggest plugin in space...