The Kinetic Jump site navigation header requires JavaScript to be enabled and the latest version of the Macromedia Flash Player. If you are you using a browser with JavaScript disabled please enable it now. Otherwise, please update your version of the free Flash Player by downloading here.

Welcome Guest Search | Active Topics | Log In | Register

Expanding share properties Options
jorgerubio
#1 Posted : Wednesday, May 13, 2009 6:47:49 PM
Rank: Advanced Member
Groups: Member

Joined: 9/18/2007
Posts: 31
I've made a custom action and i was wondering what should i do to make one of my fields to support Expanding share properties like the default ones.

An example of my field is:

[Description("Type the name of the system folder($FolderSis)")]
        public string FolderKey2
        {
            get { return this.Folder2; }
            set
            {
                this.Folder2 = value;               
            }
        }


Thanks
brianh
#2 Posted : Wednesday, May 13, 2009 8:51:50 PM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 351
Location: Minnesota

Hello Jorge,

 

Utilize the ExpandSharedProperties method of the UpdateContext class.

 

You would do this when you use your property within the prepare, execute, cleanup, or rollback methods.

 

For example, to use your FolderKey2 property in the execute method, you could expand any shared properties in the value by doing this:

 

public override void Execute(UpdateContext context) {

   string expandedFolderKey2 = context.ExpandSharedProperties(this.FolderKey2);

 

   ...

}

 

 

[Description("Type the name of the system folder($FolderSis)")]
        public string FolderKey2
        {
            get { return  this.Folder2; }
            set
            {
                this.Folder2 = value;               
            }
        }

Brian Haas
Kinetic Jump Software
jorgerubio
#3 Posted : Thursday, May 14, 2009 9:29:11 AM
Rank: Advanced Member
Groups: Member

Joined: 9/18/2007
Posts: 31
i did this in my custom action but when i see the field in the editor i didn't see the tiny blue ball which indicates that this field supports expanding share properties :(
brianh
#4 Posted : Thursday, May 14, 2009 11:24:32 AM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 351
Location: Minnesota

Hello Jorge,

 

We place the icon on our action editors to indicate that the field supports expanding shared properties.  On your actions, you decide which properties support expanding shared properties.  The default editor for a custom property is a property grid.  If you choose to, you can create an editor for your action and add the blue ball icon.

Brian Haas
Kinetic Jump Software
jorgerubio
#5 Posted : Thursday, May 14, 2009 11:35:08 AM
Rank: Advanced Member
Groups: Member

Joined: 9/18/2007
Posts: 31
ah ok brian i get it :) i thought somwthing was wrong, i'm going to test it

Thanks
jorgerubio
#6 Posted : Thursday, May 14, 2009 11:53:15 AM
Rank: Advanced Member
Groups: Member

Joined: 9/18/2007
Posts: 31
i also have another question about shared properties, for now i have only able to share properties which are Strings. but i have a field registry field which needs a Dword value. This field clearly do not support Expanded variables.How can i use share properties for this particular field?

brianh
#7 Posted : Thursday, May 14, 2009 1:01:13 PM
Rank: Administration
Groups: Member, Administration

Joined: 5/24/2007
Posts: 351
Location: Minnesota
You would have to make your field a string.  Then when you use the value, expand the shared properties and then convert the value to a number.
Brian Haas
Kinetic Jump Software
Users browsing this topic
Guest
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.