Hello,
I used the textbox with integer style for years to let the user input only numbers for a code, 01103 for instance.
In the latest release suddenly I got the problem that the first zero has been trimmed automatically when leaving the textbox :-[. Because this is not done by my code the question is if it is a wanted feature in OpenDCL. This would break my code, so please let me know, if this is wanted.
Fred
I can't reproduce this problem. Can you post a sample?
Hello,
I go crazy! ???
When using the form without lisp source code, the zero in front won't disappear. So everybody would think it's a problem of my code. But I cannot see a position of my code where the zero in front will be trimmed :'( .
Does anybody have an idea?
Fred
Fred, I loaded your project, but I don't know what I need to do to see the problem.
Hello Owen,
I'm using 5.0.0.9 DEU
If you try this like in the video - can you reproduce this?
Fred
Fred, I cannot reproduce this using either the ENU or DEU runtimes.
Hello, Owen, did you use the lisp code or did you only loaded the project file?
Fred
I loaded the lisp and eecuted the SYMB_ADD_CATEGORY command.
I can reproduce this on two different computers on xp and vista. :-\
Fred
Is it possible that you have a symbol name conflict, or loading the wrong project file?
Unfortunately not, I opened pure AutoCAD without any application and added one supportpath in a new directory to avoid such problems on both workstations.
I can reproduce that the problem won't occur when using the form without the code from top of this thread. I'm absolutely confused.
Fred
I'm out of ideas. Hopefully someone else will test your code.
I'll rewrite the code anew. :(
Fred
Hello
Is there anyone who can reproduce that the leading 0 in the example will be removed from the inputted code 012345 after changing to another control?
I want to stop beating my head on the table because of it.
Fred
Hello Owen,
I added a new source code. Here you can see that OnEditChanged will be fired before OnKillFocus will be fired although the content was not changed. Steps to reproduce:
1. call the command
2. note the string 01 in the field Schlüsselnummer
3. click into the text box Schlüsselnummer behind the last character and do not write anything
4. note what is written last in the command line
5. click into the textbox Beschreibung.
6. note in the command line that OnEditChanged was called although nothing was changed by me ??? ???
7. note that after OnEditChanged OnKillFocus was called
8. note that the leading zero disappeared. :'( :'( :'( :'( :'( :'(
Question: why will OnEditChanged be called although I didn't change anything?
Hope anyone can help help help
Fred
Fred,
Using AutoCAD 2008 and the lastest OpenDCL, I downloaded your sample and could not reproduce the problem.
Hi Kelie,
thank you for the time you've spent. Unfortunately, you can't reproduce it, too. I can reproduce this on different computers on different operation systems (all German) with different AutoCAD releases (all German) although in Berlin and in Munich. I have changed now to single line text and built my own text filter.
Thanks for watching.
Fred
I still cannot reproduce the problem. It sounds like perhaps it's only happening in the German version of Windows. I can't imagine why, but stranger things have happened.
Do you have access to an English language version of Windows to test? Is it possible that you have some virus or add-on that is interfering with edit controls on the systems you tested?
Hello Owen,
it's actually frustrating, of course but unfortunately I have no English Windows release.
But I believe that Kelie used a Chinese release and it did work there, too.
Owen: could you reproduce if OnEditChanged was called before OnKillFocus although you didn't change anything?
A colleague of our company did a joke in meaning that it might be a special property of our company that it don't work with on our computers. The computers (workstations and notebooks) I tested have neither a software firewall (but the windows one) nor an antivirus product.
The same colleague rammed a knife in my back in saying that the way it works on our computers (meaning deleting the leading zero) is more correct cause an integer has no leading zero. >:(
I have done some workaround so it works now with string filter (and I filter only the numbers). But I'll keep it in mind. I'll have some interviews on TechCamp in Paris in a few weeks - maybe there are some international partners for testing.
Thanks for watching.
Fred
Fred, when I tested there was never an OnEditChanged event, only OnKillFocus.
Hello everybody,
Leading zero, I should have known that because it's an old known problem. Maybe someone else will have the problem, too that's why I send you the solution. Thanks to Wolfgang who has the same problem, too. When he asked me about that some days ago I remembered that there was a similiar problem in ObjectDCL: After opening a form all textboxes in NumericUnits style show ".5" or "-.06" instead of "0.5" or "-0.06". I have found out that it depends on the setting of the systemvariable DIMZIN. In the German release of Autodesk Architecture there are some dimstyles which uses DIMZIN /= 0. But this setting is neccessary to show the numbers in the right way. Wolfgang has tested successfully: when DIMZIN is set to 0, then the leading zero won't be removed.
Fred