realbasic-nug
[Top] [All Lists]

Re: custom class as property - access results in Nil object exception?

To: "REALbasic NUG" <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: custom class as property - access results in Nil object exception?
From: "Roger Meier" <roger dot meier at pobox dot com>
Date: Mon, 28 Feb 2005 15:08:01 -0800
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <BE494D66 dot 1361E%markus_winter at blueyonder dot co dot uk>
Try putting the following statement into the 'open' event of the window to which you added ThisPlasmid as property:

ThisPlasmid = new plasmid


----- Original Message ----- From: "Markus Winter" <markus_winter at blueyonder dot co dot uk>
To: "REALbasic Network Users Group" <realbasic-nug at lists dot realsoftware dot 
com>
Sent: Monday, February 28, 2005 2:36 PM
Subject: custom class as property - access results in Nil object exception?


Hi all,

I made a few custom classes, among them plasmid with properties like

  name as string
  length as integer

I then added my custom class as a property to a window:

 ThisPlasmid as plasmid

All are public. I then try to access them by

 ThisPlasmid.name = Editfield.text

in the text change event of the editfield but get a Nil exception error.

Where do I go wrong? I can access other (non-custom) properties that I added
to the window just fine ...

Thanks

Markus

P.S. System: Powerbook G4, 1 GHz, 1 GB, MacOS X 10.3.7, RealBasic 5.5.4


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>






_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>