~ubuntu-branches/ubuntu/trusty/monodevelop/trusty-proposed

« back to all changes in this revision

Viewing changes to external/monomac/docs/en/MonoMac.Foundation/NSObject.xml

  • Committer: Package Import Robot
  • Author(s): Jo Shields
  • Date: 2013-05-12 09:46:03 UTC
  • mto: This revision was merged to the branch mainline in revision 29.
  • Revision ID: package-import@ubuntu.com-20130512094603-mad323bzcxvmcam0
Tags: upstream-4.0.5+dfsg
ImportĀ upstreamĀ versionĀ 4.0.5+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
      </Parameters>
64
64
      <Docs>
65
65
        <param name="x">Unused sentinel value, pass NSObjectFlag.Empty.</param>
66
 
        <summary>Constructor to call on derived classes to skip initialization and merely allocate the object.</summary>
 
66
        <summary>Constructor to call on derived classes when the derived class has an [Export] constructor.</summary>
67
67
        <remarks>
68
 
          <para>This constructor should be called by derived classes when they completely construct the object in managed code and merely want the runtime to allocate and initialize the NSObject.   This is required to implement the two-step initialization process that Objective-C uses, the first step is to perform the object allocation, the second step is to initialize the object.   When you invoke the constructor that takes the NSObjectFlag.Empty you taking advatnage of a direct path that goes all the way up to NSObject to merely allocate the object's memory and bind the Objective-C and C# objects together.    The actual initialization of the object is up to you.</para>
69
 
          <para>This constructor is typically used by the binding generator to allocate the object, but prevent the actual initialization to take place.   Once the allocation has taken place, the constructor has to initialize the object.   With constructors generated by the binding generator this means that it manually invokes one of the "init" methods to initialize the object.</para>
70
 
          <para>It is your responsability to completely initialize the object if you chain up using the NSObjectFlag.Empty path.</para>
71
 
          <para>In general, if your constructors invokes the NSObjectFlag.Empty base implementation, then it should be calling an Objective-C init method.   If this is not the case, you should instead chain to the proper constructor in your class. </para>
72
 
          <para>The argument value is ignored and merely ensures that the only code that is executed is the construction phase is the basic NSObject allocation and runtime type registration.  Typically the chaining would look like this:</para>
 
68
          <para>This constructor should be called by derived classes when they are initialized using an [Export] attribute. The argument value is ignore, typically the chaining would look like this:</para>
73
69
          <example>
74
70
            <code lang="C#">
75
 
//
76
 
// The NSObjectFlag merely allocates the object and registers the
77
 
// C# class with the Objective-C runtime if necessary, but no actual
78
 
// initXxx method is invoked, that is done later in the constructor
79
 
//
80
 
// This is taken from MonoMac's source code:
81
 
//
82
 
[Export ("initWithFrame:")]
83
 
public UIView (System.Drawing.RectangleF frame) : base (NSObjectFlag.Empty)
84
 
{
85
 
// Invoke the init method now.
86
 
        var initWithFrame = new Selector ("initWithFrame:").Handle;
87
 
        if (IsDirectBinding)
88
 
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSend_RectangleF (this.Handle, initWithFrame, frame);
89
 
        else
90
 
                Handle = MonoMac.ObjCRuntime.Messaging.IntPtr_objc_msgSendSuper_RectangleF (this.SuperHandle, initWithFrame, frame);
91
 
}
 
71
public class MyClass : BaseClass {
 
72
    [Export ("initWithFoo:")]
 
73
    public MyClass (string foo) : base (NSObjectFlag.Empty)
 
74
    {
 
75
        ...
 
76
    }
92
77
</code>
93
78
          </example>
94
79
        </remarks>
226
211
            immediately to the caller.
227
212
 
228
213
          </para>
 
214
          <example>
 
215
            <code lang="c#">
 
216
// Invoked in response to a button clicked on the UI.
 
217
void StartDownload ()
 
218
{
 
219
        status.Text = "Downloading file...";
 
220
        ThreadPool.QueueUserWorkItem (BackgroundDownload);
 
221
}
 
222
 
 
223
// This is the background helper
 
224
BackgroundDownload ()
 
225
{
 
226
        var wc = new WebClient ();
 
227
        wc.DownloadFile (myUrl, "/tmp/largeFile.txt");
 
228
 
 
229
        // When the download is complete, notify the UI
 
230
        BeginInvokeOnMainThread (delegate {
 
231
                status.Text = "Download has been completed";
 
232
        });
 
233
}
 
234
</code>
 
235
          </example>
229
236
        </remarks>
230
237
      </Docs>
231
238
    </Member>
298
305
        <param name="binding">To be added.</param>
299
306
        <param name="observable">To be added.</param>
300
307
        <param name="keyPath">To be added.</param>
301
 
        <param name="options">To be added.</param>
 
308
        <param name="options">
 
309
          <para>Options for the binding.</para>
 
310
          <para tool="nullallowed">This parameter can be <see langword="null" />.</para>
 
311
        </param>
302
312
        <summary>To be added.</summary>
303
313
        <remarks>To be added.</remarks>
304
314
      </Docs>
389
399
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
390
400
      </ReturnValue>
391
401
      <Docs>
392
 
        <summary>To be added.</summary>
393
 
        <value>To be added.</value>
 
402
        <summary>Represents the value associated with the constant NSKeyValueChangeIndexesKey</summary>
 
403
        <value>
 
404
        </value>
394
405
        <remarks>To be added.</remarks>
395
406
      </Docs>
396
407
    </Member>
405
416
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
406
417
      </ReturnValue>
407
418
      <Docs>
408
 
        <summary>To be added.</summary>
409
 
        <value>To be added.</value>
 
419
        <summary>Represents the value associated with the constant NSKeyValueChangeKindKey</summary>
 
420
        <value>
 
421
        </value>
410
422
        <remarks>To be added.</remarks>
411
423
      </Docs>
412
424
    </Member>
421
433
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
422
434
      </ReturnValue>
423
435
      <Docs>
424
 
        <summary>To be added.</summary>
425
 
        <value>To be added.</value>
 
436
        <summary>Represents the value associated with the constant NSKeyValueChangeNewKey</summary>
 
437
        <value>
 
438
        </value>
426
439
        <remarks>To be added.</remarks>
427
440
      </Docs>
428
441
    </Member>
437
450
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
438
451
      </ReturnValue>
439
452
      <Docs>
440
 
        <summary>Notification constant for ChangeNotificati</summary>
 
453
        <summary>Represents the value associated with the constant NSKeyValueChangeNotificationIsPriorKey</summary>
441
454
        <value>NSString constant, should be used as a token to NSNotificationCenter.</value>
442
455
        <remarks>
443
456
          <para id="tool-remark">This constant can be used with the <see cref="T:MonoMac.Foundation.NSNotificationCenter" /> to register a listener for this notification.</para>
472
485
        <ReturnType>MonoMac.Foundation.NSString</ReturnType>
473
486
      </ReturnValue>
474
487
      <Docs>
475
 
        <summary>To be added.</summary>
476
 
        <value>To be added.</value>
 
488
        <summary>Represents the value associated with the constant NSKeyValueChangeOldKey</summary>
 
489
        <value>
 
490
        </value>
477
491
        <remarks>To be added.</remarks>
478
492
      </Docs>
479
493
    </Member>
638
652
        <remarks>To be added.</remarks>
639
653
      </Docs>
640
654
    </Member>
 
655
    <Member MemberName="DebugDescription">
 
656
      <MemberSignature Language="C#" Value="public virtual string DebugDescription { get; }" />
 
657
      <MemberSignature Language="ILAsm" Value=".property instance string DebugDescription" />
 
658
      <MemberType>Property</MemberType>
 
659
      <AssemblyInfo>
 
660
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
661
      </AssemblyInfo>
 
662
      <Attributes>
 
663
        <Attribute>
 
664
          <AttributeName>get: MonoMac.Foundation.Export("debugDescription")</AttributeName>
 
665
        </Attribute>
 
666
      </Attributes>
 
667
      <ReturnValue>
 
668
        <ReturnType>System.String</ReturnType>
 
669
      </ReturnValue>
 
670
      <Docs>
 
671
        <summary>To be added.</summary>
 
672
        <value>To be added.</value>
 
673
        <remarks>To be added.</remarks>
 
674
      </Docs>
 
675
    </Member>
 
676
    <Member MemberName="Description">
 
677
      <MemberSignature Language="C#" Value="public virtual string Description { get; }" />
 
678
      <MemberSignature Language="ILAsm" Value=".property instance string Description" />
 
679
      <MemberType>Property</MemberType>
 
680
      <AssemblyInfo>
 
681
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
682
      </AssemblyInfo>
 
683
      <Attributes>
 
684
        <Attribute>
 
685
          <AttributeName>get: MonoMac.Foundation.Export("description")</AttributeName>
 
686
        </Attribute>
 
687
      </Attributes>
 
688
      <ReturnValue>
 
689
        <ReturnType>System.String</ReturnType>
 
690
      </ReturnValue>
 
691
      <Docs>
 
692
        <summary>To be added.</summary>
 
693
        <value>To be added.</value>
 
694
        <remarks>To be added.</remarks>
 
695
      </Docs>
 
696
    </Member>
641
697
    <Member MemberName="DidChange">
642
698
      <MemberSignature Language="C#" Value="public virtual void DidChange (MonoMac.Foundation.NSKeyValueChange changeKind, MonoMac.Foundation.NSIndexSet indexes, MonoMac.Foundation.NSString forKey);" />
643
699
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void DidChange(valuetype MonoMac.Foundation.NSKeyValueChange changeKind, class MonoMac.Foundation.NSIndexSet indexes, class MonoMac.Foundation.NSString forKey) cil managed" />
730
786
      </ReturnValue>
731
787
      <Parameters />
732
788
      <Docs>
733
 
        <summary>Releases the resourced used by the NSObject object.</summary>
 
789
        <summary>Releases the resources used by the NSObject object.</summary>
734
790
        <remarks>
735
791
          <para>The Dispose method releases the resources used by the NSObject class.</para>
736
792
          <para>Calling the Dispose method when you are finished using the NSObject ensures that all external resources used by this managed object are released as soon as possible.  Once you have invoked the Dispose method, the object is no longer useful and you should no longer make any calls to it.  For more information on releasing resources see ``Cleaning up Unmananaged Resources'' at http://msdn.microsoft.com/en-us/library/498928w2.aspx</para>
754
810
        <param name="disposing">
755
811
          <para>If set to <see langword="true" />, the method is invoked directly and will dispose manage and unmanaged resources;   If set to <see langword="false" /> the method is being called by the garbage collector finalizer and should only release unmanaged resources.</para>
756
812
        </param>
757
 
        <summary>Releases the resourced used by the NSObject object.</summary>
 
813
        <summary>Releases the resources used by the NSObject object.</summary>
758
814
        <remarks>
759
815
          <para>This Dispose method releases the resources used by the NSObject class.</para>
760
816
          <para>This method is called by both the Dispose() method and the object finalizer (Finalize).    When invoked by the Dispose method, the parameter disposting <paramref name="disposing" /> is set to <see langword="true" /> and any managed object references that this object holds are also disposed or released;  when invoked by the object finalizer, on the finalizer thread the value is set to <see langword="false" />. </para>
1125
1181
      </Docs>
1126
1182
    </Member>
1127
1183
    <Member MemberName="MonoMacAssembly">
1128
 
      <MemberSignature Language="C#" Value="public static System.Reflection.Assembly MonoMacAssembly;" />
1129
 
      <MemberSignature Language="ILAsm" Value=".field public static class System.Reflection.Assembly MonoMacAssembly" />
 
1184
      <MemberSignature Language="C#" Value="public static readonly System.Reflection.Assembly MonoMacAssembly;" />
 
1185
      <MemberSignature Language="ILAsm" Value=".field public static initonly class System.Reflection.Assembly MonoMacAssembly" />
1130
1186
      <MemberType>Field</MemberType>
1131
1187
      <AssemblyInfo>
1132
1188
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
1216
1272
      </Docs>
1217
1273
    </Member>
1218
1274
    <Member MemberName="PerformSelector">
1219
 
      <MemberSignature Language="C#" Value="public virtual void PerformSelector (MonoMac.ObjCRuntime.Selector sel, MonoMac.Foundation.NSObject obj, float delay);" />
1220
 
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void PerformSelector(class MonoMac.ObjCRuntime.Selector sel, class MonoMac.Foundation.NSObject obj, float32 delay) cil managed" />
 
1275
      <MemberSignature Language="C#" Value="public virtual void PerformSelector (MonoMac.ObjCRuntime.Selector sel, MonoMac.Foundation.NSObject obj, double delay);" />
 
1276
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void PerformSelector(class MonoMac.ObjCRuntime.Selector sel, class MonoMac.Foundation.NSObject obj, float64 delay) cil managed" />
1221
1277
      <MemberType>Method</MemberType>
1222
1278
      <AssemblyInfo>
1223
1279
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
1233
1289
      <Parameters>
1234
1290
        <Parameter Name="sel" Type="MonoMac.ObjCRuntime.Selector" />
1235
1291
        <Parameter Name="obj" Type="MonoMac.Foundation.NSObject" />
1236
 
        <Parameter Name="delay" Type="System.Single" />
 
1292
        <Parameter Name="delay" Type="System.Double" />
1237
1293
      </Parameters>
1238
1294
      <Docs>
1239
1295
        <param name="sel">To be added.</param>
1294
1350
        <remarks>To be added.</remarks>
1295
1351
      </Docs>
1296
1352
    </Member>
 
1353
    <Member MemberName="SetDefaultPlaceholder">
 
1354
      <MemberSignature Language="C#" Value="public static MonoMac.Foundation.NSObject SetDefaultPlaceholder (MonoMac.Foundation.NSObject placeholder, MonoMac.Foundation.NSObject marker, string binding);" />
 
1355
      <MemberSignature Language="ILAsm" Value=".method public static hidebysig class MonoMac.Foundation.NSObject SetDefaultPlaceholder(class MonoMac.Foundation.NSObject placeholder, class MonoMac.Foundation.NSObject marker, string binding) cil managed" />
 
1356
      <MemberType>Method</MemberType>
 
1357
      <AssemblyInfo>
 
1358
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
1359
      </AssemblyInfo>
 
1360
      <Attributes>
 
1361
        <Attribute>
 
1362
          <AttributeName>MonoMac.Foundation.Export("setDefaultPlaceholder:forMarker:withBinding:")</AttributeName>
 
1363
        </Attribute>
 
1364
      </Attributes>
 
1365
      <ReturnValue>
 
1366
        <ReturnType>MonoMac.Foundation.NSObject</ReturnType>
 
1367
      </ReturnValue>
 
1368
      <Parameters>
 
1369
        <Parameter Name="placeholder" Type="MonoMac.Foundation.NSObject" />
 
1370
        <Parameter Name="marker" Type="MonoMac.Foundation.NSObject" />
 
1371
        <Parameter Name="binding" Type="System.String" />
 
1372
      </Parameters>
 
1373
      <Docs>
 
1374
        <param name="placeholder">To be added.</param>
 
1375
        <param name="marker">To be added.</param>
 
1376
        <param name="binding">To be added.</param>
 
1377
        <summary>To be added.</summary>
 
1378
        <returns>To be added.</returns>
 
1379
        <remarks>To be added.</remarks>
 
1380
      </Docs>
 
1381
    </Member>
1297
1382
    <Member MemberName="SetNativeField">
1298
1383
      <MemberSignature Language="C#" Value="public void SetNativeField (string name, MonoMac.Foundation.NSObject value);" />
1299
1384
      <MemberSignature Language="ILAsm" Value=".method public hidebysig instance void SetNativeField(string name, class MonoMac.Foundation.NSObject value) cil managed" />
1480
1565
        <remarks>To be added.</remarks>
1481
1566
      </Docs>
1482
1567
    </Member>
 
1568
    <Member MemberName="ToString">
 
1569
      <MemberSignature Language="C#" Value="public override string ToString ();" />
 
1570
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance string ToString() cil managed" />
 
1571
      <MemberType>Method</MemberType>
 
1572
      <AssemblyInfo>
 
1573
        <AssemblyVersion>0.0.0.0</AssemblyVersion>
 
1574
      </AssemblyInfo>
 
1575
      <ReturnValue>
 
1576
        <ReturnType>System.String</ReturnType>
 
1577
      </ReturnValue>
 
1578
      <Parameters />
 
1579
      <Docs>
 
1580
        <summary>Returns a string representation of the value of the current instance.</summary>
 
1581
        <returns>
 
1582
        </returns>
 
1583
        <remarks>
 
1584
        </remarks>
 
1585
      </Docs>
 
1586
    </Member>
1483
1587
    <Member MemberName="Unbind">
1484
1588
      <MemberSignature Language="C#" Value="public virtual void Unbind (string binding);" />
1485
1589
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void Unbind(string binding) cil managed" />