[Gambas-user] Wanted:explanation of some IDE code

Benoît Minisini gambas at ...1...
Mon May 11 16:14:45 CEST 2009


> Hi all/Benoit/Devlelopers et al,
>
> I'm in the process of (very poorly) attempting to write a help module for
> my program, and decided (probably wrongly) to use bits of the IDE, so I've
> been trying to understand the IDE.
>
> I started a new project and put the bits in it I thought I'd need, and I've
> screwed something up because this routine in FTextEditor.class won't run -
> it dosn't recognise the line Save.Begin, Save.end.
>
> so, I wondered where Save.Begin/End are located. Probably a dumb question.
>
> Thanks in anticipation.
>
> PS. such a pity the IDE contains no comment on the code.
>
> Regards
>
> Richard
>
> Public Function Save() As Boolean
>
>   'Project.Config.WriteString("/Window" &/ Name &/ "Pos",
>   '  CStr(ME.X) & "," & CStr(ME.Y) & "," & CStr(ME.Width) & "," &
> CStr(ME.Height))
>
>   If Not $bModify Then Return
>
>  Save.Begin(Path)
>
>   File.Save(Path, Editor.Text)
>   Editor.Reset
>   $bModify = False
>   DrawTitle
>
>   Save.End()
>
> Catch
>
>   Return Save.Error()
>
> End
>

If the function is called Save.XXX, then you should look in a class or a 
module named "Save".

Anyway, I don't understand why you need the code of the FTextEditor.class, 
which *edits* text, for writing an help module. You should better put some 
rich text in a TextEdit widget, shouldn't you?

-- 
Benoît




More information about the User mailing list