PDA

View Full Version : Pick up a variable Value and save it



bjfrary
05-18-2004, 01:08 PM
This allows the user to save a value read from a file.

The user specifies a File name and a search string (b). Optionally the user can specify a second search string (a), a prefix and a terminator that is contained on the line with the value that should be eleiminated.

For Example

<paramName>Variable1</paramName>
<paramValue>Value1</paramValue>

In the IDE I would set
Filename = filename
SearchString A = Variable1
SearchStringB = <paramValue>
prefix = <paramValue>
terminator = </paramValue>

The code searches the specified filename for SearchStringA if it is not the empty string. When it finds it or if it's empty it starts looking for searchStringB at that point in the file. When it finds search string b it removes the prefix and the terminator and stores the rest of the line in the value property


Barbara

nhanthan
06-15-2007, 01:29 PM
Hi bjfrary,

I'm working on a custom bean doing similar thing like yours. Before going to the main bean, I tried to test very simple bean to see if it works. Unfortunately I got these error messages:
C:\Program Files\InstallShield\MP50\classes>javac -classpath "C:\Program Files\I
nstallShield\MP50\lib\wizard.jar" FirstWizAction.java
FirstWizAction.java:38: class WizardAction is public, should be declared in a fi
le named WizardAction.java
public final class WizardAction extends com.installshield.wizard {
^
FirstWizAction.java:38: cannot find symbol
symbol : class wizard
location: package com.installshield
public final class WizardAction extends com.installshield.wizard {
^
FirstWizAction.java:15: cannot inherit from final WizardAction
public class FirstWizAction extends WizardAction{
^
3 errors

----------------
Could you please tell me how to fix these?

Btw, could you please send me the bean you created to my email, since your zip file is not allowed to download at this time. My email: nhan.than@gmail.com.

Thank you

bjfrary
06-12-2008, 09:44 AM
I compile my beans in a development environment or an ant script which includes every jar file in the lib dir except conversion.jar. Also I include all the jars in the ppk directory. This may be overkill for your situation but I have to do it this way and it's a lot of work to figure out exactly which ones you need.