You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Peter Toye <ne...@ptoye.com> on 2019/07/09 11:53:19 UTC

Odd character translation

I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png). 

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

If only I could have! It's several thousand lines long and, as I said, trying to regenerate the problem with a simple example didn't work.

However, I've found the solution (I think). You mentioned the OuterPane.form1.txt file which might be confusing NB. I renamed it (I don't delete files incase they're needed again) but the problem stayed. Then I moved it to another directory and the problem went away. I hadn't realised that NB was so sensitive to files that shouldn't be there, even with an extension of .old

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

I tried and cut out most of the objects in the frame, and it worked OK! So this may take some time.... Especially as it's nothing to do with my real work.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

I've managed to reduce the project to a reasonable level. But I've not used Github before as a repository, only to comment on Microsoft's documentation, and I'm having a lot of trouble in getting my file onto it.

I created a repository (private - is that correct?) but when I tell it to upload the .zip file (with my code and a README) it says "Something went really wrong, and we can’t process that file" which isn't much help.

And when I try a push from my local Git to "github.com/ptoye/Netbeans" it says 
	Pushing to github.com/ptoye/Netbeans
	fatal: 'github.com/ptoye/Netbeans' does not appear to be a git repository
	fatal: Could not read from remote repository.

	Please make sure you have the correct access rights
	and the repository exists.

This could be an access control failure as I can't find anything in the git push command to identify myself to the remote.

Also, I think I'll need to know your Github user ID to allow you access.

Sorry to be a pain, but GitHub's UI doesn't help much - the tutorial material doesn't seem to have anything about actually getting files onto it.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj



Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

So you weren't able to confirm that the problem exists on your configuration, then?

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 20, 2019, 10:30:07 AM, you wrote:


No, I didn't do anything other than change the question marks directly in GitHub to the special characters.

Gj


On Sat, 20 Jul 2019 at 10:58, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

The problem was "solved" in that there is a workaround long before I posted it - I simply put setText calls into the constructor.

The reason I posted the problem here was to determine if it was actually a NB issue, or something to do with my configuration.  Jan Lahoda's comment implies the former, so I shall try to produce a smaller example before raising it as an issue.

I assume (I don't think you actually confirmed) that you tried deleting the "undo" button and saw the correct characters appear.


Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 7:11:06 PM, you wrote:


Your problem is solved, I think you should move on to your next problem now.

If you want me to try something, please tell me exactly what it is that I must try.

Thanks,

Gj

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
No, I didn't do anything other than change the question marks directly in
GitHub to the special characters.

Gj


On Sat, 20 Jul 2019 at 10:58, Peter Toye <ne...@ptoye.com> wrote:

> Dear Geertjan,
>
> The problem was "solved" in that there is a workaround long before I
> posted it - I simply put setText calls into the constructor.
>
> The reason I posted the problem here was to determine if it was actually a
> NB issue, or something to do with my configuration.  Jan Lahoda's comment
> implies the former, so I shall try to produce a smaller example before
> raising it as an issue.
>
> I assume (I don't think you actually confirmed) that you tried deleting
> the "undo" button and saw the correct characters appear.
>
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 7:11:06 PM, you wrote:
>
>
> Your problem is solved, I think you should move on to your next problem
> now.
>
> If you want me to try something, please tell me exactly what it is that I
> must try.
>
> Thanks,
>
> Gj
>
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

The problem was "solved" in that there is a workaround long before I posted it - I simply put setText calls into the constructor.

The reason I posted the problem here was to determine if it was actually a NB issue, or something to do with my configuration.  Jan Lahoda's comment implies the former, so I shall try to produce a smaller example before raising it as an issue.

I assume (I don't think you actually confirmed) that you tried deleting the "undo" button and saw the correct characters appear.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 7:11:06 PM, you wrote:


Your problem is solved, I think you should move on to your next problem now.

If you want me to try something, please tell me exactly what it is that I must try.

Thanks,

Gj


Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
Your problem is solved, I think you should move on to your next problem now.

If you want me to try something, please tell me exactly what it is that I
must try.

Thanks,

Gj

On Fri, Jul 19, 2019 at 8:09 PM Peter Toye <ne...@ptoye.com> wrote:

> Sorry - hit "reply" rather than "reply all"
>
> Dear Geertjan,
>
> True. Can you try it in the form editor and see what happens? There's not
> much point in having an IDE which forces you to use an external editor!
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 4:47:07 PM, you wrote:
>
>
> My comment does more than imply: it directly states these words -- "edited
> this file directly in GitHub"
>
> Gj
>
> On Fri, Jul 19, 2019 at 5:35 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> I see. But in the IDE, the initComponents() can't be edited - it's greyed
> out as I'd expect from auto-generated code, especially code prefixed by
>
>   /**
>   ??   * This method is called from within the constructor to initialize
> the form.
>   ??   * WARNING: Do NOT modify this code. The content of this method is
> always
>   ??   * regenerated by the Form Editor.
>   ??   */
>
> So how did you manage to edit it?
>
> Your comment implies that you used a text editor directly in GitHub. If
> you use the Form Editor in NB you might get the result that I did.
>
> I have to do other things now, so won't be back for a few hours.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 4:11:52 PM, you wrote:
>
>
> I cloned your repo and then edited this file directly in GitHub, replacing
> the question marks with your special characters, then created a pull
> request against my own repo and merged it:
>
>
> https://github.com/geertjanw/TestCharacters4/blob/master/src/com/ptoye/TestKiller/OuterPane.java
>
> Gj
>
> On Fri, Jul 19, 2019 at 5:08 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Thanks - it runs fine. So what exactly did you do as I can see no
> difference in either the ,form or .java files?
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 3:57:45 PM, you wrote:
>
>
> 1. Open a terminal window.
> 2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
> 3. Open and run the result from NetBeans.
>
> It will work out of the box, at least it does for me. Will you try it and
> then, after that, write back?
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Thanks. But it seems to me that you edited the .java file. The issue is
> that the part that you edited is auto-generated by NB from the form
> designer, and is not under the programmer's control.
>
> So when I recompile, the old bug will return.
>
> I use "will" here as I'm still trying to work out how to merge your update
> into my local repository. GitHub doesn't have the most intuitive of user
> interfaces and I'm a complete newbie with it.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 1:33:25 PM, you wrote:
>
>
> https://github.com/geertjanw/TestCharacters4.git
>
> Try check out the above and run it -- you should see your special
> characters without needing to do anything.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> The problem appears to be that when you check in or check out from GitHub,
> those special characters become question marks -- probably not best to use
> those special characters to begin with.
>
> To solve the 'swing-layout not found problem' in your project, right-click
> it, choose Properties, go to the Libraries tab, and remove the reference to
> swing-layout, which you don't need and are not using in your project.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> I've checked in the changes you need as a pull request, once you integrate
> the pull request, you will not have question marks. The question marks
> where in your repo, they will not be there anymore after you accept my pull
> request.
>
> At this point, you've spent about two weeks working on this problem --
> maybe you should make images of what you'd like to have on those buttons
> and then attach those images to the buttons instead of what you're
> currently doing. If plan A doesn't work, try plan B.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Errr.... No!
>
> I don’t want to delete the button - it's part of the UI.
>
> What I don't understand is how deleting button X changes the text in
> buttons A,B and C (if you see what I mean). That's surely a bug in NB,
> somewhere when it translates the data in the .form file into the Java code
> for initComponents().
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 12:42:14 PM, you wrote:
>
>
> I just followed your steps now and am now at the end where you say:
>
> "Go back to the OuterPane design and delete the leftmost button (undo).
> Compile and run again. The question marks have disappeared and the
> arrows/square are there!"
>
>
> So, the problem is fixed, i.e., your code is working in the end in the way
> you'd like it to be.
>
> And here is your pull request:
>
> https://github.com/ptoye/TestCharacters4/pull/1
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> You didn't answer my last emails, and I’ve been away for a few days.
>
> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can
> access it but I'm not sure about the privacy settings on GitHub. There's a
> README file to tell you what to do.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>
>
> Make as small a sample as possible that reproduces the problem and put it
> on GitHub — that will always be the approach to take, no one will ever want
> ‘the lot’ to solve a specific problem.
>
> Gj
>
>
> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Oh dear, I was wrong. The problem came back today, even without the
> offending file in the directory.Shall I try to cut down the program to a
> manageable size before posting it, or would you like the lot?
>
> Best regards,
>
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>
>
> You’re always going to have the same response — put the code somewhere so
> that someone can look at it and/or provide clear step by step instructions
> to reproduce the problem.
>
> Gj
>
>
> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>
> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Jan,

I suspect you're right. It's a very old project (the manifest is dated 2007 and I suspect it's even older), and I really can't remember if UTF-8 was even available then, or when/if I changed the encoding.

Certainly, making a minor change and reverting it has the desired effect. Thanks for spotting that.

I'm not sure that your fix is 100% correct, though. The .form file (which I assume is generated by the form editor) has the correct encoding:

<Property name="text" type="java.lang.String" value="&#x25a1;"/>

but the .java file doesn't:

btnRow.setText("?");

So it seems to me that the Form Editor is producing the correct XML, but whatever process that converts it to Java (or is this part of the Form Editor?) isn't picking this up.

The odd thing about this diagnosis is that the error occurred recently when I changed the button form having a GIF to a text character. And the Form Editor certainly picked up this change.

So in this file, your (a) shouldn't be happening as the encoding (UTF-8) is capable of representing the characters. (b) seems to be the problem.

Is it worth while my putting this into JIRA? It's probably a rare occurrence.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 20, 2019, 6:07:51 AM, you wrote:


Hi,

I suspect the cause for the initial problem is that at some point, the files was saved with an encoding that does not handle these characters. And form editor avoids regenerating the code unless there are changes, so the broken code remains until something changes. A potential workaround is to do a change to the model and then undo it (e.g. set "autoscrolls" on one of the buttons and then clear it), that should force regeneration of the code.

I think the fix is two-fold: a) NetBeans should complain while saving files which contain characters that cannot be represented in the current encoding; b) form editor should avoid putting such characters into the source code.

Jan


On Fri, Jul 19, 2019 at 8:09 PM Peter Toye <ne...@ptoye.com> wrote:

Sorry - hit "reply" rather than "reply all"

Dear Geertjan,

True. Can you try it in the form editor and see what happens? There's not much point in having an IDE which forces you to use an external editor!

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 4:47:07 PM, you wrote:


My comment does more than imply: it directly states these words -- "edited this file directly in GitHub"

Gj

On Fri, Jul 19, 2019 at 5:35 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

I see. But in the IDE, the initComponents() can't be edited - it's greyed out as I'd expect from auto-generated code, especially code prefixed by

  /**
  ??   * This method is called from within the constructor to initialize the form.
  ??   * WARNING: Do NOT modify this code. The content of this method is always
  ??   * regenerated by the Form Editor.
  ??   */

So how did you manage to edit it?

Your comment implies that you used a text editor directly in GitHub. If you use the Form Editor in NB you might get the result that I did.

I have to do other things now, so won't be back for a few hours.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 4:11:52 PM, you wrote:


I cloned your repo and then edited this file directly in GitHub, replacing the question marks with your special characters, then created a pull request against my own repo and merged it:

https://github.com/geertjanw/TestCharacters4/blob/master/src/com/ptoye/TestKiller/OuterPane.java

Gj

On Fri, Jul 19, 2019 at 5:08 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Thanks - it runs fine. So what exactly did you do as I can see no difference in either the ,form or .java files?

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 3:57:45 PM, you wrote:


1. Open a terminal window.
2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
3. Open and run the result from NetBeans.

It will work out of the box, at least it does for me. Will you try it and then, after that, write back?

Gj


On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Thanks. But it seems to me that you edited the .java file. The issue is that the part that you edited is auto-generated by NB from the form designer, and is not under the programmer's control.

So when I recompile, the old bug will return.

I use "will" here as I'm still trying to work out how to merge your update into my local repository. GitHub doesn't have the most intuitive of user interfaces and I'm a complete newbie with it.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 1:33:25 PM, you wrote:


https://github.com/geertjanw/TestCharacters4.git

Try check out the above and run it -- you should see your special characters without needing to do anything.

Gj

On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org> wrote:

The problem appears to be that when you check in or check out from GitHub, those special characters become question marks -- probably not best to use those special characters to begin with.

To solve the 'swing-layout not found problem' in your project, right-click it, choose Properties, go to the Libraries tab, and remove the reference to swing-layout, which you don't need and are not using in your project.

Gj

On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org> wrote:

I've checked in the changes you need as a pull request, once you integrate the pull request, you will not have question marks. The question marks where in your repo, they will not be there anymore after you accept my pull request.

At this point, you've spent about two weeks working on this problem -- maybe you should make images of what you'd like to have on those buttons and then attach those images to the buttons instead of what you're currently doing. If plan A doesn't work, try plan B.

Gj

On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Errr.... No!

I don’t want to delete the button - it's part of the UI.

What I don't understand is how deleting button X changes the text in buttons A,B and C (if you see what I mean). That's surely a bug in NB, somewhere when it translates the data in the .form file into the Java code for initComponents().

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 12:42:14 PM, you wrote:


I just followed your steps now and am now at the end where you say:

"Go back to the OuterPane design and delete the leftmost button (undo). Compile and run again. The question marks have disappeared and the arrows/square are there!"


So, the problem is fixed, i.e., your code is working in the end in the way you'd like it to be.

And here is your pull request:

https://github.com/ptoye/TestCharacters4/pull/1

Gj


On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

You didn't answer my last emails, and I’ve been away for a few days.

Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can access it but I'm not sure about the privacy settings on GitHub. There's a README file to tell you what to do.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Jan Lahoda <la...@gmail.com>.
Hi,

I suspect the cause for the initial problem is that at some point, the
files was saved with an encoding that does not handle these characters. And
form editor avoids regenerating the code unless there are changes, so the
broken code remains until something changes. A potential workaround is to
do a change to the model and then undo it (e.g. set "autoscrolls" on one of
the buttons and then clear it), that should force regeneration of the code.

I think the fix is two-fold: a) NetBeans should complain while saving files
which contain characters that cannot be represented in the current
encoding; b) form editor should avoid putting such characters into the
source code.

Jan


On Fri, Jul 19, 2019 at 8:09 PM Peter Toye <ne...@ptoye.com> wrote:

> Sorry - hit "reply" rather than "reply all"
>
> Dear Geertjan,
>
> True. Can you try it in the form editor and see what happens? There's not
> much point in having an IDE which forces you to use an external editor!
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 4:47:07 PM, you wrote:
>
>
> My comment does more than imply: it directly states these words -- "edited
> this file directly in GitHub"
>
> Gj
>
> On Fri, Jul 19, 2019 at 5:35 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> I see. But in the IDE, the initComponents() can't be edited - it's greyed
> out as I'd expect from auto-generated code, especially code prefixed by
>
>   /**
>   ??   * This method is called from within the constructor to initialize
> the form.
>   ??   * WARNING: Do NOT modify this code. The content of this method is
> always
>   ??   * regenerated by the Form Editor.
>   ??   */
>
> So how did you manage to edit it?
>
> Your comment implies that you used a text editor directly in GitHub. If
> you use the Form Editor in NB you might get the result that I did.
>
> I have to do other things now, so won't be back for a few hours.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 4:11:52 PM, you wrote:
>
>
> I cloned your repo and then edited this file directly in GitHub, replacing
> the question marks with your special characters, then created a pull
> request against my own repo and merged it:
>
>
> https://github.com/geertjanw/TestCharacters4/blob/master/src/com/ptoye/TestKiller/OuterPane.java
>
> Gj
>
> On Fri, Jul 19, 2019 at 5:08 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Thanks - it runs fine. So what exactly did you do as I can see no
> difference in either the ,form or .java files?
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 3:57:45 PM, you wrote:
>
>
> 1. Open a terminal window.
> 2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
> 3. Open and run the result from NetBeans.
>
> It will work out of the box, at least it does for me. Will you try it and
> then, after that, write back?
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Thanks. But it seems to me that you edited the .java file. The issue is
> that the part that you edited is auto-generated by NB from the form
> designer, and is not under the programmer's control.
>
> So when I recompile, the old bug will return.
>
> I use "will" here as I'm still trying to work out how to merge your update
> into my local repository. GitHub doesn't have the most intuitive of user
> interfaces and I'm a complete newbie with it.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 1:33:25 PM, you wrote:
>
>
> https://github.com/geertjanw/TestCharacters4.git
>
> Try check out the above and run it -- you should see your special
> characters without needing to do anything.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> The problem appears to be that when you check in or check out from GitHub,
> those special characters become question marks -- probably not best to use
> those special characters to begin with.
>
> To solve the 'swing-layout not found problem' in your project, right-click
> it, choose Properties, go to the Libraries tab, and remove the reference to
> swing-layout, which you don't need and are not using in your project.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> I've checked in the changes you need as a pull request, once you integrate
> the pull request, you will not have question marks. The question marks
> where in your repo, they will not be there anymore after you accept my pull
> request.
>
> At this point, you've spent about two weeks working on this problem --
> maybe you should make images of what you'd like to have on those buttons
> and then attach those images to the buttons instead of what you're
> currently doing. If plan A doesn't work, try plan B.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Errr.... No!
>
> I don’t want to delete the button - it's part of the UI.
>
> What I don't understand is how deleting button X changes the text in
> buttons A,B and C (if you see what I mean). That's surely a bug in NB,
> somewhere when it translates the data in the .form file into the Java code
> for initComponents().
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 12:42:14 PM, you wrote:
>
>
> I just followed your steps now and am now at the end where you say:
>
> "Go back to the OuterPane design and delete the leftmost button (undo).
> Compile and run again. The question marks have disappeared and the
> arrows/square are there!"
>
>
> So, the problem is fixed, i.e., your code is working in the end in the way
> you'd like it to be.
>
> And here is your pull request:
>
> https://github.com/ptoye/TestCharacters4/pull/1
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> You didn't answer my last emails, and I’ve been away for a few days.
>
> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can
> access it but I'm not sure about the privacy settings on GitHub. There's a
> README file to tell you what to do.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>
>
> Make as small a sample as possible that reproduces the problem and put it
> on GitHub — that will always be the approach to take, no one will ever want
> ‘the lot’ to solve a specific problem.
>
> Gj
>
>
> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Oh dear, I was wrong. The problem came back today, even without the
> offending file in the directory.Shall I try to cut down the program to a
> manageable size before posting it, or would you like the lot?
>
> Best regards,
>
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>
>
> You’re always going to have the same response — put the code somewhere so
> that someone can look at it and/or provide clear step by step instructions
> to reproduce the problem.
>
> Gj
>
>
> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>
> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Sorry - hit "reply" rather than "reply all"

Dear Geertjan,

True. Can you try it in the form editor and see what happens? There's not much point in having an IDE which forces you to use an external editor!

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 4:47:07 PM, you wrote:


My comment does more than imply: it directly states these words -- "edited this file directly in GitHub"

Gj

On Fri, Jul 19, 2019 at 5:35 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

I see. But in the IDE, the initComponents() can't be edited - it's greyed out as I'd expect from auto-generated code, especially code prefixed by

  /**
  ??   * This method is called from within the constructor to initialize the form.
  ??   * WARNING: Do NOT modify this code. The content of this method is always
  ??   * regenerated by the Form Editor.
  ??   */

So how did you manage to edit it?

Your comment implies that you used a text editor directly in GitHub. If you use the Form Editor in NB you might get the result that I did.

I have to do other things now, so won't be back for a few hours.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 4:11:52 PM, you wrote:


I cloned your repo and then edited this file directly in GitHub, replacing the question marks with your special characters, then created a pull request against my own repo and merged it:

https://github.com/geertjanw/TestCharacters4/blob/master/src/com/ptoye/TestKiller/OuterPane.java

Gj

On Fri, Jul 19, 2019 at 5:08 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Thanks - it runs fine. So what exactly did you do as I can see no difference in either the ,form or .java files?

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 3:57:45 PM, you wrote:


1. Open a terminal window.
2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
3. Open and run the result from NetBeans.

It will work out of the box, at least it does for me. Will you try it and then, after that, write back?

Gj


On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Thanks. But it seems to me that you edited the .java file. The issue is that the part that you edited is auto-generated by NB from the form designer, and is not under the programmer's control.

So when I recompile, the old bug will return.

I use "will" here as I'm still trying to work out how to merge your update into my local repository. GitHub doesn't have the most intuitive of user interfaces and I'm a complete newbie with it.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 1:33:25 PM, you wrote:


https://github.com/geertjanw/TestCharacters4.git

Try check out the above and run it -- you should see your special characters without needing to do anything.

Gj

On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org> wrote:

The problem appears to be that when you check in or check out from GitHub, those special characters become question marks -- probably not best to use those special characters to begin with.

To solve the 'swing-layout not found problem' in your project, right-click it, choose Properties, go to the Libraries tab, and remove the reference to swing-layout, which you don't need and are not using in your project.

Gj

On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org> wrote:

I've checked in the changes you need as a pull request, once you integrate the pull request, you will not have question marks. The question marks where in your repo, they will not be there anymore after you accept my pull request.

At this point, you've spent about two weeks working on this problem -- maybe you should make images of what you'd like to have on those buttons and then attach those images to the buttons instead of what you're currently doing. If plan A doesn't work, try plan B.

Gj

On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Errr.... No!

I don’t want to delete the button - it's part of the UI.

What I don't understand is how deleting button X changes the text in buttons A,B and C (if you see what I mean). That's surely a bug in NB, somewhere when it translates the data in the .form file into the Java code for initComponents().

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 12:42:14 PM, you wrote:


I just followed your steps now and am now at the end where you say:

"Go back to the OuterPane design and delete the leftmost button (undo). Compile and run again. The question marks have disappeared and the arrows/square are there!"


So, the problem is fixed, i.e., your code is working in the end in the way you'd like it to be.

And here is your pull request:

https://github.com/ptoye/TestCharacters4/pull/1

Gj


On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

You didn't answer my last emails, and I’ve been away for a few days.

Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can access it but I'm not sure about the privacy settings on GitHub. There's a README file to tell you what to do.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
My comment does more than imply: it directly states these words -- "edited
this file directly in GitHub"

Gj

On Fri, Jul 19, 2019 at 5:35 PM Peter Toye <ne...@ptoye.com> wrote:

> Dear Geertjan,
>
> I see. But in the IDE, the initComponents() can't be edited - it's greyed
> out as I'd expect from auto-generated code, especially code prefixed by
>
>   /**
>   ??   * This method is called from within the constructor to initialize
> the form.
>   ??   * WARNING: Do NOT modify this code. The content of this method is
> always
>   ??   * regenerated by the Form Editor.
>   ??   */
>
> So how did you manage to edit it?
>
> Your comment implies that you used a text editor directly in GitHub. If
> you use the Form Editor in NB you might get the result that I did.
>
> I have to do other things now, so won't be back for a few hours.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 4:11:52 PM, you wrote:
>
>
> I cloned your repo and then edited this file directly in GitHub, replacing
> the question marks with your special characters, then created a pull
> request against my own repo and merged it:
>
>
> https://github.com/geertjanw/TestCharacters4/blob/master/src/com/ptoye/TestKiller/OuterPane.java
>
> Gj
>
> On Fri, Jul 19, 2019 at 5:08 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Thanks - it runs fine. So what exactly did you do as I can see no
> difference in either the ,form or .java files?
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 3:57:45 PM, you wrote:
>
>
> 1. Open a terminal window.
> 2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
> 3. Open and run the result from NetBeans.
>
> It will work out of the box, at least it does for me. Will you try it and
> then, after that, write back?
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Thanks. But it seems to me that you edited the .java file. The issue is
> that the part that you edited is auto-generated by NB from the form
> designer, and is not under the programmer's control.
>
> So when I recompile, the old bug will return.
>
> I use "will" here as I'm still trying to work out how to merge your update
> into my local repository. GitHub doesn't have the most intuitive of user
> interfaces and I'm a complete newbie with it.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 1:33:25 PM, you wrote:
>
>
> https://github.com/geertjanw/TestCharacters4.git
>
> Try check out the above and run it -- you should see your special
> characters without needing to do anything.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> The problem appears to be that when you check in or check out from GitHub,
> those special characters become question marks -- probably not best to use
> those special characters to begin with.
>
> To solve the 'swing-layout not found problem' in your project, right-click
> it, choose Properties, go to the Libraries tab, and remove the reference to
> swing-layout, which you don't need and are not using in your project.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> I've checked in the changes you need as a pull request, once you integrate
> the pull request, you will not have question marks. The question marks
> where in your repo, they will not be there anymore after you accept my pull
> request.
>
> At this point, you've spent about two weeks working on this problem --
> maybe you should make images of what you'd like to have on those buttons
> and then attach those images to the buttons instead of what you're
> currently doing. If plan A doesn't work, try plan B.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Errr.... No!
>
> I don’t want to delete the button - it's part of the UI.
>
> What I don't understand is how deleting button X changes the text in
> buttons A,B and C (if you see what I mean). That's surely a bug in NB,
> somewhere when it translates the data in the .form file into the Java code
> for initComponents().
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 12:42:14 PM, you wrote:
>
>
> I just followed your steps now and am now at the end where you say:
>
> "Go back to the OuterPane design and delete the leftmost button (undo).
> Compile and run again. The question marks have disappeared and the
> arrows/square are there!"
>
>
> So, the problem is fixed, i.e., your code is working in the end in the way
> you'd like it to be.
>
> And here is your pull request:
>
> https://github.com/ptoye/TestCharacters4/pull/1
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> You didn't answer my last emails, and I’ve been away for a few days.
>
> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can
> access it but I'm not sure about the privacy settings on GitHub. There's a
> README file to tell you what to do.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>
>
> Make as small a sample as possible that reproduces the problem and put it
> on GitHub — that will always be the approach to take, no one will ever want
> ‘the lot’ to solve a specific problem.
>
> Gj
>
>
> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Oh dear, I was wrong. The problem came back today, even without the
> offending file in the directory.Shall I try to cut down the program to a
> manageable size before posting it, or would you like the lot?
>
> Best regards,
>
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>
>
> You’re always going to have the same response — put the code somewhere so
> that someone can look at it and/or provide clear step by step instructions
> to reproduce the problem.
>
> Gj
>
>
> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>
> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

I see. But in the IDE, the initComponents() can't be edited - it's greyed out as I'd expect from auto-generated code, especially code prefixed by

  /**
  
   * This method is called from within the constructor to initialize the form.
  
   * WARNING: Do NOT modify this code. The content of this method is always
  
   * regenerated by the Form Editor.
  
   */

So how did you manage to edit it? 

Your comment implies that you used a text editor directly in GitHub. If you use the Form Editor in NB you might get the result that I did.

I have to do other things now, so won't be back for a few hours.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 4:11:52 PM, you wrote:


I cloned your repo and then edited this file directly in GitHub, replacing the question marks with your special characters, then created a pull request against my own repo and merged it:

https://github.com/geertjanw/TestCharacters4/blob/master/src/com/ptoye/TestKiller/OuterPane.java

Gj

On Fri, Jul 19, 2019 at 5:08 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Thanks - it runs fine. So what exactly did you do as I can see no difference in either the ,form or .java files?

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 3:57:45 PM, you wrote:


1. Open a terminal window.
2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
3. Open and run the result from NetBeans.

It will work out of the box, at least it does for me. Will you try it and then, after that, write back?

Gj


On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Thanks. But it seems to me that you edited the .java file. The issue is that the part that you edited is auto-generated by NB from the form designer, and is not under the programmer's control.

So when I recompile, the old bug will return.

I use "will" here as I'm still trying to work out how to merge your update into my local repository. GitHub doesn't have the most intuitive of user interfaces and I'm a complete newbie with it.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 1:33:25 PM, you wrote:


https://github.com/geertjanw/TestCharacters4.git

Try check out the above and run it -- you should see your special characters without needing to do anything.

Gj

On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org> wrote:

The problem appears to be that when you check in or check out from GitHub, those special characters become question marks -- probably not best to use those special characters to begin with.

To solve the 'swing-layout not found problem' in your project, right-click it, choose Properties, go to the Libraries tab, and remove the reference to swing-layout, which you don't need and are not using in your project.

Gj

On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org> wrote:

I've checked in the changes you need as a pull request, once you integrate the pull request, you will not have question marks. The question marks where in your repo, they will not be there anymore after you accept my pull request.

At this point, you've spent about two weeks working on this problem -- maybe you should make images of what you'd like to have on those buttons and then attach those images to the buttons instead of what you're currently doing. If plan A doesn't work, try plan B.

Gj

On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Errr.... No!

I don’t want to delete the button - it's part of the UI.

What I don't understand is how deleting button X changes the text in buttons A,B and C (if you see what I mean). That's surely a bug in NB, somewhere when it translates the data in the .form file into the Java code for initComponents().

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 12:42:14 PM, you wrote:


I just followed your steps now and am now at the end where you say:

"Go back to the OuterPane design and delete the leftmost button (undo). Compile and run again. The question marks have disappeared and the arrows/square are there!"


So, the problem is fixed, i.e., your code is working in the end in the way you'd like it to be.

And here is your pull request:

https://github.com/ptoye/TestCharacters4/pull/1

Gj


On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

You didn't answer my last emails, and I’ve been away for a few days.

Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can access it but I'm not sure about the privacy settings on GitHub. There's a README file to tell you what to do.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
I cloned your repo and then edited this file directly in GitHub, replacing
the question marks with your special characters, then created a pull
request against my own repo and merged it:

https://github.com/geertjanw/TestCharacters4/blob/master/src/com/ptoye/TestKiller/OuterPane.java

Gj

On Fri, Jul 19, 2019 at 5:08 PM Peter Toye <ne...@ptoye.com> wrote:

> Dear Geertjan,
>
> Thanks - it runs fine. So what exactly did you do as I can see no
> difference in either the ,form or .java files?
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 3:57:45 PM, you wrote:
>
>
> 1. Open a terminal window.
> 2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
> 3. Open and run the result from NetBeans.
>
> It will work out of the box, at least it does for me. Will you try it and
> then, after that, write back?
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Thanks. But it seems to me that you edited the .java file. The issue is
> that the part that you edited is auto-generated by NB from the form
> designer, and is not under the programmer's control.
>
> So when I recompile, the old bug will return.
>
> I use "will" here as I'm still trying to work out how to merge your update
> into my local repository. GitHub doesn't have the most intuitive of user
> interfaces and I'm a complete newbie with it.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 1:33:25 PM, you wrote:
>
>
> https://github.com/geertjanw/TestCharacters4.git
>
> Try check out the above and run it -- you should see your special
> characters without needing to do anything.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> The problem appears to be that when you check in or check out from GitHub,
> those special characters become question marks -- probably not best to use
> those special characters to begin with.
>
> To solve the 'swing-layout not found problem' in your project, right-click
> it, choose Properties, go to the Libraries tab, and remove the reference to
> swing-layout, which you don't need and are not using in your project.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> I've checked in the changes you need as a pull request, once you integrate
> the pull request, you will not have question marks. The question marks
> where in your repo, they will not be there anymore after you accept my pull
> request.
>
> At this point, you've spent about two weeks working on this problem --
> maybe you should make images of what you'd like to have on those buttons
> and then attach those images to the buttons instead of what you're
> currently doing. If plan A doesn't work, try plan B.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Errr.... No!
>
> I don’t want to delete the button - it's part of the UI.
>
> What I don't understand is how deleting button X changes the text in
> buttons A,B and C (if you see what I mean). That's surely a bug in NB,
> somewhere when it translates the data in the .form file into the Java code
> for initComponents().
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 12:42:14 PM, you wrote:
>
>
> I just followed your steps now and am now at the end where you say:
>
> "Go back to the OuterPane design and delete the leftmost button (undo).
> Compile and run again. The question marks have disappeared and the
> arrows/square are there!"
>
>
> So, the problem is fixed, i.e., your code is working in the end in the way
> you'd like it to be.
>
> And here is your pull request:
>
> https://github.com/ptoye/TestCharacters4/pull/1
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> You didn't answer my last emails, and I’ve been away for a few days.
>
> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can
> access it but I'm not sure about the privacy settings on GitHub. There's a
> README file to tell you what to do.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>
>
> Make as small a sample as possible that reproduces the problem and put it
> on GitHub — that will always be the approach to take, no one will ever want
> ‘the lot’ to solve a specific problem.
>
> Gj
>
>
> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Oh dear, I was wrong. The problem came back today, even without the
> offending file in the directory.Shall I try to cut down the program to a
> manageable size before posting it, or would you like the lot?
>
> Best regards,
>
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>
>
> You’re always going to have the same response — put the code somewhere so
> that someone can look at it and/or provide clear step by step instructions
> to reproduce the problem.
>
> Gj
>
>
> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>
> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

Thanks - it runs fine. So what exactly did you do as I can see no difference in either the ,form or .java files?

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 3:57:45 PM, you wrote:


1. Open a terminal window.
2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
3. Open and run the result from NetBeans.

It will work out of the box, at least it does for me. Will you try it and then, after that, write back?

Gj


On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Thanks. But it seems to me that you edited the .java file. The issue is that the part that you edited is auto-generated by NB from the form designer, and is not under the programmer's control.

So when I recompile, the old bug will return.

I use "will" here as I'm still trying to work out how to merge your update into my local repository. GitHub doesn't have the most intuitive of user interfaces and I'm a complete newbie with it.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 1:33:25 PM, you wrote:


https://github.com/geertjanw/TestCharacters4.git

Try check out the above and run it -- you should see your special characters without needing to do anything.

Gj

On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org> wrote:

The problem appears to be that when you check in or check out from GitHub, those special characters become question marks -- probably not best to use those special characters to begin with.

To solve the 'swing-layout not found problem' in your project, right-click it, choose Properties, go to the Libraries tab, and remove the reference to swing-layout, which you don't need and are not using in your project.

Gj

On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org> wrote:

I've checked in the changes you need as a pull request, once you integrate the pull request, you will not have question marks. The question marks where in your repo, they will not be there anymore after you accept my pull request.

At this point, you've spent about two weeks working on this problem -- maybe you should make images of what you'd like to have on those buttons and then attach those images to the buttons instead of what you're currently doing. If plan A doesn't work, try plan B.

Gj

On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Errr.... No!

I don’t want to delete the button - it's part of the UI.

What I don't understand is how deleting button X changes the text in buttons A,B and C (if you see what I mean). That's surely a bug in NB, somewhere when it translates the data in the .form file into the Java code for initComponents().

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 12:42:14 PM, you wrote:


I just followed your steps now and am now at the end where you say:

"Go back to the OuterPane design and delete the leftmost button (undo). Compile and run again. The question marks have disappeared and the arrows/square are there!"


So, the problem is fixed, i.e., your code is working in the end in the way you'd like it to be.

And here is your pull request:

https://github.com/ptoye/TestCharacters4/pull/1

Gj


On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

You didn't answer my last emails, and I’ve been away for a few days.

Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can access it but I'm not sure about the privacy settings on GitHub. There's a README file to tell you what to do.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
1. Open a terminal window.
2. Type: git clone https://github.com/geertjanw/TestCharacters4.git
3. Open and run the result from NetBeans.

It will work out of the box, at least it does for me. Will you try it and
then, after that, write back?

Gj


On Fri, Jul 19, 2019 at 4:52 PM Peter Toye <ne...@ptoye.com> wrote:

> Dear Geertjan,
>
> Thanks. But it seems to me that you edited the .java file. The issue is
> that the part that you edited is auto-generated by NB from the form
> designer, and is not under the programmer's control.
>
> So when I recompile, the old bug will return.
>
> I use "will" here as I'm still trying to work out how to merge your update
> into my local repository. GitHub doesn't have the most intuitive of user
> interfaces and I'm a complete newbie with it.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 1:33:25 PM, you wrote:
>
>
> https://github.com/geertjanw/TestCharacters4.git
>
> Try check out the above and run it -- you should see your special
> characters without needing to do anything.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> The problem appears to be that when you check in or check out from GitHub,
> those special characters become question marks -- probably not best to use
> those special characters to begin with.
>
> To solve the 'swing-layout not found problem' in your project, right-click
> it, choose Properties, go to the Libraries tab, and remove the reference to
> swing-layout, which you don't need and are not using in your project.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
> I've checked in the changes you need as a pull request, once you integrate
> the pull request, you will not have question marks. The question marks
> where in your repo, they will not be there anymore after you accept my pull
> request.
>
> At this point, you've spent about two weeks working on this problem --
> maybe you should make images of what you'd like to have on those buttons
> and then attach those images to the buttons instead of what you're
> currently doing. If plan A doesn't work, try plan B.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Errr.... No!
>
> I don’t want to delete the button - it's part of the UI.
>
> What I don't understand is how deleting button X changes the text in
> buttons A,B and C (if you see what I mean). That's surely a bug in NB,
> somewhere when it translates the data in the .form file into the Java code
> for initComponents().
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 12:42:14 PM, you wrote:
>
>
> I just followed your steps now and am now at the end where you say:
>
> "Go back to the OuterPane design and delete the leftmost button (undo).
> Compile and run again. The question marks have disappeared and the
> arrows/square are there!"
>
>
> So, the problem is fixed, i.e., your code is working in the end in the way
> you'd like it to be.
>
> And here is your pull request:
>
> https://github.com/ptoye/TestCharacters4/pull/1
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> You didn't answer my last emails, and I’ve been away for a few days.
>
> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can
> access it but I'm not sure about the privacy settings on GitHub. There's a
> README file to tell you what to do.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>
>
> Make as small a sample as possible that reproduces the problem and put it
> on GitHub — that will always be the approach to take, no one will ever want
> ‘the lot’ to solve a specific problem.
>
> Gj
>
>
> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Oh dear, I was wrong. The problem came back today, even without the
> offending file in the directory.Shall I try to cut down the program to a
> manageable size before posting it, or would you like the lot?
>
> Best regards,
>
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>
>
> You’re always going to have the same response — put the code somewhere so
> that someone can look at it and/or provide clear step by step instructions
> to reproduce the problem.
>
> Gj
>
>
> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>
> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

Thanks. But it seems to me that you edited the .java file. The issue is that the part that you edited is auto-generated by NB from the form designer, and is not under the programmer's control.

So when I recompile, the old bug will return.

I use "will" here as I'm still trying to work out how to merge your update into my local repository. GitHub doesn't have the most intuitive of user interfaces and I'm a complete newbie with it.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 1:33:25 PM, you wrote:


https://github.com/geertjanw/TestCharacters4.git

Try check out the above and run it -- you should see your special characters without needing to do anything.

Gj

On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org> wrote:

The problem appears to be that when you check in or check out from GitHub, those special characters become question marks -- probably not best to use those special characters to begin with.

To solve the 'swing-layout not found problem' in your project, right-click it, choose Properties, go to the Libraries tab, and remove the reference to swing-layout, which you don't need and are not using in your project.

Gj

On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org> wrote:

I've checked in the changes you need as a pull request, once you integrate the pull request, you will not have question marks. The question marks where in your repo, they will not be there anymore after you accept my pull request.

At this point, you've spent about two weeks working on this problem -- maybe you should make images of what you'd like to have on those buttons and then attach those images to the buttons instead of what you're currently doing. If plan A doesn't work, try plan B.

Gj

On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Errr.... No!

I don’t want to delete the button - it's part of the UI.

What I don't understand is how deleting button X changes the text in buttons A,B and C (if you see what I mean). That's surely a bug in NB, somewhere when it translates the data in the .form file into the Java code for initComponents().

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 12:42:14 PM, you wrote:


I just followed your steps now and am now at the end where you say:

"Go back to the OuterPane design and delete the leftmost button (undo). Compile and run again. The question marks have disappeared and the arrows/square are there!"


So, the problem is fixed, i.e., your code is working in the end in the way you'd like it to be.

And here is your pull request:

https://github.com/ptoye/TestCharacters4/pull/1

Gj


On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

You didn't answer my last emails, and I’ve been away for a few days.

Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can access it but I'm not sure about the privacy settings on GitHub. There's a README file to tell you what to do.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
https://github.com/geertjanw/TestCharacters4.git

Try check out the above and run it -- you should see your special
characters without needing to do anything.

Gj

On Fri, Jul 19, 2019 at 2:28 PM Geertjan Wielenga <ge...@apache.org>
wrote:

> The problem appears to be that when you check in or check out from GitHub,
> those special characters become question marks -- probably not best to use
> those special characters to begin with.
>
> To solve the 'swing-layout not found problem' in your project, right-click
> it, choose Properties, go to the Libraries tab, and remove the reference to
> swing-layout, which you don't need and are not using in your project.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org>
> wrote:
>
>> I've checked in the changes you need as a pull request, once you
>> integrate the pull request, you will not have question marks. The question
>> marks where in your repo, they will not be there anymore after you accept
>> my pull request.
>>
>> At this point, you've spent about two weeks working on this problem --
>> maybe you should make images of what you'd like to have on those buttons
>> and then attach those images to the buttons instead of what you're
>> currently doing. If plan A doesn't work, try plan B.
>>
>> Gj
>>
>> On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:
>>
>>> Dear Geertjan,
>>>
>>> Errr.... No!
>>>
>>> I don’t want to delete the button - it's part of the UI.
>>>
>>> What I don't understand is how deleting button X changes the text in
>>> buttons A,B and C (if you see what I mean). That's surely a bug in NB,
>>> somewhere when it translates the data in the .form file into the Java code
>>> for initComponents().
>>>
>>> Best regards,
>>>
>>> Peter
>>> mailto:netbeans@ptoye.com
>>> www.ptoye.com
>>>
>>> -------------------------
>>> Friday, July 19, 2019, 12:42:14 PM, you wrote:
>>>
>>>
>>> I just followed your steps now and am now at the end where you say:
>>>
>>> "Go back to the OuterPane design and delete the leftmost button (undo).
>>> Compile and run again. The question marks have disappeared and the
>>> arrows/square are there!"
>>>
>>>
>>> So, the problem is fixed, i.e., your code is working in the end in the
>>> way you'd like it to be.
>>>
>>> And here is your pull request:
>>>
>>> https://github.com/ptoye/TestCharacters4/pull/1
>>>
>>> Gj
>>>
>>>
>>> On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:
>>>
>>> Dear Geertjan,
>>>
>>> You didn't answer my last emails, and I’ve been away for a few days.
>>>
>>> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you
>>> can access it but I'm not sure about the privacy settings on GitHub.
>>> There's a README file to tell you what to do.
>>>
>>> Best regards,
>>>
>>> Peter
>>> mailto:netbeans@ptoye.com
>>> www.ptoye.com
>>>
>>> -------------------------
>>> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>>>
>>>
>>> Make as small a sample as possible that reproduces the problem and put
>>> it on GitHub — that will always be the approach to take, no one will ever
>>> want ‘the lot’ to solve a specific problem.
>>>
>>> Gj
>>>
>>>
>>> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>>>
>>> Dear Geertjan,
>>>
>>> Oh dear, I was wrong. The problem came back today, even without the
>>> offending file in the directory.Shall I try to cut down the program to a
>>> manageable size before posting it, or would you like the lot?
>>>
>>> Best regards,
>>>
>>>
>>> Peter
>>> mailto:netbeans@ptoye.com
>>> www.ptoye.com
>>>
>>> -------------------------
>>> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>>>
>>>
>>> You’re always going to have the same response — put the code somewhere
>>> so that someone can look at it and/or provide clear step by step
>>> instructions to reproduce the problem.
>>>
>>> Gj
>>>
>>>
>>> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>>>
>>> To continue with this (as I've not had any feedback) the .form file
>>> seems to contain the correct character:
>>>
>>>         </Component>
>>>         <Component class="javax.swing.JButton" name="btnRow">
>>>           <Properties>
>>>             <Property name="font" type="java.awt.Font"
>>> editor="org.netbeans.beaninfo.editors.FontEditor">
>>>               <Font name="SansSerif" size="12" style="0"/>
>>>             </Property>
>>>             <Property name="text" type="java.lang.String"
>>> value="&#x2194;"/>                THIS IS CORRECT!
>>>             <Property name="toolTipText" type="java.lang.String"
>>> value="Confine selected squares to row"/>
>>>             <Property name="margin" type="java.awt.Insets"
>>> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>>>               <Insets value="[2, 5, 2, 5]"/>
>>>             </Property>
>>>           </Properties>
>>>
>>> So there's something wrong in the translation from this and the
>>> generated Java.
>>>
>>> Peter
>>> mailto:netbeans@ptoye.com
>>> www.ptoye.com
>>>
>>> -------------------------
>>>
>>> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>>>
>>>
>>> I modified a button to display a character rather than a GIF icon. The
>>> character is a symbol - from the Unicode arrows set \x219x. It displays OK
>>> in the Design (and also Preview) panes (see Fonts1.png) but when the
>>> program is run it displays as a question mark. And if I look at the
>>> generated code, the question mark is there as well (see Fonts2.png).
>>>
>>> The character coding for the project is set to UTF-8, so there shouldn't
>>> be any code conversion issues there.
>>>
>>> I've looked at the generated code with a hex editor and it's definitely
>>> a "?", the problem isn't just the display font used for the file.
>>>
>>> The only slightly odd thing about the project is that it was imported
>>> from NB version 8.
>>>
>>> I've tried generating a such simpler example from scratch, but this
>>> displays OK. And the generated code has the correct UTF-8 encoding for the
>>> character.
>>>
>>> Has anyone any idea what's going on? It seems to be something to do with
>>> converting the form design to Java code, which I don't know anything about.
>>>
>>>
>>> Thanks in advance,
>>>
>>> Peter
>>> mailto:netbeans@ptoye.com <ne...@ptoye.com>
>>> www.ptoye.com
>>>
>>

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
The problem appears to be that when you check in or check out from GitHub,
those special characters become question marks -- probably not best to use
those special characters to begin with.

To solve the 'swing-layout not found problem' in your project, right-click
it, choose Properties, go to the Libraries tab, and remove the reference to
swing-layout, which you don't need and are not using in your project.

Gj

On Fri, Jul 19, 2019 at 2:09 PM Geertjan Wielenga <ge...@apache.org>
wrote:

> I've checked in the changes you need as a pull request, once you integrate
> the pull request, you will not have question marks. The question marks
> where in your repo, they will not be there anymore after you accept my pull
> request.
>
> At this point, you've spent about two weeks working on this problem --
> maybe you should make images of what you'd like to have on those buttons
> and then attach those images to the buttons instead of what you're
> currently doing. If plan A doesn't work, try plan B.
>
> Gj
>
> On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:
>
>> Dear Geertjan,
>>
>> Errr.... No!
>>
>> I don’t want to delete the button - it's part of the UI.
>>
>> What I don't understand is how deleting button X changes the text in
>> buttons A,B and C (if you see what I mean). That's surely a bug in NB,
>> somewhere when it translates the data in the .form file into the Java code
>> for initComponents().
>>
>> Best regards,
>>
>> Peter
>> mailto:netbeans@ptoye.com
>> www.ptoye.com
>>
>> -------------------------
>> Friday, July 19, 2019, 12:42:14 PM, you wrote:
>>
>>
>> I just followed your steps now and am now at the end where you say:
>>
>> "Go back to the OuterPane design and delete the leftmost button (undo).
>> Compile and run again. The question marks have disappeared and the
>> arrows/square are there!"
>>
>>
>> So, the problem is fixed, i.e., your code is working in the end in the
>> way you'd like it to be.
>>
>> And here is your pull request:
>>
>> https://github.com/ptoye/TestCharacters4/pull/1
>>
>> Gj
>>
>>
>> On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:
>>
>> Dear Geertjan,
>>
>> You didn't answer my last emails, and I’ve been away for a few days.
>>
>> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can
>> access it but I'm not sure about the privacy settings on GitHub. There's a
>> README file to tell you what to do.
>>
>> Best regards,
>>
>> Peter
>> mailto:netbeans@ptoye.com
>> www.ptoye.com
>>
>> -------------------------
>> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>>
>>
>> Make as small a sample as possible that reproduces the problem and put it
>> on GitHub — that will always be the approach to take, no one will ever want
>> ‘the lot’ to solve a specific problem.
>>
>> Gj
>>
>>
>> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>>
>> Dear Geertjan,
>>
>> Oh dear, I was wrong. The problem came back today, even without the
>> offending file in the directory.Shall I try to cut down the program to a
>> manageable size before posting it, or would you like the lot?
>>
>> Best regards,
>>
>>
>> Peter
>> mailto:netbeans@ptoye.com
>> www.ptoye.com
>>
>> -------------------------
>> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>>
>>
>> You’re always going to have the same response — put the code somewhere so
>> that someone can look at it and/or provide clear step by step instructions
>> to reproduce the problem.
>>
>> Gj
>>
>>
>> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>>
>> To continue with this (as I've not had any feedback) the .form file seems
>> to contain the correct character:
>>
>>         </Component>
>>         <Component class="javax.swing.JButton" name="btnRow">
>>           <Properties>
>>             <Property name="font" type="java.awt.Font"
>> editor="org.netbeans.beaninfo.editors.FontEditor">
>>               <Font name="SansSerif" size="12" style="0"/>
>>             </Property>
>>             <Property name="text" type="java.lang.String"
>> value="&#x2194;"/>                THIS IS CORRECT!
>>             <Property name="toolTipText" type="java.lang.String"
>> value="Confine selected squares to row"/>
>>             <Property name="margin" type="java.awt.Insets"
>> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>>               <Insets value="[2, 5, 2, 5]"/>
>>             </Property>
>>           </Properties>
>>
>> So there's something wrong in the translation from this and the generated
>> Java.
>>
>> Peter
>> mailto:netbeans@ptoye.com
>> www.ptoye.com
>>
>> -------------------------
>>
>> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>>
>>
>> I modified a button to display a character rather than a GIF icon. The
>> character is a symbol - from the Unicode arrows set \x219x. It displays OK
>> in the Design (and also Preview) panes (see Fonts1.png) but when the
>> program is run it displays as a question mark. And if I look at the
>> generated code, the question mark is there as well (see Fonts2.png).
>>
>> The character coding for the project is set to UTF-8, so there shouldn't
>> be any code conversion issues there.
>>
>> I've looked at the generated code with a hex editor and it's definitely a
>> "?", the problem isn't just the display font used for the file.
>>
>> The only slightly odd thing about the project is that it was imported
>> from NB version 8.
>>
>> I've tried generating a such simpler example from scratch, but this
>> displays OK. And the generated code has the correct UTF-8 encoding for the
>> character.
>>
>> Has anyone any idea what's going on? It seems to be something to do with
>> converting the form design to Java code, which I don't know anything about.
>>
>>
>> Thanks in advance,
>>
>> Peter
>> mailto:netbeans@ptoye.com <ne...@ptoye.com>
>> www.ptoye.com
>>
>

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
I've checked in the changes you need as a pull request, once you integrate
the pull request, you will not have question marks. The question marks
where in your repo, they will not be there anymore after you accept my pull
request.

At this point, you've spent about two weeks working on this problem --
maybe you should make images of what you'd like to have on those buttons
and then attach those images to the buttons instead of what you're
currently doing. If plan A doesn't work, try plan B.

Gj

On Fri, Jul 19, 2019 at 2:07 PM Peter Toye <ne...@ptoye.com> wrote:

> Dear Geertjan,
>
> Errr.... No!
>
> I don’t want to delete the button - it's part of the UI.
>
> What I don't understand is how deleting button X changes the text in
> buttons A,B and C (if you see what I mean). That's surely a bug in NB,
> somewhere when it translates the data in the .form file into the Java code
> for initComponents().
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 19, 2019, 12:42:14 PM, you wrote:
>
>
> I just followed your steps now and am now at the end where you say:
>
> "Go back to the OuterPane design and delete the leftmost button (undo).
> Compile and run again. The question marks have disappeared and the
> arrows/square are there!"
>
>
> So, the problem is fixed, i.e., your code is working in the end in the way
> you'd like it to be.
>
> And here is your pull request:
>
> https://github.com/ptoye/TestCharacters4/pull/1
>
> Gj
>
>
> On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> You didn't answer my last emails, and I’ve been away for a few days.
>
> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can
> access it but I'm not sure about the privacy settings on GitHub. There's a
> README file to tell you what to do.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>
>
> Make as small a sample as possible that reproduces the problem and put it
> on GitHub — that will always be the approach to take, no one will ever want
> ‘the lot’ to solve a specific problem.
>
> Gj
>
>
> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Oh dear, I was wrong. The problem came back today, even without the
> offending file in the directory.Shall I try to cut down the program to a
> manageable size before posting it, or would you like the lot?
>
> Best regards,
>
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>
>
> You’re always going to have the same response — put the code somewhere so
> that someone can look at it and/or provide clear step by step instructions
> to reproduce the problem.
>
> Gj
>
>
> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>
> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

Errr.... No!

I don’t want to delete the button - it's part of the UI. 

What I don't understand is how deleting button X changes the text in buttons A,B and C (if you see what I mean). That's surely a bug in NB, somewhere when it translates the data in the .form file into the Java code for initComponents().

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 19, 2019, 12:42:14 PM, you wrote:


I just followed your steps now and am now at the end where you say:

"Go back to the OuterPane design and delete the leftmost button (undo). Compile and run again. The question marks have disappeared and the arrows/square are there!"


So, the problem is fixed, i.e., your code is working in the end in the way you'd like it to be.

And here is your pull request:

https://github.com/ptoye/TestCharacters4/pull/1

Gj


On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

You didn't answer my last emails, and I’ve been away for a few days.

Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can access it but I'm not sure about the privacy settings on GitHub. There's a README file to tell you what to do.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
I just followed your steps now and am now at the end where you say:

"Go back to the OuterPane design and delete the leftmost button (undo).
Compile and run again. The question marks have disappeared and the
arrows/square are there!"


So, the problem is fixed, i.e., your code is working in the end in the way
you'd like it to be.

And here is your pull request:

https://github.com/ptoye/TestCharacters4/pull/1

Gj


On Fri, Jul 19, 2019 at 1:28 PM Peter Toye <ne...@ptoye.com> wrote:

> Dear Geertjan,
>
> You didn't answer my last emails, and I’ve been away for a few days.
>
> Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can
> access it but I'm not sure about the privacy settings on GitHub. There's a
> README file to tell you what to do.
>
> Best regards,
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Saturday, July 13, 2019, 4:28:57 PM, you wrote:
>
>
> Make as small a sample as possible that reproduces the problem and put it
> on GitHub — that will always be the approach to take, no one will ever want
> ‘the lot’ to solve a specific problem.
>
> Gj
>
>
> On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:
>
> Dear Geertjan,
>
> Oh dear, I was wrong. The problem came back today, even without the
> offending file in the directory.Shall I try to cut down the program to a
> manageable size before posting it, or would you like the lot?
>
> Best regards,
>
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>
>
> You’re always going to have the same response — put the code somewhere so
> that someone can look at it and/or provide clear step by step instructions
> to reproduce the problem.
>
> Gj
>
>
> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>
> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

You didn't answer my last emails, and I’ve been away for a few days.

Have a look at https://github.com/ptoye/TestCharacters4 - I hope you can access it but I'm not sure about the privacy settings on GitHub. There's a README file to tell you what to do.

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Saturday, July 13, 2019, 4:28:57 PM, you wrote:


Make as small a sample as possible that reproduces the problem and put it on GitHub — that will always be the approach to take, no one will ever want ‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,


Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
Make as small a sample as possible that reproduces the problem and put it
on GitHub — that will always be the approach to take, no one will ever want
‘the lot’ to solve a specific problem.

Gj


On Sat, 13 Jul 2019 at 17:19, Peter Toye <ne...@ptoye.com> wrote:

> Dear Geertjan,
>
> Oh dear, I was wrong. The problem came back today, even without the
> offending file in the directory.Shall I try to cut down the program to a
> manageable size before posting it, or would you like the lot?
>
> Best regards,
>
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
> Friday, July 12, 2019, 4:25:35 PM, you wrote:
>
>
> You’re always going to have the same response — put the code somewhere so
> that someone can look at it and/or provide clear step by step instructions
> to reproduce the problem.
>
> Gj
>
>
> On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:
>
> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
Dear Geertjan,

Oh dear, I was wrong. The problem came back today, even without the offending file in the directory.Shall I try to cut down the program to a manageable size before posting it, or would you like the lot?

Best regards,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Friday, July 12, 2019, 4:25:35 PM, you wrote:


You’re always going to have the same response — put the code somewhere so that someone can look at it and/or provide clear step by step instructions to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>                THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------

Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

Re: Odd character translation

Posted by Geertjan Wielenga <ge...@apache.org>.
You’re always going to have the same response — put the code somewhere so
that someone can look at it and/or provide clear step by step instructions
to reproduce the problem.

Gj


On Fri, 12 Jul 2019 at 17:15, Peter Toye <ne...@ptoye.com> wrote:

> To continue with this (as I've not had any feedback) the .form file seems
> to contain the correct character:
>
>         </Component>
>         <Component class="javax.swing.JButton" name="btnRow">
>           <Properties>
>             <Property name="font" type="java.awt.Font"
> editor="org.netbeans.beaninfo.editors.FontEditor">
>               <Font name="SansSerif" size="12" style="0"/>
>             </Property>
>             <Property name="text" type="java.lang.String"
> value="&#x2194;"/>                THIS IS CORRECT!
>             <Property name="toolTipText" type="java.lang.String"
> value="Confine selected squares to row"/>
>             <Property name="margin" type="java.awt.Insets"
> editor="org.netbeans.beaninfo.editors.InsetsEditor">
>               <Insets value="[2, 5, 2, 5]"/>
>             </Property>
>           </Properties>
>
> So there's something wrong in the translation from this and the generated
> Java.
>
> Peter
> mailto:netbeans@ptoye.com
> www.ptoye.com
>
> -------------------------
>
> Tuesday, July 9, 2019, 12:53:19 PM, you wrote:
>
>
> I modified a button to display a character rather than a GIF icon. The
> character is a symbol - from the Unicode arrows set \x219x. It displays OK
> in the Design (and also Preview) panes (see Fonts1.png) but when the
> program is run it displays as a question mark. And if I look at the
> generated code, the question mark is there as well (see Fonts2.png).
>
> The character coding for the project is set to UTF-8, so there shouldn't
> be any code conversion issues there.
>
> I've looked at the generated code with a hex editor and it's definitely a
> "?", the problem isn't just the display font used for the file.
>
> The only slightly odd thing about the project is that it was imported from
> NB version 8.
>
> I've tried generating a such simpler example from scratch, but this
> displays OK. And the generated code has the correct UTF-8 encoding for the
> character.
>
> Has anyone any idea what's going on? It seems to be something to do with
> converting the form design to Java code, which I don't know anything about.
>
>
> Thanks in advance,
>
> Peter
> mailto:netbeans@ptoye.com <ne...@ptoye.com>
> www.ptoye.com
>

Re: Odd character translation

Posted by Peter Toye <ne...@ptoye.com>.
To continue with this (as I've not had any feedback) the .form file seems to contain the correct character:

        </Component>
        <Component class="javax.swing.JButton" name="btnRow">
          <Properties>
            <Property name="font" type="java.awt.Font" editor="org.netbeans.beaninfo.editors.FontEditor">
              <Font name="SansSerif" size="12" style="0"/>
            </Property>
            <Property name="text" type="java.lang.String" value="&#x2194;"/>		THIS IS CORRECT!
            <Property name="toolTipText" type="java.lang.String" value="Confine selected squares to row"/>
            <Property name="margin" type="java.awt.Insets" editor="org.netbeans.beaninfo.editors.InsetsEditor">
              <Insets value="[2, 5, 2, 5]"/>
            </Property>
          </Properties>

So there's something wrong in the translation from this and the generated Java.

Peter
mailto:netbeans@ptoye.com
www.ptoye.com

-------------------------
Tuesday, July 9, 2019, 12:53:19 PM, you wrote:


I modified a button to display a character rather than a GIF icon. The character is a symbol - from the Unicode arrows set \x219x. It displays OK in the Design (and also Preview) panes (see Fonts1.png) but when the program is run it displays as a question mark. And if I look at the generated code, the question mark is there as well (see Fonts2.png).

The character coding for the project is set to UTF-8, so there shouldn't be any code conversion issues there.

I've looked at the generated code with a hex editor and it's definitely a "?", the problem isn't just the display font used for the file.

The only slightly odd thing about the project is that it was imported from NB version 8.

I've tried generating a such simpler example from scratch, but this displays OK. And the generated code has the correct UTF-8 encoding for the character.

Has anyone any idea what's going on? It seems to be something to do with converting the form design to Java code, which I don't know anything about.

 
Thanks in advance,

Peter
mailto:netbeans@ptoye.com
www.ptoye.com