[TIP] Go to Source in Visual Mobile Designer
By lukas on Oct 14, 2005
When you created a MIDlet in Visual Mobile Designer in 4.1 then all automatically generated code appeared as big guarded block - guarded means that you cannot change it directly, you cannot write to the parts of code in blue in editor. The only way how you could create pre/post-init, pre/post-action section of code was a Property Editor where you could write a code for particular component or transition. You can invoke the property editor by double click on transition or click on '...' button of Action property or Pre/Post-Init User Code property in Properties window in 4.1.
It has changed in 5.0
You can directly change or add the pre/post-init or pre/post-action part of code because it isn't in the guarded block anymore. The one big guarded block was splitted to lot of guarded blocks mixed with un-guarded sections. These unguarded section are the parts that were edited by the property editor in 4.1
Because it can be hard to find the particular part of unguarded code in the multi gurded blocks mishmash therefor there is popup menu action "Go to Source" available on right click on components and transitions in Flow Designer. The same action is available in Screen Designer - select an form item and "Go to Source".
This makes you more productive.
The second not-so-comfortable way how to get to a method in source code in editor is 'Navigator'. The 'Navigator' window is hidden behind 'Inspector' window in Flow or Screen Designer. Click on its tab and then select the method that you'd like to see. 'Source' opens on that method in editor.
What it will mean to your old generated code from 4.1?
The syntax of generated code has changed from 4.1 to 5.0 When you'll open a visual MIDlet in 4.1-style then warning dialog appears. This dialog should notice you about the change in generated code. Then the code will be changed to 5.0-style. Maybe you wanna keep the old syntax for any reason. Yes, it's possible. Don't save the regenerated document only 'Discard' it when you're closing it
You cannot save your changes to old 4.1-style visual midlet made in 5.0 back in 4.1-style. You cannot save new visual MIDlet in the old 4.1-style. The only way is to switch to 5.0-style or stay with Mobility Pack 4.1