[Soot-list] string problem

Eric Bodden eric.bodden at mail.mcgill.ca
Wed Jul 4 08:50:17 EDT 2007


At the call site the argument should be a StringConstant. This you
should be able to read out. (via toString() ?)

Eric

On 04/07/07, Peng Li <lipeng360 at gmail.com> wrote:
> HI
> For  an example as following, I am wondering if I can get the value of
>  "icon_name" in "new GraphicTemplateAction(description, icon_name,
> MainWindow.getDrawingPanel());", which is "graphic_template.png".
>
> In this case, icon_name is a constant string, which is set by the
> method addGraphicTemplateAction. I remembered I have used options "-W"
> and "-w" to get an int in the same situation, However, it seems not
> work for string,  Does anyone have any suggestions ?
>
>
>
>    private void addGraphicTemplateAction(String displayedText, String
> description, String icon_name, int mnemonicKey, KeyStroke accelerator)
>     {
>         GraphicTemplateAction template_action = new
> GraphicTemplateAction(description, icon_name,
> MainWindow.getDrawingPanel());
>         add(template_action);
>     }
>
> private void initToolbar()
>     {
>         ResourceBundle international = MainWindow.getI18n();
>
>         addGraphicTemplateAction( international.getString(
> "MainWindowFileItemLoadTemp" ), international.getString(
> "MainWindowFileItemLoadTempTooltip" ), "graphic_template.png",
> international.getString( "MainWindowFileItemLoadTempMn" ).charAt(0),
> null );
>   }
>
>
> Cheers
> PP
> _______________________________________________
> Soot-list mailing list
> Soot-list at sable.mcgill.ca
> http://mailman.cs.mcgill.ca/mailman/listinfo/soot-list
>


-- 
Eric Bodden
Sable Research Group
McGill University, Montréal, Canada


More information about the Soot-list mailing list