IDE: codehelp editor: fixed changing node value

git-svn-id: trunk@13865 -
This commit is contained in:
mattias 2008-01-24 19:36:47 +00:00
parent a939ffbd9b
commit c050bb9441
3 changed files with 75 additions and 7 deletions

View File

@ -92,6 +92,8 @@
<element name="EMenuError">
<short>
<i>EMenuError </i>
- Exception handler for error in Menu access</short>
</element>
<!-- object Visibility: default -->
@ -120,10 +122,14 @@
<element name="TMenuActionLink">
<short>
<i>TMenuActionLink</i>
: defines the link between a selected menu item and its corresponding action</short>
<descr>
<p>
<i>TMenuActionLink</i>
: defines the link between a selected menu item and its corresponding action. Properties are protected and not readily accessible by application programmers.</p>
</descr>
</element>
@ -385,10 +391,14 @@
<element name="TMenuItem">
<short>
<i>TMenuItem</i>
- The base structure of each item in a Menu.</short>
<descr>
<p>
<i>TMenuItem</i>
- The base structure of each item in a Menu.</p>
<p>This Component does the hard work of processing the Items found in the various types of menus. It defines a lot of the properties and methods used in the various sorts of menu, including <link id="TMainMenu">TMainMenu</link>, <link id="TMenu">TMenu</link> and <link id="TPopUpMenu">TPopUpMenu</link></p>
</descr>
@ -1453,88 +1463,118 @@
<element name="TMenuItem.Action">
<short>
<i>Action</i>
- the default action associated with this Menu Item</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.AutoCheck">
<short>
<i>AutoCheck</i>
: Whether a check mark is automatically added when the item is selected</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.Caption">
<short>
<i>Caption</i>
: The text that appears on the Menu Bar at run-time</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.Checked">
<short>
<i>Checked</i>
: whether a check mark appears on the Menu Bar</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.Default">
<short>
<i>Default</i>
: is this option the default selection? If so, it usually appears in Bold and is selected by hitting ENTER</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.Enabled">
<short>
<i>Enabled</i>
: can this option be selected? If Not Enabled, usually 'greyed-out'</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.Bitmap">
<short>
<i>BitMap</i>
: an optional picture beside the MenuItem Caption</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.GroupIndex">
<short>
<i>GroupIndex</i>
: the sequence number in a group of mutually exclusive RadioItem choices</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.HelpContext">
<short>
<i>HelpContext</i>
- an index to the context-sensitive help string to be used</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.Hint">
<short>
<i>Hint</i>
: a pop-up help message that appears when the mouse hovers over an item.</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.ImageIndex">
<short>
<i>ImageIndex </i>
- number in a list of images for use in illustrating menu items</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.RadioItem">
<short>
<i>RadioItem</i>
: whether the item is part of a group of mutually exclusive choices.</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.RightJustify">
<short>
<i>RightJustify</i>
: the position of the Caption in the Menu Panel. Default (False) is Left Justify</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.ShortCut">
<short>
<i>ShortCut</i>
- the quick key sequence to be used in selecting this menu item</short>
<descr>
<p>
<i>ShortCut</i>
- the quick key sequence to be used in selecting this menu item</p>
<p>If you select this property in the Object Inspector, a list-box will appear with choices for various key-combinations to be used. The chosen key-sequence will be displayed, at run-time, on the menu drop-down next to the caption for the menu item.</p>
</descr>
@ -1549,18 +1589,24 @@
<element name="TMenuItem.SubMenuImages">
<short>
<i>SubMenuImages </i>
- will images be shown for sub-menu items as well as the main item?</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.Visible">
<short>
<i>Visible</i>
- can the item be seen?</short>
</element>
<!-- property Visibility: published -->
<element name="TMenuItem.OnClick">
<short>
<i>OnClick </i>
- event handler for selection of this menu item</short>
</element>
<!-- enumeration type Visibility: default -->
@ -1585,10 +1631,14 @@
<element name="TMenu">
<short>
<i>TMenu</i>
: The base class for all menus</short>
<descr>
<p>
<i>TMenu</i>
: The base class for all menus</p>
<p>The class definition contains very few public or published properties or methods accessible to the application programmer, but contains the entry <i>Items </i>which points to the Menu Items that appear in the menu displays</p>
</descr>
@ -1852,22 +1902,30 @@
<element name="TMenu.Items">
<short>
<i>Items</i>
- a list of Menu Items to be included in the menu display</short>
</element>
<!-- property Visibility: published -->
<element name="TMenu.Images">
<short>
<i>Images </i>
- a list of images from which entries can be selected to illustrate menu choices</short>
</element>
<!-- object Visibility: default -->
<element name="TMainMenu">
<short>
<i>TMainMenu</i>
- the Main Menu that appears at the top of most windows</short>
<descr>
<p>
<i>TMainMenu</i>
- the Main Menu that appears at the top of most windows; form designers can
customise by choosing various menu items.</p>
<p>Main Menu is a non-visible component : that is, if the icon is selected from the Component Pallete and placed on the Form, it will not appear at Run-time. Instead, a Menu bar with a structure defined by the Menu Editor will appear.</p>
@ -1914,10 +1972,14 @@ customise by choosing various menu items.</p>
<element name="TPopupMenu">
<short>
<i>TPopupMenu </i>
- a menu panel that pops up on the desktop when the right mouse button is clicked</short>
<descr>
<p>
<i>TPopupMenu</i>
: a menu panel that pops up on the desktop when the right mouse button is clicked.</p>
<p>Inherits all the properties of <i>TMenu</i> (including the properties of <i>TMenuItem</i>), but has some new properties (procedure <i>PopUp</i> and procedure <i>Close</i>) that define its behaviour when actually invoked.</p>
<p>PopupPoint defines the position of the Popup menu, usually at the current cursor position.</p>
@ -2115,13 +2177,19 @@ customise by choosing various menu items.</p>
<topic name="HowToUseMenus">
<short>
<i>HowToUseMenus</i>
- hints for creating Menus for your Forms</short>
<descr>
<p>
<i>HowToUseMenus</i>
- hints for creating Menus for your Forms</p>
<p>
<i>TMainMenu</i>
is the Main Menu that appears at the top of most forms; form designers can
customise by choosing various menu items. <i>TPopupMenu</i> is a menu window that pops up with pertinent, usually context-sensitive, details and choices when the right mouse button is clicked near a control</p>
<p>Main Menu is a non-visible component : that is, if the icon is selected from the Component Palette and placed on the Form, it will not appear at Run-time. Instead, a Menu bar with a structure defined by the Menu Editor will appear. Popup menus, placed on the form by selecting the icon from the Component Palette, do not appear at all unless the right mouse button is clicked on a control that owns such a menu.</p>

View File

@ -453,9 +453,12 @@ begin
end else if GetChildValuesAsString(Child)<>NewValue then begin
// change node
DocChanging;
while Child.FirstChild<>nil do
Child.FirstChild.Free;
DebugLn(['TLazFPDocFile.CheckAndWriteNode Changing ',Node.NodeName,' ChildName=',Child.NodeName,' OldValue=',Child.FirstChild.NodeValue,' NewValue="',NewValue,'"']);
DebugLn(['TLazFPDocFile.CheckAndWriteNode Changing ',Node.NodeName,
' ChildName=',Child.NodeName,
' OldValue=',GetChildValuesAsString(Child),
' NewValue="',NewValue,'"']);
while Child.LastChild<>nil do
Child.RemoveChild(Child.LastChild);
TextNode := Doc.CreateTextNode(NewValue);
Child.AppendChild(TextNode);
DocChanged;

View File

@ -756,9 +756,8 @@ var
begin
if not FModified then Exit; // nothing changed => exit
FModified:=false;
if (fChain=nil) or (fChain.Count=0) then exit;
if not fChain.IsValid then exit;
if Doc=nil then exit;
Values:=GetValues;
if not WriteNode(fChain[0],Values,true) then begin
DebugLn(['TLazDocForm.Save FAILED']);
@ -908,9 +907,7 @@ begin
end;
Include(FFlags,fpdefWriting);
DebugLn(['TFPDocEditor.WriteNode AAA1 ',dbgsName(CurDocFile)]);
CurDocFile.BeginUpdate;
DebugLn(['TFPDocEditor.WriteNode AAA2 ',dbgsName(CurDocFile)]);
try
CurDocFile.SetChildValue(TopNode,'short',Values[fpdiShort]);
CurDocFile.SetChildValue(TopNode,'descr',Values[fpdiDescription]);