Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Object/Path? question

From: tim-johnsons::web::com at: 1-Sep-2007 11:39

On Saturday 01 September 2007, Kai Peters wrote:
> config-obj: attempt [ make object! load %my-app.cfg ] > > probe config-obj/setting1 > > The probe fails if there is no 'setting1 defined in > %my-app.cfg > > Is there a way to test for this before attempting to probe (or doing > anything else with it) other than wrapping it in an 'attempt?
;; How about 'in ?
>> o: context[t: 1] >> in o 't
== t
>> in o 'x
== none
>> either in o 'x[print 'yes][print 'no]
no
>> get in o 't
== 1 HTH Tim