View previous topic :: View next topic |
Author |
Message |
david@windward.net
Joined: 14 Nov 2008 Posts: 14
|
Posted: Mon Nov 17, 2008 7:34 pm Post subject: Preview not working |
|
|
When I click on preview I get:
E205: Unable to locate the type (AutoTagServer.ServerControlCenter) in the compiled assembly...
One note, the name of the class is net.windward.autotag.ServerControlCenter - does Globalizer assume that everything is just in the base folder of a project?
thanks - dave |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Mon Nov 17, 2008 9:57 pm Post subject: |
|
|
Globalizer.NET scans the project file and the resource files. It doesn't try to parse the code. This means it makes some initial assumptions about the class name and namespaces for forms/controls. If a form/control is not declared in the default namespace for a project then you may need to set the ResourceName for that form/control (in the Globalizer.NET Properties tab) to match the fully qualified typename for the form. _________________ Infralution Support |
|
Back to top |
|
|
david@windward.net
Joined: 14 Nov 2008 Posts: 14
|
Posted: Mon Nov 17, 2008 10:22 pm Post subject: |
|
|
OW - we have something like 78 forms, and none are in the default namespace.
Also, found 2 errors with this. First is you must change & save the file for the change to be seen.
Second, I now get ArgumentOutOfRangeExcpetion, Text length must be less than 64 characters long. This is for code that builds and runs fine. If I click Ignore it then displays fine.
??? - thanks - dave |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Nov 18, 2008 7:07 am Post subject: |
|
|
Quote: | OW - we have something like 78 forms, and none are in the default namespace. |
Can you set the default project namespace so that it is at least correct for the majority of your forms/controls. Then you won't have to change so many. You only have to make the changes once (they aren't overwritten when you scan again).
Quote: | Also, found 2 errors with this. First is you must change & save the file for the change to be seen. |
Changes to property settings are not committed until focus is shifted from the Property tab. Just using the main Target->Preview menu doesn't shift the focus. However if you right click on the Target in the Workspace explorer then use the context menu to select Preview it will change focus and so the setting will be saved before the Preview is displayed. We will look at ensuring properties are committed when using the main menus.
Quote: | Second, I now get ArgumentOutOfRangeExcpetion, Text length must be less than 64 characters long. This is for code that builds and runs fine. If I click Ignore it then displays fine. |
Where does this error appear (as a dialog or in the Output Window)? Can you post full details including dialog title. I suspect that this may be an error caused by the form constructor calling code that requires initializiation. Because Globalizer.NET creates an instance of the form using reflection it bypasses your normal application startup code. If your default form constructor calls code that depends on initialization by application startup code then you can get errors that may not occur during normal running of the application. See the section in the online help on "Previewing Forms and Controls" for tips on how to address these issues. _________________ Infralution Support |
|
Back to top |
|
|
david@windward.net
Joined: 14 Nov 2008 Posts: 14
|
Posted: Tue Nov 18, 2008 6:30 pm Post subject: |
|
|
Infralution wrote: |
Can you set the default project namespace so that it is at least correct for the majority of your forms/controls. Then you won't have to change so many. You only have to make the changes once (they aren't overwritten when you scan again). |
Nope - we have the forms spread across about 20 directories - and everything is built using a logical namespace structure. Not only that, who wants 70+ forms all in one directory - that would be a mess.
Have you considered searching the exe/dll for a class with that name and then using the full namespace.class of that when you set it? I would guess that this is something anyone with a program that has more then 3 - 5 forms will need.
thanks - dave |
|
Back to top |
|
|
david@windward.net
Joined: 14 Nov 2008 Posts: 14
|
Posted: Tue Nov 18, 2008 6:32 pm Post subject: |
|
|
ps - on the exception when bringing up the form - yes it was code being passed as parameter that would never happen in normal operation. I check the string length now.
thanks - dave |
|
Back to top |
|
|
Infralution
Joined: 28 Feb 2005 Posts: 5027
|
Posted: Tue Nov 18, 2008 9:45 pm Post subject: |
|
|
Quote: | Have you considered searching the exe/dll for a class with that name and then using the full namespace.class of that when you set it? I would guess that this is something anyone with a program that has more then 3 - 5 forms will need. |
The reason we don't load the assembly at scan time is to avoid forcing you to compile before you can scan. This means that Globalizer.NET can be used right from the beginning of development. This is an issue we will revisit however. _________________ Infralution Support |
|
Back to top |
|
|
|