This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Component Error Detection?
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 01, 2006
11:06 AM
Component Error Detection?
I have an ANT Target Processor product action in a component. I would like to detect an error immediately after running the component and set a Property Manager property value. I have no problems setting property values but how do you detect failure of a component or product action?
ProductService ps = (ProductService)arg0.getServices().getService(ProductService.NAME);
ProductTree pt = ps.getSoftwareObjectTree(ps.DEFAULT_PRODUCT_SOURCE, null);
GenericSoftwareObject gso = (GenericSoftwareObject) pt.getRoot();
arg0.getServices().displayUserMessage("Install Status","GetBeanID: "+gso.getBeanId(),1);
arg0.getServices().displayUserMessage("Install Status","SoftwareObjectName: "+gso.getDisplayName(),1);
Using the code in the component "onInstalledcomponent" method I would like to get the status of the component bean or, more specifically, the Ant processor action bean.
Problem is with the code above, I can get the root product beanID but the DisplayName is blank. I tried to set gso to pt.getBean("beanid") with no luck.
Can anyone give me a clue how to detect bean errors from an install component method?
Thanks!
ProductService ps = (ProductService)arg0.getServices().getService(ProductService.NAME);
ProductTree pt = ps.getSoftwareObjectTree(ps.DEFAULT_PRODUCT_SOURCE, null);
GenericSoftwareObject gso = (GenericSoftwareObject) pt.getRoot();
arg0.getServices().displayUserMessage("Install Status","GetBeanID: "+gso.getBeanId(),1);
arg0.getServices().displayUserMessage("Install Status","SoftwareObjectName: "+gso.getDisplayName(),1);
Using the code in the component "onInstalledcomponent" method I would like to get the status of the component bean or, more specifically, the Ant processor action bean.
Problem is with the code above, I can get the root product beanID but the DisplayName is blank. I tried to set gso to pt.getBean("beanid") with no luck.
Can anyone give me a clue how to detect bean errors from an install component method?
Thanks!
(1) Reply
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
Mar 02, 2006
08:34 AM
Ok, using kb page:
http://support.installshield.com/kb/view.asp?articleid=Q105052
I am able to get/set bean properties but don't yet see how to detect status.
http://support.installshield.com/kb/view.asp?articleid=Q105052
I am able to get/set bean properties but don't yet see how to detect status.