using "getSubclassesUpToSchema " method...help

Forums for specific tips, techniques and example code
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

using "getSubclassesUpToSchema " method...help

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:17 pm

by James Plank >> Fri, 30 Jul 1999 4:01:46 GMT

This sound confusing, Iam just starting to use SubSchema's and I need to use the method...getSubclassesUpToSchema(topSchema: Schema; subs: ClassColl input);

But I dont know how to reference the current schema to pass it as the topSchema parameter to this method

Any ideas??




Confusing Background
I need to get a collection of subclass names for the current subschema using code in a superschema. my app which works fine with

getSubclasses in the superschema

However in a new child subschema this code ..(located in the superschema) doesnt work.

It does work with ..allSubclassesInSubschemas. However I also get other classes from other subschema s , as opposed to just the current subschema class

Now think " getSubclassesUpToSchema" might do the trick but...
I dont know how to reference a the current schema to use a a parameter

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using "getSubclassesUpToSchema " method...help

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:17 pm

by Darrell Duniam >> Fri, 30 Jul 1999 4:32:33 GMT

Hi James,

The way I have used this method (from a subschema) is as follows:

currentSchema.getClass(Object.name).getSubclassesUpToSchema(rootSchema, classColl);

.....where 'classColl' is a local variable of type 'ClassColl'. This returns a collection of all subclasses of the Object class for all schemas (ie. from the RootSchema down).

regards,
darrell.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: using "getSubclassesUpToSchema " method...help

Postby ConvertFromOldNGs » Fri Aug 07, 2009 2:17 pm

by Carl Ranson >> Mon, 2 Aug 1999 4:47:28 GMT

the current schema is in the "schema" system property


Return to “Tips and Techniques”

Who is online

Users browsing this forum: No registered users and 13 guests