Forum Post: bug with statics and method calls

  • Thread starter Thread starter jmls
  • Start date Start date
Status
Not open for further replies.
J

jmls

Guest
11.3.1 windows 3.1 I can reproduce a gpf with the following code, and was wondering if anyone else could as well /** temp/bar.cls */ routine-level on error undo, throw. using Progress.Lang.*. class temp.bar: constructor bar(): foo(). end constructor. method public character getFolder(): return "c:\temp". end method. method protected void foo(): def var lv_path as char no-undo. /** create new directory instance, run create method using getFolder method */ new temp.directory():create(substitute("&1/.backup",getFolder())). /** use static property to create new directory instance, run create method using substitute() */ temp.io:directory:create(substitute("&1/.backup","c:\temp")). assign lv_path = substitute("&1/.backup",getFolder()). /** use static property to create new directory instance, run create method using string literal */ temp.io:directory:create(lv_path). /** use static property to create new directory instance, run create method using getFolder method */ temp.io:directory:create(substitute("&1/.backup",getFolder())). /** avm crashes . So, using a combination of static property and method causes this, as other combinations don't */ message "will not see this message" view-as alert-box. end method. end class. /** temp/io.cls */ class temp.io: def static property directory as temp.directory no-undo get(): return new temp.directory(). end get . private set. end class /** temp/directory.cls */ class temp.directory: method public void create(p_dir as char): end method. end class. and then running /** temp/foobar.p */ new temp.bar().

Continue reading...
 
Status
Not open for further replies.
Back
Top