[TIP] Go to Source in Visual Mobile Designer

There is new feature in Visual Mobile Designer in Mobility Pack 5.0 I still don't know how to call it... I liked name "Splitted Guarded Block". I read "Multi Guarded Blocks" somewhere. The name isn't so much important for me and probably even for you. I'll rather describe what is this feature about.

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
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

This is the main channel to share news, tips and other stuff related to my work. Sometimes you can find even personal stuff. Enjoy your reading...

Search

Archives
« May 2015
SunMonTueWedThuFriSat
     
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
      
Today
news
Blogroll

No bookmarks in folder

OldNews
MyTrash
NavBar
NetBeans
LinksToBeExpanded