Hi Bruno,

Don't get me wrong - I'm not asking anyone to debug my code or write me new
code - I just posted it in the hope that it might highlight an issue.  Line
205 is the barcode.setCode(code) line.  All I need to know is how the
barcode object is created.  If I create a piece of code in my main class -
such as this...

            Barcode39 code39 = new Barcode39();
            code39.setCode("CODE39-1234567890");
            code39.setStartStopText(false);
            Image image39 = code39.createImageWithBarcode(cb, null, null);

..then no problem.  It just seems to complain when I put it in a class with
no specific constructor.

I have done exactly the same type of coding with the image object an it
doesn't complain.  The image class creates the object as follows:

this.pdfimage = Image.getInstance(this.pimage);

...but I'm not sure if there is an equivalent for barcodes.

Thanks
Paul


Bruno Lowagie (iText) wrote:
> 
> twinmar wrote:
>> I was under the impression that when a new class was constructed, that
>> all
>> variables within that class are also constructed and that these variables
>> could then be used.  I'm not sure if this is an iText issue or my java.
>> 
>> Any assistance on this issue would be most appreciated.
> 
> Er... you're pasting a load of code (not directly iText related). Your 
> code throws a NullPointerException in line 205 (we don't know which line 
> that is unless we copy/paste your code from a mail into our IDE), and 
> you're asking us to debug your code?
> 
> How much are you willing to pay us to do this?
> br,
> Bruno
> 
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing 
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> iText-questions mailing list
> iText-questions@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> Buy the iText book: http://www.1t3xt.com/docs/book.php
> Check the site with examples before you ask questions:
> http://www.1t3xt.info/examples/
> You can also search the keywords list:
> http://1t3xt.info/tutorials/keywords/
> 
> 

-- 
View this message in context: 
http://www.nabble.com/NullPointerException-during-creation-update-of-barcode-object-tp24031329p24031725.html
Sent from the iText - General mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to